Package com.bea.wli.config.customization
Class FindAndReplaceCustomization
java.lang.Object
com.bea.wli.config.customization.Customization
com.bea.wli.config.customization.FindAndReplaceCustomization
- All Implemented Interfaces:
Serializable
Customization for modifying environment values by doing string substitutions.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionFindAndReplaceCustomization(String description, EnvValueQuery query, String replacement) Constructor for creating a find-and-replace customization -
Method Summary
Modifier and TypeMethodDescriptionReturns a copy of this customization and optionally modifies its target references so that the customization only applies to a reference if it is subsumed by a reference in the filter.getQuery()Return the query that indicates which env values to find.Return the replacement text.Returns the references to resources, folders or projects which the customizations will be applied to.com.bea.wli.config.customizations.CustomizationTypetoXML()Returns an xml representation for this customizationMethods inherited from class com.bea.wli.config.customization.Customization
fromXML, fromXML, fromXML, fromXML, getDescription, toXML, toXML
-
Field Details
-
serialVersionUID
public static final long serialVersionUID- See Also:
-
-
Constructor Details
-
FindAndReplaceCustomization
Constructor for creating a find-and-replace customization- Parameters:
description- the user given description for this customizationquery- the query that indicates which env values to findreplacement- the replacement text. This text will be substituted for the env value pattern given in the query.
-
-
Method Details
-
getQuery
Return the query that indicates which env values to find.- Returns:
- the environment value query
-
getReplacement
Return the replacement text. This text will be substituted for the env value pattern given in the query.- Returns:
- the replacement text
-
getTargets
Description copied from class:CustomizationReturns the references to resources, folders or projects which the customizations will be applied to.- Specified by:
getTargetsin classCustomization- Returns:
- the references which the customizations will be applied to
-
toXML
public com.bea.wli.config.customizations.CustomizationType toXML() throws org.apache.xmlbeans.XmlExceptionDescription copied from class:CustomizationReturns an xml representation for this customization- Specified by:
toXMLin classCustomization- Returns:
- the xml document
- Throws:
org.apache.xmlbeans.XmlException
-
clone
Description copied from class:CustomizationReturns a copy of this customization and optionally modifies its target references so that the customization only applies to a reference if it is subsumed by a reference in the filter. This operation essentially applies the customization to a smaller set of references. The target references is filtered so that one of the following happens:- if a target reference is in the filter then it is kept in the clone as well.
- otherwise if a target reference is under a project/folder specified in the filter then it is kept in the clone.
- otherwise, if there is a reference in the filter, that is under a target reference (for example filter contains folder a/b/c, and target contains project a) then the target reference (project a) is replaced with the filter reference (folder a/b/c), effectively narrowing the target reference to a more specific reference.
- otherwise the target reference is removed.
- Specified by:
clonein classCustomization- Parameters:
filter- if filter is null no narrowing is performed, and the customization is cloned as-is.- Returns:
- the copy of this customization
-