Package org.opencms.ui.apps.search
Class CmsSearchReplaceSettings
- java.lang.Object
-
- org.opencms.ui.apps.search.CmsSearchReplaceSettings
-
- All Implemented Interfaces:
java.io.Serializable
public class CmsSearchReplaceSettings extends java.lang.Object implements java.io.Serializable
Settings bean for the dialog.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description CmsSearchReplaceSettings()
Bean constructor with cms object for path validation.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsResource
getElementResource()
Get element to search for.java.lang.String
getLocale()
Returns the locale.java.lang.String
getMessage()
java.util.List<java.lang.String>
getPaths()
java.lang.String
getProject()
CmsPropertyDefinition
getProperty()
Get property.java.lang.String
getQuery()
Returns the query.java.lang.String
getReplacepattern()
java.lang.String
getResources()
java.lang.String[]
getResourcesArray()
Returns the resources paths in an array.java.lang.String
getSearchpattern()
java.lang.String
getSiteRoot()
Returns the site root.java.lang.String
getSource()
Returns the source.CmsSourceSearchForm.SearchType
getType()
Returns the search type.java.lang.String
getTypes()
Returns the resource type(s).java.lang.String[]
getTypesArray()
Returns the type.java.lang.String
getXpath()
Returns the xpath.boolean
ignoreSubSites()
Should subsites be ignored?boolean
isForceReplace()
Returns the force replace flag, iftrue
the replacement will also be performed if the replacement String is empty.boolean
isOnlyContentValues()
Returns if only content values should be searched and replaced.boolean
isSolrSearch()
Returnstrue
if Solr index is selected and a query was entered.static java.lang.String
replaceElementInPagePattern(CmsResource resource)
Replace element pattern.static java.lang.String
searchElementInPagePattern(CmsResource resource)
Search element in xml page pattern.void
setElementResource(CmsResource resource)
Set Element to search for.void
setForceReplace(boolean forceReplace)
Sets the force replace flag.void
setIgnoreSubSites(boolean ignore)
Set if subsites should be ignored.void
setLocale(java.lang.String locale)
Sets the locale.void
setMessage(java.lang.String message)
void
setOnlyContentValues(boolean onlyContentValue)
Sets if only content values should be searched and replaced.void
setPaths(java.util.List<java.lang.String> paths)
Sets the paths.void
setProject(java.lang.String project)
void
setProperty(CmsPropertyDefinition value)
Sets the property.void
setQuery(java.lang.String query)
Sets the query.void
setReplacepattern(java.lang.String replacepattern)
Sets the replace pattern.void
setResources(java.lang.String resources)
void
setSearchpattern(java.lang.String searchpattern)
Sets the search pattern.void
setSiteRoot(java.lang.String siteRoot)
Sets the site root.void
setSource(java.lang.String source)
Sets the source.void
setType(CmsSourceSearchForm.SearchType type)
Sets the search type.void
setTypes(java.lang.String types)
Sets the resource type(s).void
setXpath(java.lang.String xpath)
Sets the xpath.
-
-
-
Constructor Detail
-
CmsSearchReplaceSettings
public CmsSearchReplaceSettings()
Bean constructor with cms object for path validation.
-
-
Method Detail
-
replaceElementInPagePattern
public static java.lang.String replaceElementInPagePattern(CmsResource resource)
Replace element pattern.- Parameters:
resource
- Resource to replace- Returns:
- String regex
-
searchElementInPagePattern
public static java.lang.String searchElementInPagePattern(CmsResource resource)
Search element in xml page pattern.- Parameters:
resource
- Resource- Returns:
- String regex
-
getElementResource
public CmsResource getElementResource()
Get element to search for.- Returns:
- CmsResource
-
getLocale
public java.lang.String getLocale()
Returns the locale.- Returns:
- the locale
-
getMessage
public java.lang.String getMessage()
- Returns:
- the message
-
getPaths
public java.util.List<java.lang.String> getPaths()
- Returns:
- the paths
-
getProject
public java.lang.String getProject()
- Returns:
- the project
-
getProperty
public CmsPropertyDefinition getProperty()
Get property.- Returns:
- CmsPropertyDefinition
-
getQuery
public java.lang.String getQuery()
Returns the query.- Returns:
- the query
-
getReplacepattern
public java.lang.String getReplacepattern()
- Returns:
- the replace pattern
-
getResources
public java.lang.String getResources()
- Returns:
- the resources
-
getResourcesArray
public java.lang.String[] getResourcesArray()
Returns the resources paths in an array.- Returns:
- the resources paths in an array.
-
getSearchpattern
public java.lang.String getSearchpattern()
- Returns:
- the search pattern
-
getSiteRoot
public java.lang.String getSiteRoot()
Returns the site root.- Returns:
- the siteRoot
-
getSource
public java.lang.String getSource()
Returns the source.- Returns:
- the source
-
getType
public CmsSourceSearchForm.SearchType getType()
Returns the search type.- Returns:
- the search type
-
getTypes
public java.lang.String getTypes()
Returns the resource type(s).- Returns:
- the type
-
getTypesArray
public java.lang.String[] getTypesArray()
Returns the type.- Returns:
- the type
-
getXpath
public java.lang.String getXpath()
Returns the xpath.- Returns:
- the xpath
-
ignoreSubSites
public boolean ignoreSubSites()
Should subsites be ignored?- Returns:
- boolean
-
isForceReplace
public boolean isForceReplace()
Returns the force replace flag, iftrue
the replacement will also be performed if the replacement String is empty.- Returns:
- the force replace flag
-
isOnlyContentValues
public boolean isOnlyContentValues()
Returns if only content values should be searched and replaced.- Returns:
- if only content values should be searched and replaced
-
isSolrSearch
public boolean isSolrSearch()
Returnstrue
if Solr index is selected and a query was entered.- Returns:
true
if Solr index is selected and a query was entered
-
setElementResource
public void setElementResource(CmsResource resource)
Set Element to search for.- Parameters:
resource
- CmsResource
-
setForceReplace
public void setForceReplace(boolean forceReplace)
Sets the force replace flag.- Parameters:
forceReplace
- the force replace flag to set
-
setIgnoreSubSites
public void setIgnoreSubSites(boolean ignore)
Set if subsites should be ignored.- Parameters:
ignore
- boolean
-
setLocale
public void setLocale(java.lang.String locale)
Sets the locale.- Parameters:
locale
- the locale to set
-
setMessage
public void setMessage(java.lang.String message)
- Parameters:
message
- the message to set
-
setOnlyContentValues
public void setOnlyContentValues(boolean onlyContentValue)
Sets if only content values should be searched and replaced.- Parameters:
onlyContentValue
- if only content values should be searched and replaced
-
setPaths
public void setPaths(java.util.List<java.lang.String> paths)
Sets the paths.- Parameters:
paths
- the paths to set
-
setProject
public void setProject(java.lang.String project)
- Parameters:
project
- the project to work in
-
setProperty
public void setProperty(CmsPropertyDefinition value)
Sets the property.- Parameters:
value
- CmsPropertyDefinition
-
setQuery
public void setQuery(java.lang.String query)
Sets the query.- Parameters:
query
- the query to set
-
setReplacepattern
public void setReplacepattern(java.lang.String replacepattern)
Sets the replace pattern.- Parameters:
replacepattern
- the replace pattern
-
setResources
public void setResources(java.lang.String resources)
- Parameters:
resources
- the resources to set
-
setSearchpattern
public void setSearchpattern(java.lang.String searchpattern)
Sets the search pattern.- Parameters:
searchpattern
- the search pattern
-
setSiteRoot
public void setSiteRoot(java.lang.String siteRoot)
Sets the site root.- Parameters:
siteRoot
- the site root to set
-
setSource
public void setSource(java.lang.String source)
Sets the source.- Parameters:
source
- the source to set
-
setType
public void setType(CmsSourceSearchForm.SearchType type)
Sets the search type.- Parameters:
type
- the search type to set
-
setTypes
public void setTypes(java.lang.String types)
Sets the resource type(s).- Parameters:
types
- the type to set
-
setXpath
public void setXpath(java.lang.String xpath)
Sets the xpath.- Parameters:
xpath
- the xpath to set
-
-