com.sun.ebxml.registry.lcm
Class LifeCycleManagerImpl

java.lang.Object
  |
  +--com.sun.ebxml.registry.lcm.LifeCycleManagerImpl
All Implemented Interfaces:
LifeCycleManager

public class LifeCycleManagerImpl
extends java.lang.Object
implements LifeCycleManager

Implementation of the LifeCycleManager interface

Author:
Farrukh S. Najmi, Adrian Chong
See Also:

Constructor Summary
protected LifeCycleManagerImpl()
           
 
Method Summary
 org.oasis.ebxml.registry.bindings.rs.RegistryResponse addSlots(org.oasis.ebxml.registry.bindings.rs.AddSlotsRequest req)
          Add slots to one or more registry entries.
 org.oasis.ebxml.registry.bindings.rs.RegistryResponse approveObjects(org.oasis.ebxml.registry.bindings.rim.User user, org.oasis.ebxml.registry.bindings.rs.ApproveObjectsRequest req)
          Approves one or more previously submitted objects
 org.oasis.ebxml.registry.bindings.rs.RegistryResponse deprecateObjects(org.oasis.ebxml.registry.bindings.rim.User user, org.oasis.ebxml.registry.bindings.rs.DeprecateObjectsRequest req)
          Deprecates one or more previously submitted objects
 void fixTemporaryIds(java.util.ArrayList objs, java.util.HashMap idMap)
           
static LifeCycleManagerImpl getInstance()
           
 boolean isValidRegistryId(java.lang.String id)
          Check whether the id is a valid UUID.
static void main(java.lang.String[] args)
           
static void printUsage()
           
 org.oasis.ebxml.registry.bindings.rs.RegistryResponse removeObjects(org.oasis.ebxml.registry.bindings.rim.User user, org.oasis.ebxml.registry.bindings.rs.RemoveObjectsRequest req)
          Removes one or more previously submitted objects from the registry.
 org.oasis.ebxml.registry.bindings.rs.RegistryResponse removeSlots(org.oasis.ebxml.registry.bindings.rs.RemoveSlotsRequest req)
          Remove specified slots from one or more registry entries.
 org.oasis.ebxml.registry.bindings.rs.RegistryResponse submitObjects(org.oasis.ebxml.registry.bindings.rim.User user, org.oasis.ebxml.registry.bindings.rs.SubmitObjectsRequest req, java.util.HashMap idToRepositoryItemMap)
          Submits one or more RegistryObjects and one or more repository items.
 org.oasis.ebxml.registry.bindings.rs.RegistryResponse updateObjects(org.oasis.ebxml.registry.bindings.rim.User user, org.oasis.ebxml.registry.bindings.rs.UpdateObjectsRequest req, java.util.HashMap idToRepositoryMap)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LifeCycleManagerImpl

protected LifeCycleManagerImpl()
Method Detail

getInstance

public static LifeCycleManagerImpl getInstance()

submitObjects

public org.oasis.ebxml.registry.bindings.rs.RegistryResponse submitObjects(org.oasis.ebxml.registry.bindings.rim.User user,
                                                                           org.oasis.ebxml.registry.bindings.rs.SubmitObjectsRequest req,
                                                                           java.util.HashMap idToRepositoryItemMap)
                                                                    throws RegistryException
Submits one or more RegistryObjects and one or more repository items.

Note: One more special feature that is not in the RS spec. version 2. The SubmitObjectsRequest allows updating objects.If a object of a particular id already exist, it is updated instead of trying to be inserted.

Specified by:
submitObjects in interface LifeCycleManager
Parameters:
idToRepositoryItemMap - is a HashMap with key that is id of a RegistryObject and value that is a RepositoryItem instance.
RegistryException

isValidRegistryId

public boolean isValidRegistryId(java.lang.String id)
Check whether the id is a valid UUID.

Returns:
false if id is null, or id does not start with "urn:uuid:", or it is not valid.

fixTemporaryIds

public void fixTemporaryIds(java.util.ArrayList objs,
                            java.util.HashMap idMap)
                     throws RegistryException
RegistryException

approveObjects

public org.oasis.ebxml.registry.bindings.rs.RegistryResponse approveObjects(org.oasis.ebxml.registry.bindings.rim.User user,
                                                                            org.oasis.ebxml.registry.bindings.rs.ApproveObjectsRequest req)
Approves one or more previously submitted objects

Specified by:
approveObjects in interface LifeCycleManager

updateObjects

public org.oasis.ebxml.registry.bindings.rs.RegistryResponse updateObjects(org.oasis.ebxml.registry.bindings.rim.User user,
                                                                           org.oasis.ebxml.registry.bindings.rs.UpdateObjectsRequest req,
                                                                           java.util.HashMap idToRepositoryMap)
Specified by:
updateObjects in interface LifeCycleManager

deprecateObjects

public org.oasis.ebxml.registry.bindings.rs.RegistryResponse deprecateObjects(org.oasis.ebxml.registry.bindings.rim.User user,
                                                                              org.oasis.ebxml.registry.bindings.rs.DeprecateObjectsRequest req)
Deprecates one or more previously submitted objects

Specified by:
deprecateObjects in interface LifeCycleManager

removeObjects

public org.oasis.ebxml.registry.bindings.rs.RegistryResponse removeObjects(org.oasis.ebxml.registry.bindings.rim.User user,
                                                                           org.oasis.ebxml.registry.bindings.rs.RemoveObjectsRequest req)
Removes one or more previously submitted objects from the registry. If the deletionScope is "DeleteRepositoryItemOnly", it will assume all the ObjectRef under ObjectRefList is referencing repository items. If the deletionScope is "DeleteAll", the reference may be either RegistryObject or repository item. In both case, if the referenced object cannot be found, RegistryResponse with errors list will be returned.

Specified by:
removeObjects in interface LifeCycleManager

addSlots

public org.oasis.ebxml.registry.bindings.rs.RegistryResponse addSlots(org.oasis.ebxml.registry.bindings.rs.AddSlotsRequest req)
Add slots to one or more registry entries.

Specified by:
addSlots in interface LifeCycleManager

removeSlots

public org.oasis.ebxml.registry.bindings.rs.RegistryResponse removeSlots(org.oasis.ebxml.registry.bindings.rs.RemoveSlotsRequest req)
Remove specified slots from one or more registry entries.

Specified by:
removeSlots in interface LifeCycleManager

printUsage

public static void printUsage()

main

public static void main(java.lang.String[] args)


Copyright © 2001-2003 OASIS. All Rights Reserved.