wt.ixb.actor
Class ActorTemplate

java.lang.Object
  extended bywt.ixb.actor.ActorTemplate
All Implemented Interfaces:
Actor
Direct Known Subclasses:
CheckOutActorTemplate, CreateNewObjectActorForVersioned, ImportNonVersionedAttrActorForVersioned, LockActorTemplate, NewIterationActorForVersioned, NewVersionActorForVersioned, PickingExistingObjectActorForVersioned, RestoreActor, SubstituteObjectActorForVersioned, UnlockAndIterateActorForVersioned, UpdateInPlaceActorForVersioned

public class ActorTemplate
extends Object
implements Actor

General template for wt.ixb.actor.Actor which defines trivial implementation.

Supported API: true

Extendable: false


Field Summary
private static String CLASSNAME
           
private static String RESOURCE
           
 
Constructor Summary
ActorTemplate()
           
 
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.
 Object importObjectAttributes(ClassExporterImporter handler, Object object, IxbElement fileXML, Importer importer)
          

Supported API: false
 Object importObjectAttributesAfterStore(ClassExporterImporter handler, Object object, IxbElement fileXML, Importer importer)
          

Supported API: false
 void performPostExportAction(ClassExporterImporter handler, Exporter exporter, Object object, IxbElement fileXML)
          Perform any action for the object after the real export ends.
 void performPreExportAction(ClassExporterImporter handler, Exporter exporter, Object object)
          Perform any actions for the object before the real export begins.
 void previewObject(ClassExporterImporter handler, IxbElement fileXML, Importer importer)
          Preview the import, including conflicts checking, without performing the real import.
 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 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

CLASSNAME

private static final String CLASSNAME
Constructor Detail

ActorTemplate

public ActorTemplate()
Method Detail

performPreExportAction

public void performPreExportAction(ClassExporterImporter handler,
                                   Exporter exporter,
                                   Object object)
                            throws WTException
Perform any actions for the object before the real export begins. Usually this method does nothing.

Supported API: true

Specified by:
performPreExportAction in interface Actor
Parameters:
handler - The export class handler.
exporter - The Exporter instance that represents the context of the export operation.
object - The object to be exported.
Throws:
WTException

performPostExportAction

public void performPostExportAction(ClassExporterImporter handler,
                                    Exporter exporter,
                                    Object object,
                                    IxbElement fileXML)
                             throws WTException
Perform any action for the object after the real export ends. Usually all common export actions are executed here.

Supported API: true

Specified by:
performPostExportAction in interface Actor
Parameters:
handler - The export class handler.
exporter - The Exporter instance that represents the context of the export operation.
object - The object to be exported.
fileXML - The exported information of the object.
Throws:
WTException

previewObject

public void previewObject(ClassExporterImporter handler,
                          IxbElement fileXML,
                          Importer importer)
                   throws WTException
Preview the import, including conflicts checking, without performing the real import.

Supported API: true

Specified by:
previewObject in interface Actor
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

createObject

public Object createObject(ClassExporterImporter handler,
                           IxbElement fileXML,
                           Importer importer)
                    throws WTException
Create an object instance. Usually the instance will not be persisted within this method context.

Supported API: true

Specified by:
createObject in interface Actor
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 )

importObjectAttributes

public Object importObjectAttributes(ClassExporterImporter handler,
                                     Object object,
                                     IxbElement fileXML,
                                     Importer importer)
                              throws WTException


Supported API: false

Specified by:
importObjectAttributes in interface Actor
Parameters:
handler -
object -
fileXML -
importer -
Returns:
Object
Throws:
WTException

importObjectAttributesAfterStore

public Object importObjectAttributesAfterStore(ClassExporterImporter handler,
                                               Object object,
                                               IxbElement fileXML,
                                               Importer importer)
                                        throws WTException


Supported API: false

Specified by:
importObjectAttributesAfterStore in interface Actor
Parameters:
handler -
object -
fileXML -
importer -
Returns:
Object
Throws:
WTException

storeObject

public Object storeObject(ClassExporterImporter handler,
                          Object object,
                          IxbElement fileXML,
                          Importer importer)
                   throws WTException
Persists the specified object as created by createObject(ClassExporterImporter handler, IxbElement fileXML, Importer importer)

Supported API: true

Specified by:
storeObject in interface Actor
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 WTException
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
Parameters:
obj -
Throws:
WTException