|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.oberon.ooql.sdk.OBBase com.oberon.ooql.sdk.AdminBase com.oberon.ooql.sdk.Program com.oberon.ooql.sdk.Trigger
public class Trigger
Class used to let Program
s work as event triggers.
Field Summary | |
---|---|
static int |
CLASS_ADDLINK
Class event: Connect a ObjectObj instance with another |
static int |
CLASS_CHANGECLASS
Class event: Change the ObjectObj 's Class |
static int |
CLASS_CHANGEDESCR
Class event: Change the ObjectObj 's description |
static int |
CLASS_CHANGEFIELD
Class event: Change the ObjectObj 's field values |
static int |
CLASS_CHANGEHOLDER
Class event: Change the ObjectObj 's holder |
static int |
CLASS_CHANGELIFECYCLE
Class event: Change the ObjectObj 's Lifecycle |
static int |
CLASS_CHANGENAME
Class event: Change the ObjectObj 's name / revision |
static int |
CLASS_CHANGESPACE
Class event: Move the ObjectObj between two ObjectSpace s |
static int |
CLASS_CLONE
Class event: Clone a ObjectObj instance |
static int |
CLASS_CREATE
Class event: Create new ObjectObj instance |
static int |
CLASS_DELEGATE
Class event: Delegate access to a ObjectObj instance |
static int |
CLASS_DESTROY
Class event: Destroy an ObjectObj instance |
static int |
CLASS_FILEDELETE
Class event: Remove file from an ObjectObj instance |
static int |
CLASS_FILEGET
Class event: Extract a file from an ObjectObj instance |
static int |
CLASS_FILELOCK
Class event: Lock file for an ObjectObj instance |
static int |
CLASS_FILEPUT
Class event: Attach new file to an ObjectObj instance |
static int |
CLASS_FILERENAME
Class event: Rename an ObjectObj 's file |
static int |
CLASS_FILEUNLOCK
Class event: Unlock file for an ObjectObj instance |
static int |
CLASS_LOCK
Class event: Lock an ObjectObj |
static int |
CLASS_REMOVELINK
Class event: Disconnect a ObjectObj instance from another |
static int |
CLASS_REVISE
Class event: Revise an ObjectObj instance |
static int |
CLASS_REVOKE
Class event: Revoke delegation for a ObjectObj instance |
static int |
CLASS_UNDO
Class event: Undo the latest ObjectObj edit operation |
static int |
CLASS_UNLOCK
Class event: Remove the lock from an ObjectObj |
static int |
EVENT_ACTION
Perform actions after the event |
static int |
EVENT_CHECK
Check conditions before the event |
static int |
EVENT_WORKFLOW
Perform actions after the event |
static int |
FIELD_EDIT
Field event: Edit |
static int |
FORMITEM_DISABLED
Form event: Item disabled condition |
static int |
FORMITEM_EDITABLE
Form event: Item editable condition |
static int |
FORMITEM_REQUIRED
Form event: Item required condition |
static int |
FORMITEM_VISIBLE
Form event: Item visible condition |
static int |
LIFECYCLE_IGNORE
Lifecycle -Stage event: Ignore a stage Validation |
static int |
LIFECYCLE_PROGRESS
Lifecycle -Stage event: Go to the next Stage |
static int |
LIFECYCLE_REFUSE
Lifecycle -Stage event: Refuse a stage Validation |
static int |
LIFECYCLE_REGRESS
Lifecycle -Stage event: Return to the previous Stage |
static int |
LIFECYCLE_SETSTAGE
Lifecycle -Stage event: Set the Stage for a object |
static int |
LIFECYCLE_VALIDATE
Lifecycle -Stage event: Validate e stage Validation |
static int |
LINK_CHANGETYPE
LinkType event: Change the link type |
static int |
LINK_CONNECT
LinkType event: Create new Link between two ObjectObj instances |
static int |
LINK_DISCONNECT
LinkType event: Remove a Link between two ObjectObj instances |
static int |
LINK_MODHOLDER
LinkType event: Change the Link 's holder |
static int |
LINK_RESTORE
LinkType event: Undo the latest Link edit operation |
static int |
LINK_UPDATE
LinkType event: Edit Link fields |
static int |
PROCESS_CHGSTEPSTATE
Process event: step change state |
static int |
PROCESS_DECISION
Process event: step decision |
static int |
PROCESS_TRANSITION
Process event: step transition |
static int |
PROCESS_USERCOMPLETION
Process event: step completed by user |
static int |
VIEWCOL_MODIFIABLE
View event: Column editable condition |
static int |
VIEWCOL_SEEABLE
View event: Column visible condition |
Fields inherited from class com.oberon.ooql.sdk.Program |
---|
CLASSNAME, EXTEND |
Fields inherited from class com.oberon.ooql.sdk.AdminBase |
---|
bsOptions, HIDDEN_OPTION |
Constructor Summary | |
---|---|
Trigger()
|
|
Trigger(java.lang.String name)
|
|
Trigger(java.lang.String name,
int event,
int type)
|
|
Trigger(java.lang.String name,
int event,
int type,
java.util.Vector<java.lang.String> args)
|
|
Trigger(java.lang.String composedName,
java.lang.String args)
[INTERNAL USAGE] |
Method Summary | |
---|---|
static java.lang.String |
argsToCommandString(java.util.Vector<?> vArgs,
boolean bWorkflow)
|
java.lang.String |
asString()
Return the Trigger properties as a single String [INTERNAL USAGE] |
boolean |
equals(Trigger trigger)
Check if this Trigger is equal to another (only event/type comparison) |
boolean |
equals(Trigger trigger,
boolean fullMatch)
Check if this Trigger is equal to another |
void |
execute(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Object> args)
Execute the Trigger |
void |
execute(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Object> args,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Execute the Trigger |
void |
fromXML(org.jdom.Element rootElement)
Load the Trigger properties from XML element tree |
java.util.Vector<java.lang.Object> |
getArgs()
Get the Program input arguments |
java.lang.String |
getArgString()
Get the Program input arguments as String [INTERNAL USAGE] |
int |
getEvent()
Get the Trigger event |
java.lang.String |
getEventAsString()
Get the Trigger event as OOQL string |
static java.lang.String |
getEventAsString(int event)
Get the Trigger event as OOQL equivalent String |
static int |
getEventFromString(java.lang.String event)
Get the Trigger event from the equivalent OOQL String |
int |
getType()
Get the Trigger type |
java.lang.String |
getTypeAsString()
Get the Trigger type as OOQL string |
static java.lang.String |
getTypeAsString(int type)
Get the Trigger type as OOQL equivalent String |
static int |
getTypeFromString(java.lang.String triggerType)
Get the Trigger type from the equivalent OOQL String |
static int |
indexOf(java.util.Vector<Trigger> triggers,
Trigger trigger)
Search a Trigger into a trigger set (only event/type comparison) |
static int |
indexOf(java.util.Vector<Trigger> triggers,
Trigger trigger,
boolean fullMatch)
Search a Trigger into a trigger set |
void |
setArgs(java.util.Vector<java.lang.String> args)
Set the Program input arguments |
void |
setArgString(java.lang.String args)
Get the Program input arguments [INTERNAL USAGE] |
void |
setEvent(int event)
Set the Trigger event |
void |
setParameters(java.util.Hashtable<java.lang.String,java.lang.String> parameters)
Set the Workflow execution arguments |
void |
setType(int type)
Set the Trigger type |
java.lang.String |
toString()
Return the Trigger properties as a single String |
java.lang.String |
toString(java.lang.String indent)
Return the Trigger properties as a single String |
Methods inherited from class com.oberon.ooql.sdk.Program |
---|
compareSimple, compareUpdate, compile, compile, create, create, destroy, execute, getCreateCommand, getCreateCommand, getJavaClass, getOwnSubPrograms, getOwnSubProgramsAsString, getProperty, getSaveCommand, getSourceCode, getSubPrograms, getSubProgramsAsString, getSuper, getTargetNames, invoke, link, open, parseArgs, setJavaClass, setName, setSourceCode, setSourceFile, toString, toXML, toXML, unlink, write, write |
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 |
Field Detail |
---|
public static final int FIELD_EDIT
Field
event: Edit
public static final int CLASS_CREATE
Class
event: Create new ObjectObj
instance
public static final int CLASS_CLONE
Class
event: Clone a ObjectObj
instance
public static final int CLASS_CHANGESPACE
Class
event: Move the ObjectObj
between two ObjectSpace
s
public static final int CLASS_CHANGECLASS
Class
event: Change the ObjectObj
's Class
public static final int CLASS_CHANGENAME
Class
event: Change the ObjectObj
's name / revision
public static final int CLASS_CHANGEHOLDER
Class
event: Change the ObjectObj
's holder
public static final int CLASS_CHANGELIFECYCLE
Class
event: Change the ObjectObj
's Lifecycle
public static final int CLASS_CHANGEDESCR
Class
event: Change the ObjectObj
's description
public static final int CLASS_CHANGEFIELD
Class
event: Change the ObjectObj
's field values
public static final int CLASS_FILEPUT
Class
event: Attach new file to an ObjectObj
instance
public static final int CLASS_FILEGET
Class
event: Extract a file from an ObjectObj
instance
public static final int CLASS_FILERENAME
Class
event: Rename an ObjectObj
's file
public static final int CLASS_FILEDELETE
Class
event: Remove file from an ObjectObj
instance
public static final int CLASS_ADDLINK
Class
event: Connect a ObjectObj
instance with another
public static final int CLASS_REMOVELINK
Class
event: Disconnect a ObjectObj
instance from another
public static final int CLASS_LOCK
Class
event: Lock an ObjectObj
public static final int CLASS_UNLOCK
Class
event: Remove the lock from an ObjectObj
public static final int CLASS_REVISE
Class
event: Revise an ObjectObj
instance
public static final int CLASS_DESTROY
Class
event: Destroy an ObjectObj
instance
public static final int CLASS_DELEGATE
Class
event: Delegate access to a ObjectObj
instance
public static final int CLASS_REVOKE
Class
event: Revoke delegation for a ObjectObj
instance
public static final int CLASS_UNDO
Class
event: Undo the latest ObjectObj
edit operation
public static final int CLASS_FILELOCK
Class
event: Lock file for an ObjectObj
instance
public static final int CLASS_FILEUNLOCK
Class
event: Unlock file for an ObjectObj
instance
public static final int LINK_CONNECT
LinkType
event: Create new Link
between two ObjectObj
instances
public static final int LINK_CHANGETYPE
LinkType
event: Change the link type
public static final int LINK_UPDATE
LinkType
event: Edit Link
fields
public static final int LINK_DISCONNECT
LinkType
event: Remove a Link
between two ObjectObj
instances
public static final int LINK_RESTORE
LinkType
event: Undo the latest Link
edit operation
public static final int LINK_MODHOLDER
LinkType
event: Change the Link
's holder
public static final int LIFECYCLE_VALIDATE
Lifecycle
-Stage
event: Validate e stage Validation
public static final int LIFECYCLE_IGNORE
Lifecycle
-Stage
event: Ignore a stage Validation
public static final int LIFECYCLE_REFUSE
Lifecycle
-Stage
event: Refuse a stage Validation
public static final int LIFECYCLE_SETSTAGE
Lifecycle
-Stage
event: Set the Stage for a object
public static final int LIFECYCLE_PROGRESS
Lifecycle
-Stage
event: Go to the next Stage
public static final int LIFECYCLE_REGRESS
Lifecycle
-Stage
event: Return to the previous Stage
public static final int FORMITEM_VISIBLE
Form
event: Item
visible condition
public static final int FORMITEM_EDITABLE
Form
event: Item
editable condition
public static final int FORMITEM_REQUIRED
Form
event: Item
required condition
public static final int FORMITEM_DISABLED
Form
event: Item
disabled condition
public static final int VIEWCOL_SEEABLE
View
event: Column
visible condition
public static final int VIEWCOL_MODIFIABLE
View
event: Column
editable condition
public static final int PROCESS_TRANSITION
Process
event: step transition
public static final int PROCESS_USERCOMPLETION
Process
event: step completed by user
public static final int PROCESS_DECISION
Process
event: step decision
public static final int PROCESS_CHGSTEPSTATE
Process
event: step change state
public static final int EVENT_CHECK
public static final int EVENT_ACTION
public static final int EVENT_WORKFLOW
Constructor Detail |
---|
public Trigger()
public Trigger(java.lang.String name) throws OberonException
name
- the name of the administrative object
OberonException
- if the name contains invalid characterspublic Trigger(java.lang.String name, int event, int type) throws OberonException
name
- the name of the administrative objectevent
- the Trigger eventtype
- the Trigger type
OberonException
- if the name contains invalid characterspublic Trigger(java.lang.String name, int event, int type, java.util.Vector<java.lang.String> args) throws OberonException
name
- the name of the administrative objectevent
- the Trigger eventtype
- the Trigger typeargs
- the Program
input arguments
OberonException
- if the name contains invalid characterspublic Trigger(java.lang.String composedName, java.lang.String args)
composedName
- name|event|typeargs
- the Program
input argumentsMethod Detail |
---|
public void setEvent(int event)
public int getEvent()
public java.lang.String getEventAsString()
public void setType(int type)
public int getType()
public java.lang.String getTypeAsString()
public void setParameters(java.util.Hashtable<java.lang.String,java.lang.String> parameters)
Workflow
execution arguments
public void setArgs(java.util.Vector<java.lang.String> args)
Program
input arguments
public java.util.Vector<java.lang.Object> getArgs()
Program
input arguments
public void setArgString(java.lang.String args)
Program
input arguments [INTERNAL USAGE]
public java.lang.String getArgString()
Program
input arguments as String [INTERNAL USAGE]
public void execute(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Object> args) throws OberonException
framework
- the current frameworkargs
- the Trigger argument hashtable
Trigger argument hashtable become the first element of the Program
input argument vector
OberonException
- due to execution errors or to programmatically raised exceptionspublic void execute(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Object> args, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
framework
- the current frameworkargs
- the Trigger argument hashtablecounters
- administrative object synch counters (if null read them from database)
Trigger argument hashtable become the first element of the Program
input argument vector
Trigger can run only at DB level (DBConnections)
OberonException
- due to execution errors or to programmatically raised exceptionspublic boolean equals(Trigger trigger, boolean fullMatch)
trigger
- the Trigger to compare with this TriggerfullMatch
- if false check only the trigger event and type
otherwise check also the name and the Program
argumentspublic boolean equals(Trigger trigger)
trigger
- the Trigger to compare with this Triggerpublic static int indexOf(java.util.Vector<Trigger> triggers, Trigger trigger, boolean fullMatch)
triggers
- a Vector of Triggers (the set)trigger
- the trigger to searchfullMatch
- if false check only the trigger event and type
otherwise check also the name and the Program
argumentspublic static int indexOf(java.util.Vector<Trigger> triggers, Trigger trigger)
triggers
- a Vector of Triggers (the set)trigger
- the trigger to searchpublic static java.lang.String getEventAsString(int event)
public static int getEventFromString(java.lang.String event)
public static java.lang.String getTypeAsString(int type)
public static int getTypeFromString(java.lang.String triggerType)
public java.lang.String toString()
toString
in class Program
public java.lang.String toString(java.lang.String indent)
indent
- set the row indent charspublic java.lang.String asString()
public void fromXML(org.jdom.Element rootElement)
fromXML
in class Program
public static java.lang.String argsToCommandString(java.util.Vector<?> vArgs, boolean bWorkflow)
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |