Package org.apache.catalina.storeconfig
Class StoreContextAppender
java.lang.Object
org.apache.catalina.storeconfig.StoreAppender
org.apache.catalina.storeconfig.StoreContextAppender
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiondefaultInstance
(Object bean) Generate a real default StandardContextprotected File
getAppBase
(StandardHost host) protected String
getDefaultWorkDir
(StandardContext context) Make default Work Dir.protected File
getDocBase
(StandardContext context, File appBase) boolean
isPrintValue
(Object bean, Object bean2, String attrName, StoreDescription desc) Print Context Values.protected void
printAttribute
(PrintWriter writer, int indent, Object bean, StoreDescription desc, String attributeName, Object bean2, Object value) Store the specified of the specified JavaBean.Methods inherited from class org.apache.catalina.storeconfig.StoreAppender
checkAttribute, isPersistable, printAttributes, printAttributes, printCloseTag, printIndent, printOpenTag, printTag, printTagArray, printTagContent, printTagValueArray, printValue
-
Constructor Details
-
StoreContextAppender
public StoreContextAppender()
-
-
Method Details
-
printAttribute
protected void printAttribute(PrintWriter writer, int indent, Object bean, StoreDescription desc, String attributeName, Object bean2, Object value) Store the specified of the specified JavaBean. Adds special handling fordocBase
.- Overrides:
printAttribute
in classStoreAppender
- Parameters:
writer
- PrintWriter to which we are storingindent
- Indentation levelbean
- The current beandesc
- RegistryDescriptor from this beanattributeName
- The attribute name to storebean2
- A default instance of the bean for comparisonvalue
- The attribute value
-
isPrintValue
Print Context Values.- Special handling to default workDir.
- Don't save path at external context.xml
- Don't generate docBase for host.appBase webapps
- Overrides:
isPrintValue
in classStoreAppender
- Parameters:
bean
- original beanbean2
- default beanattrName
- attribute namedesc
- StoreDescription from bean- Returns:
true
if the value should be stored
-
getAppBase
-
getDocBase
-
getDefaultWorkDir
Make default Work Dir.- Parameters:
context
- The context- Returns:
- The default working directory for the context.
-
defaultInstance
Generate a real default StandardContextTODO read and interpret the default context.xml and context.xml.default
TODO Cache a Default StandardContext ( with reloading strategy)
TODO remove really all elements, but detection is hard... To Listener or Valve from same class?
- Overrides:
defaultInstance
in classStoreAppender
- Parameters:
bean
- The bean- Returns:
- an object from same class as bean parameter
- Throws:
ReflectiveOperationException
- Error creating a new instance- See Also:
-