wt.queue
Class WtQueueEntry

java.lang.Object
  extended bywt.fc.WTObject
      extended bywt.fc.Item
          extended bywt.queue.WtQueueEntry
All Implemented Interfaces:
AccessControlled, DisplayIdentification, DomainAdministered, Externalizable, NetFactor, ObjectMappable, Persistable, Serializable
Direct Known Subclasses:
QueueEntry, ScheduleQueueEntry

public abstract class WtQueueEntry
extends Item
implements Externalizable



Supported API: true

Extendable: false

See Also:
Serialized Form

Field Summary
private static String CLASSNAME
           
static String END_EXEC
          Label for the attribute; Time execution finished (COMPLETED or FAILED).
private  Timestamp endExec
           
static String ENTRY_NUMBER
          Label for the attribute.
static String ENTRY_OWNER
          Label for the attribute.
private  Long entryNumber
           
private  WTPrincipalReference entryOwner
           
static long EXTERNALIZATION_VERSION_UID
           
static String FAILURE_COUNT
          Label for the attribute.
private  Long failureCount
           
protected static long OLD_FORMAT_VERSION_UID
           
static String QUEUE_REF
          Label for the attribute; Reference to the processing queue to which the entry belongs.
private  ObjectReference queueRef
           
private static String RESOURCE
           
(package private) static long serialVersionUID
           
static String START_EXEC
          Label for the attribute; Time that execution started.
private  Timestamp startExec
           
static String STATUS_INFO
          Label for the attribute.
private  StatusInfo statusInfo
           
static String TARGET_CLASS
          Label for the attribute; Fully qualified name of the class whose's method is to be executed.
private static int TARGET_CLASS_UPPER_LIMIT
           
static String TARGET_METHOD
          Label for the attribute; Name of the method to be executed.
private static int TARGET_METHOD_UPPER_LIMIT
           
private  String targetClass
           
private  String targetMethod
           
 
Fields inherited from class wt.fc.Item
VERSION_40_UID, VERSION_51_UID
 
Fields inherited from class wt.fc.WTObject
CREATE_TIMESTAMP, MODIFY_TIMESTAMP
 
Fields inherited from interface wt.admin.DomainAdministered
DOMAIN_REF, INHERITED_DOMAIN
 
Fields inherited from interface wt.fc.Persistable
IDENTITY, PERSIST_INFO, TYPE
 
Fields inherited from interface wt.identity.DisplayIdentification
DISPLAY_IDENTIFIER, DISPLAY_IDENTITY, DISPLAY_TYPE
 
Constructor Summary
WtQueueEntry()
           
 
Method Summary
 Vector convertFromByteArray(byte[] byteArray)
           
 byte[] convertFromVector(Vector meth_args)
           
 boolean equals(Object obj)
          Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers.
 StatusInfo execute()
          Executes the entry's processing request.
 String getDisplayString()
          

Supported API: true
 Timestamp getEndExec()
          Gets the value of the attribute: END_EXEC.
 Long getEntryNumber()
          Gets the value of the attribute: ENTRY_NUMBER.
 WTPrincipalReference getEntryOwner()
          Gets the value of the attribute: ENTRY_OWNER.
 Long getFailureCount()
          Gets the value of the attribute: FAILURE_COUNT.
 WTPrincipal getPrincipal()
          Returns the principal that owns the entry's execution.
 ObjectReference getQueueRef()
          Gets the value of the attribute: QUEUE_REF.
 Timestamp getStartExec()
          Gets the value of the attribute: START_EXEC.
 StatusInfo getStatusInfo()
          Gets the value of the attribute: STATUS_INFO.
 String getTargetClass()
          Gets the value of the attribute: TARGET_CLASS.
 String getTargetMethod()
          Gets the value of the attribute: TARGET_METHOD.
 int hashCode()
          Returns a hash code for this object based upon its ObjectIdentifier.
 void readExternal(ObjectInput input)
          Reads the non-transient fields of this class from an external source.
 void readExternal(PersistentRetrieveIfc input)
          Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.
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(WtQueueEntry thisObject, ObjectInput input, long readSerialVersionUID, boolean passThrough, boolean superDone)
          Reads the non-transient fields of this class from an external source.
 void setEndExec(Timestamp a_EndExec)
          Sets the value of the attribute: END_EXEC.
 void setEntryNumber(Long a_EntryNumber)
          Sets the value of the attribute: ENTRY_NUMBER.
 void setEntryOwner(WTPrincipalReference a_EntryOwner)
          Sets the value of the attribute: ENTRY_OWNER.
 void setFailureCount(Long a_FailureCount)
          Sets the value of the attribute: FAILURE_COUNT.
 void setQueueRef(ObjectReference a_QueueRef)
          Sets the value of the attribute: QUEUE_REF.
 void setStartExec(Timestamp a_StartExec)
          Sets the value of the attribute: START_EXEC.
 void setStatus(String status_code)
          Sets the status code of the entry to passed as argument.
 void setStatusInfo(StatusInfo a_StatusInfo)
          Sets the value of the attribute: STATUS_INFO.
 void setTargetClass(String a_TargetClass)
          Sets the value of the attribute: TARGET_CLASS.
 void setTargetMethod(String a_TargetMethod)
          Sets the value of the attribute: TARGET_METHOD.
 String toString()
          Returns a string representation of the entry.
 void writeExternal(ObjectOutput output)
          Writes the non-transient fields of this class to an external source.
 void writeExternal(PersistentStoreIfc output)
          Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.
 
Methods inherited from class wt.fc.Item
getDomainRef, initialize, isInheritedDomain, readVersion, setDomainRef, setInheritedDomain
 
Methods inherited from class wt.fc.WTObject
checkAttributes, duplicate, finalize, getClassInfo, getCreateTimestamp, getDisplayIdentifier, getDisplayIdentity, getDisplayType, getIdentity, getModifyTimestamp, getPersistInfo, getType, readVersion, setPersistInfo
 
Methods inherited from class java.lang.Object
clone, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface wt.fc.NetFactor
getClassInfo, getConceptualClassname
 

Field Detail

RESOURCE

private static final String RESOURCE
See Also:
Constant Field Values

CLASSNAME

private static final String CLASSNAME

QUEUE_REF

public static final String QUEUE_REF
Label for the attribute; Reference to the processing queue to which the entry belongs.

Supported API: false

See Also:
Constant Field Values

queueRef

private ObjectReference queueRef

TARGET_METHOD

public static final String TARGET_METHOD
Label for the attribute; Name of the method to be executed.

Supported API: false

See Also:
Constant Field Values

TARGET_METHOD_UPPER_LIMIT

private static int TARGET_METHOD_UPPER_LIMIT

targetMethod

private String targetMethod

TARGET_CLASS

public static final String TARGET_CLASS
Label for the attribute; Fully qualified name of the class whose's method is to be executed.

Supported API: false

See Also:
Constant Field Values

TARGET_CLASS_UPPER_LIMIT

private static int TARGET_CLASS_UPPER_LIMIT

targetClass

private String targetClass

START_EXEC

public static final String START_EXEC
Label for the attribute; Time that execution started.

Supported API: false

See Also:
Constant Field Values

startExec

private Timestamp startExec

END_EXEC

public static final String END_EXEC
Label for the attribute; Time execution finished (COMPLETED or FAILED).

Supported API: false

See Also:
Constant Field Values

endExec

private Timestamp endExec

ENTRY_OWNER

public static final String ENTRY_OWNER
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

entryOwner

private WTPrincipalReference entryOwner

STATUS_INFO

public static final String STATUS_INFO
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

statusInfo

private StatusInfo statusInfo

ENTRY_NUMBER

public static final String ENTRY_NUMBER
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

entryNumber

private Long entryNumber

FAILURE_COUNT

public static final String FAILURE_COUNT
Label for the attribute.

Supported API: false

See Also:
Constant Field Values

failureCount

private Long failureCount

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
Constructor Detail

WtQueueEntry

public WtQueueEntry()
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
Overrides:
writeExternal in class Item
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
Overrides:
readExternal in class Item
Parameters:
input -
Throws:
IOException
ClassNotFoundException

readVersion

protected boolean readVersion(WtQueueEntry 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

writeExternal

public void writeExternal(PersistentStoreIfc output)
                   throws SQLException,
                          DatastoreException
Used by Persistent Data Service to obtain the values of the persistent attributes of this class, so they can be written to a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
writeExternal in interface ObjectMappable
Overrides:
writeExternal in class Item
Parameters:
output -
Throws:
SQLException
DatastoreException

readExternal

public void readExternal(PersistentRetrieveIfc input)
                  throws SQLException,
                         DatastoreException
Used by Persistent Data Service to populate the persistent attributes of this class from a persistent store.

(Not intended for general use.)

Supported API: false

Specified by:
readExternal in interface ObjectMappable
Overrides:
readExternal in class Item
Parameters:
input -
Throws:
SQLException
DatastoreException

getQueueRef

public ObjectReference getQueueRef()
Gets the value of the attribute: QUEUE_REF. Reference to the processing queue to which the entry belongs.

Supported API: false

Returns:
ObjectReference

setQueueRef

public void setQueueRef(ObjectReference a_QueueRef)
Sets the value of the attribute: QUEUE_REF. Reference to the processing queue to which the entry belongs.

Supported API: false

Parameters:
a_QueueRef -

getTargetMethod

public String getTargetMethod()
Gets the value of the attribute: TARGET_METHOD. Name of the method to be executed.

Supported API: false

Returns:
String

setTargetMethod

public void setTargetMethod(String a_TargetMethod)
Sets the value of the attribute: TARGET_METHOD. Name of the method to be executed.

Supported API: false

Parameters:
a_TargetMethod -

getTargetClass

public String getTargetClass()
Gets the value of the attribute: TARGET_CLASS. Fully qualified name of the class whose's method is to be executed.

Supported API: false

Returns:
String

setTargetClass

public void setTargetClass(String a_TargetClass)
Sets the value of the attribute: TARGET_CLASS. Fully qualified name of the class whose's method is to be executed.

Supported API: false

Parameters:
a_TargetClass -

getStartExec

public Timestamp getStartExec()
Gets the value of the attribute: START_EXEC. Time that execution started.

Supported API: false

Returns:
Timestamp

setStartExec

public void setStartExec(Timestamp a_StartExec)
Sets the value of the attribute: START_EXEC. Time that execution started.

Supported API: false

Parameters:
a_StartExec -

getEndExec

public Timestamp getEndExec()
Gets the value of the attribute: END_EXEC. Time execution finished (COMPLETED or FAILED).

Supported API: false

Returns:
Timestamp

setEndExec

public void setEndExec(Timestamp a_EndExec)
Sets the value of the attribute: END_EXEC. Time execution finished (COMPLETED or FAILED).

Supported API: false

Parameters:
a_EndExec -

getEntryOwner

public WTPrincipalReference getEntryOwner()
Gets the value of the attribute: ENTRY_OWNER.

Supported API: false

Returns:
WTPrincipalReference

setEntryOwner

public void setEntryOwner(WTPrincipalReference a_EntryOwner)
Sets the value of the attribute: ENTRY_OWNER.

Supported API: false

Parameters:
a_EntryOwner -

getStatusInfo

public StatusInfo getStatusInfo()
Gets the value of the attribute: STATUS_INFO.

Supported API: false

Returns:
StatusInfo

setStatusInfo

public void setStatusInfo(StatusInfo a_StatusInfo)
Sets the value of the attribute: STATUS_INFO.

Supported API: false

Parameters:
a_StatusInfo -

getEntryNumber

public Long getEntryNumber()
Gets the value of the attribute: ENTRY_NUMBER.

Supported API: false

Returns:
Long

setEntryNumber

public void setEntryNumber(Long a_EntryNumber)
Sets the value of the attribute: ENTRY_NUMBER.

Supported API: false

Parameters:
a_EntryNumber -

getFailureCount

public Long getFailureCount()
Gets the value of the attribute: FAILURE_COUNT.

Supported API: false

Returns:
Long

setFailureCount

public void setFailureCount(Long a_FailureCount)
Sets the value of the attribute: FAILURE_COUNT.

Supported API: false

Parameters:
a_FailureCount -

execute

public StatusInfo execute()
                   throws WTException
Executes the entry's processing request. Assumes the identity of the entry's principal for the execution.

Supported API: true

Returns:
StatusInfo
Throws:
WTException

toString

public String toString()
Returns a string representation of the entry.

Supported API: true

Overrides:
toString in class WTObject
Returns:
String

getPrincipal

public WTPrincipal getPrincipal()
                         throws WTException
Returns the principal that owns the entry's execution. The access control for execution will be enforced relative to this principal.

Supported API: true

Returns:
WTPrincipal
Throws:
WTException

setStatus

public void setStatus(String status_code)
               throws WTException
Sets the status code of the entry to passed as argument. The only statuses allowed are READY and SUSPENDED. The message is set to "Status set by operator." (it is defined in the resource bundle of the package.

Supported API: true

Parameters:
status_code -
Throws:
WTException

getDisplayString

public String getDisplayString()


Supported API: true

Returns:
String

equals

public boolean equals(Object obj)
Indicates whether the given object is equal to this object from a persistence perspective, by comparing the two objects ObjectIdentifiers. Changed or stale copies are still considered equal by this method. Delegates to PersistenceHelper.equals(Persistable,Object).

Warning: Certain core Windchill operations may depend upon equals being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
equals in class Item
Parameters:
obj -
Returns:
boolean

hashCode

public int hashCode()
Returns a hash code for this object based upon its ObjectIdentifier. Delegates to PersistenceHelper.hashCode(Persistable).

Warning: Certain core Windchill operations may depend upon hashCode being ObjectIdentifier-based. Changes to the default implementation should be done with care, if at all.

Supported API: false

Overrides:
hashCode in class Item
Returns:
int

convertFromVector

public byte[] convertFromVector(Vector meth_args)
                         throws WTException
Throws:
WTException

convertFromByteArray

public Vector convertFromByteArray(byte[] byteArray)
                            throws WTException
Throws:
WTException