Class EnvironmentProcessor
- java.lang.Object
- 
- edu.uiuc.ncsa.security.core.configuration.EnvironmentProcessor
 
- 
 public class EnvironmentProcessor extends Object This class does the work of taking a raw configuration file, possibly with environment elements, snooping the lines for the environment tags, and resolving them It will create the environment for a single document.Usage- Instantiate this class
- Invoke resolveEnvironment(InputStream)on your configuration file
- retrieve the processed file using getRootDocument()
- If you need the environment, it is in getEnv()
 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringENV_END_ELEMENTstatic StringENV_START_ELEMENTstatic StringENV_TAGstatic StringINCLUDE_TAGstatic StringKEY_TAG
 - 
Constructor SummaryConstructors Constructor Description EnvironmentProcessor()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,String>getEnv()DocumentgetRootDocument()The final document when all is said and done.protected booleanisEndEnv(String l)Does the trimmed line end with an environment end tag?protected booleanisStartEnv(String l)Does the trimmed line start and environment entry?protected voidprocessEnvDocument(InputStream inputStream, EnvStack envStack)Process a single env document from any source.voidresolveEnvironment(InputStream inputStream)This starts the environment resolution on a file.protected voidresolveEnvironment(InputStream inputStream, EnvStack stack)voidsetEnv(Map<String,String> env)voidsetRootDocument(Document rootDocument)
 
- 
- 
- 
Field Detail- 
ENV_TAGpublic static final String ENV_TAG - See Also:
- Constant Field Values
 
 - 
KEY_TAGpublic static final String KEY_TAG - See Also:
- Constant Field Values
 
 - 
INCLUDE_TAGpublic static final String INCLUDE_TAG - See Also:
- Constant Field Values
 
 - 
ENV_START_ELEMENTpublic static final String ENV_START_ELEMENT - See Also:
- Constant Field Values
 
 - 
ENV_END_ELEMENTpublic static final String ENV_END_ELEMENT - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
isStartEnvprotected boolean isStartEnv(String l) Does the trimmed line start and environment entry?- Parameters:
- l-
- Returns:
 
 - 
isEndEnvprotected boolean isEndEnv(String l) Does the trimmed line end with an environment end tag?- Parameters:
- l-
- Returns:
 
 - 
getRootDocumentpublic Document getRootDocument() The final document when all is said and done.- Returns:
 
 - 
setRootDocumentpublic void setRootDocument(Document rootDocument) 
 - 
resolveEnvironmentpublic void resolveEnvironment(InputStream inputStream) throws Throwable This starts the environment resolution on a file. It will read through the lines for environment tags, collect them then process them. You do not call this on a file with only environment elements in it.- Parameters:
- inputStream-
- Throws:
- Throwable
 
 - 
resolveEnvironmentprotected void resolveEnvironment(InputStream inputStream, EnvStack stack) throws Throwable - Throws:
- Throwable
 
 - 
processEnvDocumentprotected void processEnvDocument(InputStream inputStream, EnvStack envStack) throws Throwable Process a single env document from any source. At the end of this, every envionment element will have been processed and added to the current environmentgetEnv().- Parameters:
- inputStream-
- Throws:
- Throwable
 
 
- 
 
-