OBEROn SDK

com.oberon.ooql.sdk
Class Column

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

public class Column
extends AdminComponent
implements java.io.Serializable

View - Column: represents a user View column.

Version:
5.0
See Also:
Serialized Form

Field Summary
static int COLUMNACCESS_Length
           
static int COLUMNACCESS_MODIFIABLE
          Modifiable access condition
static int COLUMNACCESS_SEEABLE
          Seeable access condition
static int EDITABLE_OPTION
          The Editable flag index inside the Option Set
static int HIDDEN_OPTION
          The Hidden flag index inside the Option Set
 
Fields inherited from class com.oberon.ooql.sdk.AdminComponent
bsOptions
 
Constructor Summary
Column()
           
Column(java.lang.String name)
           
 
Method Summary
static java.lang.String accessToString(java.util.BitSet accessFlags, java.lang.String delim)
          Convert the access flags to the OOQL format
 void addAccessProgram(Trigger program)
          Add a trigger to compute the Column access
 void compareUpdate(Column refColumn, boolean checkImage, Framework framework)
          Return/apply the OOQL command to update this Column object and let it become equals to another reference object.
 boolean equals(Column column)
          Compare two Columns
 void fromXML(org.jdom.Element rootElement)
          Load the Column properties from XML element tree
static java.lang.String getAccessAsString(int accessType)
          Convert the access type to the OOQL format
static java.lang.String getAccessEvent(int accessType)
          Convert the access type to the OOQL access trigger format (seeable / modifiable ...)
static int getAccessId(java.lang.String access)
          Convert the access type from the OOQL format to the internal id
 Trigger getAccessProgramByEvent(java.lang.String event)
          Get trigger to compute a specific access for this Column
 java.util.Vector<Trigger> getAccessPrograms()
          Get triggers to compute the Column access
 java.lang.String getAccessProgramsAsString(java.lang.String delim)
          Get triggers to compute the Column access as String
 ActorAccess getActorAccess(java.lang.String actorType, java.lang.String actorName)
          Get the Column accesses for the given actor
 boolean getActorAccess(java.lang.String actorType, java.lang.String actorName, int accessType)
          Get the actor access to this Column for a specific operation
 java.util.Vector<ActorAccess> getActorAccesses()
          Get the all actor accesses for this Column
 java.util.Vector<java.lang.String> getActors()
          Get all actors enabled for this Column
 java.util.Vector<java.lang.String> getActors(java.lang.String actorType)
          Get all actors enabled for this Column filtered by type
 java.lang.String getApplication()
          Get the application Menu name.
 java.lang.String getChangeCommand()
          Return the OOQL command to update this Column with the modified properties.
 java.util.BitSet getCommunityAccess()
          Get the Column accesses for the community
 boolean getCommunityAccess(int accessType)
          Get the community access to this Column for a specific operation
 java.lang.String getCreateCommand(boolean force)
          [Inherited but not used]
 java.lang.String getCreateCommand(java.lang.String operator, java.lang.String columnName)
          Return the OOQL command to add this Column with the settled properties to a View
 java.lang.String getFormat()
          Get the Output/Input format
 java.lang.String getGetLink()
          Get the OOQL Link selector for the Column content.
 java.lang.String getGetObject()
          Get the OOQL ObjectObj selector for the Column content.
 java.lang.String getLabel()
          Get the Column label
 Selector getLinkSelector()
          Get the Link Selector for the Column content.
 Selector getObjectSelector()
          Get the ObjectObj Selector for the Column content.
 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 Column item by its OOQL identifier
 java.lang.String getSaveCommand(boolean force)
          [Inherited but not used]
 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
 View getView()
          Get the related View
 double getWidth()
          Get the Column width
 org.jdom.Element getXMLAssignmentList(java.lang.String actor)
          Return the Column Assignment access as XML element tree
 org.jdom.Element getXMLCommunity()
          Return the Column community access as XML element tree
 org.jdom.Element getXMLTeamList(java.lang.String actor)
          Return the Column Team access as XML element tree
 org.jdom.Element getXMLUserList(java.lang.String actor)
          Return the Column User access as XML element tree
 boolean hasAccess(int accessType, java.util.Vector<java.lang.Object> filterArgs, Framework framework)
          Check if the framework user has access to this Column
 boolean hasAccess(int accessType, java.util.Vector<java.lang.Object> filterArgs, Framework framework, java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
          Check if the framework user has access to this Column
 boolean isEditable()
          Deprecated. 
 boolean isHidden()
          Return if the Column is or not hidden
 boolean isImageChanged()
          Check if the column image is changed
 void removeAccessProgram(Trigger program)
          Remove a Column access trigger
 void removeActorAccess(java.lang.String actorType, java.lang.String actorName)
          Revoke the Column access to a specific actor
 void setAccessPrograms(java.util.Vector<Trigger> programs)
          Set triggers to compute the Column access
 void setActorAccess(java.lang.String actorType, java.lang.String actorName, java.util.BitSet accessFlags)
          Set the Column accesses for a specific actor
 void setActorAccess(java.lang.String actorType, java.lang.String actorName, int accessType, boolean accessFlag)
          Set the Column access for a specific actor
 void setAllActorAccess(java.lang.String actorType, java.lang.String actorName)
          Give the full Column access to a specific actor
 void setAllCommunityAccess()
          Give the full Column access to the community
 void setCommunityAccess(java.util.BitSet accessFlags)
          Set the Column accesses for the community
 void setCommunityAccess(int accessType, boolean accessFlag)
          Set the Column access for the community
 void setFormat(java.lang.String format)
          Set the Output/Input format.
 void setGetLink(java.lang.String ooqlSelector)
          Set an OOQL Link selector for the Column content.
 void setGetObject(java.lang.String ooqlSelector)
          Set an OOQL ObjectObj Selector for the Column content.
 void setHidden(boolean hidden)
          Set the Hidden flag
 void setLabel(java.lang.String label)
          Set the Column label.
 void setLinkSelector(Selector selector)
          Set a Link Selector for the Column content.
 void setNoCommunityAccess()
          Revoke the Column access to the community
 void setObjectSelector(Selector selector)
          Set an ObjectObj Selector for the Column content.
 void setView(View view)
          Link the Column with the related View
 void setWidth(double width)
          Set the Column width.
 java.lang.String toString()
          Return the Column properties as a single String
 org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
          Return the Column properties as XML element tree
 org.jdom.Element toXML(Framework framework)
          Return the Column properties as XML element tree
 void updateAccessPrograms(java.util.Vector<Trigger> programs)
          Update the access programs on the basis of a given list
 void updateActorAccess(java.util.Vector<ActorAccess> accesses)
          Update the execute access on the basis of a given list
 
Methods inherited from class com.oberon.ooql.sdk.AdminComponent
checkChangeName, getAdminType, getCommonProperty, getCommonTargetNames, getCrtDate, getDescription, getEditBasicCommand, getImage, getImageData, getImageFile, getModDate, getModUser, getName, getOldName, hasImage, setCrtDate, setDescription, setImage, setImageData, setImageFile, setModDate, setModUser, setName, 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

HIDDEN_OPTION

public static final int HIDDEN_OPTION
The Hidden flag index inside the Option Set

See Also:
Constant Field Values

EDITABLE_OPTION

public static final int EDITABLE_OPTION
The Editable flag index inside the Option Set

See Also:
Constant Field Values

COLUMNACCESS_SEEABLE

public static final int COLUMNACCESS_SEEABLE
Seeable access condition

See Also:
Constant Field Values

COLUMNACCESS_MODIFIABLE

public static final int COLUMNACCESS_MODIFIABLE
Modifiable access condition

See Also:
Constant Field Values

COLUMNACCESS_Length

public static final int COLUMNACCESS_Length
See Also:
Constant Field Values
Constructor Detail

Column

public Column()

Column

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

isImageChanged

public boolean isImageChanged()
Check if the column image is changed


setView

public void setView(View view)
Link the Column with the related View


getView

public View getView()
Get the related View


getApplication

public java.lang.String getApplication()
Get the application Menu name.

Since:
2.2_01

setLabel

public void setLabel(java.lang.String label)
Set the Column label.

Parameters:
label - the label value

getLabel

public java.lang.String getLabel()
Get the Column label

Returns:
the label value

isEditable

@Deprecated
public boolean isEditable()
Deprecated. 

Check if the Column is editable.

Returns:
the editable flag

setHidden

public void setHidden(boolean hidden)
Set the Hidden flag

Parameters:
hidden - the hidden flag
See Also:
Framework.setFilterHidden(boolean)

isHidden

public boolean isHidden()
Return if the Column is or not hidden


setWidth

public void setWidth(double width)
Set the Column width.

Parameters:
width - the Column width

getWidth

public double getWidth()
Get the Column width

Returns:
the Column width value

setFormat

public void setFormat(java.lang.String format)
               throws OberonException
Set the Output/Input format. Available tags:
<t[key]> : set the translation key for values
<t[section,key]> : set the translation section and key for values

<i[n]> : integer with maximum n digits
<f[n.d]> : float with n integer digits and m decimals
<s[min,max]> : string with length included between min and max
<d[format]> : date with a given format (ex: yyyy/MMM/dd , dd-MM-yy ...)

Throws:
OberonException

getFormat

public java.lang.String getFormat()
Get the Output/Input format


setObjectSelector

public void setObjectSelector(Selector selector)
Set an ObjectObj Selector for the Column content. This selector can be applied both on ObjectObj queries and navigations Reset the Link selector.

Parameters:
selector - Link selection parameters

setGetObject

public void setGetObject(java.lang.String ooqlSelector)
Set an OOQL ObjectObj Selector for the Column content. This selector can be applied both on ObjectObj queries and navigations Reset the Link selector.

Parameters:
ooqlSelector - ObjectObj selector in OOQL format (example: description , field['FieldName'],... )

getObjectSelector

public Selector getObjectSelector()
Get the ObjectObj Selector for the Column content.

Returns:
the ObjectObj Selector

getGetObject

public java.lang.String getGetObject()
Get the OOQL ObjectObj selector for the Column content.

Returns:
the ObjectObj selector in OOQL format

setLinkSelector

public void setLinkSelector(Selector selector)
Set a Link Selector for the Column content. This selector can be applied only for ObjectObj navigations Reset the ObjectObj selector.

Parameters:
selector - Link selection parameters

setGetLink

public void setGetLink(java.lang.String ooqlSelector)
Set an OOQL Link selector for the Column content. This selector can be applied only for ObjectObj navigations Reset the ObjectObj selector.

Parameters:
ooqlSelector - Link selector in OOQL format (example: to.name , field['FieldName'],... )

getLinkSelector

public Selector getLinkSelector()
Get the Link Selector for the Column content.

Returns:
the Link Selector

getGetLink

public java.lang.String getGetLink()
Get the OOQL Link selector for the Column content.

Returns:
the Link selector in OOQL format

setCommunityAccess

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

Parameters:
accessType - the access type ( COLUMNACCESS_SEEABLE / COLUMNACCESS_MODIFIABLE )
accessFlag - true to enable / false to disable the access

setAllCommunityAccess

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


setNoCommunityAccess

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


setCommunityAccess

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


getCommunityAccess

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

Parameters:
accessType - the access type ( COLUMNACCESS_SEEABLE / COLUMNACCESS_MODIFIABLE )

getCommunityAccess

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


getAccessId

public static int getAccessId(java.lang.String access)
Convert the access type from the OOQL format to the internal id


getAccessAsString

public static java.lang.String getAccessAsString(int accessType)
Convert the access type to the OOQL format


getAccessEvent

public static java.lang.String getAccessEvent(int accessType)
Convert the access type to the OOQL access trigger format (seeable / modifiable ...)


accessToString

public static 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

setActorAccess

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

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

setActorAccess

public void setActorAccess(java.lang.String actorType,
                           java.lang.String actorName,
                           int accessType,
                           boolean accessFlag)
Set the Column access for a specific actor

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

setAllActorAccess

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

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

removeActorAccess

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

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

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 the actor access to this Column 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 ( COLUMNACCESS_SEEABLE / COLUMNACCESS_MODIFIABLE )

getActorAccess

public ActorAccess getActorAccess(java.lang.String actorType,
                                  java.lang.String actorName)
Get the Column accesses for the given actor

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

getActors

public java.util.Vector<java.lang.String> getActors(java.lang.String actorType)
Get all actors enabled for this Column filtered by type

Parameters:
actorType - the actor type: can be ActorAccess.USER , ActorAccess.TEAM , ActorAccess.ASSIGNMENT or empty

getActors

public java.util.Vector<java.lang.String> getActors()
Get all actors enabled for this Column


getActorAccesses

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

Returns:
a vector of ActorAccesses
Since:
4.0

setAccessPrograms

public void setAccessPrograms(java.util.Vector<Trigger> programs)
Set triggers to compute the Column access

Parameters:
programs - Vector of Programs ( or access Triggers )

addAccessProgram

public void addAccessProgram(Trigger program)
                      throws OberonException
Add a trigger to compute the Column access

Parameters:
program - the access Trigger
Throws:
OberonException

removeAccessProgram

public void removeAccessProgram(Trigger program)
Remove a Column access trigger

See Also:
addAccessProgram(Trigger)

updateAccessPrograms

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

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

getAccessPrograms

public java.util.Vector<Trigger> getAccessPrograms()
Get triggers to compute the Column access

Returns:
Vector of Triggers

getAccessProgramsAsString

public java.lang.String getAccessProgramsAsString(java.lang.String delim)
Get triggers to compute the Column access as String

Parameters:
delim - the trigger data separator

getAccessProgramByEvent

public Trigger getAccessProgramByEvent(java.lang.String event)
Get trigger to compute a specific access for this Column

Parameters:
event - is the OOQL event type ( seeable / modifiable )

hasAccess

public boolean hasAccess(int accessType,
                         java.util.Vector<java.lang.Object> filterArgs,
                         Framework framework)
Check if the framework user has access to this Column

Parameters:
accessType - the access type ( COLUMNACCESS_SEEABLE / COLUMNACCESS_MODIFIABLE )
filterArgs - extra arguments used to compute the Column access

hasAccess

public boolean hasAccess(int accessType,
                         java.util.Vector<java.lang.Object> filterArgs,
                         Framework framework,
                         java.util.Hashtable<java.lang.String,java.lang.Integer> counters)
Check if the framework user has access to this Column

Parameters:
accessType - the access type ( COLUMNACCESS_SEEABLE / COLUMNACCESS_MODIFIABLE )
filterArgs - extra arguments used to compute the Column access
counters - administrative object synch counters (if null read them from database)

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 Column item by its OOQL identifier

Specified by:
getProperty in class OBBase
Parameters:
propertyName - OOQL property identifier/name (example: editable , label ...)
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
filterArgs - extra arguments used to compute properties
framework - the current framework
Returns:
a Vector of target names, used to extract their (sub)properties values

equals

public boolean equals(Column column)
Compare two Columns

Returns:
true if they have the same name

toString

public java.lang.String toString()
Return the Column properties as a single String

Overrides:
toString in class java.lang.Object

getXMLCommunity

public org.jdom.Element getXMLCommunity()
Return the Column community access as XML element tree


getXMLUserList

public org.jdom.Element getXMLUserList(java.lang.String actor)
Return the Column User access as XML element tree


getXMLTeamList

public org.jdom.Element getXMLTeamList(java.lang.String actor)
Return the Column Team access as XML element tree


getXMLAssignmentList

public org.jdom.Element getXMLAssignmentList(java.lang.String actor)
Return the Column Assignment access as XML element tree


toXML

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

Parameters:
framework - the current framework

toXML

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

Parameters:
fullDump - true to include detailed information
framework - the current framework

fromXML

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

Overrides:
fromXML in class AdminComponent

getCreateCommand

public java.lang.String getCreateCommand(boolean force)
[Inherited but not used]


getSaveCommand

public java.lang.String getSaveCommand(boolean force)
[Inherited but not used]


getCreateCommand

public java.lang.String getCreateCommand(java.lang.String operator,
                                         java.lang.String columnName)
Return the OOQL command to add this Column with the settled properties to a View

Parameters:
operator - OOQL syntax position (example: "append" , "addbefore" ....)
columnName - the name of the reference Column

getChangeCommand

public java.lang.String getChangeCommand()
Return the OOQL command to update this Column with the modified properties.


compareUpdate

public void compareUpdate(Column refColumn,
                          boolean checkImage,
                          Framework framework)
                   throws OberonException
Return/apply the OOQL command to update this Column object and let it become equals to another reference object.

Parameters:
refColumn - the reference Column object
framework - the current framework
Throws:
OberonException
See Also:
fromXML(Element)

OBEROn SDK

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