com.centrasite.jaxr
Interface CentraSiteImportValidator


public interface CentraSiteImportValidator


Method Summary
 java.util.Collection getIgnoredObjects()
          Return collection of objects that have been ignored because they are already present in the registry with the same state.
 javax.xml.registry.infomodel.RegistryObject getImportedObject(java.lang.String id)
          Get the imported registry object, organized in a separate cache.
 java.util.Collection getReplacingObjects()
          Return collection of objects that must be replaced in the registry because they are already present with a different state.
 void importObject(java.lang.String xml)
          Import an object
 void importObject(java.lang.String xml, java.lang.String centrasiteUrl, java.util.Collection lifecycleStages)
          Import an object, check lifecycle stages
 boolean removeImportedObject(java.lang.String id)
          Remove a previously imported object from this ImportValidator.
 void setConflictListener(CentraSiteConflictListener conflictListener)
          Set a listener for "Conflict" situations during ImportValidation
 void setImportGroups(boolean importGroups)
          Sets whether the group objects can be included for import
 void setKeepOwner()
          Set whether to keep the owner of the validated objects in contrast to set to the importing user.
 javax.xml.registry.BulkResponse validate()
          Validate imported objects, that is verify all outgoing references are satisfied by persistent objects or objects imported in the same chunk.
 

Method Detail

importObject

void importObject(java.lang.String xml)
                  throws javax.xml.registry.JAXRException
Import an object

Parameters:
xml - the XML representation of the object to be imported
Throws:
javax.xml.registry.JAXRException

importObject

void importObject(java.lang.String xml,
                  java.lang.String centrasiteUrl,
                  java.util.Collection lifecycleStages)
                  throws javax.xml.registry.JAXRException
Import an object, check lifecycle stages

Parameters:
xml - the XML representation of the object to be imported
centrasiteUrl - the URL of the connection
lifecycleStages - collection of lifecycle stages the object can be imported into
Throws:
javax.xml.registry.JAXRException

removeImportedObject

boolean removeImportedObject(java.lang.String id)
                             throws javax.xml.registry.JAXRException
Remove a previously imported object from this ImportValidator.

Parameters:
id - the key id of the object to be removed
Returns:
true, if the object was in fact removed. false, if object was not found
Throws:
javax.xml.registry.JAXRException

getIgnoredObjects

java.util.Collection getIgnoredObjects()
Return collection of objects that have been ignored because they are already present in the registry with the same state.

Returns:
the collection of registry objects

getReplacingObjects

java.util.Collection getReplacingObjects()
Return collection of objects that must be replaced in the registry because they are already present with a different state.

Returns:
the collection of registry objects

validate

javax.xml.registry.BulkResponse validate()
                                         throws javax.xml.registry.JAXRException
Validate imported objects, that is verify all outgoing references are satisfied by persistent objects or objects imported in the same chunk. Also verify that we are not importing any objects that do already exist, unless they are in the same state (by timestamp).

Returns:
a BulkResponse whose collection is the list of validated objects, this list can be passed on to LifeCycleManager.saveObjects() to make them persistent. The exceptions returned in the BulkResponse represent those objects that cannot be imported, all entries are instances of ImportValidationException
Throws:
javax.xml.registry.JAXRException

setKeepOwner

void setKeepOwner()
Set whether to keep the owner of the validated objects in contrast to set to the importing user.


setImportGroups

void setImportGroups(boolean importGroups)
Sets whether the group objects can be included for import

Parameters:
importGroups -

setConflictListener

void setConflictListener(CentraSiteConflictListener conflictListener)
Set a listener for "Conflict" situations during ImportValidation

Parameters:
conflictListener - a listener

getImportedObject

javax.xml.registry.infomodel.RegistryObject getImportedObject(java.lang.String id)
                                                              throws javax.xml.registry.JAXRException
Get the imported registry object, organized in a separate cache.

Parameters:
id - the id of the object
Returns:
imported registry object
Throws:
javax.xml.registry.JAXRException