|
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.ObjectBase
public abstract class ObjectBase
A base class for ObjectObj
and Link
instances.
This class provides the common basic features for OBEROn objects and their links
Field Summary | |
---|---|
boolean |
bHasAccess
Read access |
java.util.BitSet |
bsOptions
Set for options |
static int |
HIST_ADDLINK
History flag: Add- Link (connect) event |
static int |
HIST_CHANGECLASS
History flag: Change Class event |
static int |
HIST_CHANGEHOLDER
History flag: Change Holder event |
static int |
HIST_CHANGELIFECYCLE
History flag: Change Lifecycle event |
static int |
HIST_CHANGENAME
History flag: Change Name event |
static int |
HIST_CHANGESPACE
History flag: Change ObjectSpace event |
static int |
HIST_CHANGETYPE
History flag: Change- Link LinkType event |
static int |
HIST_CLONE
History flag: Clone event |
static int |
HIST_CREATE
History flag: Create event |
static int |
HIST_CUSTOM
History flag: Custom event |
static int |
HIST_DELEGATE
History flag: Delegate event |
static int |
HIST_EDIT
History flag: Edit event |
static int |
HIST_FILEDELETE
History flag: File-Delete event |
static int |
HIST_FILEGET
History flag: File-Get event |
static int |
HIST_FILELOCK
History flag: File-Lock event |
static int |
HIST_FILEPUT
History flag: File-Put event |
static int |
HIST_FILERENAME
History flag: File-Rename event |
static int |
HIST_FILEUNLOCK
History flag: File-UnLock event |
static int |
HIST_IGNORE
History flag: Validation -Ignore event |
static int |
HIST_Length
Number of History flags |
static int |
HIST_LOCK
History flag: Lock event |
static int |
HIST_PROGRESS
History flag: Stage -Progress event |
static int |
HIST_REFUSE
History flag: Validation -Refuse event |
static int |
HIST_REGRESS
History flag: Stage -Regress event |
static int |
HIST_REMOVELINK
History flag: Remove- Link (disconnect) event |
static int |
HIST_REVISE
History flag: Revise event |
static int |
HIST_REVOKE
History flag: Revoke Delegation event |
static int |
HIST_SETSTAGE
History flag: Set- Stage event |
static int |
HIST_UNDO
History flag: Undo event |
static int |
HIST_UNLOCK
History flag: UnLock event |
static int |
HIST_VALIDATE
History flag: Validation -Validate event |
static int[] |
LINK_HIST
List of Link History events |
static int[] |
OBJ_HIST
List of Object History events |
Constructor Summary | |
---|---|
ObjectBase()
|
Method Summary | |
---|---|
void |
addAltHolder(java.lang.String userName)
Add an alternative holder to the Object/Link; the User will gain the same access rights of main holder |
void |
addHistory(int event,
java.lang.String text,
java.lang.String note,
Framework framework)
Register custom event on the history table |
static java.lang.String |
formatHistory(java.lang.String[] fHistory)
Format the history table item as a text |
static org.jdom.Element |
formatXMLHistory(java.lang.String[] fHistory)
Format the history table item as XML structure |
java.util.Vector<java.lang.String> |
getAltHolders()
Return the list of alternative holders |
java.lang.String |
getAltHoldersAsString(java.lang.String delim)
Return the list of alternative holders, as a String |
java.lang.String |
getCrtDate()
Return the creation date |
int |
getCurrentIteration(Framework framework)
Get the number of current iteration |
abstract java.lang.String |
getDescription()
Get the description |
java.util.Vector<java.lang.String> |
getFieldNames()
Get the ObjectObj/Link Field names |
java.lang.String |
getFieldValue(java.lang.String fieldName)
Get a ObjectObj/Link's Field value; (the ObjectObj/Link must be linked to DB) |
abstract java.lang.String |
getFieldValue(java.lang.String fieldName,
Framework framework)
Get a ObjectObj/Link Field value directly from DB |
java.util.Vector<java.lang.String[]> |
getFieldValues()
Get the ObjectObj/Link's Field values |
java.util.Vector<java.lang.String[]> |
getHistory(int event,
java.lang.String userName,
FieldRange dateRange,
Framework framework)
Get items from the history table |
java.lang.String |
getHistory(Selector.HistorySelector hselector,
Framework framework)
Get items from the history table |
void |
getHistoryFromXML(org.jdom.Element rootElement)
Load the history table from XML element tree |
static java.lang.String |
getHistoryOptionAsString(int event)
Convert the history flag to OOQL string format |
static int |
getHistoryOptionId(java.lang.String history)
Convert the OOQL history string format to history flag |
java.lang.String |
getHolder()
Get the ObjectObj/Link's holder. |
java.lang.String |
getID()
Return the ID The ID format is #00000-FFFFFFFF where 00000 is the ObjectSpace code and FFFFFFFF is a 8 digits hex number |
java.lang.String |
getIteration(int iterNumber,
Framework framework)
Get the saved values for a specific iteration |
java.lang.String |
getModDate()
Return the last modification date |
java.util.Vector<java.lang.String> |
getOldAltHolders()
Get the original ObjectObj/Link's alternative holders. |
java.lang.String |
getOldHolder()
Get the original ObjectObj/Link's holder. |
int |
getSyncCounter()
Return the sync counter |
org.jdom.Element |
getXMLHistory(Selector.HistorySelector hselector,
Framework framework)
Get items from the history table in XML form |
void |
removeAllHistory(Framework framework)
Reset the history table |
void |
removeAltHolder(java.lang.String userName)
Remove an alternative holder; the User will loose the access rights defined for the holder |
void |
removeHistory(int event,
java.lang.String userName,
FieldRange dateRange,
Framework framework)
Remove items from the history table |
void |
resetFieldValues()
Remove all Field values |
void |
resetID()
Reset the ID [INTERNAL USAGE] |
void |
setCrtDate(java.lang.String date)
Set the creation date; [INTERNAL USAGE] |
abstract void |
setDescription(java.lang.String description)
Set the description |
void |
setFieldValue(java.lang.String fieldName,
java.lang.String value)
Set value for a ObjectObj/Link's Field. |
void |
setFieldValue(java.lang.String fieldName,
java.lang.String value,
boolean useDefault,
java.lang.String symbol)
Set value for a ObjectObj/Link's Field. |
void |
setFieldValue(java.lang.String fieldName,
java.lang.String value,
java.lang.String symbol)
Set value for a ObjectObj/Link's Field. |
void |
setFieldValues(java.util.Vector<java.lang.String[]> fieldValues)
Set the ObjectObj/Link - Field values |
void |
setHistory(java.util.Vector<java.lang.String[]> history)
Set the history table |
void |
setHolder(java.lang.String userName)
Set the ObjectObj/Link's holder |
void |
setID(java.lang.String objectID)
Set the ID [INTERNAL USAGE] |
void |
setModDate(java.lang.String date)
Set the last modification date; [INTERNAL USAGE] |
void |
setSyncCounter(int counter)
Set the synchronization counter; [INTERNAL USAGE] |
static void |
show(ObjectBase objlink,
Selector selector,
java.io.DataOutputStream outStream,
Framework framework)
Show the properties for the ObjectObj or the Link |
abstract void |
show(Selector selector,
java.io.DataOutputStream outStream,
Framework framework)
Show the ObjectObj/Link's properties |
void |
updateAltHolders(java.util.Vector<java.lang.String> holders)
Update the alternative holders on the basis of a given list |
Methods inherited from class com.oberon.ooql.sdk.OBBase |
---|
addChange, addUniqueChange, ChangesFromXML, ChangesToXML, getChanges, getChangesAsString, getId, getName, getProperty, getTargetNames, isLinked, removeChange, resetChanges, setId, setLinked |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int HIST_CREATE
public static final int HIST_CLONE
public static final int HIST_CHANGESPACE
ObjectSpace
event
public static final int HIST_CHANGECLASS
Class
event
public static final int HIST_CHANGENAME
public static final int HIST_CHANGEHOLDER
public static final int HIST_CHANGELIFECYCLE
Lifecycle
event
public static final int HIST_EDIT
public static final int HIST_FILEPUT
public static final int HIST_FILEGET
public static final int HIST_FILERENAME
public static final int HIST_FILEDELETE
public static final int HIST_ADDLINK
Link
(connect) event
public static final int HIST_CHANGETYPE
Link
LinkType
event
public static final int HIST_REMOVELINK
Link
(disconnect) event
public static final int HIST_LOCK
public static final int HIST_UNLOCK
public static final int HIST_PROGRESS
Stage
-Progress event
public static final int HIST_REGRESS
Stage
-Regress event
public static final int HIST_VALIDATE
Validation
-Validate event
public static final int HIST_IGNORE
Validation
-Ignore event
public static final int HIST_REFUSE
Validation
-Refuse event
public static final int HIST_REVISE
public static final int HIST_DELEGATE
public static final int HIST_REVOKE
public static final int HIST_CUSTOM
public static final int HIST_UNDO
public static final int HIST_FILELOCK
public static final int HIST_FILEUNLOCK
public static final int HIST_SETSTAGE
Stage
event
public static final int HIST_Length
public static final int[] OBJ_HIST
public static final int[] LINK_HIST
public boolean bHasAccess
public java.util.BitSet bsOptions
Constructor Detail |
---|
public ObjectBase()
Method Detail |
---|
public void setID(java.lang.String objectID)
public void resetID()
public java.lang.String getID()
ObjectSpace
code and FFFFFFFF is a 8 digits hex number
public void setModDate(java.lang.String date)
date
- the modification datepublic java.lang.String getModDate()
public void setCrtDate(java.lang.String date)
date
- the creation datepublic java.lang.String getCrtDate()
public void setSyncCounter(int counter)
counter
- the sync counterpublic int getSyncCounter()
public void setFieldValues(java.util.Vector<java.lang.String[]> fieldValues)
fieldValues
- vector of Field
values (String[3]: name / value / default )public void setFieldValue(java.lang.String fieldName, java.lang.String value)
Field
value is not stored on DB when it's equal to the default.
fieldName
- the Field namevalue
- the value to set for the Fieldpublic void setFieldValue(java.lang.String fieldName, java.lang.String value, java.lang.String symbol)
Field
value is not stored on DB when it's equal to the default.
fieldName
- the Field namevalue
- the value to set for the Fieldsymbol
- set the unit measure symbolpublic void setFieldValue(java.lang.String fieldName, java.lang.String value, boolean useDefault, java.lang.String symbol)
fieldName
- the Field
namevalue
- the value to set for the FielduseDefault
- if true the Field value is not stored on DB because it's equal to the defaultsymbol
- set the unit measure symbolpublic void resetFieldValues()
Field
values
public java.lang.String getFieldValue(java.lang.String fieldName)
public abstract java.lang.String getFieldValue(java.lang.String fieldName, Framework framework) throws java.sql.SQLException, OberonException
Field
value directly from DB
fieldName
- the Field nameframework
- the current framework
java.sql.SQLException
OberonException
public java.util.Vector<java.lang.String> getFieldNames()
Field
namespublic java.util.Vector<java.lang.String[]> getFieldValues()
Field
values (String[4]: name / value / default / symbol )public abstract void setDescription(java.lang.String description)
public abstract java.lang.String getDescription()
public void setHolder(java.lang.String userName)
userName
- the holder User
namepublic java.lang.String getOldHolder()
setHolder(String)
method)
User
namepublic java.lang.String getHolder()
User
namepublic void addAltHolder(java.lang.String userName)
userName
- the name of the User
public void removeAltHolder(java.lang.String userName)
userName
- the name of the User
public void updateAltHolders(java.util.Vector<java.lang.String> holders)
holders
- list of User
's namespublic java.util.Vector<java.lang.String> getOldAltHolders()
addAltHolder(String)
/removeAltHolder(String)
methods)
User
namespublic java.util.Vector<java.lang.String> getAltHolders()
User
namespublic java.lang.String getAltHoldersAsString(java.lang.String delim)
delim
- the separator item
User
names separated by the delim characterspublic int getCurrentIteration(Framework framework)
framework
- the current frameworkpublic java.lang.String getIteration(int iterNumber, Framework framework)
iterNumber
- the iteration numberframework
- the current frameworkpublic void addHistory(int event, java.lang.String text, java.lang.String note, Framework framework) throws OberonException
event
- the history event flagtext
- the event description textnote
- extra text
OberonException
public void setHistory(java.util.Vector<java.lang.String[]> history)
history
- vector of History itemspublic void removeAllHistory(Framework framework) throws OberonException
OberonException
public void removeHistory(int event, java.lang.String userName, FieldRange dateRange, Framework framework) throws OberonException
event
- the history event flaguserName
- filter items by event responsible User
dateRange
- filter items by date rangeframework
- the current framework
OberonException
public java.util.Vector<java.lang.String[]> getHistory(int event, java.lang.String userName, FieldRange dateRange, Framework framework) throws OberonException
event
- the history event flaguserName
- filter items by event responsible User
dateRange
- filter items by date rangeframework
- the current framework
OberonException
public java.lang.String getHistory(Selector.HistorySelector hselector, Framework framework)
hselector
- the history selectorframework
- the current frameworkpublic org.jdom.Element getXMLHistory(Selector.HistorySelector hselector, Framework framework)
hselector
- the history selectorframework
- the current frameworkpublic static java.lang.String getHistoryOptionAsString(int event)
event
- the history event flagpublic static int getHistoryOptionId(java.lang.String history)
history
- the OOQL history labelpublic static java.lang.String formatHistory(java.lang.String[] fHistory)
fHistory
- the history itempublic static org.jdom.Element formatXMLHistory(java.lang.String[] fHistory)
fHistory
- the history itempublic void getHistoryFromXML(org.jdom.Element rootElement)
rootElement
- the root of the XML history structurepublic static void show(ObjectBase objlink, Selector selector, java.io.DataOutputStream outStream, Framework framework) throws java.io.IOException, OberonException
objlink
- the ObjectObj or the Link object (linked or not linked)selector
- selection parameters (if null return all the object properties)outStream
- the stream for the results (if null the result is stored into the framework)framework
- the current framework
java.io.IOException
- when the output stream return an exception
OberonException
- for all other problemsFramework.getResult()
public abstract void show(Selector selector, java.io.DataOutputStream outStream, Framework framework) throws java.io.IOException, OberonException
selector
- selection parameters (if null return all properties)outStream
- the stream for the results (if null the result is stored into the framework)framework
- the current framework
java.io.IOException
- when the output stream return an exception
OberonException
- for all other problemsFramework.getResult()
|
OBEROn SDK | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |