OBEROn SDK

com.oberon.ooql.sdk
Class Item

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

public class Item
extends AdminComponent
implements java.io.Serializable

Form - Item: represents a user Form element.

Version:
5.0
See Also:
Serialized Form

Field Summary
static int DISABLED_OPTION
          The Field disabled flag index inside the Option Set
static int FIELDTYPE_CHECKBOX
          HTML Check Box
static int FIELDTYPE_DATE
          HTML Date Picker
static int FIELDTYPE_HIDDEN
          HTML Hidden Input
static int FIELDTYPE_length
           
static int FIELDTYPE_LISTBOX
          HTML Double List Box
static int FIELDTYPE_POPUP
          PopUp selector
static int FIELDTYPE_RADIO
          HTML Radio Button
static int FIELDTYPE_SELECT
          HTML Combo Box
static int FIELDTYPE_TEXT
          HTML Text Input
static int FIELDTYPE_TEXTAREA
          HTML Textarea
static int FORMTYPE_CLASS
          Form Type - Object class default form
static int FORMTYPE_DEFAULT
          Form Type - Administrative element
static int FORMTYPE_DYNAMIC
          Form Type - Dynamically created by program
static int FORMTYPE_length
           
static int ITEMACCESS_DISABLED
          Disabled access condition
static int ITEMACCESS_EDITABLE
          Editable access condition
static int ITEMACCESS_Length
           
static int ITEMACCESS_REQUIRED
          Required access condition
static int ITEMACCESS_VISIBLE
          Visible access condition
static int ITEMTYPE_ACTION
          HTML Action Input (Parameter used by the Form action program)
static int ITEMTYPE_BASIC
          Object Basic Field
static int ITEMTYPE_BUTTON
          HTML Button
static int ITEMTYPE_EMBED
          Embedded object
static int ITEMTYPE_FIELD
          Input field related to main class
static int ITEMTYPE_FORM
          Include another form
static int ITEMTYPE_GETLINK
          Static text - extract data from links
static int ITEMTYPE_GETOBJ
          Static text - extract data from object
static int ITEMTYPE_HIDDEN
          Hidden value
static int ITEMTYPE_HREF
          HTML Link
static int ITEMTYPE_IMAGE
          Image
static int ITEMTYPE_LABEL
          Static label
static int ITEMTYPE_length
           
static int ITEMTYPE_NAVIGATE
          Navigate table
static int ITEMTYPE_SECTION
          Section separator
static int ITEMTYPE_SPACER
          Line Break
static int ITEMTYPE_XFIELD
          Input field related to secondary classes
static int MULTIPLE_OPTION
          The Multiple selection flag index inside the Option Set
static int REQUIRED_OPTION
          The Field required flag index inside the Option Set
 
Fields inherited from class com.oberon.ooql.sdk.AdminComponent
bsOptions
 
Constructor Summary
Item()
           
Item(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 Item access
 void compareUpdate(Item refItem, boolean checkImage, Framework framework)
          Return/apply the OOQL command to update this Item object and let it become equals to another reference object.
 boolean equals(Item item)
          Compare two Items
 void fromXML(org.jdom.Element rootElement)
          Load the Item 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 (visible / editable ...)
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 Item
 java.util.Vector<Trigger> getAccessPrograms()
          Get triggers to compute the Item access
 java.lang.String getAccessProgramsAsString(java.lang.String delim)
          Get triggers to compute the Item access as String
 ActorAccess getActorAccess(java.lang.String actorType, java.lang.String actorName)
          Get the Item accesses for the given actor
 boolean getActorAccess(java.lang.String actorType, java.lang.String actorName, int accessType)
          Get the actor access to this Item for a specific operation
 java.util.Vector<ActorAccess> getActorAccesses()
          Get the all actor accesses for this Item
 java.util.Vector<java.lang.String> getActors()
          Get all actors enabled for this Item
 java.util.Vector<java.lang.String> getActors(java.lang.String actorType)
          Get all actors enabled for this Item filtered by type
 java.lang.String getApplication()
          Get the application Menu name.
 java.lang.String getChangeCommand()
          Return the OOQL command to update this Item with the modified properties.
 java.util.BitSet getCommunityAccess()
          Get the Item accesses for the community
 boolean getCommunityAccess(int accessType)
          Get the community access to this Item 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 refItem)
          Return the OOQL command to add this Item with the settled properties to a Form
 int getFieldType()
          Get the Item - field type
 java.lang.String getFieldTypeAsString()
          Get the Item - field type in OOQL format
static java.lang.String getFieldTypeAsString(int type)
          Convert the Item - field type to OOQL format
static int getFieldTypeFromString(java.lang.String htmlType)
          Convert Item - field type from OOQL (html) format
 Form getForm()
          Get the related Form
 java.lang.String getFormat()
          Get the Output/Input format
 int getFormType()
          Get the Item - form type
 java.lang.String getFormTypeAsString()
          Get the Item - form type in OOQL format
static java.lang.String getFormTypeAsString(int type)
          Convert the Item - form type to OOQL format
static int getFormTypeFromString(java.lang.String formType)
          Convert Item - form type from OOQL format
 double getHeight()
          Get the Item height
 java.lang.String getItemFormName()
          Get the name of Item in Form control
 java.lang.String getItemValue()
          Get the Item value or parameters
 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 Item 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
 int getType()
          Get the Item type
 java.lang.String getTypeAsString()
          Get the Item type in OOQL format
static java.lang.String getTypeAsString(int type)
          Convert the Item type in OOQL format
static int getTypeFromString(java.lang.String itemType)
          Convert Item type from OOQL format
 double getWidth()
          Get the Item width
 org.jdom.Element getXMLAssignmentList(java.lang.String actor)
          Return the Item Assignment access as XML element tree
 org.jdom.Element getXMLCommunity()
          Return the Item community access as XML element tree
 org.jdom.Element getXMLTeamList(java.lang.String actor)
          Return the Item Team access as XML element tree
 org.jdom.Element getXMLUserList(java.lang.String actor)
          Return the Item 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 Item
 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 Item
 boolean isFieldDisabled()
          Deprecated. 
 boolean isFieldMultipleSelection()
          Check if the Item - field is enabled to multiple selection.
 boolean isFieldRequired()
          Deprecated. 
 boolean isImageChanged()
          Check if the item image is changed
 void removeAccessProgram(Trigger program)
          Remove a Item access trigger
 void removeActorAccess(java.lang.String actorType, java.lang.String actorName)
          Revoke the Item access to a specific actor
 void setAccessPrograms(java.util.Vector<Trigger> programs)
          Set triggers to compute the Item access
 void setActorAccess(java.lang.String actorType, java.lang.String actorName, java.util.BitSet accessFlags)
          Set the Item accesses for a specific actor
 void setActorAccess(java.lang.String actorType, java.lang.String actorName, int accessType, boolean accessFlag)
          Set the Item access for a specific actor
 void setAllActorAccess(java.lang.String actorType, java.lang.String actorName)
          Give the full Item access to a specific actor
 void setAllCommunityAccess()
          Give the full Item access to the community
 void setCommunityAccess(java.util.BitSet accessFlags)
          Set the Item accesses for the community
 void setCommunityAccess(int accessType, boolean accessFlag)
          Set the Item access for the community
 void setFieldMultipleSelection(boolean multipleFlag)
          Set the multiple selection flag for this Item - field.
 void setFieldType(int type)
          Set the Item - field type.
 void setForm(Form form)
          Link the Item with the related Form
 void setFormat(java.lang.String format)
          Set the Output/Input format.
 void setFormType(int type)
          Set the Item - form type.
 void setHeight(double height)
          Set the Item height.
 void setItemAs(int type, java.lang.String parameters)
          Set the Item type and parameters.
 void setItemAsAction(java.lang.String parameters)
          Set the Item as a hidden value.
 void setItemAsBasic(java.lang.String parameters)
          Set the Item as a ObjectObj basic field.
 void setItemAsButton(java.lang.String parameters)
          Set the Item as html button.
 void setItemAsEmbed(java.lang.String parameters)
          Set the Item as a HTML embedded object.
 void setItemAsExtraField(java.lang.String fieldName)
          Set the Item as HTML input field related to an extra ObjectObj/Link Field
 void setItemAsField(java.lang.String fieldName)
          Set the Item as HTML input field directly related to an ObjectObj/Link Field
 void setItemAsFormInclude(java.lang.String parameters)
          Set the Item as a hidden value.
 void setItemAsGetLink(java.lang.String ooqlSelector)
          Set an OOQL Link selector for the Item content.
 void setItemAsGetObject(java.lang.String ooqlSelector)
          Set an OOQL ObjectObj selector for the Item content.
 void setItemAsHidden(java.lang.String parameters)
          Set the Item as a hidden value.
 void setItemAsHRef(java.lang.String url)
          Set the Item as a HTML anchor.
 void setItemAsImage(java.lang.String src)
          Set the Item as a HTML image.
 void setItemAsLabel(java.lang.String label)
          Set the Item as a label.
 void setItemAsNavigate(java.lang.String parameters)
          Set the Item as a navigator table.
 void setItemAsSectionHeader(java.lang.String sectionLabel)
          Set the Item as a section header.
 void setItemAsSpacer()
          Set the Item as a spacer.
 void setNoCommunityAccess()
          Revoke the Item access to the community
 void setWidth(double width)
          Set the Item width.
 java.lang.String toString()
          Return the Item properties as a single String
 org.jdom.Element toXML(boolean getImage, boolean fullDump, Framework framework)
          Return the Item properties as XML element tree
 org.jdom.Element toXML(Framework framework)
          Return the Item 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

MULTIPLE_OPTION

public static final int MULTIPLE_OPTION
The Multiple selection flag index inside the Option Set

See Also:
Constant Field Values

DISABLED_OPTION

public static final int DISABLED_OPTION
The Field disabled flag index inside the Option Set

See Also:
Constant Field Values

REQUIRED_OPTION

public static final int REQUIRED_OPTION
The Field required flag index inside the Option Set

See Also:
Constant Field Values

ITEMACCESS_VISIBLE

public static final int ITEMACCESS_VISIBLE
Visible access condition

See Also:
Constant Field Values

ITEMACCESS_EDITABLE

public static final int ITEMACCESS_EDITABLE
Editable access condition

See Also:
Constant Field Values

ITEMACCESS_REQUIRED

public static final int ITEMACCESS_REQUIRED
Required access condition

See Also:
Constant Field Values

ITEMACCESS_DISABLED

public static final int ITEMACCESS_DISABLED
Disabled access condition

See Also:
Constant Field Values

ITEMACCESS_Length

public static final int ITEMACCESS_Length
See Also:
Constant Field Values

ITEMTYPE_FIELD

public static final int ITEMTYPE_FIELD
Input field related to main class

See Also:
Constant Field Values

ITEMTYPE_GETOBJ

public static final int ITEMTYPE_GETOBJ
Static text - extract data from object

See Also:
Constant Field Values

ITEMTYPE_GETLINK

public static final int ITEMTYPE_GETLINK
Static text - extract data from links

See Also:
Constant Field Values

ITEMTYPE_SECTION

public static final int ITEMTYPE_SECTION
Section separator

See Also:
Constant Field Values

ITEMTYPE_SPACER

public static final int ITEMTYPE_SPACER
Line Break

See Also:
Constant Field Values

ITEMTYPE_HREF

public static final int ITEMTYPE_HREF
HTML Link

See Also:
Constant Field Values

ITEMTYPE_LABEL

public static final int ITEMTYPE_LABEL
Static label

See Also:
Constant Field Values

ITEMTYPE_IMAGE

public static final int ITEMTYPE_IMAGE
Image

See Also:
Constant Field Values

ITEMTYPE_EMBED

public static final int ITEMTYPE_EMBED
Embedded object

See Also:
Constant Field Values

ITEMTYPE_HIDDEN

public static final int ITEMTYPE_HIDDEN
Hidden value

See Also:
Constant Field Values

ITEMTYPE_NAVIGATE

public static final int ITEMTYPE_NAVIGATE
Navigate table

See Also:
Constant Field Values

ITEMTYPE_BASIC

public static final int ITEMTYPE_BASIC
Object Basic Field

See Also:
Constant Field Values

ITEMTYPE_BUTTON

public static final int ITEMTYPE_BUTTON
HTML Button

See Also:
Constant Field Values

ITEMTYPE_ACTION

public static final int ITEMTYPE_ACTION
HTML Action Input (Parameter used by the Form action program)

See Also:
Constant Field Values

ITEMTYPE_FORM

public static final int ITEMTYPE_FORM
Include another form

See Also:
Constant Field Values

ITEMTYPE_XFIELD

public static final int ITEMTYPE_XFIELD
Input field related to secondary classes

See Also:
Constant Field Values

ITEMTYPE_length

public static final int ITEMTYPE_length
See Also:
Constant Field Values

FIELDTYPE_TEXT

public static final int FIELDTYPE_TEXT
HTML Text Input

See Also:
Constant Field Values

FIELDTYPE_TEXTAREA

public static final int FIELDTYPE_TEXTAREA
HTML Textarea

See Also:
Constant Field Values

FIELDTYPE_SELECT

public static final int FIELDTYPE_SELECT
HTML Combo Box

See Also:
Constant Field Values

FIELDTYPE_CHECKBOX

public static final int FIELDTYPE_CHECKBOX
HTML Check Box

See Also:
Constant Field Values

FIELDTYPE_RADIO

public static final int FIELDTYPE_RADIO
HTML Radio Button

See Also:
Constant Field Values

FIELDTYPE_DATE

public static final int FIELDTYPE_DATE
HTML Date Picker

See Also:
Constant Field Values

FIELDTYPE_HIDDEN

public static final int FIELDTYPE_HIDDEN
HTML Hidden Input

See Also:
Constant Field Values

FIELDTYPE_POPUP

public static final int FIELDTYPE_POPUP
PopUp selector

See Also:
Constant Field Values

FIELDTYPE_LISTBOX

public static final int FIELDTYPE_LISTBOX
HTML Double List Box

See Also:
Constant Field Values

FIELDTYPE_length

public static final int FIELDTYPE_length
See Also:
Constant Field Values

FORMTYPE_DEFAULT

public static final int FORMTYPE_DEFAULT
Form Type - Administrative element

See Also:
Constant Field Values

FORMTYPE_CLASS

public static final int FORMTYPE_CLASS
Form Type - Object class default form

See Also:
Constant Field Values

FORMTYPE_DYNAMIC

public static final int FORMTYPE_DYNAMIC
Form Type - Dynamically created by program

See Also:
Constant Field Values

FORMTYPE_length

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

Item

public Item()

Item

public Item(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 item image is changed


setForm

public void setForm(Form form)
Link the Item with the related Form


getForm

public Form getForm()
Get the related Form


getApplication

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

Since:
2.2_01

setItemAsField

public void setItemAsField(java.lang.String fieldName)
Set the Item as HTML input field directly related to an ObjectObj/Link Field

Parameters:
fieldName - the ObjectObj/Link Field name

setItemAsExtraField

public void setItemAsExtraField(java.lang.String fieldName)
Set the Item as HTML input field related to an extra ObjectObj/Link Field

Parameters:
fieldName - the ObjectObj/Link Field name

setItemAsLabel

public void setItemAsLabel(java.lang.String label)
Set the Item as a label.

Parameters:
label - the label value

setItemAsSectionHeader

public void setItemAsSectionHeader(java.lang.String sectionLabel)
Set the Item as a section header.

Parameters:
sectionLabel - the section header label

setItemAsSpacer

public void setItemAsSpacer()
Set the Item as a spacer.


setItemAsHRef

public void setItemAsHRef(java.lang.String url)
Set the Item as a HTML anchor.

Parameters:
url - the link url (it can contains substitution macros)

setItemAsImage

public void setItemAsImage(java.lang.String src)
Set the Item as a HTML image.

Parameters:
src - the image source URL (it can contains substitution macros)

setItemAsEmbed

public void setItemAsEmbed(java.lang.String parameters)
Set the Item as a HTML embedded object.

Parameters:
parameters - the embed parameters

setItemAsHidden

public void setItemAsHidden(java.lang.String parameters)
Set the Item as a hidden value.


setItemAsNavigate

public void setItemAsNavigate(java.lang.String parameters)
Set the Item as a navigator table.


setItemAsBasic

public void setItemAsBasic(java.lang.String parameters)
Set the Item as a ObjectObj basic field.


setItemAsButton

public void setItemAsButton(java.lang.String parameters)
Set the Item as html button.


setItemAsAction

public void setItemAsAction(java.lang.String parameters)
Set the Item as a hidden value.


setItemAsFormInclude

public void setItemAsFormInclude(java.lang.String parameters)
Set the Item as a hidden value.


setItemAsGetObject

public void setItemAsGetObject(java.lang.String ooqlSelector)
Set an OOQL ObjectObj selector for the Item content.

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

setItemAsGetLink

public void setItemAsGetLink(java.lang.String ooqlSelector)
Set an OOQL Link selector for the Item content.

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

setItemAs

public void setItemAs(int type,
                      java.lang.String parameters)
Set the Item type and parameters.

Parameters:
type - the Item type
parameters - Item parameters

getType

public int getType()
Get the Item type


getTypeAsString

public static java.lang.String getTypeAsString(int type)
Convert the Item type in OOQL format


getTypeAsString

public java.lang.String getTypeAsString()
Get the Item type in OOQL format


getTypeFromString

public static int getTypeFromString(java.lang.String itemType)
Convert Item type from OOQL format

Returns:
the Item type

getItemValue

public java.lang.String getItemValue()
Get the Item value or parameters


getItemFormName

public java.lang.String getItemFormName()
Get the name of Item in Form control


setWidth

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

Parameters:
width - the Item width

getWidth

public double getWidth()
Get the Item width

Returns:
the Item width value

setHeight

public void setHeight(double height)
Set the Item height.

Parameters:
height - the item height. The meaning of this value depends on the HTML control type: for example for selection fields this represents the number of visible options.

getHeight

public double getHeight()
Get the Item height

Returns:
the Item height value

setFormat

public void setFormat(java.lang.String format)
               throws OberonException
Set the Output/Input format. Available tags:
<td> : start a new table cell
<td[colspan,rowspan,class]> : start a new table cell with specific spans
</td> : end a table cell
</tr> : end a table row
<F[format]> : html item format or navigate view

<@> : field that cause the form refresh
<$> : field to be refreshed

<L[label]> : add a (translated) label cell
<L[section,label]> : add a (section translated) label cell
<l[label]> : add a (translated) label inside a table cell
<l[section,label]> : add a (section translated) label inside a table cell

<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 ...)

<B[active buttons (, separated)]> : navigate buttons (A=add,R=remove,E=erase,N=new,O=open)

The format parameter can be used also to filter Items with visible/editable access Programs
Examples:
{StageName} : visible if the ObjectObj is in the StageName status
*{StageName} : visible and editable if the ObjectObj is in the StageName status

Throws:
OberonException

getFormat

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


setCommunityAccess

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

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

setAllCommunityAccess

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


setNoCommunityAccess

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


setCommunityAccess

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


getCommunityAccess

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

Parameters:
accessType - the access type ( ITEMACCESS_VISIBLE / ITEMACCESS_EDITABLE )

getCommunityAccess

public java.util.BitSet getCommunityAccess()
Get the Item 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 (visible / editable ...)


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 Item 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 Item 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 ( ITEMACCESS_VISIBLE / ITEMACCESS_EDITABLE )
accessFlag - true to enable / false to disable the access

setAllActorAccess

public void setAllActorAccess(java.lang.String actorType,
                              java.lang.String actorName)
Give the full Item 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 Item 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 Item 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 ( ITEMACCESS_VISIBLE / ITEMACCESS_EDITABLE )

getActorAccess

public ActorAccess getActorAccess(java.lang.String actorType,
                                  java.lang.String actorName)
Get the Item 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 Item filtered by type

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

getActors

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


getActorAccesses

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

Returns:
a vector of ActorAccesses
Since:
4.0

setAccessPrograms

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

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

addAccessProgram

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

Parameters:
program - the access Trigger
Throws:
OberonException

removeAccessProgram

public void removeAccessProgram(Trigger program)
Remove a Item 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 Item access

Returns:
Vector of Triggers

getAccessProgramsAsString

public java.lang.String getAccessProgramsAsString(java.lang.String delim)
Get triggers to compute the Item 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 Item

Parameters:
event - is the OOQL event type ( visible / editable )

hasAccess

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

Parameters:
accessType - the access type ( ITEMACCESS_VISIBLE / ITEMACCESS_EDITABLE )
filterArgs - extra arguments used to compute the Item 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 Item

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

setFieldType

public void setFieldType(int type)
Set the Item - field type.

Parameters:
type - the field type

getFieldType

public int getFieldType()
Get the Item - field type


getFieldTypeAsString

public static java.lang.String getFieldTypeAsString(int type)
Convert the Item - field type to OOQL format


getFieldTypeAsString

public java.lang.String getFieldTypeAsString()
Get the Item - field type in OOQL format


getFieldTypeFromString

public static int getFieldTypeFromString(java.lang.String htmlType)
Convert Item - field type from OOQL (html) format

Returns:
the field type

isFieldDisabled

@Deprecated
public boolean isFieldDisabled()
Deprecated. 

Check if the Item - field is disabled.

Returns:
the disabled flag

isFieldRequired

@Deprecated
public boolean isFieldRequired()
Deprecated. 

Check if the Item - field is required.

Returns:
the required flag

setFieldMultipleSelection

public void setFieldMultipleSelection(boolean multipleFlag)
Set the multiple selection flag for this Item - field.

Parameters:
multipleFlag - true to enable multiple selection for the field

isFieldMultipleSelection

public boolean isFieldMultipleSelection()
Check if the Item - field is enabled to multiple selection.

Returns:
the multiple selection flag

setFormType

public void setFormType(int type)
Set the Item - form type.

Parameters:
type - the form type
Since:
4.2

getFormType

public int getFormType()
Get the Item - form type

Since:
4.2

getFormTypeAsString

public static java.lang.String getFormTypeAsString(int type)
Convert the Item - form type to OOQL format

Since:
4.2

getFormTypeAsString

public java.lang.String getFormTypeAsString()
Get the Item - form type in OOQL format

Since:
4.2

getFormTypeFromString

public static int getFormTypeFromString(java.lang.String formType)
Convert Item - form type from OOQL format

Returns:
the form type
Since:
4.2

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

Specified by:
getProperty in class OBBase
Parameters:
propertyName - OOQL property identifier/name (example: format , 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 (example: user , team ... )
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(Item item)
Compare two Items

Returns:
true if they have the same name

toString

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

Overrides:
toString in class java.lang.Object

getXMLCommunity

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


getXMLUserList

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


getXMLTeamList

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


getXMLAssignmentList

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


toXML

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

Parameters:
framework - the current framework

toXML

public org.jdom.Element toXML(boolean getImage,
                              boolean fullDump,
                              Framework framework)
Return the Item 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 Item 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 refItem)
Return the OOQL command to add this Item with the settled properties to a Form

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

getChangeCommand

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


compareUpdate

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

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

OBEROn SDK

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