com.ptc.windchill.cadx.common.pageBuilder
Class Action

java.lang.Object
  extended bycom.ptc.windchill.cadx.common.pageBuilder.Action
All Implemented Interfaces:
Externalizable, Serializable
Direct Known Subclasses:
QueueAbleAction

public abstract class Action
extends Object
implements Externalizable



Supported API: true

Extendable: true

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static long EXTERNALIZATION_VERSION_UID
           
private  String name
           
private  Vector objects
           
protected static long OLD_FORMAT_VERSION_UID
           
private  Hashtable parameters
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
private  Locale userLocale
           
protected static boolean VERBOSE
           
 
Constructor Summary
Action()
           
 
Method Summary
 void addParameter(Object key, Object value)
          

Supported API: false
abstract  int execute()
          This is the method that should have the code that is executed for this particular action.
 String getName()
          Gets the value of the attribute: name; A localized name of the action (will be used to give status feedback of the action)

Supported API: false
 Vector getObjects()
          Gets the value of the attribute: objects; The set of objects to act on.
 Object getParameter(Object key)
          

Supported API: false
 Hashtable getParameters()
          Gets the value of the attribute: parameters; An Hashtable of parameters.
 Locale getUserLocale()
          Gets the value of the attribute: userLocale.
private  void nameValidate(String a_Name)
           
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
private  boolean readOldVersion(ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source, which is not the current version.
protected  boolean readVersion(Action thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setName(String a_Name)
          Sets the value of the attribute: name; A localized name of the action (will be used to give status feedback of the action)

Supported API: false
 void setObjects(Vector a_Objects)
          Sets the value of the attribute: objects; The set of objects to act on.
 void setParameters(Hashtable a_Parameters)
          Sets the value of the attribute: parameters; An Hashtable of parameters.
 void setUserLocale(Locale a_UserLocale)
          Sets the value of the attribute: userLocale.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 
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

objects

private Vector objects

name

private String name

parameters

private Hashtable parameters

userLocale

private Locale userLocale

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

EXTERNALIZATION_VERSION_UID

public static final long EXTERNALIZATION_VERSION_UID
See Also:
Constant Field Values

OLD_FORMAT_VERSION_UID

protected static final long OLD_FORMAT_VERSION_UID
See Also:
Constant Field Values

VERBOSE

protected static boolean VERBOSE
Constructor Detail

Action

public Action()
Method Detail

writeExternal

public void writeExternal(ObjectOutput output)
                   throws IOException
Writes the non-transient fields of this class to an external source.

Supported API: false

Specified by:
writeExternal in interface Externalizable
Parameters:
output -
Throws:
IOException

readExternal

public void readExternal(ObjectInput input)
                  throws IOException,
                         ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Specified by:
readExternal in interface Externalizable
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(Action thisObject,
                              ObjectInput input,
                              long readSerialVersionUID,
                              boolean passThrough,
                              boolean superDone)
                       throws IOException,
                              ClassNotFoundException
Reads the non-transient fields of this class from an external source.

Supported API: false

Parameters:
thisObject -
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

readOldVersion

private boolean readOldVersion(ObjectInput input,
                               long readSerialVersionUID,
                               boolean passThrough,
                               boolean superDone)
                        throws IOException,
                               ClassNotFoundException
Reads the non-transient fields of this class from an external source, which is not the current version.

Parameters:
input -
readSerialVersionUID -
passThrough -
superDone -
Returns:
boolean
Throws:
IOException
ClassNotFoundException

getObjects

public Vector getObjects()
Gets the value of the attribute: objects; The set of objects to act on.

Supported API: false

Returns:
Vector

setObjects

public void setObjects(Vector a_Objects)
                throws WTPropertyVetoException
Sets the value of the attribute: objects; The set of objects to act on.

Supported API: false

Parameters:
a_Objects -
Throws:
WTPropertyVetoException

getName

public String getName()
Gets the value of the attribute: name; A localized name of the action (will be used to give status feedback of the action)

Supported API: false

Returns:
String

setName

public void setName(String a_Name)
             throws WTPropertyVetoException
Sets the value of the attribute: name; A localized name of the action (will be used to give status feedback of the action)

Supported API: false

Parameters:
a_Name -
Throws:
WTPropertyVetoException

nameValidate

private void nameValidate(String a_Name)
                   throws WTPropertyVetoException
Parameters:
a_Name -
Throws:
WTPropertyVetoException

getParameters

public Hashtable getParameters()
Gets the value of the attribute: parameters; An Hashtable of parameters.

Supported API: false

Returns:
Hashtable

setParameters

public void setParameters(Hashtable a_Parameters)
                   throws WTPropertyVetoException
Sets the value of the attribute: parameters; An Hashtable of parameters.

Supported API: false

Parameters:
a_Parameters -
Throws:
WTPropertyVetoException

getUserLocale

public Locale getUserLocale()
Gets the value of the attribute: userLocale.

Supported API: false

Returns:
Locale

setUserLocale

public void setUserLocale(Locale a_UserLocale)
                   throws WTPropertyVetoException
Sets the value of the attribute: userLocale.

Supported API: false

Parameters:
a_UserLocale -
Throws:
WTPropertyVetoException

execute

public abstract int execute()
This is the method that should have the code that is executed for this particular action. When implementing this method, all error messgaes should be put in the logger (logger can be obtained by calling getLogger()). Status messages (messages that appear in status area) should not be put in logger in this method, it will be taken care by methods that call this method by examining the return of this method. The return will be one of SUCCESS, FAILURE, WARNINGS

Supported API: false

Returns:
int

addParameter

public void addParameter(Object key,
                         Object value)
                  throws WTException


Supported API: false

Parameters:
key -
value -
Throws:
WTException

getParameter

public Object getParameter(Object key)
                    throws WTException


Supported API: false

Parameters:
key -
Returns:
Object
Throws:
WTException