OBEROn SDK

com.oberon.ooql.sdk
Class ObjectStage

java.lang.Object
  extended by com.oberon.ooql.sdk.OBBase
      extended by com.oberon.ooql.sdk.ObjectStage
All Implemented Interfaces:
java.io.Serializable

public class ObjectStage
extends OBBase

Class used to retrieve Lifecycle-Stages for a specific ObjectObj.

Since:
3.1
Version:
5.0
See Also:
Serialized Form

Constructor Summary
ObjectStage()
           
ObjectStage(java.lang.String name)
          Define new Object Validation
 
Method Summary
 java.lang.String accessToString(Framework framework)
          Get the list of framework User accesses for the current ObjectObj at this Stage (as String)
 java.lang.String accessToString(java.lang.String userName, Framework framework)
          Get the list of User accesses for the current ObjectObj at this Stage (as String)
 void fromXML(org.jdom.Element rootElement)
          Load the ObjectStage from XML element tree
 Stage getAdminStage(Framework framework)
          Return the administrative stage of ObjectObj's lifecycle
 java.util.Vector<Validation> getAllStageValidations(Framework framework)
          Get the list of Validations for the Object's current Stage.
 long getDuration()
          Return the number of days the ObjectObj was kept at the given stage
 java.lang.String getEnterDate()
          Return the date of last time the ObjectObj reaches the given stage
 java.lang.String getExitDate()
          Return the date of last time the ObjectObj leaves the given stage
 void getHistory(Framework framework)
          [Inherited but not used]
 java.lang.String getName()
          Get the ObjectStage name
 ObjectObj getObject()
          Get the ObjectStage relative ObjectObj name
 java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
          Get a property for this ObjectStage by its OOQL identifier
 java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
          Return a Vector of target names extracted by using an OOQL selector
 ObjectValidation getValidation(java.lang.String validationName, Framework framework)
          Get a ObjectStage's Validation.
 java.util.Vector<ObjectValidation> getValidations(Framework framework)
          Get the ObjectStage's Validations
 org.jdom.Element getXMLValidations(Framework framework)
          Return the ObjectStage's validations as XML element tree
 boolean isCurrent()
          Check if this stage it the ObjectObj current stage
 void resetValidations()
          Force reload ObjectValidations from DB
 void setEnterDate(java.lang.String date)
          Set the ObjectStage enter date [INTERNAL USAGE]
 void setExitDate(java.lang.String date)
          Set the ObjectStage exit date [INTERNAL USAGE]
 void setName(java.lang.String name)
          Set the ObjectStage name [INTERNAL USAGE]
 void setObject(ObjectObj objectobj)
          Set the ObjectStage relative ObjectObj [INTERNAL USAGE]
 void setValidations(java.util.Vector<ObjectValidation> validations)
          Set the ObjectStages's Validations [INTERNAL USAGE].
 java.lang.String toString()
          Return the ObjectStage basic properties as String
 java.lang.String toString(java.lang.String indent)
          Return the ObjectStage basic properties as String
 java.lang.String toString(java.lang.String indent, Framework framework)
          Return the ObjectStage properties as a single String
 org.jdom.Element toXML(Framework framework)
          Return the ObjectStage properties as XML element tree
 
Methods inherited from class com.oberon.ooql.sdk.OBBase
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, isLinked, removeChange, resetChanges, setId, setLinked
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectStage

public ObjectStage()

ObjectStage

public ObjectStage(java.lang.String name)
Define new Object Validation

Parameters:
name - the validation name
Method Detail

setName

public void setName(java.lang.String name)
Set the ObjectStage name [INTERNAL USAGE]


getName

public java.lang.String getName()
Get the ObjectStage name

Specified by:
getName in class OBBase

setObject

public void setObject(ObjectObj objectobj)
Set the ObjectStage relative ObjectObj [INTERNAL USAGE]


getObject

public ObjectObj getObject()
Get the ObjectStage relative ObjectObj name


setEnterDate

public void setEnterDate(java.lang.String date)
Set the ObjectStage enter date [INTERNAL USAGE]

Parameters:
date - the date of last time the ObjectObj reaches the given stage

getEnterDate

public java.lang.String getEnterDate()
Return the date of last time the ObjectObj reaches the given stage


setExitDate

public void setExitDate(java.lang.String date)
Set the ObjectStage exit date [INTERNAL USAGE]

Parameters:
date - date of last time the ObjectObj leaves the given stage

getExitDate

public java.lang.String getExitDate()
Return the date of last time the ObjectObj leaves the given stage


getDuration

public long getDuration()
Return the number of days the ObjectObj was kept at the given stage


getAdminStage

public Stage getAdminStage(Framework framework)
Return the administrative stage of ObjectObj's lifecycle


isCurrent

public boolean isCurrent()
Check if this stage it the ObjectObj current stage


resetValidations

public void resetValidations()
Force reload ObjectValidations from DB


setValidations

public void setValidations(java.util.Vector<ObjectValidation> validations)
Set the ObjectStages's Validations [INTERNAL USAGE].

Parameters:
validations - vector of ObjectValidations

getValidations

public java.util.Vector<ObjectValidation> getValidations(Framework framework)
Get the ObjectStage's Validations

Returns:
vector of ObjectValidations

getValidation

public ObjectValidation getValidation(java.lang.String validationName,
                                      Framework framework)
Get a ObjectStage's Validation.

Parameters:
validationName - the Validation name

getAllStageValidations

public java.util.Vector<Validation> getAllStageValidations(Framework framework)
Get the list of Validations for the Object's current Stage.

Returns:
vector of Validations
Since:
2.1_08

accessToString

public java.lang.String accessToString(Framework framework)
Get the list of framework User accesses for the current ObjectObj at this Stage (as String)

Parameters:
framework - the current framework
Returns:
access flags in OOQL format separated with commas
See Also:
Stage.hasAccess(int, ObjectObj, Framework)

accessToString

public java.lang.String accessToString(java.lang.String userName,
                                       Framework framework)
Get the list of User accesses for the current ObjectObj at this Stage (as String)

Parameters:
userName - the name of user to get the access
framework - the current framework
Returns:
access flags in OOQL format separated with commas
See Also:
Stage.hasAccess(int, ObjectObj, String, Framework)

getHistory

public void getHistory(Framework framework)
                throws OberonException
[Inherited but not used]

Throws:
OberonException

getProperty

public java.lang.String getProperty(java.lang.String propertyName,
                                    java.util.Vector<java.lang.Object> filterArgs,
                                    java.lang.String token,
                                    Framework framework)
Get a property for this ObjectStage by its OOQL identifier

Specified by:
getProperty in class OBBase
Parameters:
propertyName - OOQL property identifier/name (example: name , enterdate , duration ...)
filterArgs - extra arguments used to compute properties
token - separator token for complex properties
framework - the current framework
Returns:
the property value

getTargetNames

public java.util.Vector<?> getTargetNames(java.lang.String composedName,
                                          java.util.Vector<java.lang.Object> filterArgs,
                                          Framework framework)
Return a Vector of target names extracted by using an OOQL selector

Specified by:
getTargetNames in class OBBase
Parameters:
composedName - OOQL property identifier/name (example: validation , .. )
filterArgs - extra arguments used to compute properties
framework - the current framework
Returns:
a Vector of target names, used to extract their (sub)properties values

getXMLValidations

public org.jdom.Element getXMLValidations(Framework framework)
Return the ObjectStage's validations as XML element tree

Parameters:
framework - the current framework

toXML

public org.jdom.Element toXML(Framework framework)
Return the ObjectStage properties as XML element tree

Parameters:
framework - the current framework

fromXML

public void fromXML(org.jdom.Element rootElement)
Load the ObjectStage from XML element tree


toString

public java.lang.String toString()
Return the ObjectStage basic properties as String

Overrides:
toString in class java.lang.Object

toString

public java.lang.String toString(java.lang.String indent)
Return the ObjectStage basic properties as String

Parameters:
indent - set the row indent chars

toString

public java.lang.String toString(java.lang.String indent,
                                 Framework framework)
Return the ObjectStage properties as a single String

Parameters:
indent - set the row indent chars

OBEROn SDK

Copyright © 2008-2014 Mirko Solazzi. All Rights Reserved.