public class CmsSearchIndexSource extends java.lang.Object implements java.lang.Comparable<CmsSearchIndexSource>
构造器和说明 |
---|
CmsSearchIndexSource()
Creates a new CmsSearchIndexSource.
|
限定符和类型 | 方法和说明 |
---|---|
void |
addConfigurationParameter(java.lang.String key,
java.lang.String value)
Adds a parameter.
|
void |
addDocumentType(java.lang.String key)
Adds the name of a document type.
|
void |
addResourceName(java.lang.String resourceName)
Adds the path of a Cms resource.
|
int |
compareTo(CmsSearchIndexSource obj)
Returns
0 if the given object is an index source with the same name. |
boolean |
equals(java.lang.Object obj)
Two index sources are considered equal if their names as returned by
getName() is equal. |
java.util.List<java.lang.String> |
getDocumentTypes()
Returns the list of names (Strings) of the document types to be indexed.
|
I_CmsIndexer |
getIndexer()
Returns the indexer.
|
java.lang.String |
getIndexerClassName()
Returns the class name of the indexer.
|
java.lang.String |
getName()
Returns the logical key/name of this search index source.
|
java.lang.String |
getParam(java.lang.String key)
Returns the value for a specified parameter key.
|
java.util.Map<java.lang.String,java.lang.String> |
getParams()
Returns the map of optional key/value parameters.
|
java.util.List<java.lang.String> |
getResourcesNames()
Returns the list of VFS resources to be indexed.
|
int |
hashCode()
Overriden to be consistents with overridden method
. |
boolean |
isContaining(java.lang.String rootPath)
Returns
true in case the given resource root path is contained in the list of
configured resource names of this index source. |
boolean |
isIndexing(java.lang.String rootPath,
java.lang.String documentType)
Returns
true in case the given resource root path is contained in the list of
configured resource names, and the given document type name is contained in the
list if configured document type names of this index source. |
boolean |
removeDocumentType(java.lang.String key)
Removes the name of a document type from the list of configured types of this index source.
|
void |
setDocumentTypes(java.util.List<java.lang.String> documentTypes)
Sets the list of document type names (Strings) to be indexed.
|
void |
setIndexerClassName(java.lang.String indexerClassName)
Sets the class name of the indexer.
|
void |
setName(java.lang.String name)
Sets the logical key/name of this search index source.
|
void |
setParams(java.util.Map<java.lang.String,java.lang.String> params)
Sets the map of optional key/value parameters.
|
void |
setResourcesNames(java.util.List<java.lang.String> resources)
Sets the list of Cms resources to be indexed.
|
public void addConfigurationParameter(java.lang.String key, java.lang.String value)
key
- the key/name of the parametervalue
- the value of the parameterpublic void addDocumentType(java.lang.String key)
key
- the name of a document type to addpublic void addResourceName(java.lang.String resourceName)
resourceName
- the path of a Cms resourcepublic int compareTo(CmsSearchIndexSource obj)
0
if the given object is an index source with the same name. Note that the name of an index source has to be unique within OpenCms.
compareTo
在接口中 java.lang.Comparable<CmsSearchIndexSource>
obj
- another index source0
if the given object is an index source with the same nameComparable.compareTo(java.lang.Object)
public boolean equals(java.lang.Object obj)
getName()
is equal.Note that the name of an index source has to be unique within OpenCms.
equals
在类中 java.lang.Object
Object.equals(java.lang.Object)
public java.util.List<java.lang.String> getDocumentTypes()
public I_CmsIndexer getIndexer()
public java.lang.String getIndexerClassName()
public java.lang.String getName()
public java.lang.String getParam(java.lang.String key)
key
- the parameter key/namepublic java.util.Map<java.lang.String,java.lang.String> getParams()
public java.util.List<java.lang.String> getResourcesNames()
public int hashCode()
equals(Object)
.hashCode
在类中 java.lang.Object
Object.hashCode()
public boolean isContaining(java.lang.String rootPath)
true
in case the given resource root path is contained in the list of
configured resource names of this index source.rootPath
- the resource root path to checktrue
in case the given resource root path is contained in the list of
configured resource names of this index sourcegetResourcesNames()
public boolean isIndexing(java.lang.String rootPath, java.lang.String documentType)
true
in case the given resource root path is contained in the list of
configured resource names, and the given document type name is contained in the
list if configured document type names of this index source.rootPath
- the resource root path to checkdocumentType
- the document type factory name to checktrue
in case the given resource root path is contained in the list of
configured resource names, and the given document type name is contained in the
list if configured document type names of this index sourceisContaining(String)
,
getDocumentTypes()
public boolean removeDocumentType(java.lang.String key)
key
- the name of the document type to removepublic void setDocumentTypes(java.util.List<java.lang.String> documentTypes)
documentTypes
- the list of document type names (Strings) to be indexedpublic void setIndexerClassName(java.lang.String indexerClassName) throws CmsIllegalArgumentException
An Exception is thrown to allow GUI-display of wrong input.
indexerClassName
- the class name of the indexerCmsIllegalArgumentException
- if the given String is not a fully qualified classname (within this Java VM)public void setName(java.lang.String name) throws CmsIllegalArgumentException
name
- the logical key/name of this search index sourceCmsIllegalArgumentException
- if argument name is null, an empty or whitespace-only Strings
or already used for another indexsource's name.public void setParams(java.util.Map<java.lang.String,java.lang.String> params)
params
- the map of optional key/value parameterspublic void setResourcesNames(java.util.List<java.lang.String> resources)
resources
- the list of Cms resources (Strings) to be indexed