Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.search.api.client.indexing.resources.factory
Interface IndexableResourceFactory

All Superinterfaces:
java.io.Serializable
All Known Implementing Classes:
AbstractIndexableResourceFactory, AuditIndexableResourceFactory, DocumentBuiltinsIndexableResourceFactory, DocumentIndexableResourceFactory, DocumentIndexableResourceFactory

public interface IndexableResourceFactory
extends java.io.Serializable

Generic indexable resource factory interface.

API to generate indexable resource instances and resolve them given configuration and target objects on which indexable resources apply.

Author:
Julien Anguenot

Method Summary
 IndexableResource createEmptyIndexableResource()
          Returns an empty indexable resource instance.
 IndexableResource createIndexableResourceFrom(java.io.Serializable targetResource, IndexableResourceConf conf, java.lang.String sid)
          Returns an indexable resource instance given a target object needed by the resource along with its configuration.
 ResolvedResource createResolvedResourceFor(java.io.Serializable targetResource, IndexableResourceConf conf, java.lang.String sid)
          Resolves and returns an indexable resource instance.
 ResolvedResources createResolvedResourcesFor(java.io.Serializable targetResource, IndexableResourceConf conf, java.lang.String sid)
          Resolves an indexable resources and returns an aggregated resolved resources instances.
 ResolvedResource resolveResourceFor(IndexableResource resource)
          Resolves an indexable resource instance.
 ResolvedResource resolveResourceFor(java.io.Serializable targetResource, IndexableResourceConf conf, java.lang.String sid)
          Resolves and returns an indexable resource instance.
 ResolvedResources resolveResourcesFor(IndexableResource resource)
          Resolves an indexable resources and returns an aggregated resolved resources instances.
 

Method Detail

createEmptyIndexableResource

IndexableResource createEmptyIndexableResource()
Returns an empty indexable resource instance.

Useful for complete computations of indexable resources outside of the factory.

Returns:
an empty indexable resource instance.

createIndexableResourceFrom

IndexableResource createIndexableResourceFrom(java.io.Serializable targetResource,
                                              IndexableResourceConf conf,
                                              java.lang.String sid)
Returns an indexable resource instance given a target object needed by the resource along with its configuration.

For instance it could be a document model or log entry id or still a relation.

Parameters:
conf - the bound indexable resource configuration.
sid - optional Nuxeo Core session id. (XXX should be removed from the signature)
targetResource - the target object on which the indexable resource applies.
Returns:
an indexable resource instance.

resolveResourceFor

ResolvedResource resolveResourceFor(IndexableResource resource)
                                    throws IndexingException
Resolves an indexable resource instance.

Note the indexable resource instance contains the configuration and the target object on which it applies.

Parameters:
resource - the indexable resource instance.
Returns:
a resolved indexable resource instance.
Throws:
IndexingException

resolveResourceFor

ResolvedResource resolveResourceFor(java.io.Serializable targetResource,
                                    IndexableResourceConf conf,
                                    java.lang.String sid)
                                    throws IndexingException
Resolves and returns an indexable resource instance.

Parameters:
targetResource - the target object on which the indexable resource applies.
conf - the indexable resource configuration
sid - optional Nuxeo Core session id. (XXX should be removed from the signature)
Returns:
a resolved indexable resource instance.
Throws:
IndexingException

createResolvedResourceFor

ResolvedResource createResolvedResourceFor(java.io.Serializable targetResource,
                                           IndexableResourceConf conf,
                                           java.lang.String sid)
                                           throws IndexingException
Resolves and returns an indexable resource instance.

Parameters:
targetResource - the target object on which the indexable resource applies.
conf - the indexable resource configuration
sid - optional Nuxeo Core session id. (XXX should be removed from the signature)
Returns:
a resolved indexable resource instance.
Throws:
IndexingException

resolveResourcesFor

ResolvedResources resolveResourcesFor(IndexableResource resource)
Resolves an indexable resources and returns an aggregated resolved resources instances.

The idea here is to simplify the generations of aggregated resources when only one indexable resource is involved.

Parameters:
resource - an indexable resource instance.
Returns:
a resolved indexable resource instance.

createResolvedResourcesFor

ResolvedResources createResolvedResourcesFor(java.io.Serializable targetResource,
                                             IndexableResourceConf conf,
                                             java.lang.String sid)
                                             throws IndexingException
Resolves an indexable resources and returns an aggregated resolved resources instances.

The idea here is to simplify the generations of aggregated resources when only one indexable resource is involved.

Parameters:
targetResource - the target object on which the indexable resource applies.
conf - the indexable resource configuration
sid - optional Nuxeo Core session id. (XXX should be removed from the signature)
Returns:
a resolved indexable resource instance.
Throws:
IndexingException

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.