Nuxeo Enterprise Platform 5.4

org.nuxeo.ecm.core.search.backend.testing
Class FakeIndexableResource

java.lang.Object
  extended by org.nuxeo.ecm.core.search.backend.testing.FakeIndexableResource
All Implemented Interfaces:
java.io.Serializable, IndexableResource

public class FakeIndexableResource
extends java.lang.Object
implements IndexableResource

Indexable resources used as proxy in testing data.

Author:
Georges Racinet
See Also:
Serialized Form

Constructor Summary
FakeIndexableResource(IndexableResourceConf conf)
           
 
Method Summary
 ACP computeAcp()
          Computes an ACP for the given resource.
 java.lang.String computeId()
          Computes the resource unique id.
 IndexableResourceConf getConfiguration()
          Returns this instance bound configuration.
 java.lang.String getName()
          Returns the resource configuration name.
 java.io.Serializable getValueFor(java.lang.String indexableDataName)
          Returns the value for a given indexable data name.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FakeIndexableResource

public FakeIndexableResource(IndexableResourceConf conf)
Method Detail

getConfiguration

public IndexableResourceConf getConfiguration()
Description copied from interface: IndexableResource
Returns this instance bound configuration.

Specified by:
getConfiguration in interface IndexableResource
Returns:
an IndexableResourceConf instance.

getName

public java.lang.String getName()
Description copied from interface: IndexableResource
Returns the resource configuration name.

Specified by:
getName in interface IndexableResource
Returns:
the resource name.

getValueFor

public java.io.Serializable getValueFor(java.lang.String indexableDataName)
                                 throws IndexingException
Description copied from interface: IndexableResource
Returns the value for a given indexable data name.

Specified by:
getValueFor in interface IndexableResource
Parameters:
indexableDataName - the actual indexable data name resource side.
Returns:
a serializable object holding the value.
Throws:
IndexingException - TODO

computeId

public java.lang.String computeId()
Description copied from interface: IndexableResource
Computes the resource unique id. This can be costly, since it may involve fetching data, computing hash codes, etc.

Specified by:
computeId in interface IndexableResource
Returns:
the resource id

computeAcp

public ACP computeAcp()
Description copied from interface: IndexableResource
Computes an ACP for the given resource.

The returned value applies to all the resources that may be associated with the present one in an IndexableResources. Confidence in the validity of said value must be as strong as it gets. The counterpart is that the caller must interpret null return values as a lack of info from this and perform other computations.

Specified by:
computeAcp in interface IndexableResource
Returns:
the ACP

Nuxeo Enterprise Platform 5.4

Copyright © 2010 Nuxeo SAS. All Rights Reserved.