|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Manages the indexes of the content management system.
There is always one central instance for the documents of all repositories.
To get an index service follow this example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex,
IWcmIndexConst| Field Summary | |
static boolean |
ACTIVATE_SIEMENS
|
static java.lang.String |
CM_INDEXSERVICE_NS
|
static boolean |
NEW_CRAWLER_FLAG
|
static boolean |
NEW_CRAWLER_FLAG_TODO_1
|
static java.lang.String |
SERVICE_CLASS
Class property of an index implementation. |
static java.lang.String |
SERVICE_NAME
Display name property of an index implementation. |
static boolean |
TEST_NIRVANA_FLAG
|
| Method Summary | |
void |
attachIndexFolder(IIndex index,
IIndexFolder indexfolder)
Attaches an index folder to an index. |
void |
attachIndexToRepository(IIndex index,
IResource folder)
Attaches an index to a folder in a repository. |
ICompareTaxonomies |
createCompareTaxonomies()
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
ISchedulerTask |
createDeltaIndexSchedulerTask()
Returns a task for a delta index schedule. |
java.lang.String |
createEmptySchedulerEntryId(java.lang.String indexId)
Returns an identifier for a delta index schedule for the index. |
IIndex |
createIndex(java.lang.String indexId,
java.lang.String indexName,
java.lang.String indexGroup,
java.lang.String serviceId)
Creates an index object. |
java.lang.String |
createIndexSchedulerEntryId(java.lang.String indexId,
RID indexFolderRid)
Returns an identifier for a delta index schedule for an folder, which if defined by the according schedule of the index. |
java.lang.String |
createSchedulerEntryId(java.lang.String indexId,
RID indexFolderRid)
Returns an identifier for a delta index schedule for an folder, which if not defined by the according schedule of the index. |
ITaxonomyTransport |
createTaxonomyTransport()
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
void |
deleteCrawlers(java.util.List crawlers)
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
void |
deleteIndex(IIndex index)
Deprecated. as of NW04. Use deleteIndex(IIndex,IResourceContext) ATTENTION: Using this signature instead of the one with a resource context for a classification index can lead to problems. If ACLs are used for the taxonomy repository, no folder can be deleted by this method because the service user context that is used only has read permission. |
void |
deleteIndex(IIndex index,
IResourceContext context)
Deletes an index. |
void |
detachIndexFolder(IIndex index,
IIndexFolder indexFolder)
Detaches an index folder from an index. |
void |
detachIndexFromRepository(IIndex index,
IResource folder)
Detaches an index from a folder in a repository. |
void |
enqueueDeltaIndexCrawler(IIndexFolder indexFolder)
Puts a delta index crawl into the index management crawler queue. |
void |
enqueueIndexCrawler(IIndexFolder indexFolder)
Deprecated. as of NW04. Does not work with the new crawlers |
java.util.List |
getActiveIndexes()
Returns all existing indexes in the system which are active. |
java.util.List |
getActiveIndexmanagementCrawlers(IIndex index)
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
java.util.List |
getAllIndexmanagementCrawlers(IIndex index)
Returns an ID list of all crawler for an index. |
com.sapportals.portal.security.usermanagement.IUser |
getConfigServiceUser()
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
java.lang.String |
getCrawlerType()
Returns the default crawler type of the index management service. |
java.util.List |
getFailedCrawlers(IIndex index)
Returns an ID list with the failed crawler. |
IIndex |
getIndex(java.lang.String indexId)
Returns the specified index. |
IPropertyMap |
getIndexedProperties()
Determines all properties indexed in at least one of the indexes maintained by the index service. |
IPropertyMap |
getIndexedProperties(IResourceContext resourceContext)
Determines all properties indexed in at least one of the indexes maintained by the index service and for which read access for the resource context is allowed. |
IPropertyMap |
getIndexedProperties(java.util.List indexes)
Determines all properties indexed in at least one of the indexes. |
IPropertyMap |
getIndexedProperties(java.util.List indexes,
IResourceContext resourceContext)
Determines all properties indexed in at least one of the indexes and for which read access for the resource context is allowed. |
java.util.List |
getIndexes()
Returns all existing indexes in the system. |
java.util.List |
getIndexes(IRepositoryManager repositoryManager)
Returns all indexes into which documents of a repository are indexed. |
java.util.List |
getIndexes(RID topFolderRid)
Indexes that contain documents of the folder specified by topFolderRid
or any subfolder |
java.util.List |
getIndexes(URI topFolderURI)
Deprecated. as of NW04. Use getIndexes(RID) |
java.util.List |
getIndexesForResource(IResource resource)
TReturns the indexes into which a document is indexed. |
java.util.List |
getIndexesForResource(RID rid)
Returns the indexes into which a document is indexed. |
java.util.List |
getIndexesForResource(URI uri)
Deprecated. as of NW04. Use getIndexesForResource(RID) |
IIndex |
getIndexForResource(IResource resource,
java.lang.String serviceType)
Returns the index in which the document is indexed depending on the specified service type. |
IIndex |
getIndexForResource(RID rid,
java.lang.String serviceType)
Returns the index into which the document is indexed depending on the specified service type. |
IIndex |
getIndexForResource(URI uri,
java.lang.String serviceType)
Deprecated. as of NW04. Use getIndexForResource(RID,String) |
java.util.List |
getIndexGroups()
Returns the index groups defined. |
RID |
getIndexmanagementRepositoryPrefixRID()
Gets the resource ID of the root folder of the indexmanagement repository. |
IResourceContext |
getIndexServiceUserContext()
|
java.util.Set |
getLanguagesOfIndexedDocuments(java.util.List indexes)
The methods get as parameter a list of index IDs. |
int |
getMaxTransferSize()
Returns the defined size in byte, up to which content is send directly to the index server, when indexing documents. |
java.lang.Object |
getObjectInstance(java.lang.String objectInstanceName)
Gets an instance of an object specified by an IWcmIndexConst constant. |
ISchedulerTimeTable |
getSchedulerTimeTable(java.lang.String indexId)
Returns the timetable of a schedule for delta index crawling for the index. |
java.util.List |
getServiceIds()
Returns the available service IDs. |
java.util.Properties |
getServiceProperties(java.lang.String serviceId)
Gets the properties of an index implementation. |
java.lang.String |
getServiceUserId()
Returns the ID of the index management service user. |
ITaskQueueHandler |
getTaskQueueHandler()
Returns the task queue handler of the index management service. |
java.util.Map |
groupIndexesByService(java.util.List indexes)
When given a list of index objects, it returns a map that contains the service IDs as keys and a list of indexes for each service as values. |
void |
internalSaveIndex(IIndex index)
Saves a newly created index object inside the index service. |
boolean |
isDeleteAllowed(IResourceContext context,
IIndex index)
Checks the delete permission of a user for an index. |
java.util.List |
isDeleteAllowed(IResourceContext context,
java.util.List indexes)
Checks the delete permission of a user for a list of indexes. |
boolean |
isReadAllowed(IResourceContext context,
IIndex index)
Checks the read access permission of a user for an index. |
java.util.List |
isReadAllowed(IResourceContext context,
java.util.List indexes)
Checks the read access permission of a user for a list of indexes. |
boolean |
isWriteAllowed(IResourceContext context,
IIndex index)
Checks the write access permission of a user for an index. |
java.util.List |
isWriteAllowed(IResourceContext context,
java.util.List indexes)
Checks the write access permission of a user for a list of indexes. |
void |
queueDeltaIndexCrawler(IIndexFolder indexFolder)
Puts a delta index crawl into the index management crawler queue. |
void |
queueIndexCrawler(IIndexFolder indexFolder)
Puts an index crawl into the index management crawler queue. |
void |
resumeCrawlers(java.util.List crawlers)
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
void |
runQueuedCrawlers()
Deprecated. as of NW04. Does not work with the new crawlers |
void |
setMaxTransferSize(int i)
Sets the defined size in byte, up to which content is send directly to the index server, when indexing documents. |
void |
setSchedulerTimeTable(java.lang.String indexId,
ISchedulerTimeTable schedulerTimeTable)
Registers a schedule for delta index crawling for the index with the ISchedulerTimeTable. |
void |
startDeltaIndexCrawler(IIndexFolder indexFolder)
Deprecated. as of NW04. Crawlers can only be queued - use queueDeltaIndexCrawler |
void |
startIndexCrawler(IIndexFolder indexFolder)
Deprecated. as of NW04. Crawlers can only be queued - use queueIndexCrawler |
void |
startResourceIndexer(IResource document,
AbstractClassificationIndex index)
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
void |
startXIndexCrawler(IIndex index,
IResource startResource)
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
void |
startXTaxRetrainCrawler(IIndex index,
java.lang.String taxonomyName,
ICollection taxonomyCollection,
boolean isSearchRelevant)
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
void |
stopCrawlers(java.util.List crawlers)
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
void |
suspendCrawlers(java.util.List crawlers)
This method is only used by internal methods and should not be used programmers using the imdexmanagement API. |
void |
updateIndex(IIndex index)
Saves all changes that have been made to the index object. |
| Methods inherited from interface com.sapportals.wcm.util.events.IEventReceiver |
received |
| Methods inherited from interface com.sapportals.wcm.service.IService |
getDescription, getDescription, getID |
| Field Detail |
public static final boolean ACTIVATE_SIEMENS
public static final boolean TEST_NIRVANA_FLAG
public static final boolean NEW_CRAWLER_FLAG
public static final boolean NEW_CRAWLER_FLAG_TODO_1
public static final java.lang.String CM_INDEXSERVICE_NS
public static final java.lang.String SERVICE_CLASS
class and the displayname
can be requested by calling the getServiceProperties(String serviceId) method
of this interface. It returns a property bag with the two properties.class property of the
index implementation.
Example:
Properties properties = indexService.getServiceProperties("trexSearch");
String class = properties.getProperty(IIndexService.SERVICE_CLASS);
public static final java.lang.String SERVICE_NAME
class and the displayname
can be requested by calling the getServiceProperties(String serviceId) method
of this interface. It returns a property bag with the two properties.displayname property of the index implementation.
Example:
Properties properties = indexService.getServiceProperties("trexSearch");
String class = properties.getProperty(IIndexService.SERVICE_NAME);
| Method Detail |
public void deleteIndex(IIndex index)
throws WcmException
index - object of type IIndexWcmException - exception raised in failure situation
public IIndex createIndex(java.lang.String indexId,
java.lang.String indexName,
java.lang.String indexGroup,
java.lang.String serviceId)
throws WcmException
generate(IResourceContext context)
must be performed on the index object.init method of the IIndex interface.
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.createIndex("abc","abc index","abc group","trexSearch");
Properties properties = new Properties();
properties.setProperty("fuzziness","0.8");
index.init(properties);
index.generate(context);
indexId - identifier/name of the indexindexName - display name of the indexindexGroup - group name to group indexes, examples: Internal Sources, Internet SourcesserviceId - ID that has been specified for the index implementation in cm configurationIIndexWcmException - exception raised in failure situation
public void deleteIndex(IIndex index,
IResourceContext context)
throws WcmException
Example:
String indexId = "abc"; IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE); IIndex index = indexService.getIndex(indexId); indexService.deleteIndex(index,context);
index - object of type IIndexcontext - user contextWcmException - exception raised in failure situation
public void attachIndexToRepository(IIndex index,
IResource folder)
throws WcmException
index - index that has to be attachedfolder - folder to which the index should be attachedWcmException - exception raised in failure situation
public void attachIndexFolder(IIndex index,
IIndexFolder indexfolder)
throws WcmException
Example:
String indexId = "abc";
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex(indexId);
IIndexFolder indexFolder = new IndexFolder(indexId,RID.getRID("/abcRm/subfolder"));
indexService.attachIndexFolder(index,indexFolder);
index - index to that the index folder has to be attachedindexFolder - index folder to attach to the indexWcmException - exception raised in failure situation
public void detachIndexFromRepository(IIndex index,
IResource folder)
throws WcmException
index - index that has to be detached from the folderfolder - folder from which the index is to be detachedWcmException - exception raised in failure situation
public void detachIndexFolder(IIndex index,
IIndexFolder indexFolder)
throws WcmException
Example:
String indexId = "abc";
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex(indexId);
IIndexFolder indexFolder = index.getIndexFolders().get(RID.getRID("/abcRm/subfolder"));
indexService.detachIndexFolder(index,indexFolder);
index - index from which the index folder has to be detachedindexFolder - index folder to detach from the indexWcmException - exception raised in failure situationpublic java.util.List getIndexes()
IIndex)public java.util.List getIndexes(IRepositoryManager repositoryManager)
repositoryManager - repository for which the indexes have to be returnedIIndex)
containing documents of the repositorypublic java.util.List getIndexes(URI topFolderURI)
topFolderUri - URI of the top folder of a subhierarchy
public IPropertyMap getIndexedProperties()
throws WcmException
WcmException - exception raised in failure situation
public IPropertyMap getIndexedProperties(IResourceContext resourceContext)
throws WcmException
resourceContext - WcmException - exception raised in failure situation
public IPropertyMap getIndexedProperties(java.util.List indexes)
throws WcmException
WcmException - exception raised in failure situation
public IPropertyMap getIndexedProperties(java.util.List indexes,
IResourceContext resourceContext)
throws WcmException
indexes - resourceContext - WcmException - exception raised in failure situationpublic java.util.List getIndexes(RID topFolderRid)
topFolderRid
or any subfoldertopFolderRid - resource ID of the top folder in a folder hierarchyIIndex) to which the specified folder
or a subfolder is attached
public IIndex getIndex(java.lang.String indexId)
throws WcmException
IClassificationIndex).
Example:
String indexId = "abcclassification"; IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE); IIndex index = indexService.getIndex(indexId); IClassificationIndex classificationIndex = null; if (index instanceof IClassificationIndex) classificationIndex = (IClassificationIndex)index;
indexId - ID of the indexWcmException - exception raised in failure situationWcmException is
thrown.
public IIndex getIndexForResource(IResource resource,
java.lang.String serviceType)
throws ResourceException
IWcmIndexConst contains constants for existing service types
Example:
To get the search index for document "a.txt" that is in folder "/documents/mydocs"
the following example can be used:
IResource resource = ResourceFactory.getInstance().getResource(RID.getRID("/documents/mydocs/a.txt"),context);
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndexForResource(resource,IWcmIndexConst.SERVICE_TYPE_SEARCH);
If no index of the specified service type contains the resource, null is returned.
resource - folder or document for which the index has to be determinedserviceType - use com.sapportals.wcm.service.indexmanagement.IWcmIndexConst service typesResourceException - exception raised in failure situation
public IIndex getIndexForResource(URI uri,
java.lang.String serviceType)
serviceType - use com.sapportals.wcm.service.indexmanagement.IWcmIndexConst service typesuri - URI of the resource for which the index has to be determined
public IIndex getIndexForResource(RID rid,
java.lang.String serviceType)
IWcmIndexConst contains constants for existing service types
Example:
To get the search index for document "a.txt" that is in folder "/documents/mydocs"
the following example can be used:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndexForResource(RID.getRID("/documents/mydocs/a.txt"),IWcmIndexConst.SERVICE_TYPE_SEARCH);
If no index of the specified service type contains the resource, null is returned.
serviceType - use com.sapportals.wcm.service.indexmanagement.IWcmIndexConst service typesrid - resource ID of the resource for which the index has to be determined
public java.util.List getIndexesForResource(IResource resource)
throws ResourceException
Example:
To get the indexes for document "a.txt" that is in folder "/documents/mydocs"
the following example can be used:
IResource resource = ResourceFactory.getInstance().getResource(RID.getRID("/documents/mydocs/a.txt"),context);
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
List indexes = indexService.getIndexesForResource(resource);
If no index contains the resource, an empty List is returned.
resource - folder or the document for which the indexes have to be determinedIIndex) into which the document is indexedResourceException - exception raised in failure situationpublic java.util.List getIndexesForResource(URI uri)
uri - the URI of the folder or the document for which the indexes have to be determinedpublic java.util.List getIndexesForResource(RID rid)
Example:
To get the indexes for document "a.txt" that is in folder "/documents/mydocs"
the following example can be used:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
List indexes = indexService.getIndexesForResource(RID.getRID("/documents/mydocs/a.txt"));
If no index contains the resource, an empty List is returned.
rid - resource ID of the folder or the document for which the indexes have to be determinedIIndex) into which the document is indexedpublic java.util.List getIndexGroups()
String used in the existing indexespublic java.util.List getServiceIds()
serviceId is an identifier.String) of all index services
public java.util.Properties getServiceProperties(java.lang.String serviceId)
throws WcmException
displayname and the class are returned for each
implementation. The constants
SERVICE_NAME and SERVICE_CLASS can be used as keys for getting a property from the returned property map.
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
Properties properties = indexService.getServiceProperties("trexSearch");
//returns "Trex Search"
String displayName = properties.getProperty(IIndexService.SERVICE_NAME);
//returns "com.sapportals.wcm.service.indexmanagement.retrieval.trex.TrexSearch"
String class = properties.getProperty(IIndexService.SERVICE_CLASS);
- Parameters:
serviceId - ID of the index implementation, for example, "trexSearch"- Returns:
- properties of the implementation, for example
IIndexService.SERVICE_CLASS,
IIndexService.SERVICE_NAME, ... - Throws:
WcmException - exception raised in failure situation
public java.util.Set getLanguagesOfIndexedDocuments(java.util.List indexes)
throws WcmException
indexes - List of indexesWcmException - Exception raised in failure situation
public void updateIndex(IIndex index)
throws ResourceException
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex("abc");
index.setIndexName("abc index");
indexService.updateIndex(index);
index - index that has to be updated persistentlyResourceException - exception raised in failure situation
public void internalSaveIndex(IIndex index)
throws WcmException
.generate() method.
In that way the configuration is only made persistent when the index could be created by the
index implementation successfully.
Don't use this method for other purposes.index - index to savepublic java.util.Map groupIndexesByService(java.util.List indexes)
indexes - list of indexes (IIndex) that have to be groupedMap with serviceIds as keys (String) and their
corresponding indexes in a list as values (IIndex)
public java.lang.Object getObjectInstance(java.lang.String objectInstanceName)
throws WcmException
IWcmIndexConst constant. Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE); IFederatedSearch federatedSearch = (IFederatedSearch)indexService.getObjectInstance(IWcmIndexConst.FEDERATED_SEARCH_INSTANCE);
objectInstanceName - ID for the kind of objectWcmException - exception raised in failure situationpublic java.lang.String getCrawlerType()
public java.lang.String getServiceUserId()
To get the resource context of the index management service user, follow this example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE); String serviceUserId = indexService.getServiceUserId(); IResourceContext serviceContext = ResourceFactory.getInstance().getServiceContext(serviceUserId);Note: The user must be configured in user management as a service user.
public IResourceContext getIndexServiceUserContext()
throws WcmException
public void startDeltaIndexCrawler(IIndexFolder indexFolder)
throws WcmException
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex("abc");
//"/documents" must be an index folder of the index "abc".
IIndexFolder indexFolder = index.getIndexFolders().get(RID.getRID("/documents"));
indexService.startDeltaIndexCrawler(indexFolder);
indexFolder - index folder that has to be crawledWcmException - exception raised in failure situation
public void startIndexCrawler(IIndexFolder indexFolder)
throws WcmException
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex("abc");
//"/documents" must be an index folder of the index "abc".
IIndexFolder indexFolder = index.getIndexFolders().get(RID.getRID("/documents"));
indexService.startIndexCrawler(indexFolder);
indexFolder - index folder that has to be crawledWcmException - exception raised in failure situation
public void enqueueDeltaIndexCrawler(IIndexFolder indexFolder)
throws WcmException
runQueuedCrawlers
must be executed. The number of crawlers of the queue that are active
in parallel is defined in the index management service configuration
property maxrunningcrawlers.
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex("abc");
//"/documents" must be an index folder of the index "abc".
IIndexFolder indexFolder = index.getIndexFolders().get(RID.getRID("/documents"));
indexService.queueDeltaIndexCrawler(indexFolder);
indexService.runQueuedCrawlers();
indexFolder - index folder that has to be crawledWcmException - exception raised in failure situationrunQueuedCrawlers()
public void queueDeltaIndexCrawler(IIndexFolder indexFolder)
throws WcmException
runQueuedCrawlers
must be executed. The number of crawlers of the queue that are active
in parallel is defined in the index management service configuration
property maxrunningcrawlers.
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex("abc");
//"/documents" must be an index folder of the index "abc".
IIndexFolder indexFolder = index.getIndexFolders().get(RID.getRID("/documents"));
indexService.queueDeltaIndexCrawler(indexFolder);
indexService.runQueuedCrawlers();
indexFolder - index folder that has to be crawledWcmException - exception raised in failure situationrunQueuedCrawlers()
public void queueIndexCrawler(IIndexFolder indexFolder)
throws WcmException
runQueuedCrawlers
must be executed. The number of crawlers of the queue that are active
in parallel is defined in the index management service configuration
property maxrunningcrawlers.
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex("abc");
//"/documents" must be an index folder of the index "abc".
IIndexFolder indexFolder = index.getIndexFolders().get(RID.getRID("/documents"));
indexService.queueIndexCrawler(indexFolder);
indexService.runQueuedCrawlers();
indexFolder - index folder that has to be crawledWcmException - exception raised in failure situationrunQueuedCrawlers()
public void enqueueIndexCrawler(IIndexFolder indexFolder)
throws WcmException
runQueuedCrawlers
must be executed. The number of crawlers of the queue that are active
in parallel is defined in the index management service configuration
property maxrunningcrawlers.
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex("abc");
//"/documents" must be an index folder of the index "abc".
IIndexFolder indexFolder = index.getIndexFolders().get(RID.getRID("/documents"));
indexService.queueIndexCrawler(indexFolder);
indexService.runQueuedCrawlers();
indexFolder - index folder that has be crawledreindexMode - true, if the documents are indexed using the reindex callWcmException - exception raised in failure situationrunQueuedCrawlers()
public void runQueuedCrawlers()
throws WcmException
queueIndexCrawler and
queueDeltaIndexCrawler methods of this interface.
Example:
IIndexService indexService = (IIndexService)ResourceFactory.getInstance().getServiceFactory().getService(IServiceTypesConst.INDEX_SERVICE);
IIndex index = indexService.getIndex("abc");
//"/documents" must be an index folder of the index "abc".
IIndexFolder indexFolder = index.getIndexFolders().get(RID.getRID("/documents"));
indexService.queueIndexCrawler(indexFolder);
indexService.runQueuedCrawlers();
WcmException - exception raised in failure situationqueueIndexCrawler(IIndexFolder),
queueDeltaIndexCrawler(IIndexFolder)
public ITaskQueueHandler getTaskQueueHandler()
throws WcmException
public void setSchedulerTimeTable(java.lang.String indexId,
ISchedulerTimeTable schedulerTimeTable)
throws WcmException
ISchedulerTimeTable. Thereby it sets this schedule for all
data sources with no own schedule.indexId - String ID fo index.schedulerTimeTable - ISchedulerTimeTableWcmException - in case of an error.
public ISchedulerTimeTable getSchedulerTimeTable(java.lang.String indexId)
throws WcmException
indexId - String ID of the index.WcmException - in case of an error.
public java.lang.String createIndexSchedulerEntryId(java.lang.String indexId,
RID indexFolderRid)
throws WcmException
indexId - String ID of the index.indexFolderRid - RIDWcmException - in case of an error.
public java.lang.String createSchedulerEntryId(java.lang.String indexId,
RID indexFolderRid)
throws WcmException
indexId - String ID of the index.indexFolderRid - RIDWcmException - in case of an error.
public java.lang.String createEmptySchedulerEntryId(java.lang.String indexId)
throws WcmException
indexId - String ID of the index.WcmException - in case of an error.public ISchedulerTask createDeltaIndexSchedulerTask()
public RID getIndexmanagementRepositoryPrefixRID()
throws WcmException
WcmException - in case of an error
public java.util.List getActiveIndexes()
throws WcmException
IIndex)WcmException - in case of an error
public boolean isReadAllowed(IResourceContext context,
IIndex index)
throws WcmException
context - user contextindex - index that is checkedWcmException - in case of an error
public java.util.List isReadAllowed(IResourceContext context,
java.util.List indexes)
throws WcmException
context - user contextindexes - indexes that are checkedWcmException - in case of an error
public boolean isWriteAllowed(IResourceContext context,
IIndex index)
throws WcmException
context - user contextindex - index that is checkedWcmException - in case of an error
public java.util.List isWriteAllowed(IResourceContext context,
java.util.List indexes)
throws WcmException
context - user contextindexes - indexes that are checkedWcmException - in case of an error
public boolean isDeleteAllowed(IResourceContext context,
IIndex index)
throws WcmException
context - user contextindex - index that is checkedWcmException - in case of an error
public java.util.List isDeleteAllowed(IResourceContext context,
java.util.List indexes)
throws WcmException
context - user contextindexes - indexes that are checkedWcmException - in case of an errorpublic int getMaxTransferSize()
public void setMaxTransferSize(int i)
i -
public void startXIndexCrawler(IIndex index,
IResource startResource)
throws WcmException
public void startXTaxRetrainCrawler(IIndex index,
java.lang.String taxonomyName,
ICollection taxonomyCollection,
boolean isSearchRelevant)
throws ResourceException,
WcmException
public com.sapportals.portal.security.usermanagement.IUser getConfigServiceUser()
throws java.lang.Exception
public void startResourceIndexer(IResource document,
AbstractClassificationIndex index)
throws WcmException
public java.util.List getActiveIndexmanagementCrawlers(IIndex index)
throws WcmException
public void deleteCrawlers(java.util.List crawlers)
throws WcmException
public void stopCrawlers(java.util.List crawlers)
throws WcmException
public void suspendCrawlers(java.util.List crawlers)
throws WcmException
public void resumeCrawlers(java.util.List crawlers)
throws WcmException
public ITaxonomyTransport createTaxonomyTransport()
throws ResourceException,
PropertyConfigurationServiceException
public ICompareTaxonomies createCompareTaxonomies()
public java.util.List getAllIndexmanagementCrawlers(IIndex index)
throws ResourceException,
XCrawlerException
index - ResourceException - XCrawlerException -
public java.util.List getFailedCrawlers(IIndex index)
throws ResourceException,
XCrawlerException
index - ResourceException - XCrawlerException -
|
SAP NetWeaver '04 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||