SMILA (incubation) API documentation

org.eclipse.smila.connectivity.framework.util
Class ConnectivityIdFactory

java.lang.Object
  extended by org.eclipse.smila.connectivity.framework.util.ConnectivityIdFactory

public final class ConnectivityIdFactory
extends java.lang.Object

A factory to create Id objects in Crawlers and Agents.


Method Summary
 ConnectivityId createId(java.lang.String dataSourceId, AnyMap idAttributes)
          Create an Id object based on the given Attributes.
 ConnectivityId createId(java.lang.String dataSourceId, java.lang.String simpleId)
          Create an Id object based on data source and simple object id.
static ConnectivityIdFactory getInstance()
          Returns the singleton instance of the IdFactory.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static ConnectivityIdFactory getInstance()
Returns the singleton instance of the IdFactory.

Returns:
the IdFactory

createId

public ConnectivityId createId(java.lang.String dataSourceId,
                               AnyMap idAttributes)
Create an Id object based on the given Attributes.

Note the order of elementds in the passed AnyMaps is important and reflected in the generated hash and id. Usually this is not wanted but for performance reasons it is better to take the order as is and ensure proper ordering in the crawler/agent.

Parameters:
dataSourceId - the dataSourceId. Must not be null or empty.
idAttributes - an AnyMap of Any objects whose entries are used to create the Id. Must not be null or empty.
Returns:
the ConnectivityId object

createId

public ConnectivityId createId(java.lang.String dataSourceId,
                               java.lang.String simpleId)
Create an Id object based on data source and simple object id.

Parameters:
dataSourceId - the dataSourceId. Must not be null or empty.
simpleId - a simple object id
Returns:
the ConnectivityId object

SMILA (incubation) API documentation