public interface StringSubstitutor
String substitution is a process of substituting a string in a file with another string.
| Modifier and Type | Method and Description |
|---|---|
List<Property> |
getDefaultProperties(PropertyType type)
Get's the default
Property for the given PropertyType, If
the property type is null then all the default properties will be returned. |
StringsubsDefinition |
getStringSubsDefinition()
Get's the string-subs definition object.
|
void |
setAttributePreprocessor(AttributePreprocessor attributePreprocessor)
Set's the
AttributePreprocessor to customize the substitution
process. |
void |
setEntryFactory(SubstitutableFactory factory)
Set's a factory which can process a
FileEntry or an Archive entry
to retrieve all the Substitutable entries. |
void |
setFileBackupLocation(File backupLocation)
TODO: Missing Implementation
|
void |
substituteAll()
Perform's string substitution.
|
void |
substituteComponents(List<String> components)
Perform's string substitution for give components.
|
void |
substituteGroups(List<String> groups)
Perform's string substitution for give groups.
|
void setAttributePreprocessor(AttributePreprocessor attributePreprocessor)
AttributePreprocessor to customize the substitution
process. Attribute preprocessor takes care to retrieve the value of
substitutable key.attributePreprocessor - Custom implementation of AttributePreprocessorvoid setEntryFactory(SubstitutableFactory factory)
FileEntry or an Archive entry
to retrieve all the Substitutable entries.factory - void setFileBackupLocation(File backupLocation)
backupLocation - List<Property> getDefaultProperties(PropertyType type)
Property for the given PropertyType, If
the property type is null then all the default properties will be returned.type - The type for which default properties has to be retrieved.StringsubsDefinition getStringSubsDefinition()
StringSubsDefiniton object
contains the details of component, groups and files used in substitution.
NOTE: This object is updatable.
void substituteAll()
throws StringSubstitutionException
StringSubstitutionException - If any error occurs in string substitution.void substituteComponents(List<String> components) throws StringSubstitutionException
component - List of Component identifiers for which the string
substitution has to be performed.StringSubstitutionException - If any error occurs during
substitution.void substituteGroups(List<String> groups) throws StringSubstitutionException
groups - List of Group identifiers for which the string
substitution has to be performed.StringSubstitutionException - If any error occurs during
substitution.Copyright © 2015. All rights reserved.