OBEROn SDK

com.oberon.ooql.sdk
Class LinkType

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

public class LinkType
extends AdminBase
implements java.io.Serializable

LinkType Admin Object: defines a type of relationship between OBEROn object [ObjectObj] instances.

Version:
5.0
See Also:
Serialized Form

Field Summary
static int CARD_MULTIPLE
          The cardinality multiple constant (N)
static int CARD_SINGLE
          The cardinality single constant (1)
static int CLONE_DUPLICATE
          All links are replicated to the new object during the clone operation
static int CLONE_MOVE
          All links are moved from the reference to the new object during the clone operation
static int CLONE_NONE
          Object clonation doesn't affect links
static int REVISION_DUPLICATE
          All links are replicated to the new object during the revision operation
static int REVISION_MOVE
          All links are moved from the reference to the new object during the revision operation
static int REVISION_NONE
          Object revision doesn't affect links
 
Fields inherited from class com.oberon.ooql.sdk.AdminBase
bsOptions, HIDDEN_OPTION
 
Constructor Summary
LinkType()
           
LinkType(java.lang.String name)
           
 
Method Summary
 java.lang.String accessToString(java.util.BitSet accessFlags, java.lang.String delim)
          Convert the access flags to the OOQL format
 void addClass(java.lang.String className, boolean from)
          Add a From/To Side Class to the LinkType.
 void addField(java.lang.String fieldName)
          Add a Field to this LinkType
 void addFromSideClass(java.lang.String className)
          Add a From Side Class to the LinkType.
 void addToSideClass(java.lang.String className)
          Add a To Side Class to the LinkType.
 void addTrigger(Trigger trigger)
          Add a Trigger to this LinkType
 java.lang.String compareUpdate(LinkType refLinkType, boolean checkImage, boolean overwrite, boolean force, Framework framework)
          Return/apply the OOQL command to update this LinkType object and let it become equals to another reference object.
 void create(boolean force, Framework framework)
          Create a new LinkType object on the database
 void create(Framework framework)
          Create a new LinkType object on the database
 void destroy(Framework framework)
          Remove the LinkType object from the database
 void fromXML(org.jdom.Element rootElement)
          Load the LinkType object properties from XML element tree
 ActorAccess getActorAccess(java.lang.String actorType, java.lang.String actorName)
          Get the Link accesses for a specific actor
 boolean getActorAccess(java.lang.String actorType, java.lang.String actorName, int accessType)
          Get actor access for a specific operation
 java.util.Vector<ActorAccess> getActorAccesses()
          Get the all actor accesses for this LinkType
 java.util.Vector<java.lang.String> getActors()
          Get the list of all actors for this LinkType
 java.util.Vector<java.lang.String> getActors(java.lang.String actorType)
          Get the list of actors for this LinkType
 java.lang.String getCardinalityAsString(int cardinality)
          Convert the cardinality to OOQL string
 java.lang.String getCloneAsString(int clone)
          Convert the clone behavior to OOQL string
 java.util.BitSet getCommunityAccess()
          Get the Link accesses for the community
 boolean getCommunityAccess(int accessType)
          Get the community access for a specific operation
 java.lang.String getCreateCommand(boolean force)
          Return the OOQL command to create this LinkType object with the settled properties
 java.lang.String getDefaultForm()
          Get the default Form to edit Links of this LinkType.
 boolean getDuplicate()
          Check if the LinkType allows duplicates.
 java.util.Vector<java.lang.String> getFields()
          Return the list of Fields for this LinkType
 java.lang.String getFieldsAsString(java.lang.String delim)
          Return the list of Fields, as a String
 int getFromSideCardinality()
          Get the From side cardinality
 java.util.Vector<java.lang.String> getFromSideClasses()
          Get the list of Classes that allow outgoing Links of this LinkType.
 java.lang.String getFromSideClassesAsString(java.lang.String delim)
          Get the list of Classes that allow outgoing Links of this LinkType as a single String.
 int getFromSideClone()
          Get the From side clone behavior.
 java.lang.String getFromSideNote()
          Get the note that describes the From side
 int getFromSideRevision()
          Get the From side revision behavior.
 java.util.BitSet getHistoryOption()
          Get the events traced into the history table for Links of this LinkType
 boolean getHistoryOption(int event)
          Check if a specific event is traced into the history table for Links with this LinkType
 java.lang.String getHistoryOptionsAsString(java.lang.String delim)
          Get the events traced into the history table for Links of this LinkType as String
 java.util.BitSet getHolderAccess()
          Get the Link accesses for the holder
 boolean getHolderAccess(int accessType)
          Get the holder access for a specific operation
 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 LinkType object by its OOQL identifier
 java.lang.String getRevisionAsString(int revision)
          Convert the revision behavior to OOQL string
 java.lang.String getSaveCommand(boolean force)
          Return the OOQL command to update this LinkType object with the modified properties.
 boolean getSelfLink()
          Check if the LinkType allows Self-Links.
 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
 int getToSideCardinality()
          Get the To side cardinality
 java.util.Vector<java.lang.String> getToSideClasses()
          Get the list of Classes that allow incoming Links of this LinkType.
 java.lang.String getToSideClassesAsString(java.lang.String delim)
          Get the list of Classes that allow incoming Links of this LinkType as a single String.
 int getToSideClone()
          Get the To side clone behavior.
 java.lang.String getToSideNote()
          Get the note that describes the To side
 int getToSideRevision()
          Get the To side revision behavior.
 Trigger getTriggerByEvent(java.lang.String event)
          Get the Program-Trigger for a specific event
 java.util.Vector<Trigger> getTriggers()
          Return the list of Triggers defined for this LinkType
 java.lang.String getTriggersAsString(java.lang.String delim)
          Return the list of Program-Triggers, as a String
 java.lang.String getWorkflowAsString(java.lang.String delim)
          Return the list of Workflow-Triggers, as a String
 Trigger getWorkflowByEvent(java.lang.String event)
          Get the Workflow-Trigger for a specific event
 org.jdom.Element getXMLAssignmentList(java.lang.String assignName)
          Return the LinkType Assignment actor accesses as XML element tree
 org.jdom.Element getXMLCommunity()
          Return the LinkType community accesses as XML element tree
 org.jdom.Element getXMLHistoryFlags()
          Return the history flags as XML element tree
 org.jdom.Element getXMLHolder()
          Return the LinkType holder accesses as XML element tree
 org.jdom.Element getXMLTeamList(java.lang.String teamName)
          Return the LinkType Team actor accesses as XML element tree
 org.jdom.Element getXMLUserList(java.lang.String userName)
          Return the LinkType User actor accesses as XML element tree
 boolean hasAccess(int accessType, Framework framework)
          Check if the current framework User has access for a specific operation (ignore holder access)
 boolean hasAccess(int accessType, Link link, Framework framework)
          Check if the current framework User has access for a specific operation on a given Link
 boolean hasAccess(int accessType, Link link, java.lang.String userName, Framework framework)
          Check if a User has access for a specific operation on a given Link.
 boolean hasAccess(int accessType, java.lang.String userName, Framework framework)
          Check if a User has access for a specific operation (ignore holder access).
 boolean isCheckUpdate()
          Check if the checkUpdate option is active for this Linktype
 boolean isHistoryActive(int event)
          Check if a specific event is traced into the history table for Links of this LinkType
 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 object: connect the memory instance with the database instance
static LinkType 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 removeActorAccess(java.lang.String actorType, java.lang.String actorName)
          Revoke the Link access to a specific actor
 void removeField(java.lang.String fieldName)
          Remove a Field from this LinkType; values for all instantiated links will be lost
 void removeFromSideClass(java.lang.String className)
          Remove a From Side Class from the LinkType.
 void removeToSideClass(java.lang.String className)
          Remove a To Side Class from the LinkType.
 void removeTrigger(Trigger trigger)
          Remove a Trigger from this LinkType
 void setActorAccess(java.lang.String actorType, java.lang.String actorName, java.util.BitSet accessFlags)
          Set the Link accesses for a specific actor
 void setActorAccess(java.lang.String actorType, java.lang.String actorName, int accessType, boolean accessFlag)
          Set the Link access for an actor user
 void setAllActorAccess(java.lang.String actorType, java.lang.String actorName)
          Give the full Link access to a specific actor
 void setAllCommunityAccess()
          Give the full Link access to the community
 void setAllHistoryOption()
          Active all events history trace for Links of this LinkType
 void setAllHolderAccess()
          Give the full Link access to the holder
 void setCardinality(java.lang.String cardinality, boolean from)
          Set the From/To side cardinality
 void setCheckUpdate(boolean checkUpdate)
          Set the checkUpdate option.
 void setClone(java.lang.String clone, boolean from)
          Set the From/To side clone behavior.
 void setCommunityAccess(java.util.BitSet accessFlags)
          Set the Link accesses for the community
 void setCommunityAccess(int accessType, boolean accessFlag)
          Set the Link access for the community
 void setDefaultForm(java.lang.String defaultForm)
          Set the default Form to edit Links of this LinkType.
 void setDuplicate(boolean duplicate)
          Set the duplicate flag for this LinkType.
 void setFromSideCardinality(int cardinality)
          Set the From side cardinality
 void setFromSideClone(int clone)
          Set the From side clone behavior.
 void setFromSideNote(java.lang.String note)
          Set a note to describe the From side
 void setFromSideRevision(int revision)
          Set the From side revision behavior.
 void setHistoryOption(java.util.BitSet eventFlags)
          Set the events to log into the history table for Links of this LinkType
 void setHistoryOption(int event, boolean flag)
          Set the events to log into the history table for Links of this LinkType
 void setHolderAccess(java.util.BitSet accessFlags)
          Set the Link accesses for the holder
 void setHolderAccess(int accessType, boolean accessFlag)
          Set the Link access for the Link's holder
 void setNoCommunityAccess()
          Revoke the Link access to the community
 void setNoHistoryOption()
          Disable history trace for Links of this LinkType
 void setNoHolderAccess()
          Revoke the Link access to the holder
 void setNote(java.lang.String note, boolean from)
          Set a note to describe the From/To side
 void setRevision(java.lang.String revision, boolean from)
          Set the From/To side revision behavior.
 void setSelfLink(boolean selflink)
          Set the selflink flag for this LinkType.
 void setToSideCardinality(int cardinality)
          Set the To side cardinality
 void setToSideClone(int clone)
          Set the To side clone behavior.
 void setToSideNote(java.lang.String note)
          Set a note to describe the To side
 void setToSideRevision(int revision)
          Set the To side revision behavior.
 void setTriggers(java.util.Vector<Trigger> triggers)
          Set Triggers for this LinkType
 void setUndoOption(boolean undoOption)
          Set the Undo option.
 java.lang.String toString()
          Return the LinkType object basic properties as a single String
 java.lang.String toString(Framework framework)
          Return the LinkType object extended properties as a single String
 org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
          Return the LinkType object properties as XML element tree
 org.jdom.Element toXML(Framework framework)
          Return the LinkType object properties as XML element tree
 void unlink(Framework framework)
          Close the object: disconnect the memory instance from the database instance
 void updateActorAccess(java.util.Vector<ActorAccess> accesses)
          Update the execute access on the basis of a given list
 void updateFields(java.util.Vector<java.lang.String> fields)
          Update the fields on the basis of a given list
 void updateFromSideClasses(java.util.Vector<java.lang.String> classes)
          Update the From Side classes on the basis of a given list
 void updateToSideClasses(java.util.Vector<java.lang.String> classes)
          Update the To Side classes on the basis of a given list
 void updateTriggers(java.util.Vector<Trigger> triggers)
          Update the triggers on the basis of a given list
 void write(boolean force, Framework framework)
          Update the LinkType object to the database
 void write(Framework framework)
          Update the LinkType object to the database
 
Methods inherited from class com.oberon.ooql.sdk.AdminBase
addFeature, changedApplication, checkChangeName, checkCounters, checkCounters, getAdminType, getApplication, getCommonProperty, getCommonTargetNames, getCounters, getCreateBasicCommand, getCreateCommand, getCrtDate, getDescription, getEditBasicCommand, getFeature, getFeatures, getFeaturesAsString, getImage, getImage, getImage, getImageData, getImageFile, getModDate, getModUser, getName, getOldName, getPlainFeatures, getSaveCommand, getSVNRevision, getXMLFeatureList, hasImage, isHidden, setApplication, setCounters, setCrtDate, setDescription, setHidden, setImage, setImageData, setImageFile, setModDate, setModUser, setName, setSVNRevision, show, show, toCommonXML, toXML
 
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

CARD_MULTIPLE

public static final int CARD_MULTIPLE
The cardinality multiple constant (N)

See Also:
Constant Field Values

CARD_SINGLE

public static final int CARD_SINGLE
The cardinality single constant (1)

See Also:
Constant Field Values

CLONE_NONE

public static final int CLONE_NONE
Object clonation doesn't affect links

See Also:
Constant Field Values

CLONE_MOVE

public static final int CLONE_MOVE
All links are moved from the reference to the new object during the clone operation

See Also:
Constant Field Values

CLONE_DUPLICATE

public static final int CLONE_DUPLICATE
All links are replicated to the new object during the clone operation

See Also:
Constant Field Values

REVISION_NONE

public static final int REVISION_NONE
Object revision doesn't affect links

See Also:
Constant Field Values

REVISION_MOVE

public static final int REVISION_MOVE
All links are moved from the reference to the new object during the revision operation

See Also:
Constant Field Values

REVISION_DUPLICATE

public static final int REVISION_DUPLICATE
All links are replicated to the new object during the revision operation

See Also:
Constant Field Values
Constructor Detail

LinkType

public LinkType()

LinkType

public LinkType(java.lang.String name)
         throws OberonException
Parameters:
name - the name of the administrative object
Throws:
OberonException - if the name contains invalid characters
Method Detail

open

public static LinkType open(java.lang.String name,
                            Framework framework,
                            java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
                     throws OberonException
Open an administrative object and read properties from the database or retrieve them from memory

Parameters:
name - the object name
framework - the current framework
counters - administrative object synch counters (if null read them from database)
Throws:
OberonException - usually due to DB SQL exceptions

link

public void link(Framework framework,
                 java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
          throws OberonException
Open the object: connect the memory instance with the database instance

Specified by:
link in class AdminBase
Parameters:
framework - the current framework
counters - administrative object synch counters (if null read them from database)
Throws:
OberonException - usually due to DB SQL exceptions

create

public void create(Framework framework)
            throws OberonException
Create a new LinkType object on the database

Specified by:
create in class AdminBase
Parameters:
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights

create

public void create(boolean force,
                   Framework framework)
            throws OberonException
Create a new LinkType object on the database

Parameters:
force - if true ignores optional features
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights
Since:
1.6

write

public void write(Framework framework)
           throws OberonException
Update the LinkType object to the database

Specified by:
write in class AdminBase
Parameters:
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights

write

public void write(boolean force,
                  Framework framework)
           throws OberonException
Update the LinkType object to the database

Parameters:
force - if true ignores optional features
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights
Since:
1.6

unlink

public void unlink(Framework framework)
            throws OberonException
Close the object: disconnect the memory instance from the database instance

Specified by:
unlink in class AdminBase
Parameters:
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions

destroy

public void destroy(Framework framework)
             throws OberonException
Remove the LinkType object from the database

Specified by:
destroy in class AdminBase
Parameters:
framework - the current framework
Throws:
OberonException - usually due to DB SQL exceptions or to limited user access rights

setDuplicate

public void setDuplicate(boolean duplicate)
Set the duplicate flag for this LinkType. If a LinkType doesn't allow duplicates double links of the same type between the same ObjectObjs cannot be created.

Parameters:
duplicate - true to avoid Link duplicates

getDuplicate

public boolean getDuplicate()
Check if the LinkType allows duplicates.

Returns:
the duplicate flag

setSelfLink

public void setSelfLink(boolean selflink)
Set the selflink flag for this LinkType. If a LinkType doesn't allow self-links you cannot create a link between the ObjectObj and itself

Parameters:
selflink - true to avoid Self-Links
Since:
2.3_04

getSelfLink

public boolean getSelfLink()
Check if the LinkType allows Self-Links.

Returns:
the selflink flag
Since:
2.3_04

setCheckUpdate

public void setCheckUpdate(boolean checkUpdate)
Set the checkUpdate option. This option enables/disables the synchronization counter for link instance updates: the link internal counter is increased after each modification, in case of the read counter doesn't match the current value during the update operation an exception is raised

Parameters:
checkUpdate - true to enable the option
Since:
3.0

isCheckUpdate

public boolean isCheckUpdate()
Check if the checkUpdate option is active for this Linktype

Since:
3.0

setUndoOption

public void setUndoOption(boolean undoOption)
Set the Undo option. This option enables/disables the rollback of edit operations for link instances

Parameters:
undoOption - true to enable the Undo option
Since:
3.0

isUndoEnabled

public boolean isUndoEnabled()
Check if the Undo option is enabled for this Lifecycle


addField

public void addField(java.lang.String fieldName)
Add a Field to this LinkType

Parameters:
fieldName - the name of the Field to add

removeField

public void removeField(java.lang.String fieldName)
Remove a Field from this LinkType; values for all instantiated links will be lost

Parameters:
fieldName - the name of the Field to remove

updateFields

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

Parameters:
fields - list of Field's names
Since:
4.0

getFields

public java.util.Vector<java.lang.String> getFields()
Return the list of Fields for this LinkType

Returns:
Vector of Field names

getFieldsAsString

public java.lang.String getFieldsAsString(java.lang.String delim)
Return the list of Fields, as a String

Parameters:
delim - the separator item
Returns:
list of Field names separated by the delim characters

setFromSideNote

public void setFromSideNote(java.lang.String note)
Set a note to describe the From side


getFromSideNote

public java.lang.String getFromSideNote()
Get the note that describes the From side


setToSideNote

public void setToSideNote(java.lang.String note)
Set a note to describe the To side


getToSideNote

public java.lang.String getToSideNote()
Get the note that describes the To side


setNote

public void setNote(java.lang.String note,
                    boolean from)
Set a note to describe the From/To side

Parameters:
from - true to set the From note / false to set the To note

setFromSideCardinality

public void setFromSideCardinality(int cardinality)
Set the From side cardinality

Parameters:
cardinality - the cardinality constant ( CARD_MULTIPLE / CARD_SINGLE)

getFromSideCardinality

public int getFromSideCardinality()
Get the From side cardinality


setToSideCardinality

public void setToSideCardinality(int cardinality)
Set the To side cardinality

Parameters:
cardinality - the cardinality constant ( CARD_MULTIPLE / CARD_SINGLE)

getToSideCardinality

public int getToSideCardinality()
Get the To side cardinality


getCardinalityAsString

public java.lang.String getCardinalityAsString(int cardinality)
Convert the cardinality to OOQL string


setCardinality

public void setCardinality(java.lang.String cardinality,
                           boolean from)
Set the From/To side cardinality

Parameters:
cardinality - the OOQL cardinality string ( single / multiple )
from - true to set the From cardinality / false to set the To cardinality

setFromSideRevision

public void setFromSideRevision(int revision)
Set the From side revision behavior. Defines what to do with the ObjectObj's outgoing links during the revise operation

Parameters:
revision - the revision behavior constant ( REVISION_NONE / REVISION_MOVE / REVISION_DUPLICATE)

getFromSideRevision

public int getFromSideRevision()
Get the From side revision behavior.

See Also:
setFromSideRevision(int)

setToSideRevision

public void setToSideRevision(int revision)
Set the To side revision behavior. Defines what to do with the ObjectObj's incoming links during the revise operation

Parameters:
revision - the revision behavior constant ( REVISION_NONE / REVISION_MOVE / REVISION_DUPLICATE)

getToSideRevision

public int getToSideRevision()
Get the To side revision behavior.

See Also:
setToSideRevision(int)

getRevisionAsString

public java.lang.String getRevisionAsString(int revision)
Convert the revision behavior to OOQL string


setRevision

public void setRevision(java.lang.String revision,
                        boolean from)
Set the From/To side revision behavior. Defines what to do with the ObjectObj's links during the revise operation

Parameters:
revision - the OOQL revision behavior string ( none / move / duplicate )
from - true to set the From revision behavior / false to set the To revision behavior

setFromSideClone

public void setFromSideClone(int clone)
Set the From side clone behavior. Defines what to do with the ObjectObj's outgoing links during the clone operation

Parameters:
clone - the clone behavior constant ( CLONE_NONE / CLONE_MOVE / CLONE_DUPLICATE)

getFromSideClone

public int getFromSideClone()
Get the From side clone behavior.

See Also:
setFromSideClone(int)

setToSideClone

public void setToSideClone(int clone)
Set the To side clone behavior. Defines what to do with the ObjectObj's incoming links during the clone operation

Parameters:
clone - the clone behavior constant ( CLONE_NONE / CLONE_MOVE / CLONE_DUPLICATE)

getToSideClone

public int getToSideClone()
Get the To side clone behavior.

See Also:
setToSideClone(int)

getCloneAsString

public java.lang.String getCloneAsString(int clone)
Convert the clone behavior to OOQL string


setClone

public void setClone(java.lang.String clone,
                     boolean from)
Set the From/To side clone behavior. Defines what to do with the ObjectObj's links during the clone operation

Parameters:
clone - the OOQL clone behavior string ( none / move / duplicate )
from - true to set the From clone behavior / false to set the To clone behavior

addFromSideClass

public void addFromSideClass(java.lang.String className)
Add a From Side Class to the LinkType. Let the Class instances allow outgoing Links of this LinkType. This is true also for the Class subClasses.

Parameters:
className - the Class name

removeFromSideClass

public void removeFromSideClass(java.lang.String className)
Remove a From Side Class from the LinkType. New ObjectObj instances of this Class (or its subClasses) cannot have outgoing Links of this LinkType.

Parameters:
className - the Class name

updateFromSideClasses

public void updateFromSideClasses(java.util.Vector<java.lang.String> classes)
Update the From Side classes on the basis of a given list

Parameters:
classes - list of Class's names
Since:
4.0

getFromSideClasses

public java.util.Vector<java.lang.String> getFromSideClasses()
Get the list of Classes that allow outgoing Links of this LinkType. If a Class has subClasses, these allow this LinkType links even if they don't appair in the list

Returns:
a Vector of Class names

getFromSideClassesAsString

public java.lang.String getFromSideClassesAsString(java.lang.String delim)
Get the list of Classes that allow outgoing Links of this LinkType as a single String.

Parameters:
delim - the Class name separator

addToSideClass

public void addToSideClass(java.lang.String className)
Add a To Side Class to the LinkType. Let the Class instances allow incoming Links of this LinkType. This is true also for the Class subClasses.

Parameters:
className - the Class name

removeToSideClass

public void removeToSideClass(java.lang.String className)
Remove a To Side Class from the LinkType. New ObjectObj instances of this Class (or its subClasses) cannot have incoming Links of this LinkType.

Parameters:
className - the Class name

updateToSideClasses

public void updateToSideClasses(java.util.Vector<java.lang.String> classes)
Update the To Side classes on the basis of a given list

Parameters:
classes - list of Class's names
Since:
4.0

getToSideClasses

public java.util.Vector<java.lang.String> getToSideClasses()
Get the list of Classes that allow incoming Links of this LinkType. If a Class has subClasses, these allow this LinkType links even if they don't appair in the list

Returns:
a Vector of Class names

getToSideClassesAsString

public java.lang.String getToSideClassesAsString(java.lang.String delim)
Get the list of Classes that allow incoming Links of this LinkType as a single String.

Parameters:
delim - the Class name separator

addClass

public void addClass(java.lang.String className,
                     boolean from)
Add a From/To Side Class to the LinkType. Let the Class instances allow outgoing / incoming Links of this LinkType. This is true also for the Class subClasses.

Parameters:
className - the Class name
from - true to add From class / false to add To class

setDefaultForm

public void setDefaultForm(java.lang.String defaultForm)
Set the default Form to edit Links of this LinkType.

Parameters:
defaultForm - the default edit Form

getDefaultForm

public java.lang.String getDefaultForm()
Get the default Form to edit Links of this LinkType.


setHistoryOption

public void setHistoryOption(int event,
                             boolean flag)
Set the events to log into the history table for Links of this LinkType

Parameters:
event - the history event
flag - if true the event will be traced into the history
Since:
4.0

setAllHistoryOption

public void setAllHistoryOption()
Active all events history trace for Links of this LinkType

Since:
4.0

setNoHistoryOption

public void setNoHistoryOption()
Disable history trace for Links of this LinkType

Since:
4.0

setHistoryOption

public void setHistoryOption(java.util.BitSet eventFlags)
Set the events to log into the history table for Links of this LinkType

Since:
4.0

getHistoryOption

public boolean getHistoryOption(int event)
Check if a specific event is traced into the history table for Links with this LinkType

Parameters:
event - the event code
Since:
4.0

isHistoryActive

public boolean isHistoryActive(int event)
Check if a specific event is traced into the history table for Links of this LinkType

Parameters:
event - the event code
Since:
4.0

getHistoryOption

public java.util.BitSet getHistoryOption()
Get the events traced into the history table for Links of this LinkType

Since:
4.0

getHistoryOptionsAsString

public java.lang.String getHistoryOptionsAsString(java.lang.String delim)
Get the events traced into the history table for Links of this LinkType as String

Parameters:
delim - the event name separator
Since:
4.0

setHolderAccess

public void setHolderAccess(int accessType,
                            boolean accessFlag)
Set the Link access for the Link's holder

Parameters:
accessType - the access type
accessFlag - true to enable / false to disable the access
Since:
4.0

setAllHolderAccess

public void setAllHolderAccess()
Give the full Link access to the holder

Since:
4.0

setNoHolderAccess

public void setNoHolderAccess()
Revoke the Link access to the holder

Since:
4.0

setHolderAccess

public void setHolderAccess(java.util.BitSet accessFlags)
Set the Link accesses for the holder

Since:
4.0

getHolderAccess

public boolean getHolderAccess(int accessType)
Get the holder access for a specific operation

Parameters:
accessType - the access type
Since:
4.0

getHolderAccess

public java.util.BitSet getHolderAccess()
Get the Link accesses for the holder

Since:
4.0

accessToString

public java.lang.String accessToString(java.util.BitSet accessFlags,
                                       java.lang.String delim)
Convert the access flags to the OOQL format

Parameters:
delim - the access separator string
Since:
4.0

setCommunityAccess

public void setCommunityAccess(int accessType,
                               boolean accessFlag)
Set the Link access for the community

Parameters:
accessType - the access type
accessFlag - true to enable / false to disable the access
Since:
4.0

setAllCommunityAccess

public void setAllCommunityAccess()
Give the full Link access to the community

Since:
4.0

setNoCommunityAccess

public void setNoCommunityAccess()
Revoke the Link access to the community

Since:
4.0

setCommunityAccess

public void setCommunityAccess(java.util.BitSet accessFlags)
Set the Link accesses for the community

Since:
4.0

getCommunityAccess

public boolean getCommunityAccess(int accessType)
Get the community access for a specific operation

Parameters:
accessType - the access type
Since:
4.0

getCommunityAccess

public java.util.BitSet getCommunityAccess()
Get the Link accesses for the community

Since:
4.0

setActorAccess

public void setActorAccess(java.lang.String actorType,
                           java.lang.String actorName,
                           java.util.BitSet accessFlags)
Set the Link accesses for a specific actor

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name
Since:
4.0

setActorAccess

public void setActorAccess(java.lang.String actorType,
                           java.lang.String actorName,
                           int accessType,
                           boolean accessFlag)
Set the Link access for an actor user

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name
accessType - the access type
accessFlag - true to enable / false to disable the access
Since:
4.0

setAllActorAccess

public void setAllActorAccess(java.lang.String actorType,
                              java.lang.String actorName)
Give the full Link access to a specific actor

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name
Since:
4.0

removeActorAccess

public void removeActorAccess(java.lang.String actorType,
                              java.lang.String actorName)
Revoke the Link access to a specific actor

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name
Since:
4.0

updateActorAccess

public void updateActorAccess(java.util.Vector<ActorAccess> accesses)
Update the execute access on the basis of a given list

Parameters:
accesses - list of ActorAccesses
Since:
4.0

getActorAccess

public boolean getActorAccess(java.lang.String actorType,
                              java.lang.String actorName,
                              int accessType)
Get actor access for a specific operation

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name
accessType - the access type
Since:
4.0

getActorAccess

public ActorAccess getActorAccess(java.lang.String actorType,
                                  java.lang.String actorName)
Get the Link accesses for a specific actor

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT
actorName - the actor name
Since:
4.0

getActors

public java.util.Vector<java.lang.String> getActors(java.lang.String actorType)
Get the list of actors for this LinkType

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT or empty
Returns:
a vector of couple actorType|actorName
Since:
4.0

getActors

public java.util.Vector<java.lang.String> getActors()
Get the list of all actors for this LinkType

Returns:
a vector of couple actorType|actorName
Since:
4.0

getActorAccesses

public java.util.Vector<ActorAccess> getActorAccesses()
Get the all actor accesses for this LinkType

Returns:
a vector of ActorAccesses
Since:
4.0

hasAccess

public boolean hasAccess(int accessType,
                         Link link,
                         Framework framework)
Check if the current framework User has access for a specific operation on a given Link

Parameters:
accessType - the access Type
link - the specific Link
framework - the current framework
Since:
4.0
See Also:
hasAccess(int, Link, String, Framework)

hasAccess

public boolean hasAccess(int accessType,
                         Link link,
                         java.lang.String userName,
                         Framework framework)
Check if a User has access for a specific operation on a given Link.
The general checks are:
- check if the user is a Super User (in this case return true)
- check the community access
- check if the User has direct access as actor access
- check if the User belong to a Team enabled to perform the operation
- check if the User has at least one Assignment enabled to perform the operation
The link specific checks are:
- check the holder access if the user is the Link's holder / alt-holder

Parameters:
accessType - the access Type
link - the specific Link
userName - the name of User to check
framework - the current framework
Since:
4.0

hasAccess

public boolean hasAccess(int accessType,
                         Framework framework)
Check if the current framework User has access for a specific operation (ignore holder access)

Parameters:
accessType - the access Type
framework - the current framework
Since:
4.0
See Also:
hasAccess(int, String, Framework)

hasAccess

public boolean hasAccess(int accessType,
                         java.lang.String userName,
                         Framework framework)
Check if a User has access for a specific operation (ignore holder access).
The check steps are:
- check if the User is a Super User (in this case return true)
- check the community access
- check if the User has direct access as actor access
- check if the User belong to a Team enabled to perform the operation
- check if the User has at least one Assignment enabled to perform the operation

Parameters:
accessType - the access Type
userName - the User name
framework - the current framework
Since:
4.0

setTriggers

public void setTriggers(java.util.Vector<Trigger> triggers)
Set Triggers for this LinkType

Parameters:
triggers - a vector of Triggers
See Also:
Trigger

addTrigger

public void addTrigger(Trigger trigger)
                throws OberonException
Add a Trigger to this LinkType

Parameters:
trigger - the Trigger to add
Throws:
OberonException

removeTrigger

public void removeTrigger(Trigger trigger)
Remove a Trigger from this LinkType

Parameters:
trigger - the Trigger to remove

updateTriggers

public void updateTriggers(java.util.Vector<Trigger> triggers)
                    throws OberonException
Update the triggers on the basis of a given list

Parameters:
triggers - list of Triggers
Throws:
OberonException
Since:
4.0

getTriggers

public java.util.Vector<Trigger> getTriggers()
Return the list of Triggers defined for this LinkType

Returns:
Vector of Triggers

getTriggersAsString

public java.lang.String getTriggersAsString(java.lang.String delim)
Return the list of Program-Triggers, as a String

Parameters:
delim - the separator item
Returns:
list of Triggers separated by the delim characters
See Also:
Trigger.asString()

getWorkflowAsString

public java.lang.String getWorkflowAsString(java.lang.String delim)
Return the list of Workflow-Triggers, as a String

Parameters:
delim - the separator item
Returns:
list of Triggers separated by the delim characters
Since:
2.1
See Also:
Trigger.asString()

getTriggerByEvent

public Trigger getTriggerByEvent(java.lang.String event)
Get the Program-Trigger for a specific event

Parameters:
event - the event name as defined by the OOQL syntax ( example: edit.check )
Returns:
the event Trigger or null if the event is not associated to a Trigger

getWorkflowByEvent

public Trigger getWorkflowByEvent(java.lang.String event)
Get the Workflow-Trigger for a specific event

Parameters:
event - the event name as defined by the OOQL syntax ( example: edit )
Returns:
the event Trigger or null if the event is not associated to a Trigger
Since:
2.1

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 LinkType object by its OOQL identifier

Specified by:
getProperty in class OBBase
Parameters:
propertyName - OOQL property identifier/name (example: duplicate , from.cardinality ...)
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 administrative object names extracted by using an OOQL selector

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

toString

public java.lang.String toString()
Return the LinkType object basic properties as a single String

Overrides:
toString in class AdminBase

toString

public java.lang.String toString(Framework framework)
Return the LinkType object extended properties as a single String

Overrides:
toString in class AdminBase
Parameters:
framework - the current framework

getXMLHolder

public org.jdom.Element getXMLHolder()
Return the LinkType holder accesses as XML element tree

Since:
4.0

getXMLCommunity

public org.jdom.Element getXMLCommunity()
Return the LinkType community accesses as XML element tree

Since:
4.0

getXMLUserList

public org.jdom.Element getXMLUserList(java.lang.String userName)
Return the LinkType User actor accesses as XML element tree

Parameters:
userName - the User name (empty for all Users)
Since:
4.0

getXMLTeamList

public org.jdom.Element getXMLTeamList(java.lang.String teamName)
Return the LinkType Team actor accesses as XML element tree

Parameters:
teamName - the Team name (empty for all Teams)
Since:
4.0

getXMLAssignmentList

public org.jdom.Element getXMLAssignmentList(java.lang.String assignName)
Return the LinkType Assignment actor accesses as XML element tree

Parameters:
assignName - the Assignment name (empty for all Assignments)
Since:
4.0

getXMLHistoryFlags

public org.jdom.Element getXMLHistoryFlags()
Return the history flags as XML element tree

Since:
4.0

toXML

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

Specified by:
toXML in class AdminBase
Parameters:
framework - the current framework

toXML

public org.jdom.Element toXML(boolean getImage,
                              boolean fullDump,
                              Framework framework)
Return the LinkType object properties as XML element tree

Specified by:
toXML in class AdminBase
Parameters:
getImage - true to include "imagedata" element with the base64 encoded image data
fullDump - true to include detailed information
framework - the current framework

fromXML

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

Overrides:
fromXML in class AdminBase

getCreateCommand

public java.lang.String getCreateCommand(boolean force)
Return the OOQL command to create this LinkType object with the settled properties

Specified by:
getCreateCommand in class AdminBase
Parameters:
force - if true append the "force" options at the end

getSaveCommand

public java.lang.String getSaveCommand(boolean force)
Return the OOQL command to update this LinkType object with the modified properties.
If the object is new, it returns the create command.

Specified by:
getSaveCommand in class AdminBase
Parameters:
force - if true append the "force" options at the end

compareUpdate

public java.lang.String compareUpdate(LinkType refLinkType,
                                      boolean checkImage,
                                      boolean overwrite,
                                      boolean force,
                                      Framework framework)
                               throws OberonException
Return/apply the OOQL command to update this LinkType object and let it become equals to another reference object.
This method is useful to import objects from an XML file.

Parameters:
refLinkType - the reference LinkType object
checkImage - if true compare also the image icon
overwrite - if true update the database object instance
force - if true ignores optional properties
framework - the current framework
Throws:
OberonException
See Also:
fromXML(Element)

OBEROn SDK

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