wt.fc
Class StandardIdentityService

java.lang.Object
  extended by wt.services.StandardManager
      extended by wt.fc.StandardIdentityService
All Implemented Interfaces:
Serializable, IdentityService, NetFactor, wt.services.Manager

public class StandardIdentityService
extends StandardManager
implements IdentityService, Serializable

Standard implementation of the identity service. Provides means to change the identity of an Identified object as well identity checks for the creation of these objects.

Use the newStandardIdentityService static factory method(s), not the StandardIdentityService constructor, to construct instances of this class. Instances must be constructed using the static factory(s), in order to ensure proper initialization of the instance.



Supported API: true

Extendable: false

See Also:
Serialized Form

Method Summary
 WTCollection changeIdentities(WTKeyedMap identifiedToIdentificationObjectMap)
          Changes the identities of all the Identied objects (the keys) to the ones of the IdentificationObjects (the values).
 Identified changeIdentity(Identified obj, IdentificationObject identity)
          Changes the identity of the object to the one held by the Identification object.
 
Methods inherited from class wt.services.StandardManager
getManagerService, getManagerStatus, getName, getStartupType
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

changeIdentity

public Identified changeIdentity(Identified obj,
                                 IdentificationObject identity)
                          throws WTException
Changes the identity of the object to the one held by the Identification object. The identity change is performed after identity constraints have been checked (including uniqueness constraints). The change is performed as a single operation, even if the identity is composed of several attributes.

Supported API: true

Specified by:
changeIdentity in interface IdentityService
Parameters:
obj -
identity -
Returns:
Identified
Throws:
WTException

changeIdentities

public WTCollection changeIdentities(WTKeyedMap identifiedToIdentificationObjectMap)
                              throws WTException
Changes the identities of all the Identied objects (the keys) to the ones of the IdentificationObjects (the values). Checks the validity of the changes including uniqueness constraints. If the changes are allowed, performs them and saves the changed objects in the database. Returns the changed objects or throws an exception if the change is not allowed. Posts PRE and POST change identity events.

Supported API: true

Specified by:
changeIdentities in interface IdentityService
Parameters:
identifiedToIdentificationObjectMap -
Returns:
WTCollection
Throws:
WTException