|
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.Lifecycle
public class Lifecycle
Lifecycle Admin Object: defines object lifecycle policies.
Field Summary | |
---|---|
static int |
ADD_TO_RECENT_LIST_OPTION
The Add To Recent List flag index inside the Option Set |
static int |
CHECKUPDATE_OPTION
The CheckUpdare flag index inside the Option Set |
static int |
UNDO_OPTION
The Undo flag index inside the Option Set |
Fields inherited from class com.oberon.ooql.sdk.AdminBase |
---|
bsOptions, HIDDEN_OPTION |
Constructor Summary | |
---|---|
Lifecycle()
|
|
Lifecycle(java.lang.String name)
|
Method Summary | |
---|---|
void |
addClass(java.lang.String className)
Add a Class to the Lifecycle. |
void |
addCommand(java.lang.String commandName)
Add an application Command for ObjectObj instances with this Lifecycle. |
void |
addCommandAfter(java.lang.String commandName,
java.lang.String refCommand)
Add an application Command after another reference command |
void |
addCommandBefore(java.lang.String commandName,
java.lang.String refCommand)
Add an application Command before another reference command |
void |
addFileType(java.lang.String fileTypeName)
Add a FileType to the Lifecycle. |
void |
addStage(Stage stage)
Appends a new Stage to the Lyfecycle |
void |
addStageAfter(Stage stage,
java.lang.String refStage)
Add a Stage after another reference stage |
void |
addStageBefore(Stage stage,
java.lang.String refStage)
Add a Stage before another reference stage |
java.lang.String |
compareUpdate(Lifecycle refLifecycle,
boolean checkImage,
boolean overwrite,
boolean force,
Framework framework)
Return/apply the OOQL command to update this Lifecycle object and let it become equals to another reference object. |
void |
create(boolean force,
Framework framework)
Create a new Lifecycle object on the database |
void |
create(Framework framework)
Create a new Lifecycle object on the database |
void |
destroy(Framework framework)
Remove the Lifecycle object from the database. |
void |
fromXML(org.jdom.Element rootElement)
Load the Lifecycle object and Stage properties from XML element tree |
void |
fromXML(org.jdom.Element rootElement,
boolean loadStages)
Load the Lifecycle object properties from XML element tree |
java.util.Vector<java.lang.String> |
getClasses()
Get the list of Classes directly governed by this Lifecycle. |
java.lang.String |
getClassesAsString(java.lang.String delim)
Get the list of Classes directly governed by this Lifecycle as a single String. |
java.util.Vector<java.lang.String> |
getCommands()
Get the list of application Commands available for ObjectObj instances with this Lifecycle
and common to all Stage s. |
java.lang.String |
getCommandsAsString(java.lang.String delim)
Get the list of application Commands as a single String. |
java.lang.String |
getCreateCommand(boolean force)
Return the OOQL command to create this Lifecycle object with the settled properties |
java.lang.String |
getDefaultFileType()
Get the default FileType for ObjectObj attachments |
java.lang.String |
getFileSpace()
Get the FileSpace where the ObjectObj attached files are stored |
java.util.Vector<java.lang.String> |
getFileTypes()
Get the list of FileTypes allowed by this Lifecycle |
java.lang.String |
getFileTypesAsString(java.lang.String delim)
Get the list of FileTypes allowed by this Lifecycle as a single String |
java.lang.String |
getFirstRevision()
Return the first revision for a Lifecycle revision rule |
java.util.BitSet |
getHistoryOption()
Get the events traced into the history table for ObjectObj s with this Lifecycle |
boolean |
getHistoryOption(int event)
Check if a specific event is traced into the history table for ObjectObj s with this Lifecycle |
java.lang.String |
getHistoryOptionsAsString(java.lang.String delim)
Get the events traced into the history table for ObjectObj s with this Lifecycle as String |
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 Lifecycle object by its OOQL identifier |
java.lang.String |
getRevisionRule()
Get the ObjectObj revision rule. |
java.lang.String |
getSaveCommand(boolean force)
Return the OOQL command to update this Lifecycle object with the modified properties. |
Stage |
getStage(java.lang.String stageName)
Get a Lifecycle Stage with the given name |
Stage |
getStageAt(int index)
Get a Lifecycle Stage at given position index |
Stage |
getStageFromId(int stageId)
Get a Lifecycle Stage with the given internal id |
java.util.Vector<java.lang.String> |
getStageIDs()
Get all Lifecycle Stage internal ids |
java.util.Vector<java.lang.String> |
getStageNames()
Get all Lifecycle Stage names |
int |
getStagePos(java.lang.String stageName)
Get the Stage position index in the Lifecycle stage sequence |
java.util.Vector<Stage> |
getStages()
Get all lifecycle Stages |
java.lang.String |
getStagesAsString(java.lang.String delim)
Get all Lifecycle Stage names as a single string |
java.util.Hashtable<java.lang.String,org.jdom.Element> |
getStageXML()
Get the Stage properties loaded from the XML element tree |
java.util.Vector<?> |
getTargetNames(java.lang.String composedName,
java.util.Vector<java.lang.Object> filterArgs,
Framework framework)
Return a Vector of administrative object names extracted by using an OOQL selector |
org.jdom.Element |
getXMLHistoryFlags()
Return the history flags as XML element tree |
boolean |
isAddToRecentList()
Get the "add object to (user) recent list" option. |
boolean |
isCheckUpdate()
Check if the checkUpdate option is active for this Lifecycle |
boolean |
isUndoEnabled()
Check if the Undo option is enabled for this Lifecycle |
void |
link(Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open the Lifecycle object: connect the memory instance with the database instance |
void |
moveCommand(java.lang.String commandName,
boolean after)
Move an application Command for ObjectObj instances with this Lifecycle. |
void |
moveStage(java.lang.String stageName,
boolean after)
Move a Lifecycle Stage |
static Lifecycle |
open(java.lang.String name,
Framework framework,
java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Open an administrative object and read properties from the database or retrieve them from memory |
void |
removeClass(java.lang.String className)
Remove a Class from the Lifecycle. |
void |
removeCommand(java.lang.String commandName)
Remove an application Command for ObjectObj instances with this Lifecycle. |
void |
removeFileType(java.lang.String fileTypeName)
Remove a FileType from the Lifecycle. |
void |
removeStage(Stage stage)
Remove a Stage from the Lifecycle |
void |
removeStage(java.lang.String stageName)
Remove a Stage from the Lifecycle identified by its name |
void |
setAddToRecentList(boolean addObject)
Set the "add object to (user) recent list" option. |
void |
setAllHistoryOption()
Active all events history trace for ObjectObj s with this Lifecycle |
void |
setCheckUpdate(boolean checkUpdate)
Set the checkUpdate option. |
void |
setDefaultFileType(java.lang.String fileTypeName)
Set the default FileType for ObjectObj attachments |
void |
setFileSpace(java.lang.String fileSpaceName)
Set the FileSpace where store the ObjectObj attached files |
void |
setHistoryOption(java.util.BitSet eventFlags)
Set the events to log into the history table for ObjectObj s with this Lifecycle |
void |
setHistoryOption(int event,
boolean flag)
Set the events to log into the history table for ObjectObj s with this Lifecycle |
void |
setNoHistoryOption()
Disable history trace for ObjectObj s with this Lifecycle |
void |
setRevisionRule(java.lang.String revisionRule)
Set the ObjectObj revision rule. |
void |
setStages(java.util.Vector<Stage> stages)
Set all Lifecycle Stages |
void |
setUndoOption(boolean undoOption)
Set the Undo option. |
java.lang.String |
toString()
Return the Lifecycle object basic properties as a single String |
java.lang.String |
toString(Framework framework)
Return the Lifecycle object extended properties as a single String |
org.jdom.Element |
toXML(boolean getImage,
boolean fullDump,
Framework framework)
Return the Lifecycle object properties as XML element tree |
org.jdom.Element |
toXML(Framework framework)
Return the Lifecycle object properties as XML element tree |
void |
unlink(Framework framework)
Close the object: disconnect the memory instance from the database instance |
void |
updateClasses(java.util.Vector<java.lang.String> classes)
Update the classes on the basis of a given list |
void |
updateCommands(java.util.Vector<java.lang.String> commands)
Update the commands on the basis of a given list |
void |
updateFileTypes(java.util.Vector<java.lang.String> filetypes)
Update the filetypes on the basis of a given list |
void |
updateStages(java.util.Vector<Stage> stages)
Update the stages on the basis of a given list |
void |
write(boolean force,
Framework framework)
Update the Lifecycle object to the database |
void |
write(Framework framework)
Update the Lifecycle object to the database |
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 CHECKUPDATE_OPTION
public static final int UNDO_OPTION
public static final int ADD_TO_RECENT_LIST_OPTION
Constructor Detail |
---|
public Lifecycle()
public Lifecycle(java.lang.String name) throws OberonException
name
- the name of the administrative object
OberonException
- if the name contains invalid charactersMethod Detail |
---|
public static Lifecycle open(java.lang.String name, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
name
- the object nameframework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic void link(Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters) throws OberonException
link
in class AdminBase
framework
- the current frameworkcounters
- administrative object synch counters (if null read them from database)
OberonException
- usually due to DB SQL exceptionspublic void create(Framework framework) throws OberonException
create
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void create(boolean force, Framework framework) throws OberonException
force
- if true ignores optional featuresframework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void write(Framework framework) throws OberonException
write
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void write(boolean force, Framework framework) throws OberonException
force
- if true ignores optional featuresframework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void unlink(Framework framework) throws OberonException
unlink
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptionspublic void destroy(Framework framework) throws OberonException
ObjectObj
instances with this Lifecycle.
destroy
in class AdminBase
framework
- the current framework
OberonException
- usually due to DB SQL exceptions or to limited user access rightspublic void setDefaultFileType(java.lang.String fileTypeName)
ObjectObj
attachments
fileTypeName
- the default FileType
. Adds this FileType to the Lifecycle if not already allowed.public java.lang.String getDefaultFileType()
FileType
for ObjectObj
attachments
public void setFileSpace(java.lang.String fileSpaceName)
FileSpace
where store the ObjectObj
attached files
public java.lang.String getFileSpace()
FileSpace
where the ObjectObj
attached files are stored
public void setRevisionRule(java.lang.String revisionRule) throws OberonException
ObjectObj
revision rule.
revisionRule
- the revision rule.
OberonException
- when the revision rule doesn't respect the AutoNumber
formatAutoNumber.symbolTypes
public java.lang.String getRevisionRule()
ObjectObj
revision rule.
public java.lang.String getFirstRevision() throws java.lang.Exception
java.lang.Exception
public void setCheckUpdate(boolean checkUpdate)
checkUpdate
- true to enable the optionpublic boolean isCheckUpdate()
public void setUndoOption(boolean undoOption)
undoOption
- true to enable the Undo optionpublic boolean isUndoEnabled()
public void setAddToRecentList(boolean addObject)
ObjectObj
s will be added to the user recent opened list if this flag is true (override "Add to recent" flag in the stages)
public boolean isAddToRecentList()
public void addClass(java.lang.String className)
ObjectObj
instances.
This is true also for the Class subclasses.
className
- the Class
namepublic void removeClass(java.lang.String className)
ObjectObj
of this Class (or its subclasses) cannot have this Lifecycle.
className
- the Class
namepublic void updateClasses(java.util.Vector<java.lang.String> classes)
classes
- list of Class
's namespublic java.util.Vector<java.lang.String> getClasses()
Class
namespublic java.lang.String getClassesAsString(java.lang.String delim)
delim
- the Class
name separatorpublic void addFileType(java.lang.String fileTypeName)
ObjectObj
instances with this Lifecycle will allow also the FileType kind of attachments.
fileTypeName
- the FileType
namepublic void removeFileType(java.lang.String fileTypeName)
fileTypeName
- the FileType
namepublic void updateFileTypes(java.util.Vector<java.lang.String> filetypes)
filetypes
- list of FileType
spublic java.util.Vector<java.lang.String> getFileTypes()
FileType
namespublic java.lang.String getFileTypesAsString(java.lang.String delim)
delim
- the FileType
name separatorpublic void setHistoryOption(int event, boolean flag)
ObjectObj
s with this Lifecycle
event
- the history event codeflag
- if true the event will be traced into the historypublic void setAllHistoryOption()
ObjectObj
s with this Lifecycle
public void setNoHistoryOption()
ObjectObj
s with this Lifecycle
public void setHistoryOption(java.util.BitSet eventFlags)
ObjectObj
s with this Lifecycle
public boolean getHistoryOption(int event)
ObjectObj
s with this Lifecycle
event
- the event codepublic java.util.BitSet getHistoryOption()
ObjectObj
s with this Lifecycle
public java.lang.String getHistoryOptionsAsString(java.lang.String delim)
ObjectObj
s with this Lifecycle as String
delim
- the event name separatorpublic void addCommand(java.lang.String commandName)
ObjectObj
instances with this Lifecycle.
These commands will be active for all Lifecycle Stage
s.
commandName
- the Command
namepublic void addCommandBefore(java.lang.String commandName, java.lang.String refCommand) throws OberonException
commandName
- the Command
namerefCommand
- the reference Command name
OberonException
- when the reference command is not foundpublic void addCommandAfter(java.lang.String commandName, java.lang.String refCommand) throws OberonException
commandName
- the Command
namerefCommand
- the reference Command name
OberonException
- when the reference Command is not foundpublic void removeCommand(java.lang.String commandName)
Command
for ObjectObj
instances with this Lifecycle.
public void moveCommand(java.lang.String commandName, boolean after)
ObjectObj
instances with this Lifecycle.
commandName
- the Command
nameafter
- if true move the Command after else move it before the current positionpublic void updateCommands(java.util.Vector<java.lang.String> commands)
commands
- list of Command
spublic java.util.Vector<java.lang.String> getCommands()
ObjectObj
instances with this Lifecycle
and common to all Stage
s.
Command
namespublic java.lang.String getCommandsAsString(java.lang.String delim)
delim
- the command name separatorgetCommands()
public void addStage(Stage stage) throws OberonException
OberonException
public void addStageBefore(Stage stage, java.lang.String refStage) throws OberonException
stage
- the Stage to addrefStage
- the reference Stage name
OberonException
- when the reference Stage is not foundpublic void addStageAfter(Stage stage, java.lang.String refStage) throws OberonException
stage
- the Stage to addrefStage
- the reference Stage name
OberonException
- when the reference Stage is not foundpublic void moveStage(java.lang.String stageName, boolean after)
stageName
- the Stage
nameafter
- if true move the Stage after else move it before the current positionpublic void removeStage(Stage stage)
Stage
from the Lifecycle
public void removeStage(java.lang.String stageName)
Stage
from the Lifecycle identified by its name
public void setStages(java.util.Vector<Stage> stages)
stages
- a Vector of Stage
spublic void updateStages(java.util.Vector<Stage> stages) throws OberonException
stages
- list of Stage
s
OberonException
public int getStagePos(java.lang.String stageName)
Stage
position index in the Lifecycle stage sequence
public java.util.Vector<Stage> getStages()
Stage
spublic Stage getStageAt(int index)
public Stage getStage(java.lang.String stageName)
public Stage getStageFromId(int stageId)
public java.util.Vector<java.lang.String> getStageNames()
Stage
namespublic java.util.Vector<java.lang.String> getStageIDs()
public java.lang.String getStagesAsString(java.lang.String delim)
delim
- the Stage
name separatorpublic java.lang.String getProperty(java.lang.String propertyName, java.util.Vector<java.lang.Object> filterArgs, java.lang.String token, Framework framework)
getProperty
in class OBBase
propertyName
- OOQL property identifier/name (example: defaultfiletype , revisionrule ...)filterArgs
- extra arguments used to compute propertiestoken
- separator token for complex propertiesframework
- the current framework
public java.util.Vector<?> getTargetNames(java.lang.String composedName, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
getTargetNames
in class OBBase
composedName
- OOQL property identifier/name (example: class, stage, .. )filterArgs
- extra arguments used to compute propertiesframework
- the current framework
public java.lang.String toString()
toString
in class AdminBase
public java.lang.String toString(Framework framework)
toString
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element getXMLHistoryFlags()
public org.jdom.Element toXML(Framework framework)
toXML
in class AdminBase
framework
- the current frameworkpublic org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
toXML
in class AdminBase
getImage
- true to include "imagedata" element with the base64 encoded image datafullDump
- true to include detailed informationframework
- the current frameworkpublic void fromXML(org.jdom.Element rootElement)
Stage
properties from XML element tree
fromXML
in class AdminBase
public void fromXML(org.jdom.Element rootElement, boolean loadStages)
loadStages
- if true to load also Stage propertiespublic java.util.Hashtable<java.lang.String,org.jdom.Element> getStageXML()
Stage
s associated to their IDsfromXML(Element, boolean)
public java.lang.String getCreateCommand(boolean force)
getCreateCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String getSaveCommand(boolean force)
getSaveCommand
in class AdminBase
force
- if true append the "force" options at the endpublic java.lang.String compareUpdate(Lifecycle refLifecycle, boolean checkImage, boolean overwrite, boolean force, Framework framework) throws OberonException
refLifecycle
- the reference Lifecycle objectcheckImage
- if true compare also the image iconoverwrite
- if true update the database object instanceforce
- if true ignores optional propertiesframework
- the current framework
OberonException
fromXML(Element)
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |