SAP NetWeaver '04

com.sapportals.wcm.service.indexmanagement
Class AbstractIndex

[contained in: com.sap.km.cm.service.par - km.shared.service.indexmanagement_api.jar]
java.lang.Object
  |
  +--com.sapportals.wcm.service.indexmanagement.AbstractIndex
All Implemented Interfaces:
IIndex
Direct Known Subclasses:
AbstractClassificationIndex

public abstract class AbstractIndex
extends java.lang.Object
implements IIndex

Generic index class, which must be extended by a specialized index implementation.

See Also:
IIndex

Inner Class Summary
static class AbstractIndex.ErrorState
           
static class AbstractIndex.IndexingState
           
 class AbstractIndex.Reindexer
          This class handles the reindex process in a separate thread.
static class AbstractIndex.RunningState
           
static class AbstractIndex.WhatToIndex
           
 
Field Summary
static java.lang.String CFG_PLUGIN_CM_INDEXES
           
static java.lang.String CFG_PLUGIN_CM_INDEXES_INDEX_FOLDERS
           
static java.lang.String INDEX_STRING_AS_STRING
           
protected  java.lang.String m_crawlerProfileId
          ID of the default crawler profile for all index folders of the index.
protected  java.util.List m_crawlerQueue
          Queue of crawlers.
protected  IIndexFolderList m_indexFolders
          list of index folders that are assigned to the index
protected  java.lang.String m_indexGroup
          group of the index
protected  java.lang.String m_indexId
          id of the index
protected  java.lang.String m_indexName
          display name of the index
protected  boolean m_isActive
          Indicates if an index is available or has be deactivated.
protected  java.lang.String m_serviceId
          the id of the implementing index service
protected static java.lang.String m_serviceUserId
          ID of the service user.
static java.lang.String PROPERTIES
           
 
Constructor Summary
AbstractIndex(java.lang.String indexId, java.lang.String indexName, java.lang.String indexGroup, IIndexFolderList indexFolders, java.lang.String serviceId, java.lang.String serviceUserId, java.util.Properties indexServiceProperties)
          Deprecated. as of NW04. Use constructor with crawler profile ID
AbstractIndex(java.lang.String indexId, java.lang.String indexName, java.lang.String indexGroup, IIndexFolderList indexFolders, java.lang.String serviceId, java.lang.String crawlerProfileId, java.lang.String serviceUserId, java.util.Properties indexServiceProperties)
          Constructor.
 
Method Summary
 void addFolderUri(URI folderUri)
          Deprecated. as of NW04. Use add(IIndexFolder) at the IIndexFolderList interface
protected  void checkIndexIsActive()
           
 void checkProperties(java.util.Properties customProperties)
          With this method the properties that should be set could be checked.
 int compareTo(java.lang.Object o)
           
 void createIndexOnServer()
          Creates the index on the index server connected with the CM system.
 void deindexDocument(IResource resource)
          Deindexes a document
 void deindexDocument(RID resourceRid)
          Deindexes a document
 void deindexDocument(URI resourceUri)
          Deprecated. as of NW04. Use deindexDocument(RID)
 void deindexDocuments(IResourceList resources)
          Deindexes a document
 void deindexDocuments(IRidList resourceRids)
          Deindexes a document
 void deindexDocuments(IUriList resourceUris)
          Deprecated. as of NW04. Use deindexDocuments(IRidList)
 void deleteOnServer()
          Deletes the index on the index server connected with the CM system.
static void deleteOnServer(java.lang.String indexId)
           
 void deltaReindex()
          Performs indexing of the documents that are not indexed yet or have been changed since the last crawl.
 boolean equals(java.lang.Object o)
           
 long getActiveTime()
          Gives a rough estimation for the time duration needed for indexing the actual available documents.
static com.sapportals.portal.security.usermanagement.IUser getConfigServiceUser()
          AccessController.doPrivileged stops the security check on this level of the call stack.
 java.lang.String getCrawlerProfileId()
          ID of the default crawler profile for all index folders of the index.
 java.lang.String getDetailsMonitorPageText()
          Get Display Text for details monitor portal page
 java.lang.String getDetailsMonitorPageURL()
          Get details monitor portal page
 java.lang.String getDetailsMonitorURL1()
          Get first details monitor
 java.lang.String getDetailsMonitorURL2()
          Get second details monitor
 java.lang.String getDetailsMonitorURL3()
          Get third details monitor
static PropertyName getDisplayNameAsStringPropName()
           
 AbstractIndex.ErrorState getErrorState(double errorThreshold, double warningThreshold, java.util.Locale locale)
          Returns an error state indicating the overall indexing status.
 IUriList getFolderUris()
          Deprecated. as of NW04. Use getFolderRids()
 java.lang.String[] getFrameSizes()
          Get frame sizes of detailed monitors (and implicit number of detailed monitors)
 IPropertyMap getIndexedProperties()
          Returns the properties, indexed with the documents in the index.
 IIndexFolder getIndexFolderForDocument(RID documentRid)
          Gets the next upper indexFolder for the document
 IIndexFolderList getIndexFolders()
          Folders or start pages that are assigned to the index for indexing.
 java.lang.String getIndexGroup()
          Returns the group of indexes to which the index logically belongs.
 java.lang.String getIndexId()
          Identifies the index within the system.
 AbstractIndex.IndexingState getIndexingState()
           
 java.lang.String getIndexName()
          Non-technical identifier of an index.
 java.util.List getLanguagesOfIndexedDocuments()
          Returns the languages of an index, for which documents exist in.
 int getNumberOfCrawler(RID indexRid)
           
 int getNumberOfDocumentsInQueue()
          Returns the numbers of documents currently in work for indexing, but not in an error state.
 int getNumberOfErrors()
          Returns the numbers of documents failed during indexing.
 int getNumberOfSuccessfullyIndexedDocs()
          Returns the numbers of documents successfully indexed and searchable.
abstract  java.util.Properties getProperties()
          Gets index implementation specific data
 java.lang.String getResourceInfo(RID documentRid)
           
 RID getRID()
          Gets the resource ID of the resource representation of this index.
 AbstractIndex.RunningState getRunningState()
          Returns a state indicating what is actually happening with respect to indexing.
 ISchedulerTimeTable getSchedulerTimeTable()
          Returns the timetable of a schedule for delta index crawling for the index.
 java.lang.String getServiceId()
          Specifies the index implementation that is used for the index.
 java.util.List getServiceTypes(java.util.Locale locale)
          Displays representations of the indexes service types in the locale's language.
abstract  ISupportedOptionSet getSupportedOptions()
          The actions of the additional interfaces of an index are supported actions for the index in question (for example, ISearchIndex, IClassificationIndex) that are supported by the index implementation.
 AbstractIndex.WhatToIndex getWhatToIndex()
           
 java.lang.String getWhatToIndexString()
           
 void indexDocument(IResource resource)
          Indexes a document
 void indexDocument(IResource resource, IResourceEvent resourceEvent)
          Indexes a document
 void indexDocuments(IResourceList resources)
          Indexes a list of documents
 void indexDocuments(IResourceList resources, IResourceEvent resourceEvent)
          Indexes a list of documents
 boolean indexInternalLinks()
           
abstract  void init(java.util.Properties properties)
          Initializes the index with index implementation specific data
 void internalAddQueuedCrawler(IIndexServiceCrawler crawler)
          For internal use only!
protected abstract  void internalDeindexDocuments(IRidList rids)
          Deindexes documents
protected abstract  void internalIndexDocuments(IResourceList resources, IResourceEvent resourceEvent)
          Indexes a list of documents
 void internalRunQueuedIfNoActive()
           
 void internalSetIndexFolders(IIndexFolderList indexFolders)
          For internal use only!
 boolean isActive()
          Returns the information if an index is available or has be set inactive.
 int reduceNumberOfCrawler()
           
 void reindex()
          Reindexes the index
 void reindex(boolean disablePostClearTasks)
          Reindexes the index
 void reindexNotTrainingDocs()
           
protected  void reindexPostClear(IIndexFolderList preClearIndexFolders)
          Deprecated. as of NW04. Does not work with the new crawlers
protected  boolean reindexXPostClear(IIndexFolderList preClearIndexFolders)
           
 void removeAllFolderUris()
          Deprecated. as of NW04. Use clear() at the IIndexFolderList interface
 void removeFolderUri(URI folderUri)
          Deprecated. as of NW04. Use remove(IIndexFolder) at the IIndexFolderList interface
 void repaireConfigurable()
           
 void restartAll()
          Stops all stopped and suspended tasks for indexing.
 void resumeAll()
          Resumes all suspended tasks for indexing.
 boolean setActive(boolean isActive)
          Sets an index inactive or activates it.
 void setActiveDuringStartup(boolean isActive)
           
 void setCrawlerProfileId(java.lang.String crawlerProfileId)
          Sets the ID of the default crawler profile for all index folders of the index.
 void setInactiveIndexHasChanged()
          Sets a property on true, if index documents have changed during index was inactive.
 void setIndexGroup(java.lang.String indexGroup)
          for internal use
 void setIndexingState(AbstractIndex.IndexingState state)
           
 void setIndexName(java.lang.String indexName)
          For internal use only.
 void setNumberOfCrawler(int numOfCrawler)
           
abstract  void setProperties(java.util.Properties properties)
          Sets index implementation specific data
 void setSchedulerTimeTable(ISchedulerTimeTable schedulerTimeTablePar)
          Registers a schedule for delta index crawling for the index with the ISchedulerTimeTable.
 void setStateAndNumberOfCrawler(AbstractIndex.IndexingState state, int numOfCrawler)
           
 void setWhatToIndex(java.lang.String s)
           
 void startReindexer(boolean disablePostClearTasks)
           
 void stopAll()
          Stops all running tasks for indexing.
 void suspendAll()
          Suspends all running tasks for indexing.
 boolean typeShouldBeIndexed(IResource res)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sapportals.wcm.service.indexmanagement.IIndex
clear, delete, delete, generate, generate, getResourceInfo, getServiceTypes
 

Field Detail

CFG_PLUGIN_CM_INDEXES

public static final java.lang.String CFG_PLUGIN_CM_INDEXES

CFG_PLUGIN_CM_INDEXES_INDEX_FOLDERS

public static final java.lang.String CFG_PLUGIN_CM_INDEXES_INDEX_FOLDERS

PROPERTIES

public static final java.lang.String PROPERTIES

INDEX_STRING_AS_STRING

public static final java.lang.String INDEX_STRING_AS_STRING

m_indexId

protected java.lang.String m_indexId
id of the index

m_indexFolders

protected IIndexFolderList m_indexFolders
list of index folders that are assigned to the index

m_serviceId

protected java.lang.String m_serviceId
the id of the implementing index service

m_indexName

protected java.lang.String m_indexName
display name of the index

m_indexGroup

protected java.lang.String m_indexGroup
group of the index

m_isActive

protected boolean m_isActive
Indicates if an index is available or has be deactivated.

m_crawlerProfileId

protected java.lang.String m_crawlerProfileId
ID of the default crawler profile for all index folders of the index.

m_serviceUserId

protected static java.lang.String m_serviceUserId
ID of the service user.

m_crawlerQueue

protected java.util.List m_crawlerQueue
Queue of crawlers.
Constructor Detail

AbstractIndex

public AbstractIndex(java.lang.String indexId,
                     java.lang.String indexName,
                     java.lang.String indexGroup,
                     IIndexFolderList indexFolders,
                     java.lang.String serviceId,
                     java.lang.String serviceUserId,
                     java.util.Properties indexServiceProperties)
              throws WcmException
Deprecated. as of NW04. Use constructor with crawler profile ID

Constructor.
Parameters:
indexId - - index identifier
indexName - - display name of the index
indexGroup - - the group the index has been assigned to
folderRids - - list of RID objects that are representing the attached folders of the index
serviceId - - the identifier of the index service
serviceUserId - - id of the index management service user, to set the service context
indexServiceProperties - - config properties of the index management service
Throws:
WcmException - Exception raised in failure situation

AbstractIndex

public AbstractIndex(java.lang.String indexId,
                     java.lang.String indexName,
                     java.lang.String indexGroup,
                     IIndexFolderList indexFolders,
                     java.lang.String serviceId,
                     java.lang.String crawlerProfileId,
                     java.lang.String serviceUserId,
                     java.util.Properties indexServiceProperties)
              throws WcmException
Constructor.
Parameters:
indexId - - index identifier
indexName - - display name of the index
indexGroup - - the group the index has been assigned to
folderRids - - list of RID objects that are representing the attached folders of the index
serviceId - - the identifier of the index service
crawlerProfileId - - ID of the default crawler profile for all index folders of the index
serviceUserId - - id of the index management service user, to set the service context
indexServiceProperties - - config properties of the index management service
Throws:
WcmException - Exception raised in failure situation
Method Detail

getConfigServiceUser

public static com.sapportals.portal.security.usermanagement.IUser getConfigServiceUser()
                                                                                throws java.lang.Exception
AccessController.doPrivileged stops the security check on this level of the call stack. This allows customer code to call this method. Otherwise the execution of foreign code would be forbidden.

getIndexedProperties

public IPropertyMap getIndexedProperties()
                                  throws WcmException
Returns the properties, indexed with the documents in the index. Only the information about the properties not all their values are returned, i.e. each property appearch only one time in the return map.
Specified by:
getIndexedProperties in interface IIndex
Returns:
Map with the properties
Throws:
WcmException - Exception raised in failure situation

setIndexName

public void setIndexName(java.lang.String indexName)
For internal use only. Sets the name of the index.
Specified by:
setIndexName in interface IIndex
Parameters:
indexName - The new IndexName value

setIndexGroup

public void setIndexGroup(java.lang.String indexGroup)
for internal use
Specified by:
setIndexGroup in interface IIndex
Parameters:
indexGroup - The new IndexGroup value

setCrawlerProfileId

public void setCrawlerProfileId(java.lang.String crawlerProfileId)
                         throws WcmException
Sets the ID of the default crawler profile for all index folders of the index.
Specified by:
setCrawlerProfileId in interface IIndex
Parameters:
CrawlerProfileId - The new CrawlerProfileId value

setProperties

public abstract void setProperties(java.util.Properties properties)
Sets index implementation specific data
Specified by:
setProperties in interface IIndex
Parameters:
properties - The new Properties value

getIndexId

public java.lang.String getIndexId()
Description copied from interface: IIndex
Identifies the index within the system.
The ID of an index is needed to get the IIndex object from the IIndexService.
Forbidden characters for an index ID are dot('.'), space(' ') and plus('+').
Specified by:
getIndexId in interface IIndex
Returns:
index identifier

getIndexName

public java.lang.String getIndexName()
Description copied from interface: IIndex
Non-technical identifier of an index.
The index name should be used for display purposes only.
All characters are allowed for an index name. If no index name is available, the index ID is returned.
Specified by:
getIndexName in interface IIndex
Returns:
display name of the index

getFolderUris

public IUriList getFolderUris()
Deprecated. as of NW04. Use getFolderRids()

Specified by:
getFolderUris in interface IIndex
Returns:
list of URI objects that are representing the attached folders of the index

getIndexFolders

public IIndexFolderList getIndexFolders()
Description copied from interface: IIndex
Folders or start pages that are assigned to the index for indexing.
A document is added to a particular index, if a superior folder (or startpage) is contained in IIndexFolderList. If more than one superior folder is attached to different indexes, the lower folder determines the index, in which the document is stored.
Specified by:
getIndexFolders in interface IIndex
Returns:
list of IIndexFolder objects that are representing the attached folders of the index

getServiceId

public java.lang.String getServiceId()
Description copied from interface: IIndex
Specifies the index implementation that is used for the index.
Every service ID is linked to a java class from which the index object is instantiated.
The index implementation determines the interfaces that can be used for the index.
Additionally, the service types of the index are determined by the implementation.
Example:
Service ID: trexSearchAndClassification
Java Class: com.sapportals.wcm.service.indexmanagement.retrieval.trex.TrexSearchAndClassificationIndex
Additional interfaces: ISearchIndex, IClassificationIndex
Service types: search, classification
Specified by:
getServiceId in interface IIndex
Returns:
the identifier of the index service (e.g. trexSearchAndClassification).

It is configured in the wcm configuration file and links to the impementing class.


getIndexGroup

public java.lang.String getIndexGroup()
Description copied from interface: IIndex
Returns the group of indexes to which the index logically belongs.
Grouping indexes makes it possible to perform operations on more than one index by selecting an index group and performing the action on all indexes in that group.
These cumulative functions must be implemented on UI level. Currently this is implemented in the CM search dialog box for the selection of indexes. Selection is carried out by selecting an index group to search in all indexes that belong to that group. group can be null.
Specified by:
getIndexGroup in interface IIndex
Returns:
the group the index has been assigned to

As an example indexes can be grouped to display them separated in groups.


getCrawlerProfileId

public java.lang.String getCrawlerProfileId()
ID of the default crawler profile for all index folders of the index.
Specified by:
getCrawlerProfileId in interface IIndex
Returns:
crawler profile ID

getServiceTypes

public java.util.List getServiceTypes(java.util.Locale locale)
Description copied from interface: IIndex
Displays representations of the indexes service types in the locale's language.
The returned types should only be used for display purposes.
Specified by:
getServiceTypes in interface IIndex
Parameters:
locale - - locale of user context to return service types in locale language of user context
Returns:
(String)list of service types the index is belonging to. because of the locale the service types are returned in the locales language

getProperties

public abstract java.util.Properties getProperties()
Gets index implementation specific data
Specified by:
getProperties in interface IIndex
Returns:
The Properties value

checkProperties

public void checkProperties(java.util.Properties customProperties)
                     throws WcmException
Description copied from interface: IIndex
With this method the properties that should be set could be checked. In case of a wrong property (range error, format error, etc.) a WcmException is thrown, with a localized error message, describing the problem. If the parameter is null, no exception is thrown.
Specified by:
checkProperties in interface IIndex
See Also:
IIndex

getSupportedOptions

public abstract ISupportedOptionSet getSupportedOptions()
Description copied from interface: IIndex
The actions of the additional interfaces of an index are supported actions for the index in question (for example, ISearchIndex, IClassificationIndex) that are supported by the index implementation.

Example:

  String indexId = "abc";
  IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
  IIndex index = indexService.getIndex(indexId);
  ISupportedOptionSet supportedOptions = index.getSupportedOptions();
  if (supportedOptions.isSupported(SupportedOption.SEARCH)) {
    //do search; it is supported by the index
  }
 
Specified by:
getSupportedOptions in interface IIndex
Returns:
a collection of supported operations

getLanguagesOfIndexedDocuments

public java.util.List getLanguagesOfIndexedDocuments()
                                              throws WcmException
Returns the languages of an index, for which documents exist in.
Specified by:
getLanguagesOfIndexedDocuments in interface IIndex
Returns:
List of strings each describing one language.

addFolderUri

public void addFolderUri(URI folderUri)
Deprecated. as of NW04. Use add(IIndexFolder) at the IIndexFolderList interface

for internal use
Specified by:
addFolderUri in interface IIndex
Parameters:
folderUri - FolderUri to be added

removeAllFolderUris

public void removeAllFolderUris()
Deprecated. as of NW04. Use clear() at the IIndexFolderList interface

for internal use
Specified by:
removeAllFolderUris in interface IIndex

removeFolderUri

public void removeFolderUri(URI folderUri)
Deprecated. as of NW04. Use remove(IIndexFolder) at the IIndexFolderList interface

for internal use
Specified by:
removeFolderUri in interface IIndex
Parameters:
folderUri - uri of folder to remove from index

indexDocuments

public void indexDocuments(IResourceList resources,
                           IResourceEvent resourceEvent)
                    throws ResourceException,
                           WcmException,
                           java.io.IOException
Indexes a list of documents
Specified by:
indexDocuments in interface IIndex
Parameters:
resources - resources to index
resourceEvent - event that caused the index request
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

indexDocuments

public void indexDocuments(IResourceList resources)
                    throws ResourceException,
                           WcmException,
                           java.io.IOException
Indexes a list of documents
Specified by:
indexDocuments in interface IIndex
Parameters:
resources - resources to index
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

indexDocument

public void indexDocument(IResource resource)
                   throws ResourceException,
                          WcmException,
                          java.io.IOException
Indexes a document
Specified by:
indexDocument in interface IIndex
Parameters:
resource - resource to index
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

indexDocument

public void indexDocument(IResource resource,
                          IResourceEvent resourceEvent)
                   throws ResourceException,
                          WcmException,
                          java.io.IOException
Indexes a document
Specified by:
indexDocument in interface IIndex
Parameters:
resource - resource to index
resourceEvent - event that caused the index request
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

deindexDocuments

public void deindexDocuments(IResourceList resources)
                      throws ResourceException,
                             WcmException
Deindexes a document
Specified by:
deindexDocuments in interface IIndex
Parameters:
resources - resources to deindex
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation

deindexDocuments

public void deindexDocuments(IUriList resourceUris)
                      throws ResourceException,
                             WcmException
Deprecated. as of NW04. Use deindexDocuments(IRidList)

Deindexes a document
Specified by:
deindexDocuments in interface IIndex
Parameters:
resourceUris - list of uris to deindex
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation

deindexDocuments

public void deindexDocuments(IRidList resourceRids)
                      throws ResourceException,
                             WcmException
Deindexes a document
Specified by:
deindexDocuments in interface IIndex
Parameters:
resourceRids - list of rids to deindex
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation

deindexDocument

public void deindexDocument(IResource resource)
                     throws ResourceException,
                            WcmException
Deindexes a document
Specified by:
deindexDocument in interface IIndex
Parameters:
resource - resource to deindex
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation

deindexDocument

public void deindexDocument(URI resourceUri)
                     throws ResourceException,
                            WcmException
Deprecated. as of NW04. Use deindexDocument(RID)

Deindexes a document
Specified by:
deindexDocument in interface IIndex
Parameters:
resourceUri - uri to deindex
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation

deindexDocument

public void deindexDocument(RID resourceRid)
                     throws ResourceException,
                            WcmException
Deindexes a document
Specified by:
deindexDocument in interface IIndex
Parameters:
resourceRid - rid to deindex
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation

reindex

public void reindex()
             throws WcmException
Reindexes the index
Specified by:
reindex in interface IIndex
Throws:
WcmException - Exception raised in failure situation

reindex

public void reindex(boolean disablePostClearTasks)
             throws WcmException
Reindexes the index
Specified by:
reindex in interface IIndex
Parameters:
disablePostClearTasks - - if true the tasks that can be performed by the index implementation after the index has been cleared are skipped. Example: Don't train the classification index before reindex all documents.
Throws:
WcmException - Exception raised in failure situation

deleteOnServer

public void deleteOnServer()
                    throws WcmException
Description copied from interface: IIndex
Deletes the index on the index server connected with the CM system.
Specified by:
deleteOnServer in interface IIndex
Following copied from interface: com.sapportals.wcm.service.indexmanagement.IIndex
Throws:
WcmException -  

deleteOnServer

public static void deleteOnServer(java.lang.String indexId)
                           throws WcmException

createIndexOnServer

public void createIndexOnServer()
                         throws WcmException
Description copied from interface: IIndex
Creates the index on the index server connected with the CM system.
Specified by:
createIndexOnServer in interface IIndex
Following copied from interface: com.sapportals.wcm.service.indexmanagement.IIndex
Throws:
WcmException -  

startReindexer

public void startReindexer(boolean disablePostClearTasks)
                    throws WcmException

deltaReindex

public void deltaReindex()
                  throws WcmException
Performs indexing of the documents that are not indexed yet or have been changed since the last crawl. Additionally it deindexes documents from the index that have been indexed but now have been deleted. In contrast to the reindex calls this call doesn't clear the index.
Specified by:
deltaReindex in interface IIndex
Following copied from interface: com.sapportals.wcm.service.indexmanagement.IIndex
Throws:
WcmException - exception raised in failure situation

init

public abstract void init(java.util.Properties properties)
Initializes the index with index implementation specific data
Specified by:
init in interface IIndex
Parameters:
properties - specific properties of the index implemenation

internalIndexDocuments

protected abstract void internalIndexDocuments(IResourceList resources,
                                               IResourceEvent resourceEvent)
                                        throws ResourceException,
                                               WcmException,
                                               java.io.IOException
Indexes a list of documents
Parameters:
resources - resources to index
resourceEvent - event that caused the index request
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation
java.io.IOException - Exception raised in failure situation

internalDeindexDocuments

protected abstract void internalDeindexDocuments(IRidList rids)
                                          throws ResourceException,
                                                 WcmException
Deindexes documents
Parameters:
rids - list of rids to deindex
Throws:
ResourceException - Exception raised in failure situation
WcmException - Exception raised in failure situation

reindexPostClear

protected void reindexPostClear(IIndexFolderList preClearIndexFolders)
                         throws WcmException
Deprecated. as of NW04. Does not work with the new crawlers

Lets index implementations perform tasks after the index has been cleared within a reindex call. After this post clear tasks the attached folders of the index are indexed. Example task: train the taxonomies of an classification index before indexing the documents.
Parameters:
preClearIndexFolders - index folders that have been attached befor the clear
Throws:
WcmException - Exception raised in failure situation

reindexXPostClear

protected boolean reindexXPostClear(IIndexFolderList preClearIndexFolders)
                             throws WcmException

getIndexFolderForDocument

public IIndexFolder getIndexFolderForDocument(RID documentRid)
Gets the next upper indexFolder for the document
Specified by:
getIndexFolderForDocument in interface IIndex
Parameters:
documentRid - rid of the document to get the index folder for
Returns:
index folder for document

reindexNotTrainingDocs

public void reindexNotTrainingDocs()
                            throws WcmException

compareTo

public int compareTo(java.lang.Object o)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

internalSetIndexFolders

public void internalSetIndexFolders(IIndexFolderList indexFolders)
For internal use only!
Parameters:
indexFolders -  

internalAddQueuedCrawler

public void internalAddQueuedCrawler(IIndexServiceCrawler crawler)
                              throws WcmException
For internal use only!
Parameters:
crawler -  
Throws:
WcmException -  

internalRunQueuedIfNoActive

public void internalRunQueuedIfNoActive()
                                 throws WcmException

getResourceInfo

public java.lang.String getResourceInfo(RID documentRid)
                                 throws WcmException

setSchedulerTimeTable

public void setSchedulerTimeTable(ISchedulerTimeTable schedulerTimeTablePar)
                           throws WcmException
Registers a schedule for delta index crawling for the index with the ISchedulerTimeTable. Thereby it sets this schedule for all data sources with no own schedule. Remark: It is recommended to use the similar method of the IIndexService instead of this method.
Specified by:
setSchedulerTimeTable in interface IIndex
Parameters:
schedulerTimeTablePar - ISchedulerTimeTable
Throws:
WcmException - in case of an error.

getSchedulerTimeTable

public ISchedulerTimeTable getSchedulerTimeTable()
                                          throws WcmException
Returns the timetable of a schedule for delta index crawling for the index. Returns null in case that no schedule is defined for the index. Remark: It is recommended to use the similar method of the IIndexService instead of this method.
Specified by:
getSchedulerTimeTable in interface IIndex
Returns:
ISchedulerTimeTable
Throws:
WcmException - in case of an error.

isActive

public boolean isActive()
Returns the information if an index is available or has be set inactive.
Specified by:
isActive in interface IIndex
Returns:
true if index is active, false if index is inactive

setActive

public boolean setActive(boolean isActive)
                  throws WcmException
Sets an index inactive or activates it.
Specified by:
setActive in interface IIndex
Parameters:
true - if index should be set to active, false if index should be deactivated
Returns:
true, if index has to be actualized after activating it, otherwise false

setActiveDuringStartup

public void setActiveDuringStartup(boolean isActive)
                            throws WcmException
Specified by:
setActiveDuringStartup in interface IIndex

setInactiveIndexHasChanged

public void setInactiveIndexHasChanged()
                                throws WcmException,
                                       ResourceException
Sets a property on true, if index documents have changed during index was inactive. The property is automatically deleted, if the index is reactivated, but the method for index reactivation returns true in that case, indicating that the index should be updated.
Specified by:
setInactiveIndexHasChanged in interface IIndex
Throws:
WcmException - in case of an error
ResourceException - in case of an error

getRID

public RID getRID()
           throws WcmException
Gets the resource ID of the resource representation of this index. Can return null if no indexmanagement repository prefix is configured.
Specified by:
getRID in interface IIndex
Returns:
resource ID of this index

checkIndexIsActive

protected void checkIndexIsActive()
                           throws WcmException

setStateAndNumberOfCrawler

public void setStateAndNumberOfCrawler(AbstractIndex.IndexingState state,
                                       int numOfCrawler)
                                throws WcmException
Specified by:
setStateAndNumberOfCrawler in interface IIndex
Parameters:
i -  

setNumberOfCrawler

public void setNumberOfCrawler(int numOfCrawler)
                        throws ResourceException,
                               WcmException

setIndexingState

public void setIndexingState(AbstractIndex.IndexingState state)
                      throws ResourceException,
                             WcmException
Specified by:
setIndexingState in interface IIndex

repaireConfigurable

public void repaireConfigurable()
                         throws java.lang.Exception

getNumberOfCrawler

public int getNumberOfCrawler(RID indexRid)
                       throws WcmException
Returns:
 

reduceNumberOfCrawler

public int reduceNumberOfCrawler()
                          throws WcmException
Specified by:
reduceNumberOfCrawler in interface IIndex
Returns:
 

getIndexingState

public AbstractIndex.IndexingState getIndexingState()
                                             throws ResourceException,
                                                    WcmException
Specified by:
getIndexingState in interface IIndex
Parameters:
indexRid -  
Returns:
 

getDetailsMonitorURL1

public java.lang.String getDetailsMonitorURL1()
                                       throws NotSupportedException
Get first details monitor
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getDetailsMonitorURL2

public java.lang.String getDetailsMonitorURL2()
                                       throws NotSupportedException
Get second details monitor
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getDetailsMonitorURL3

public java.lang.String getDetailsMonitorURL3()
                                       throws NotSupportedException
Get third details monitor
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getDetailsMonitorPageURL

public java.lang.String getDetailsMonitorPageURL()
                                          throws NotSupportedException
Get details monitor portal page
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getDetailsMonitorPageText

public java.lang.String getDetailsMonitorPageText()
                                           throws NotSupportedException
Get Display Text for details monitor portal page
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getFrameSizes

public java.lang.String[] getFrameSizes()
                                 throws NotSupportedException
Get frame sizes of detailed monitors (and implicit number of detailed monitors)
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getErrorState

public AbstractIndex.ErrorState getErrorState(double errorThreshold,
                                              double warningThreshold,
                                              java.util.Locale locale)
                                       throws NotSupportedException
Returns an error state indicating the overall indexing status. The parameters decribes two borders. If the percentage of errors is over the first parameter an error status is returned. If it is over the second a warning status is returned.
Parameters:
errorThreshold -  
warningThreshold -  
locale -  
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index

getRunningState

public AbstractIndex.RunningState getRunningState()
                                           throws WcmException
Returns a state indicating what is actually happening with respect to indexing.
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getNumberOfSuccessfullyIndexedDocs

public int getNumberOfSuccessfullyIndexedDocs()
                                       throws WcmException
Returns the numbers of documents successfully indexed and searchable.
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getNumberOfDocumentsInQueue

public int getNumberOfDocumentsInQueue()
                                throws WcmException
Returns the numbers of documents currently in work for indexing, but not in an error state.
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getNumberOfErrors

public int getNumberOfErrors()
                      throws WcmException
Returns the numbers of documents failed during indexing.
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getActiveTime

public long getActiveTime()
                   throws WcmException
Gives a rough estimation for the time duration needed for indexing the actual available documents.
Returns:
 
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

getWhatToIndex

public AbstractIndex.WhatToIndex getWhatToIndex()
Returns:
 

setWhatToIndex

public void setWhatToIndex(java.lang.String s)
Specified by:
setWhatToIndex in interface IIndex
Following copied from interface: com.sapportals.wcm.service.indexmanagement.IIndex
Parameters:
whatToIndex -  

getWhatToIndexString

public java.lang.String getWhatToIndexString()
Specified by:
getWhatToIndexString in interface IIndex
Following copied from interface: com.sapportals.wcm.service.indexmanagement.IIndex
Returns:
 

typeShouldBeIndexed

public boolean typeShouldBeIndexed(IResource res)
Specified by:
typeShouldBeIndexed in interface IIndex
Following copied from interface: com.sapportals.wcm.service.indexmanagement.IIndex
Parameters:
resource -  
Returns:
 

getDisplayNameAsStringPropName

public static PropertyName getDisplayNameAsStringPropName()
                                                   throws ResourceException
Returns:
 

suspendAll

public void suspendAll()
                throws WcmException
Suspends all running tasks for indexing.
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

resumeAll

public void resumeAll()
               throws WcmException
Resumes all suspended tasks for indexing.
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

stopAll

public void stopAll()
             throws WcmException
Stops all running tasks for indexing.
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

restartAll

public void restartAll()
                throws WcmException
Stops all stopped and suspended tasks for indexing.
Throws:
NotSupportedException - if the method is not implemented for an index
WcmException -  

indexInternalLinks

public boolean indexInternalLinks()
Specified by:
indexInternalLinks in interface IIndex

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary.

These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.