OBEROn SDK

com.oberon.ooql.sdk
Class ObjectBase

java.lang.Object
  extended by com.oberon.ooql.sdk.OBBase
      extended by com.oberon.ooql.sdk.ObjectBase
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
Link, ObjectObj

public abstract class ObjectBase
extends OBBase
implements java.io.Serializable

A base class for ObjectObj and Link instances. This class provides the common basic features for OBEROn objects and their links

Version:
5.0
See Also:
Serialized Form

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

HIST_CREATE

public static final int HIST_CREATE
History flag: Create event

See Also:
Constant Field Values

HIST_CLONE

public static final int HIST_CLONE
History flag: Clone event

See Also:
Constant Field Values

HIST_CHANGESPACE

public static final int HIST_CHANGESPACE
History flag: Change ObjectSpace event

See Also:
Constant Field Values

HIST_CHANGECLASS

public static final int HIST_CHANGECLASS
History flag: Change Class event

See Also:
Constant Field Values

HIST_CHANGENAME

public static final int HIST_CHANGENAME
History flag: Change Name event

See Also:
Constant Field Values

HIST_CHANGEHOLDER

public static final int HIST_CHANGEHOLDER
History flag: Change Holder event

See Also:
Constant Field Values

HIST_CHANGELIFECYCLE

public static final int HIST_CHANGELIFECYCLE
History flag: Change Lifecycle event

See Also:
Constant Field Values

HIST_EDIT

public static final int HIST_EDIT
History flag: Edit event

See Also:
Constant Field Values

HIST_FILEPUT

public static final int HIST_FILEPUT
History flag: File-Put event

See Also:
Constant Field Values

HIST_FILEGET

public static final int HIST_FILEGET
History flag: File-Get event

See Also:
Constant Field Values

HIST_FILERENAME

public static final int HIST_FILERENAME
History flag: File-Rename event

See Also:
Constant Field Values

HIST_FILEDELETE

public static final int HIST_FILEDELETE
History flag: File-Delete event

See Also:
Constant Field Values

HIST_ADDLINK

public static final int HIST_ADDLINK
History flag: Add-Link (connect) event

See Also:
Constant Field Values

HIST_CHANGETYPE

public static final int HIST_CHANGETYPE
History flag: Change-Link LinkType event

See Also:
Constant Field Values

HIST_REMOVELINK

public static final int HIST_REMOVELINK
History flag: Remove-Link (disconnect) event

See Also:
Constant Field Values

HIST_LOCK

public static final int HIST_LOCK
History flag: Lock event

See Also:
Constant Field Values

HIST_UNLOCK

public static final int HIST_UNLOCK
History flag: UnLock event

See Also:
Constant Field Values

HIST_PROGRESS

public static final int HIST_PROGRESS
History flag: Stage-Progress event

See Also:
Constant Field Values

HIST_REGRESS

public static final int HIST_REGRESS
History flag: Stage-Regress event

See Also:
Constant Field Values

HIST_VALIDATE

public static final int HIST_VALIDATE
History flag: Validation-Validate event

See Also:
Constant Field Values

HIST_IGNORE

public static final int HIST_IGNORE
History flag: Validation-Ignore event

See Also:
Constant Field Values

HIST_REFUSE

public static final int HIST_REFUSE
History flag: Validation-Refuse event

See Also:
Constant Field Values

HIST_REVISE

public static final int HIST_REVISE
History flag: Revise event

See Also:
Constant Field Values

HIST_DELEGATE

public static final int HIST_DELEGATE
History flag: Delegate event

See Also:
Constant Field Values

HIST_REVOKE

public static final int HIST_REVOKE
History flag: Revoke Delegation event

See Also:
Constant Field Values

HIST_CUSTOM

public static final int HIST_CUSTOM
History flag: Custom event

See Also:
Constant Field Values

HIST_UNDO

public static final int HIST_UNDO
History flag: Undo event

See Also:
Constant Field Values

HIST_FILELOCK

public static final int HIST_FILELOCK
History flag: File-Lock event

See Also:
Constant Field Values

HIST_FILEUNLOCK

public static final int HIST_FILEUNLOCK
History flag: File-UnLock event

See Also:
Constant Field Values

HIST_SETSTAGE

public static final int HIST_SETSTAGE
History flag: Set-Stage event

See Also:
Constant Field Values

HIST_Length

public static final int HIST_Length
Number of History flags

See Also:
Constant Field Values

OBJ_HIST

public static final int[] OBJ_HIST
List of Object History events


LINK_HIST

public static final int[] LINK_HIST
List of Link History events


bHasAccess

public boolean bHasAccess
Read access


bsOptions

public java.util.BitSet bsOptions
Set for options

Constructor Detail

ObjectBase

public ObjectBase()
Method Detail

setID

public void setID(java.lang.String objectID)
Set the ID [INTERNAL USAGE]


resetID

public void resetID()
Reset the ID [INTERNAL USAGE]


getID

public 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


setModDate

public void setModDate(java.lang.String date)
Set the last modification date; [INTERNAL USAGE]

Parameters:
date - the modification date

getModDate

public java.lang.String getModDate()
Return the last modification date


setCrtDate

public void setCrtDate(java.lang.String date)
Set the creation date; [INTERNAL USAGE]

Parameters:
date - the creation date

getCrtDate

public java.lang.String getCrtDate()
Return the creation date


setSyncCounter

public void setSyncCounter(int counter)
Set the synchronization counter; [INTERNAL USAGE]

Parameters:
counter - the sync counter
Since:
3.0

getSyncCounter

public int getSyncCounter()
Return the sync counter

Since:
3.0

setFieldValues

public void setFieldValues(java.util.Vector<java.lang.String[]> fieldValues)
Set the ObjectObj/Link - Field values

Parameters:
fieldValues - vector of Field values (String[3]: name / value / default )

setFieldValue

public void setFieldValue(java.lang.String fieldName,
                          java.lang.String value)
Set value for a ObjectObj/Link's Field. The Field value is not stored on DB when it's equal to the default.

Parameters:
fieldName - the Field name
value - the value to set for the Field

setFieldValue

public void setFieldValue(java.lang.String fieldName,
                          java.lang.String value,
                          java.lang.String symbol)
Set value for a ObjectObj/Link's Field. The Field value is not stored on DB when it's equal to the default.

Parameters:
fieldName - the Field name
value - the value to set for the Field
symbol - set the unit measure symbol
Since:
2.4

setFieldValue

public void setFieldValue(java.lang.String fieldName,
                          java.lang.String value,
                          boolean useDefault,
                          java.lang.String symbol)
Set value for a ObjectObj/Link's Field. [INTERNAL USAGE]

Parameters:
fieldName - the Field name
value - the value to set for the Field
useDefault - if true the Field value is not stored on DB because it's equal to the default
symbol - set the unit measure symbol
Since:
2.4

resetFieldValues

public void resetFieldValues()
Remove all Field values


getFieldValue

public java.lang.String getFieldValue(java.lang.String fieldName)
Get a ObjectObj/Link's Field value; (the ObjectObj/Link must be linked to DB)


getFieldValue

public abstract java.lang.String getFieldValue(java.lang.String fieldName,
                                               Framework framework)
                                        throws java.sql.SQLException,
                                               OberonException
Get a ObjectObj/Link Field value directly from DB

Parameters:
fieldName - the Field name
framework - the current framework
Throws:
java.sql.SQLException
OberonException

getFieldNames

public java.util.Vector<java.lang.String> getFieldNames()
Get the ObjectObj/Link Field names

Returns:
a vector of Field names

getFieldValues

public java.util.Vector<java.lang.String[]> getFieldValues()
Get the ObjectObj/Link's Field values

Returns:
a vector of Field values (String[4]: name / value / default / symbol )

setDescription

public abstract void setDescription(java.lang.String description)
Set the description


getDescription

public abstract java.lang.String getDescription()
Get the description


setHolder

public void setHolder(java.lang.String userName)
Set the ObjectObj/Link's holder

Parameters:
userName - the holder User name
Since:
4.0

getOldHolder

public java.lang.String getOldHolder()
Get the original ObjectObj/Link's holder. (Ignore changes made with the setHolder(String) method)

Returns:
the holder User name

getHolder

public java.lang.String getHolder()
Get the ObjectObj/Link's holder.

Returns:
the holder User name

addAltHolder

public 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

Parameters:
userName - the name of the User
Since:
4.0

removeAltHolder

public void removeAltHolder(java.lang.String userName)
Remove an alternative holder; the User will loose the access rights defined for the holder

Parameters:
userName - the name of the User
Since:
4.0

updateAltHolders

public void updateAltHolders(java.util.Vector<java.lang.String> holders)
Update the alternative holders on the basis of a given list

Parameters:
holders - list of User's names
Since:
4.0

getOldAltHolders

public java.util.Vector<java.lang.String> getOldAltHolders()
Get the original ObjectObj/Link's alternative holders. (Ignore changes made with the addAltHolder(String)/removeAltHolder(String) methods)

Returns:
Vector of User names
Since:
4.0

getAltHolders

public java.util.Vector<java.lang.String> getAltHolders()
Return the list of alternative holders

Returns:
Vector of User names
Since:
4.0

getAltHoldersAsString

public java.lang.String getAltHoldersAsString(java.lang.String delim)
Return the list of alternative holders, as a String

Parameters:
delim - the separator item
Returns:
list of User names separated by the delim characters
Since:
4.0

getCurrentIteration

public int getCurrentIteration(Framework framework)
Get the number of current iteration

Parameters:
framework - the current framework
Since:
3.0

getIteration

public java.lang.String getIteration(int iterNumber,
                                     Framework framework)
Get the saved values for a specific iteration

Parameters:
iterNumber - the iteration number
framework - the current framework
Since:
3.0

addHistory

public void addHistory(int event,
                       java.lang.String text,
                       java.lang.String note,
                       Framework framework)
                throws OberonException
Register custom event on the history table

Parameters:
event - the history event flag
text - the event description text
note - extra text
Throws:
OberonException

setHistory

public void setHistory(java.util.Vector<java.lang.String[]> history)
Set the history table

Parameters:
history - vector of History items

removeAllHistory

public void removeAllHistory(Framework framework)
                      throws OberonException
Reset the history table

Throws:
OberonException

removeHistory

public void removeHistory(int event,
                          java.lang.String userName,
                          FieldRange dateRange,
                          Framework framework)
                   throws OberonException
Remove items from the history table

Parameters:
event - the history event flag
userName - filter items by event responsible User
dateRange - filter items by date range
framework - the current framework
Throws:
OberonException

getHistory

public java.util.Vector<java.lang.String[]> getHistory(int event,
                                                       java.lang.String userName,
                                                       FieldRange dateRange,
                                                       Framework framework)
                                                throws OberonException
Get items from the history table

Parameters:
event - the history event flag
userName - filter items by event responsible User
dateRange - filter items by date range
framework - the current framework
Throws:
OberonException

getHistory

public java.lang.String getHistory(Selector.HistorySelector hselector,
                                   Framework framework)
Get items from the history table

Parameters:
hselector - the history selector
framework - the current framework

getXMLHistory

public org.jdom.Element getXMLHistory(Selector.HistorySelector hselector,
                                      Framework framework)
Get items from the history table in XML form

Parameters:
hselector - the history selector
framework - the current framework

getHistoryOptionAsString

public static java.lang.String getHistoryOptionAsString(int event)
Convert the history flag to OOQL string format

Parameters:
event - the history event flag

getHistoryOptionId

public static int getHistoryOptionId(java.lang.String history)
Convert the OOQL history string format to history flag

Parameters:
history - the OOQL history label

formatHistory

public static java.lang.String formatHistory(java.lang.String[] fHistory)
Format the history table item as a text

Parameters:
fHistory - the history item

formatXMLHistory

public static org.jdom.Element formatXMLHistory(java.lang.String[] fHistory)
Format the history table item as XML structure

Parameters:
fHistory - the history item

getHistoryFromXML

public void getHistoryFromXML(org.jdom.Element rootElement)
Load the history table from XML element tree

Parameters:
rootElement - the root of the XML history structure

show

public static void show(ObjectBase objlink,
                        Selector selector,
                        java.io.DataOutputStream outStream,
                        Framework framework)
                 throws java.io.IOException,
                        OberonException
Show the properties for the ObjectObj or the Link

Parameters:
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
Throws:
java.io.IOException - when the output stream return an exception
OberonException - for all other problems
Since:
4.0
See Also:
Framework.getResult()

show

public abstract void show(Selector selector,
                          java.io.DataOutputStream outStream,
                          Framework framework)
                   throws java.io.IOException,
                          OberonException
Show the ObjectObj/Link's properties

Parameters:
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
Throws:
java.io.IOException - when the output stream return an exception
OberonException - for all other problems
See Also:
Framework.getResult()

OBEROn SDK

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