Package com.marklogic.client.ext.file
Class PropertiesDrivenDocumentFileProcessor
- java.lang.Object
-
- com.marklogic.client.ext.helper.LoggingObject
-
- com.marklogic.client.ext.file.PropertiesDrivenDocumentFileProcessor
-
- All Implemented Interfaces:
DocumentFileProcessor,java.io.FileFilter
- Direct Known Subclasses:
CollectionsFileDocumentFileProcessor,PermissionsFileDocumentFileProcessor
public abstract class PropertiesDrivenDocumentFileProcessor extends LoggingObject implements DocumentFileProcessor, java.io.FileFilter
Base class for processors that look for a special file in each directory and intend to perform some processing based on the contents of that file. By default, that special file is NOT loaded into MarkLogic.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringWILDCARD_KEY-
Fields inherited from class com.marklogic.client.ext.helper.LoggingObject
logger
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPropertiesDrivenDocumentFileProcessor(java.lang.String propertiesFilename)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description booleanaccept(java.io.File file)java.util.Map<java.io.File,java.util.Properties>getPropertiesCache()java.lang.StringgetPropertiesFilename()protected java.lang.StringgetPropertyValue(java.util.Properties properties, java.lang.String propertyName)protected TokenReplacergetTokenReplacer()protected java.util.PropertiesloadProperties(java.io.File propertiesFile)DocumentFileprocessDocumentFile(DocumentFile documentFile)protected abstract voidprocessProperties(DocumentFile documentFile, java.util.Properties properties)voidsetTokenReplacer(TokenReplacer tokenReplacer)-
Methods inherited from class com.marklogic.client.ext.helper.LoggingObject
format
-
-
-
-
Field Detail
-
WILDCARD_KEY
protected static final java.lang.String WILDCARD_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
accept
public boolean accept(java.io.File file)
- Specified by:
acceptin interfacejava.io.FileFilter
-
processDocumentFile
public DocumentFile processDocumentFile(DocumentFile documentFile)
- Specified by:
processDocumentFilein interfaceDocumentFileProcessor- Parameters:
documentFile-- Returns:
- null if the file is not accepted, else the incoming DocumentFile
-
processProperties
protected abstract void processProperties(DocumentFile documentFile, java.util.Properties properties)
-
loadProperties
protected java.util.Properties loadProperties(java.io.File propertiesFile) throws java.io.IOException- Throws:
java.io.IOException
-
getPropertyValue
protected java.lang.String getPropertyValue(java.util.Properties properties, java.lang.String propertyName)
-
getPropertiesCache
public java.util.Map<java.io.File,java.util.Properties> getPropertiesCache()
-
getPropertiesFilename
public java.lang.String getPropertiesFilename()
-
setTokenReplacer
public void setTokenReplacer(TokenReplacer tokenReplacer)
-
getTokenReplacer
protected TokenReplacer getTokenReplacer()
-
-