wt.ixb.actor
Class CreateNewObjectActorForVersioned

java.lang.Object
  extended bywt.ixb.actor.ActorTemplate
      extended bywt.ixb.actor.CreateNewObjectActorForVersioned
All Implemented Interfaces:
Actor

public class CreateNewObjectActorForVersioned
extends ActorTemplate

Title: CreateNewObjectActor

Description: This actor creates a brand new object with new identities provided from XML

Copyright: Copyright PTC (c)

Company: PTC


Field Summary
private  String newIteration
           
private  String newName
           
private  String newNumber
           
private  String newVersion
           
private static String RESOURCE
           
private static String XML_PARAM_ITERATION
           
private static String XML_PARAM_NAME
           
private static String XML_PARAM_NUMBER
          XML tags bellows are used to get values of action parameters They should be removed if Anna implements them in IxbActionsHelper
private static String XML_PARAM_VERSION
           
 
Fields inherited from class wt.ixb.actor.ActorTemplate
 
Constructor Summary
CreateNewObjectActorForVersioned()
           
 
Method Summary
 void checkApplicabilityOfAction(Object obj)
          Check if this action is applicable to the specified object.
 Object createObject(ClassExporterImporter _handler, IxbElement fileXML, Importer importer)
          Create an object instance.
private  void parseNewIdentities(IxbElement fileXML)
          get new identities of an object from newId The identities are XML elements
 void previewObject(ClassExporterImporter _handler, IxbElement fileXML, Importer importer)
          Preview the import, including conflicts checking, without performing the real import.
private static void printout(String s)
           
 Object storeObject(ClassExporterImporter _handler, Object object, IxbElement fileXML, Importer importer)
          Persists the specified object as created by createObject(ClassExporterImporter handler, IxbElement fileXML, Importer importer)

Supported API: true
 
Methods inherited from class wt.ixb.actor.ActorTemplate
importObjectAttributes, importObjectAttributesAfterStore, performPostExportAction, performPreExportAction
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

newNumber

private String newNumber

newName

private String newName

newVersion

private String newVersion

newIteration

private String newIteration

XML_PARAM_NUMBER

private static final String XML_PARAM_NUMBER
XML tags bellows are used to get values of action parameters They should be removed if Anna implements them in IxbActionsHelper

See Also:
Constant Field Values

XML_PARAM_NAME

private static final String XML_PARAM_NAME
See Also:
Constant Field Values

XML_PARAM_VERSION

private static final String XML_PARAM_VERSION
See Also:
Constant Field Values

XML_PARAM_ITERATION

private static final String XML_PARAM_ITERATION
See Also:
Constant Field Values
Constructor Detail

CreateNewObjectActorForVersioned

public CreateNewObjectActorForVersioned()
Method Detail

createObject

public Object createObject(ClassExporterImporter _handler,
                           IxbElement fileXML,
                           Importer importer)
                    throws WTException
Description copied from class: ActorTemplate
Create an object instance. Usually the instance will not be persisted within this method context.

Supported API: true

Specified by:
createObject in interface Actor
Overrides:
createObject in class ActorTemplate
Parameters:
_handler - The import class handler for the corresponding XML file.
fileXML - the XML element to be imported.
importer - The Importer instance that represents the context of the import operation.
Returns:
Object
Throws:
WTException
See Also:
method storeObject( ClassExporterImporter handler, Object object, IxbElement fileXML, Importer importer )

storeObject

public Object storeObject(ClassExporterImporter _handler,
                          Object object,
                          IxbElement fileXML,
                          Importer importer)
                   throws WTException
Description copied from class: ActorTemplate
Persists the specified object as created by createObject(ClassExporterImporter handler, IxbElement fileXML, Importer importer)

Supported API: true

Specified by:
storeObject in interface Actor
Overrides:
storeObject in class ActorTemplate
Parameters:
_handler - The import class handler for the corresponding XML file.
object - The object to be persisted.
fileXML - the XML element to be imported.
importer - The Importer instance that represents the context of the import operation.
Returns:
Object
Throws:
WTException

checkApplicabilityOfAction

public void checkApplicabilityOfAction(Object obj)
                                throws IxbInapplicableActionException
Description copied from class: ActorTemplate
Check if this action is applicable to the specified object. If not, throw wt.util.WTException

Supported API: true

Specified by:
checkApplicabilityOfAction in interface Actor
Overrides:
checkApplicabilityOfAction in class ActorTemplate
Parameters:
obj -
Throws:
IxbInapplicableActionException

parseNewIdentities

private void parseNewIdentities(IxbElement fileXML)
                         throws WTException
get new identities of an object from newId The identities are XML elements

Throws:
WTException

previewObject

public void previewObject(ClassExporterImporter _handler,
                          IxbElement fileXML,
                          Importer importer)
                   throws WTException
Description copied from class: ActorTemplate
Preview the import, including conflicts checking, without performing the real import.

Supported API: true

Specified by:
previewObject in interface Actor
Overrides:
previewObject in class ActorTemplate
Parameters:
_handler - The import class handler for the corresponding XML file.
fileXML - the XML element to be imported.
importer - The Importer instance that represents the context of the import operation.
Throws:
WTException

printout

private static void printout(String s)