Nuxeo Enterprise Platform 5.1

org.nuxeo.ecm.core.search.api.client.indexing.resources.document.impl
Class AbstractNXCoreIndexableResource

java.lang.Object
  extended by org.nuxeo.ecm.core.search.api.client.indexing.resources.AbstractIndexableResource
      extended by org.nuxeo.ecm.core.search.api.client.indexing.resources.document.impl.AbstractNXCoreIndexableResource
All Implemented Interfaces:
Serializable, NXCoreIndexableResource, IndexableResource
Direct Known Subclasses:
DocumentIndexableResourceImpl, RelationIndexableResourceImpl

public abstract class AbstractNXCoreIndexableResource
extends AbstractIndexableResource
implements NXCoreIndexableResource

Abstract Nuxeo Core indexable resource implementation.

Indexable resource that wish to communicate with Nuxeo Core can extend this class.

Author:
Julien Anguenot
See Also:
Serialized Form

Field Summary
protected  CoreSession coreSession
           
protected  String docRepositoryName
           
protected  String sid
           
 
Fields inherited from class org.nuxeo.ecm.core.search.api.client.indexing.resources.AbstractIndexableResource
configuration, name
 
Constructor Summary
protected AbstractNXCoreIndexableResource()
           
protected AbstractNXCoreIndexableResource(String name, IndexableResourceConf configuration)
           
protected AbstractNXCoreIndexableResource(String name, IndexableResourceConf configuration, String sid, String docRepositoryName)
           
 
Method Summary
 void closeCoreSession()
          Close the core session only if it was not managed externally, i.e.
 CoreSession getCoreSession()
          Returns a Nuxeo core session.
 String getDocRepositoryName()
          Returns the repository identifier where the document is stored.
 
Methods inherited from class org.nuxeo.ecm.core.search.api.client.indexing.resources.AbstractIndexableResource
computeAcp, getConfiguration, getName, isBoundToIndexingThread, login, logout
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuxeo.ecm.core.search.api.client.indexing.resources.IndexableResource
computeAcp, computeId, getConfiguration, getName, getValueFor
 

Field Detail

coreSession

protected CoreSession coreSession

docRepositoryName

protected final String docRepositoryName

sid

protected final String sid
Constructor Detail

AbstractNXCoreIndexableResource

protected AbstractNXCoreIndexableResource()

AbstractNXCoreIndexableResource

protected AbstractNXCoreIndexableResource(String name,
                                          IndexableResourceConf configuration)

AbstractNXCoreIndexableResource

protected AbstractNXCoreIndexableResource(String name,
                                          IndexableResourceConf configuration,
                                          String sid,
                                          String docRepositoryName)
Method Detail

getCoreSession

public CoreSession getCoreSession()
                           throws IndexingException
Description copied from interface: NXCoreIndexableResource
Returns a Nuxeo core session.

This is the implementation job to either authenticate or reuse a new existing session. Check implementation for details.

Specified by:
getCoreSession in interface NXCoreIndexableResource
Returns:
a initialized CoreSession instance.
Throws:
IndexingException

closeCoreSession

public void closeCoreSession()
                      throws IndexingException
Close the core session only if it was not managed externally, i.e. managedSessionId was not explicitly provided to the resource constructor

Specified by:
closeCoreSession in interface NXCoreIndexableResource
Throws:
IndexingException

getDocRepositoryName

public String getDocRepositoryName()
Description copied from interface: NXCoreIndexableResource
Returns the repository identifier where the document is stored.

Specified by:
getDocRepositoryName in interface NXCoreIndexableResource
Returns:
the repository identifier

Nuxeo Enterprise Platform 5.1

Copyright ? 2007 Nuxeo SAS. All Rights Reserved.