当前位置: 首页>>代码示例>>Java>>正文


Java Digester.addSetProperties方法代码示例

本文整理汇总了Java中org.apache.tomcat.util.digester.Digester.addSetProperties方法的典型用法代码示例。如果您正苦于以下问题:Java Digester.addSetProperties方法的具体用法?Java Digester.addSetProperties怎么用?Java Digester.addSetProperties使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.apache.tomcat.util.digester.Digester的用法示例。


在下文中一共展示了Digester.addSetProperties方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createStopDigester

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * Create and configure the Digester we will be using for shutdown.
 */
protected Digester createStopDigester() {

    // Initialize the digester
    Digester digester = new Digester();
    digester.setUseContextClassLoader(true);

    // Configure the rules we need for shutting down
    digester.addObjectCreate("Server",
                             "org.apache.catalina.core.StandardServer",
                             "className");
    digester.addSetProperties("Server");
    digester.addSetNext("Server",
                        "setServer",
                        "org.apache.catalina.Server");

    return (digester);

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:22,代码来源:Catalina.java

示例2: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>Add the set of Rule instances defined in this RuleSet to the
 * specified <code>Digester</code> instance, associating them with
 * our namespace URI (if any).  This method should only be called
 * by a Digester instance.</p>
 *
 * @param digester Digester instance to which the new Rule instances
 *  should be added.
 */
public void addRuleInstances(Digester digester) {

    digester.addObjectCreate(prefix + "Realm",
                             null, // MUST be specified in the element,
                             "className");
    digester.addSetProperties(prefix + "Realm");
    digester.addSetNext(prefix + "Realm",
                        "setRealm",
                        "org.apache.catalina.Realm");

    digester.addObjectCreate(prefix + "Realm/Realm",
                             null, // MUST be specified in the element
                             "className");
    digester.addSetProperties(prefix + "Realm/Realm");
    digester.addSetNext(prefix + "Realm/Realm",
                        "addRealm",
                        "org.apache.catalina.Realm");

}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:RealmRuleSet.java

示例3: createStopDigester

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * Create and configure the Digester we will be using for shutdown.
 */
protected Digester createStopDigester() {

    // Initialize the digester
    Digester digester = new Digester();

    // Configure the rules we need for shutting down
    digester.addObjectCreate("Server",
                             "org.apache.catalina.core.StandardServer",
                             "className");
    digester.addSetProperties("Server");
    digester.addSetNext("Server",
                        "setServer",
                        "org.apache.catalina.Server");

    return (digester);

}
 
开发者ID:WhiteBearSolutions,项目名称:WBSAirback,代码行数:21,代码来源:Catalina.java

示例4: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>Add the set of Rule instances defined in this RuleSet to the
 * specified <code>Digester</code> instance, associating them with
 * our namespace URI (if any).  This method should only be called
 * by a Digester instance.</p>
 *
 * @param digester Digester instance to which the new Rule instances
 *  should be added.
 */
@Override
public void addRuleInstances(Digester digester) {

    digester.addObjectCreate(prefix + "Realm",
                             null, // MUST be specified in the element,
                             "className");
    digester.addSetProperties(prefix + "Realm");
    digester.addSetNext(prefix + "Realm",
                        "setRealm",
                        "org.apache.catalina.Realm");

    digester.addObjectCreate(prefix + "Realm/Realm",
                             null, // MUST be specified in the element
                             "className");
    digester.addSetProperties(prefix + "Realm/Realm");
    digester.addSetNext(prefix + "Realm/Realm",
                        "addRealm",
                        "org.apache.catalina.Realm");

}
 
开发者ID:WhiteBearSolutions,项目名称:WBSAirback,代码行数:30,代码来源:RealmRuleSet.java

示例5: createDigester

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * Create the digester which will be used to parse context config files.
 */
protected static Digester createDigester(String contextClassName) {
    Digester digester = new Digester();
    digester.setValidating(false);
    // Add object creation rule
    digester.addObjectCreate("Context", contextClassName, "className");
    // Set the properties on that object (it doesn't matter if extra
    // properties are set)
    digester.addSetProperties("Context");
    return (digester);
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:14,代码来源:HostConfig.java

示例6: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>
 * Add the set of Rule instances defined in this RuleSet to the specified
 * <code>Digester</code> instance, associating them with our namespace URI
 * (if any). This method should only be called by a Digester instance.
 * </p>
 *
 * @param digester
 *            Digester instance to which the new Rule instances should be
 *            added.
 */
@Override
public void addRuleInstances(Digester digester) {

	digester.addObjectCreate(prefix + "Ejb", "org.apache.catalina.deploy.ContextEjb");
	digester.addRule(prefix + "Ejb", new SetAllPropertiesRule());
	digester.addRule(prefix + "Ejb", new SetNextNamingRule("addEjb", "org.apache.catalina.deploy.ContextEjb"));

	digester.addObjectCreate(prefix + "Environment", "org.apache.catalina.deploy.ContextEnvironment");
	digester.addSetProperties(prefix + "Environment");
	digester.addRule(prefix + "Environment",
			new SetNextNamingRule("addEnvironment", "org.apache.catalina.deploy.ContextEnvironment"));

	digester.addObjectCreate(prefix + "LocalEjb", "org.apache.catalina.deploy.ContextLocalEjb");
	digester.addRule(prefix + "LocalEjb", new SetAllPropertiesRule());
	digester.addRule(prefix + "LocalEjb",
			new SetNextNamingRule("addLocalEjb", "org.apache.catalina.deploy.ContextLocalEjb"));

	digester.addObjectCreate(prefix + "Resource", "org.apache.catalina.deploy.ContextResource");
	digester.addRule(prefix + "Resource", new SetAllPropertiesRule());
	digester.addRule(prefix + "Resource",
			new SetNextNamingRule("addResource", "org.apache.catalina.deploy.ContextResource"));

	digester.addObjectCreate(prefix + "ResourceEnvRef", "org.apache.catalina.deploy.ContextResourceEnvRef");
	digester.addRule(prefix + "ResourceEnvRef", new SetAllPropertiesRule());
	digester.addRule(prefix + "ResourceEnvRef",
			new SetNextNamingRule("addResourceEnvRef", "org.apache.catalina.deploy.ContextResourceEnvRef"));

	digester.addObjectCreate(prefix + "ServiceRef", "org.apache.catalina.deploy.ContextService");
	digester.addRule(prefix + "ServiceRef", new SetAllPropertiesRule());
	digester.addRule(prefix + "ServiceRef",
			new SetNextNamingRule("addService", "org.apache.catalina.deploy.ContextService"));

	digester.addObjectCreate(prefix + "Transaction", "org.apache.catalina.deploy.ContextTransaction");
	digester.addRule(prefix + "Transaction", new SetAllPropertiesRule());
	digester.addRule(prefix + "Transaction",
			new SetNextNamingRule("setTransaction", "org.apache.catalina.deploy.ContextTransaction"));

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:50,代码来源:NamingRuleSet.java

示例7: createDigester

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * Create the digester which will be used to parse context config files.
 */
protected static Digester createDigester() {
    Digester digester = new Digester();
    digester.setValidating(false);
    // Add object creation rule
    digester.addObjectCreate("Context", "org.apache.catalina.core.StandardContext",
        "className");
    // Set the properties on that object (it doesn't matter if extra 
    // properties are set)
    digester.addSetProperties("Context");
    return (digester);
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:15,代码来源:HostConfig.java

示例8: createDigester

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * Create the digester which will be used to parse context config files.
 *
 * contextClassName: org.apache.catalina.core.StandardContext
 */
protected static Digester createDigester(String contextClassName) {
    Digester digester = new Digester();
    digester.setValidating(false);
    // Add object creation rule
    digester.addObjectCreate("Context", contextClassName, "className");
    // Set the properties on that object (it doesn't matter if extra
    // properties are set)
    digester.addSetProperties("Context");
    return (digester);
}
 
开发者ID:sunmingshuai,项目名称:apache-tomcat-7.0.73-with-comment,代码行数:16,代码来源:HostConfig.java

示例9: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>
 * Add the set of Rule instances defined in this RuleSet to the specified
 * <code>Digester</code> instance, associating them with our namespace URI
 * (if any). This method should only be called by a Digester instance.
 * </p>
 *
 * @param digester
 *            Digester instance to which the new Rule instances should be
 *            added.
 */
@Override
public void addRuleInstances(Digester digester) {

	digester.addObjectCreate(prefix + "Engine", "org.apache.catalina.core.StandardEngine", "className");
	digester.addSetProperties(prefix + "Engine");
	digester.addRule(prefix + "Engine",
			new LifecycleListenerRule("org.apache.catalina.startup.EngineConfig", "engineConfigClass"));
	digester.addSetNext(prefix + "Engine", "setContainer", "org.apache.catalina.Container");

	// Cluster configuration start
	digester.addObjectCreate(prefix + "Engine/Cluster", null, // MUST be
																// specified
																// in the
																// element
			"className");
	digester.addSetProperties(prefix + "Engine/Cluster");
	digester.addSetNext(prefix + "Engine/Cluster", "setCluster", "org.apache.catalina.Cluster");
	// Cluster configuration end

	digester.addObjectCreate(prefix + "Engine/Listener", null, // MUST be
																// specified
																// in the
																// element
			"className");
	digester.addSetProperties(prefix + "Engine/Listener");
	digester.addSetNext(prefix + "Engine/Listener", "addLifecycleListener",
			"org.apache.catalina.LifecycleListener");

	digester.addRuleSet(new RealmRuleSet(prefix + "Engine/"));

	digester.addObjectCreate(prefix + "Engine/Valve", null, // MUST be
															// specified in
															// the element
			"className");
	digester.addSetProperties(prefix + "Engine/Valve");
	digester.addSetNext(prefix + "Engine/Valve", "addValve", "org.apache.catalina.Valve");

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:50,代码来源:EngineRuleSet.java

示例10: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>
 * Add the set of Rule instances defined in this RuleSet to the specified
 * <code>Digester</code> instance, associating them with our namespace URI
 * (if any). This method should only be called by a Digester instance.
 * </p>
 *
 * @param digester
 *            Digester instance to which the new Rule instances should be
 *            added.
 */
@Override
public void addRuleInstances(Digester digester) {

	digester.addObjectCreate(prefix + "Host", "org.apache.catalina.core.StandardHost", "className");
	digester.addSetProperties(prefix + "Host");
	digester.addRule(prefix + "Host", new CopyParentClassLoaderRule());
	digester.addRule(prefix + "Host",
			new LifecycleListenerRule("org.apache.catalina.startup.HostConfig", "hostConfigClass"));
	digester.addSetNext(prefix + "Host", "addChild", "org.apache.catalina.Container");

	digester.addCallMethod(prefix + "Host/Alias", "addAlias", 0);

	// Cluster configuration start
	digester.addObjectCreate(prefix + "Host/Cluster", null, // MUST be
															// specified in
															// the element
			"className");
	digester.addSetProperties(prefix + "Host/Cluster");
	digester.addSetNext(prefix + "Host/Cluster", "setCluster", "org.apache.catalina.Cluster");
	// Cluster configuration end

	digester.addObjectCreate(prefix + "Host/Listener", null, // MUST be
																// specified
																// in the
																// element
			"className");
	digester.addSetProperties(prefix + "Host/Listener");
	digester.addSetNext(prefix + "Host/Listener", "addLifecycleListener", "org.apache.catalina.LifecycleListener");

	digester.addRuleSet(new RealmRuleSet(prefix + "Host/"));

	digester.addObjectCreate(prefix + "Host/Valve", null, // MUST be
															// specified in
															// the element
			"className");
	digester.addSetProperties(prefix + "Host/Valve");
	digester.addSetNext(prefix + "Host/Valve", "addValve", "org.apache.catalina.Valve");

}
 
开发者ID:how2j,项目名称:lazycat,代码行数:51,代码来源:HostRuleSet.java

示例11: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>Add the set of Rule instances defined in this RuleSet to the
 * specified <code>Digester</code> instance, associating them with
 * our namespace URI (if any).  This method should only be called
 * by a Digester instance.</p>
 *
 * @param digester Digester instance to which the new Rule instances
 *  should be added.
 */
@Override
public void addRuleInstances(Digester digester) {

    String pattern = prefix;

    for (int i = 0; i < MAX_NESTED_REALM_LEVELS; i++) {

        if (i > 0) {
            pattern += "/";
        }
        pattern += "Realm";

        digester.addObjectCreate(pattern,
                                 null, // MUST be specified in the element,
                                 "className");
        digester.addSetProperties(pattern);
        if (i == 0) {
            digester.addSetNext(pattern,
                                "setRealm",
                                "org.apache.catalina.Realm");
        } else {
            digester.addSetNext(pattern,
                                "addRealm",
                                "org.apache.catalina.Realm");
        }
    }
}
 
开发者ID:deathspeeder,项目名称:class-guard,代码行数:37,代码来源:RealmRuleSet.java

示例12: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>Add the set of Rule instances defined in this RuleSet to the
 * specified <code>Digester</code> instance, associating them with
 * our namespace URI (if any).  This method should only be called
 * by a Digester instance.</p>
 *
 * @param digester Digester instance to which the new Rule instances
 *  should be added.
 */
@Override
public void addRuleInstances(Digester digester) {

    digester.addObjectCreate(prefix + "Host",
                             "org.apache.catalina.core.StandardHost",
                             "className");
    digester.addSetProperties(prefix + "Host");
    digester.addRule(prefix + "Host",
                     new CopyParentClassLoaderRule());
    digester.addRule(prefix + "Host",
                     new LifecycleListenerRule
                     ("org.apache.catalina.startup.HostConfig",
                      "hostConfigClass"));
    digester.addSetNext(prefix + "Host",
                        "addChild",
                        "org.apache.catalina.Container");

    digester.addCallMethod(prefix + "Host/Alias",
                           "addAlias", 0);

    //Cluster configuration start
    digester.addObjectCreate(prefix + "Host/Cluster",
                             null, // MUST be specified in the element
                             "className");
    digester.addSetProperties(prefix + "Host/Cluster");
    digester.addSetNext(prefix + "Host/Cluster",
                        "setCluster",
                        "org.apache.catalina.Cluster");
    //Cluster configuration end

    digester.addObjectCreate(prefix + "Host/Listener",
                             null, // MUST be specified in the element
                             "className");
    digester.addSetProperties(prefix + "Host/Listener");
    digester.addSetNext(prefix + "Host/Listener",
                        "addLifecycleListener",
                        "org.apache.catalina.LifecycleListener");

    digester.addRuleSet(new RealmRuleSet(prefix + "Host/"));

    digester.addObjectCreate(prefix + "Host/Valve",
                             null, // MUST be specified in the element
                             "className");
    digester.addSetProperties(prefix + "Host/Valve");
    digester.addSetNext(prefix + "Host/Valve",
                        "addValve",
                        "org.apache.catalina.Valve");

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:59,代码来源:HostRuleSet.java

示例13: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
/**
 * <p>Add the set of Rule instances defined in this RuleSet to the
 * specified <code>Digester</code> instance, associating them with
 * our namespace URI (if any).  This method should only be called
 * by a Digester instance.</p>
 *
 * @param digester Digester instance to which the new Rule instances
 *  should be added.
 */
@Override
public void addRuleInstances(Digester digester) {
    
    digester.addObjectCreate(prefix + "Engine",
                             "org.apache.catalina.core.StandardEngine",
                             "className");
    digester.addSetProperties(prefix + "Engine");
    digester.addRule(prefix + "Engine",
                     new LifecycleListenerRule
                     ("org.apache.catalina.startup.EngineConfig",
                      "engineConfigClass"));
    digester.addSetNext(prefix + "Engine",
                        "setContainer",
                        "org.apache.catalina.Container");

    //Cluster configuration start
    digester.addObjectCreate(prefix + "Engine/Cluster",
                             null, // MUST be specified in the element
                             "className");
    digester.addSetProperties(prefix + "Engine/Cluster");
    digester.addSetNext(prefix + "Engine/Cluster",
                        "setCluster",
                        "org.apache.catalina.Cluster");
    //Cluster configuration end

    digester.addObjectCreate(prefix + "Engine/Listener",
                             null, // MUST be specified in the element
                             "className");
    digester.addSetProperties(prefix + "Engine/Listener");
    digester.addSetNext(prefix + "Engine/Listener",
                        "addLifecycleListener",
                        "org.apache.catalina.LifecycleListener");


    digester.addRuleSet(new RealmRuleSet(prefix + "Engine/"));

    digester.addObjectCreate(prefix + "Engine/Valve",
                             null, // MUST be specified in the element
                             "className");
    digester.addSetProperties(prefix + "Engine/Valve");
    digester.addSetNext(prefix + "Engine/Valve",
                        "addValve",
                        "org.apache.catalina.Valve");

}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:55,代码来源:EngineRuleSet.java

示例14: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
private void addRuleInstances(Digester digester, String pattern, String methodName) {
    digester.addObjectCreate(pattern, null /* MUST be specified in the element */,
            "className");
    digester.addSetProperties(pattern);
    digester.addSetNext(pattern, methodName, "org.apache.catalina.Realm");
}
 
开发者ID:liaokailin,项目名称:tomcat7,代码行数:7,代码来源:RealmRuleSet.java

示例15: addRuleInstances

import org.apache.tomcat.util.digester.Digester; //导入方法依赖的package包/类
private void addRuleInstances(Digester digester, String pattern, String methodName) {
	digester.addObjectCreate(pattern,
			null /* MUST be specified in the element */, "className");
	digester.addSetProperties(pattern);
	digester.addSetNext(pattern, methodName, "org.apache.catalina.Realm");
}
 
开发者ID:how2j,项目名称:lazycat,代码行数:7,代码来源:RealmRuleSet.java


注:本文中的org.apache.tomcat.util.digester.Digester.addSetProperties方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。