本文整理汇总了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);
}
示例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");
}
示例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);
}
示例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");
}
示例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);
}
示例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"));
}
示例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);
}
示例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);
}
示例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");
}
示例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");
}
示例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");
}
}
}
示例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");
}
示例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");
}
示例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");
}
示例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");
}