LEONARDI Application Composer - 8.9.0.40 by W4 S.A.

leon.info
Class LyAction

java.lang.Object
  extended by leon.info.LyTag
      extended by leon.info.LyInfo
          extended by leon.info.LyObjectInfo
              extended by leon.info.LyAction
All Implemented Interfaces:
java.lang.Cloneable, LyCommentInterface
Direct Known Subclasses:
LyCompoundAction, LyTabAction

public class LyAction
extends LyObjectInfo

This class implements the description of actions available for the objects of the application.
Default actions are defined in a resource file (leon.xml) Generic actions have an id that starts with underscore (_) Internal actions (not cloneable) have an id starting with 2 underscores (__)
Actions can have marks, these marks define properties for actions. Generic marks are defined as public static, their names start with MARK_.
Actions may require a minimum and a maximum number of objects. Additionally, a filter may be set on objects to impose a condition on the objects.
An action can have a shortcut that is used to quickly invoke the action when presented in a menubar.
An action may have parameters. A parameter is a pair (name, value) where name is a string and value an object of the following classes : LyInfo, LyBitSet, String. Parameters are used to parameter actions. Valid parameters for actions depend on each action.
An action controller class is associated to an action. A controller is in charge of controlling the view built when the action is executed.
An action behavior class may be associated to an action. This behavior allows to customize action processing.
An action builder class can be associated to an action. It is in charge to build the view corresponding to the action. The builder constructs an empty view (containing no data), this view is updated by the action controller.
An alternate way is to associate a specific view to the action. This view is a reference to an XML file describing the view according to views.dtd. In that case the builder won't be used.
An action can specify what are the other actions that can be accessed from the action view.
Finally, an action can have a default action which is the action invoked when the user double-clicks in the action view.
User defined actions may "clone" default actions. If an action clones a generic action, the generic implementation will be able to offer generic processing : checking validity, name, resource, execute...

See also tag of leon.dtd


Nested Class Summary
 
Nested classes/interfaces inherited from class leon.info.LyTag
LyTag.Model
 
Field Summary
static java.lang.String __version
           
static char ACTION_ID_SEP
          Action id separator used for composite action id.
static java.lang.String ID_ACTIVATE
          Id of generic action : ACTIVATE.
static java.lang.String ID_CANVAS
          Id of generic action : canvas.
static java.lang.String ID_CHART
          Id of generic action : chart.
static java.lang.String ID_CHART_FILE
          Id of generic action : chartFile.
static java.lang.String ID_CHOOSE
          Id of generic action : choose.
static java.lang.String ID_CLONE
          Id of generic clone action.
static java.lang.String ID_CONSULT
          Id of generic consult action.
static java.lang.String ID_CONSULT_RELATION_TABLE
          Id of generic action : consultRelationTable.
static java.lang.String ID_CONTEXT
          Id of internal action : Context.
static java.lang.String ID_COPY
          Id of generic action : COPY.
static java.lang.String ID_CREATE
          Id of generic create action.
static java.lang.String ID_CREATEWS
          Id of generic web service create action.
static java.lang.String ID_DASHBOARD
          Id of generic action : DASHBOARD.
static java.lang.String ID_DATE_TOOL
          Id of generic action : dateTool.
static java.lang.String ID_DELETE
          Id of generic action : DELETE.
static java.lang.String ID_DELETE_CHART
          Id of generic action : deleteChart.
static java.lang.String ID_DELETEWS
          Id of generic action : DELETEWS.
static java.lang.String ID_EXEC
          Id of generic action : EXECUTE.
static java.lang.String ID_EXIT
          Id of generic action : EXIT.
static java.lang.String ID_EXPORT
          Id of generic action : EXPORT.
static java.lang.String ID_EXPORT_PREVIEW
          Id of generic action : exportPreview.
static java.lang.String ID_FAST_FILTER
          Id of generic action : fastFilter.
static java.lang.String ID_GANTT
          Id of generic action : gantt.
static java.lang.String ID_HIDE
          Id of generic action : Hide.
static java.lang.String ID_IMPORT
          Id of generic action : IMPORT.
static java.lang.String ID_IMPORT_TABLE
          Id of generic action : importTable.
static java.lang.String ID_LOGIN
          Id of generic action : LOGIN.
static java.lang.String ID_MAIL
          Id of generic action : MAIL.
static java.lang.String ID_MAP
          Id of generic action : MAP.
static java.lang.String ID_MODIFY
          Id of internal action : MODIFY.
static java.lang.String ID_MOVE_DOWN_TOOL
          Id of generic action : moveDownTool.
static java.lang.String ID_MOVE_UP_TOOL
          Id of generic action : moveUpTool.
static java.lang.String ID_MULTI_PAGE_TABLE
          Id of generic action : multiPageTable.
static java.lang.String ID_NEW_FILTER
          Id of internal action : New filter.
static java.lang.String ID_NEXT_PAGE
          Id of internal action : Next page.
static java.lang.String ID_PASSWORD
          Id of generic action : (CHANGE) PASSWORD.
static java.lang.String ID_PASTE
          Id of generic action : Paste.
static java.lang.String ID_PREVIOUS_PAGE
          Id of internal action : Previous page.
static java.lang.String ID_PRINT
          Id of generic action : PRINT.
static java.lang.String ID_PRINT_TABLE
          Id of generic action : PRINT.
static java.lang.String ID_REDO
          Id of generic action : Redo.
static java.lang.String ID_REPORTING
          Id of internal action : REPORTING.
static java.lang.String ID_SAVE_AS
          Id of generic action : SAVE_AS.
static java.lang.String ID_SELECT
          Id of generic action : select.
static java.lang.String ID_SELECT_BY_NAME
          Id of generic action : selectByName.
static java.lang.String ID_SELECT_FILE
          Id of generic action : selectFile.
static java.lang.String ID_SET
          Id of generic action : SET.
static java.lang.String ID_SET_EMPTY
          Id of generic action : setEmpty.
static java.lang.String ID_SET_FILTER
          Id of internal action : Set filter.
static java.lang.String ID_SET_RELATION_TABLE
          Id of generic action : setRelationTable.
static java.lang.String ID_SETWS
          Id of generic action : SETWS.
static java.lang.String ID_SHOW
          Id of generic action : Show.
static java.lang.String ID_SORT_WIZARD
          Id of generic action : sortWizard.
static java.lang.String ID_START_MODULE
          Id of generic action : Start Module.
static java.lang.String ID_TABLE
          Id of generic action : TABLE.
static java.lang.String ID_TEXT
          Id of internal action : TEXT.
static java.lang.String ID_TREE
          Id of generic action : TREE.
static java.lang.String ID_UNDO
          Id of generic action : Undo.
static java.lang.String ID_UPDATE_ARRAY_VALUE
          Id of generic action : updateArrayValue.
static java.lang.String ID_USER_INPUT
          Id of generic action : userInput.
static java.lang.String ID_WAITING_VIEW
          Id of internal action : Waiting view.
static java.lang.String ID_XREF
          Id of generic action : XREF.
static int MARK_DEFAULT
          Mark DEFAULT : indicates that this action is a the default action (action invoked on double-click in some views).
static int MARK_DIALOG
          Mark DIALOG : Indicates whether this action opens a dialog view or not.
static int MARK_FORM
          Mark FORM : this action is enabled in forms toolbars.
static int MARK_FRAME_VIEW
          Mark FRAME_VIEW : Action shown in frame (or in dialog).
static int MARK_HIDDEN
          Mark HIDDEN : this action is hidden (not shown to user).
static int MARK_MOBILEONLY
          Mark MOBILEONLY : action available on mobile device only.
static int MARK_MOBILEWEBVIEW
          Mark MOBILEWEBVIEW : action displayed as a webview on mobile device.
static int MARK_MODAL
          Mark MODAL : Modal view (only used for dialogs).
static int MARK_NO_COMMANDS
          Mark NO_COMMANDS : Specifies that the view corresponding to this action should not contain a commands bar.
static int MARK_NO_CONTEXT
          Mark NO_CONTEXT : No context.
static int MARK_NO_DECORATION
          Mark NO_DECORATION : No decoration.
static int MARK_NO_MENU
          Mark NO_MENU : Disable contextual menus.
static int MARK_NO_MENUBAR
          Mark NO_MENUBAR : Disable menubar.
static int MARK_NO_MESSAGES
          Mark NO_MESSAGES : No message bar.
static int MARK_NO_TABS
          Mark NO_TABS : Ignores fieldInfos tabs when adding fields in forms.
static int MARK_NO_TITLEBAR
          Mark NO_TITLEBAR : Specifies that the view corresponding to this action should not contain a titlebar.
static int MARK_NO_TOOLBAR
          Mark NO_TOOLBAR : Specifies that the view corresponding to this action should not contain a toolbar.
static int MARK_NOTFORMOBILE
          Mark NOTFORMOBILE : action available only on non mobile device.
static int MARK_POPUP
          Mark POPUP : action displayed as popup.
static int MARK_PORTLET
          Mark PORTLET : action available as portlet.
static int MARK_STATUS
          Mark STATUS : Specifies that this action is invoked when selecting the status mark for an object in a table view.
static int MARK_TOOL
          Mark TOOL : this action is enabled as a tool in toolbars.
static int MARK_TRANSVERSE
          Mark TRANSVERSE : this action is enabled in relations toolbars in edition forms on relations that reference classInfos that contain this action.
static int MARK_WEBSERVICE
          Mark WEBSERVICE : action available as webservice.
static java.lang.String PARAM_CLASS
          Parameter name : classInfo Used for actions that have a classInfo as parameter.
static java.lang.String PARAM_FIELD
          Parameter name : fieldInfo Used for actions that have a fieldInfo as parameter.
static java.lang.String PARAM_FIELD_MARKS
          Parameter name : fieldInfo marks Used for actions that have a sort as parameter.
static java.lang.String PARAM_FILTER
          Parameter name : filter Used for actions that have a filter as parameter.
static java.lang.String PARAM_SORT
          Parameter name : sort Used for actions that have a sort as parameter.
 
Fields inherited from class leon.info.LyObjectInfo
__VERSION, NULL, PART_ALL, PART_BIND, PART_DATA, PART_GUI, PART_LABEL
 
Constructor Summary
LyAction(LyAction template, java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
          Constructs a new action.
LyAction(LyAction template, LyClassInfo classInfo, java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
          Constructs a new action for an action that applies on a classInfo.
LyAction(java.lang.String id, LyAction template, LyClassInfo classInfo, java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
          Constructs a new action for an action that applies on a classInfo.
 
Method Summary
 boolean canBeInvoked(boolean checkClassInfo)
          Method used to check if this action is invokable or not (i.e. all its required parameters have a value)
 void free()
          Method for freeing dynamic action.
 LyAction getAction(int index)
          Gets sub-action at the given index in sub-actions list.
 int getActionCount()
          Gets number of sub-actions.
 LyInfoList<LyAction> getActions()
          Gets sub-actions list : extra registered actions that can be invoked from action view.
 java.lang.Class<?> getBehaviorClass()
          Return behavior class.
 java.lang.String getBehaviorClassName()
          Gets behavior class name.
 java.lang.Class<?> getBuilderClass()
          Return builder class.
 java.lang.String getBuilderClassName()
          Gets builder class name.
 LyClassInfo getClassInfo()
          Returns class info on which the action is applied if specified.
 java.lang.Class<?> getControllerClass()
          Returns controller class.
 java.lang.String getControllerClassName()
          Gets controller class name.
 LyAction getDefaultAction()
          Gets the default action for this action.
 LyEnvironment getEnvironment(LyEnvironment parentEnvironment)
          Gets action environment containing specific action resources.
 LyInfoList<LyFieldInfo> getFieldInfos(LyClassInfo classInfo, boolean useFieldMarks)
          Gets list of fields concerned by the action if specified.
 LyFilter getFilter()
          Gets the filter associated with this action, and which may disable the action if selected objects don't match the filter.
 java.util.BitSet getGenericMarks()
          Accessor to the generic marks attached to this instance.
 LyGeometry getGeometry()
          Gets geometry information for action view (used with fat client only).
 LyParameter getLyParameter(java.lang.String name, boolean allowUnkownValue)
          Gets parameter corresponding to the given parameter name.
static int getMark(java.lang.String markName)
          Gets mark index corresponding to the given mark name.
static int getMark(java.lang.String markName, boolean add)
          Gets mark index corresponding to the given mark name.
static java.lang.String getMarkName(int markIndex)
          Get mark name for the given index of a mark.
 int getMax()
          Gets the maximum number of objects which can be selected to enable the action or -1 if no maximum is specified.
 java.lang.String getMenu()
          Accessor to the menu name.
 int getMin()
          Gets the minimum number of objects that must be selected to enable the action or 0 if no selection is accepted.
 java.lang.Object getParameter(java.lang.String name)
          Gets value corresponding to the given parameter name.
 java.lang.Object getParameter(java.lang.String name, boolean allowUnkownValue)
          Gets value corresponding to the given parameter.
 LyParameterDecl getParameterDecl(java.lang.String name)
          Gets a parameter declaration from a parameter name.
 java.util.BitSet getParameterMarks(java.lang.String name, LyBitSet.Type type)
          Gets value corresponding to the given parameter mark.
 java.util.Vector<LyParameter> getParameters()
          Gets all parameters defined for one action.
 java.util.Vector<LyParameterDecl> getParametersDecl()
          Gets all parameter declarations defined for one action.
 java.util.Vector<LyActionResource> getResources()
          Get All resources defined for this action.
 LyAction getRoot()
          Gets the 'root' template for this action.
 java.lang.String getShortcut()
          Gets the shortcut associated with this action, and which appear in the corresponding menu item.
 java.lang.String[] getSpecificMarks()
          Accessor to the marks attached to this instance (presented as an array of strings).
 java.lang.String getTarget()
          Returns the target zone id for this action.
 java.lang.String getView()
          Return XML view file.
 boolean hasMark(java.lang.String markName)
          Check if a specific mark is set on this action from its name.
 boolean isAbstract()
          Checks if this action is abstract or not.
 boolean isActionRef()
          Is the current action an action_ref.
 boolean isViewable()
          Method used to check if this action is viewable or not (i.e. the action is executed in a view).
 void setParentEnvironment(LyEnvironment parentEnvironment)
          Sets action parent environment (internal use).
 
Methods inherited from class leon.info.LyObjectInfo
clone, getAlias, getData, getDataList, getDatas, getFilePrefix, getGroup, getInternalAlias, getInternalFilePrefix, getInternalName, getMarks, getName, getTemplate, getTip, getUserData, hasMark, hasMarks, hasTemplate, isTemplate, putData, putData, removeData, toName
 
Methods inherited from class leon.info.LyInfo
getApplication, getFile, getId, getInclude, isIncluded, isInternal, isInternal, isLoaded, isLocked, load, setApplication, setFile, toString
 
Methods inherited from class leon.info.LyTag
getCommentsEnd, getCommentsStart, getEnvironment, getModelType, getParent, getRootProject, hasAncestor, isExtern, setCommentsEnd, setCommentsStart, wasCloned
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface leon.parser.LyCommentInterface
getCommentsEnd, getCommentsStart, setCommentsEnd, setCommentsStart
 

Field Detail

__version

public static final java.lang.String __version
See Also:
Constant Field Values

ID_CONSULT

public static final java.lang.String ID_CONSULT
Id of generic consult action.


ID_CREATE

public static final java.lang.String ID_CREATE
Id of generic create action.


ID_CREATEWS

public static final java.lang.String ID_CREATEWS
Id of generic web service create action.


ID_CLONE

public static final java.lang.String ID_CLONE
Id of generic clone action.


ID_COPY

public static final java.lang.String ID_COPY
Id of generic action : COPY.


ID_PASTE

public static final java.lang.String ID_PASTE
Id of generic action : Paste.


ID_SET

public static final java.lang.String ID_SET
Id of generic action : SET.


ID_SETWS

public static final java.lang.String ID_SETWS
Id of generic action : SETWS.


ID_DELETE

public static final java.lang.String ID_DELETE
Id of generic action : DELETE.


ID_DELETEWS

public static final java.lang.String ID_DELETEWS
Id of generic action : DELETEWS.


ID_PRINT

public static final java.lang.String ID_PRINT
Id of generic action : PRINT.


ID_PRINT_TABLE

public static final java.lang.String ID_PRINT_TABLE
Id of generic action : PRINT.


ID_PASSWORD

public static final java.lang.String ID_PASSWORD
Id of generic action : (CHANGE) PASSWORD.


ID_SAVE_AS

public static final java.lang.String ID_SAVE_AS
Id of generic action : SAVE_AS.


ID_ACTIVATE

public static final java.lang.String ID_ACTIVATE
Id of generic action : ACTIVATE.


ID_IMPORT

public static final java.lang.String ID_IMPORT
Id of generic action : IMPORT.


ID_EXPORT

public static final java.lang.String ID_EXPORT
Id of generic action : EXPORT.


ID_XREF

public static final java.lang.String ID_XREF
Id of generic action : XREF.


ID_MAP

public static final java.lang.String ID_MAP
Id of generic action : MAP.


ID_TABLE

public static final java.lang.String ID_TABLE
Id of generic action : TABLE.


ID_MULTI_PAGE_TABLE

public static final java.lang.String ID_MULTI_PAGE_TABLE
Id of generic action : multiPageTable.


ID_TREE

public static final java.lang.String ID_TREE
Id of generic action : TREE.


ID_LOGIN

public static final java.lang.String ID_LOGIN
Id of generic action : LOGIN.


ID_DASHBOARD

public static final java.lang.String ID_DASHBOARD
Id of generic action : DASHBOARD.


ID_EXIT

public static final java.lang.String ID_EXIT
Id of generic action : EXIT.


ID_EXEC

public static final java.lang.String ID_EXEC
Id of generic action : EXECUTE.


ID_MAIL

public static final java.lang.String ID_MAIL
Id of generic action : MAIL.


ID_WAITING_VIEW

public static final java.lang.String ID_WAITING_VIEW
Id of internal action : Waiting view.


ID_TEXT

public static final java.lang.String ID_TEXT
Id of internal action : TEXT.


ID_MODIFY

public static final java.lang.String ID_MODIFY
Id of internal action : MODIFY.


ID_REPORTING

public static final java.lang.String ID_REPORTING
Id of internal action : REPORTING.


ID_PREVIOUS_PAGE

public static final java.lang.String ID_PREVIOUS_PAGE
Id of internal action : Previous page.


ID_NEXT_PAGE

public static final java.lang.String ID_NEXT_PAGE
Id of internal action : Next page.


ID_CONTEXT

public static final java.lang.String ID_CONTEXT
Id of internal action : Context.


ID_NEW_FILTER

public static final java.lang.String ID_NEW_FILTER
Id of internal action : New filter.


ID_SET_FILTER

public static final java.lang.String ID_SET_FILTER
Id of internal action : Set filter.


ID_START_MODULE

public static final java.lang.String ID_START_MODULE
Id of generic action : Start Module.


ID_SHOW

public static final java.lang.String ID_SHOW
Id of generic action : Show.


ID_HIDE

public static final java.lang.String ID_HIDE
Id of generic action : Hide.


ID_UNDO

public static final java.lang.String ID_UNDO
Id of generic action : Undo.


ID_REDO

public static final java.lang.String ID_REDO
Id of generic action : Redo.


ID_SELECT

public static final java.lang.String ID_SELECT
Id of generic action : select.


ID_SELECT_BY_NAME

public static final java.lang.String ID_SELECT_BY_NAME
Id of generic action : selectByName.


ID_SELECT_FILE

public static final java.lang.String ID_SELECT_FILE
Id of generic action : selectFile.


ID_CONSULT_RELATION_TABLE

public static final java.lang.String ID_CONSULT_RELATION_TABLE
Id of generic action : consultRelationTable.


ID_SET_RELATION_TABLE

public static final java.lang.String ID_SET_RELATION_TABLE
Id of generic action : setRelationTable.


ID_FAST_FILTER

public static final java.lang.String ID_FAST_FILTER
Id of generic action : fastFilter.


ID_UPDATE_ARRAY_VALUE

public static final java.lang.String ID_UPDATE_ARRAY_VALUE
Id of generic action : updateArrayValue.


ID_MOVE_UP_TOOL

public static final java.lang.String ID_MOVE_UP_TOOL
Id of generic action : moveUpTool.


ID_MOVE_DOWN_TOOL

public static final java.lang.String ID_MOVE_DOWN_TOOL
Id of generic action : moveDownTool.


ID_CHOOSE

public static final java.lang.String ID_CHOOSE
Id of generic action : choose.


ID_SORT_WIZARD

public static final java.lang.String ID_SORT_WIZARD
Id of generic action : sortWizard.


ID_USER_INPUT

public static final java.lang.String ID_USER_INPUT
Id of generic action : userInput.


ID_IMPORT_TABLE

public static final java.lang.String ID_IMPORT_TABLE
Id of generic action : importTable.


ID_EXPORT_PREVIEW

public static final java.lang.String ID_EXPORT_PREVIEW
Id of generic action : exportPreview.


ID_DATE_TOOL

public static final java.lang.String ID_DATE_TOOL
Id of generic action : dateTool.


ID_CHART_FILE

public static final java.lang.String ID_CHART_FILE
Id of generic action : chartFile.


ID_DELETE_CHART

public static final java.lang.String ID_DELETE_CHART
Id of generic action : deleteChart.


ID_SET_EMPTY

public static final java.lang.String ID_SET_EMPTY
Id of generic action : setEmpty.


ID_GANTT

public static final java.lang.String ID_GANTT
Id of generic action : gantt.


ID_CHART

public static final java.lang.String ID_CHART
Id of generic action : chart.


ID_CANVAS

public static final java.lang.String ID_CANVAS
Id of generic action : canvas.


MARK_DEFAULT

public static final int MARK_DEFAULT
Mark DEFAULT : indicates that this action is a the default action (action invoked on double-click in some views).

See Also:
Constant Field Values

MARK_TOOL

public static final int MARK_TOOL
Mark TOOL : this action is enabled as a tool in toolbars.

See Also:
Constant Field Values

MARK_FORM

public static final int MARK_FORM
Mark FORM : this action is enabled in forms toolbars.

See Also:
Constant Field Values

MARK_TRANSVERSE

public static final int MARK_TRANSVERSE
Mark TRANSVERSE : this action is enabled in relations toolbars in edition forms on relations that reference classInfos that contain this action.

See Also:
Constant Field Values

MARK_HIDDEN

public static final int MARK_HIDDEN
Mark HIDDEN : this action is hidden (not shown to user).

See Also:
Constant Field Values

MARK_DIALOG

public static final int MARK_DIALOG
Mark DIALOG : Indicates whether this action opens a dialog view or not. The only effect is to concatenate "..." to action name.

See Also:
Constant Field Values

MARK_NO_TITLEBAR

public static final int MARK_NO_TITLEBAR
Mark NO_TITLEBAR : Specifies that the view corresponding to this action should not contain a titlebar.

See Also:
Constant Field Values

MARK_NO_TOOLBAR

public static final int MARK_NO_TOOLBAR
Mark NO_TOOLBAR : Specifies that the view corresponding to this action should not contain a toolbar.

See Also:
Constant Field Values

MARK_NO_COMMANDS

public static final int MARK_NO_COMMANDS
Mark NO_COMMANDS : Specifies that the view corresponding to this action should not contain a commands bar.

See Also:
Constant Field Values

MARK_NO_TABS

public static final int MARK_NO_TABS
Mark NO_TABS : Ignores fieldInfos tabs when adding fields in forms.

See Also:
Constant Field Values

MARK_NO_MENU

public static final int MARK_NO_MENU
Mark NO_MENU : Disable contextual menus.

See Also:
Constant Field Values

MARK_STATUS

public static final int MARK_STATUS
Mark STATUS : Specifies that this action is invoked when selecting the status mark for an object in a table view.

See Also:
Constant Field Values

MARK_NO_MENUBAR

public static final int MARK_NO_MENUBAR
Mark NO_MENUBAR : Disable menubar.

See Also:
Constant Field Values

MARK_FRAME_VIEW

public static final int MARK_FRAME_VIEW
Mark FRAME_VIEW : Action shown in frame (or in dialog).

See Also:
Constant Field Values

MARK_MODAL

public static final int MARK_MODAL
Mark MODAL : Modal view (only used for dialogs).

See Also:
Constant Field Values

MARK_NO_MESSAGES

public static final int MARK_NO_MESSAGES
Mark NO_MESSAGES : No message bar.

See Also:
Constant Field Values

MARK_NO_DECORATION

public static final int MARK_NO_DECORATION
Mark NO_DECORATION : No decoration.

See Also:
Constant Field Values

MARK_NO_CONTEXT

public static final int MARK_NO_CONTEXT
Mark NO_CONTEXT : No context.

See Also:
Constant Field Values

MARK_PORTLET

public static final int MARK_PORTLET
Mark PORTLET : action available as portlet.

See Also:
Constant Field Values

MARK_WEBSERVICE

public static final int MARK_WEBSERVICE
Mark WEBSERVICE : action available as webservice.

See Also:
Constant Field Values

MARK_MOBILEONLY

public static final int MARK_MOBILEONLY
Mark MOBILEONLY : action available on mobile device only.

See Also:
Constant Field Values

MARK_NOTFORMOBILE

public static final int MARK_NOTFORMOBILE
Mark NOTFORMOBILE : action available only on non mobile device.

See Also:
Constant Field Values

MARK_POPUP

public static final int MARK_POPUP
Mark POPUP : action displayed as popup.

See Also:
Constant Field Values

MARK_MOBILEWEBVIEW

public static final int MARK_MOBILEWEBVIEW
Mark MOBILEWEBVIEW : action displayed as a webview on mobile device.

See Also:
Constant Field Values

PARAM_CLASS

public static final java.lang.String PARAM_CLASS
Parameter name : classInfo Used for actions that have a classInfo as parameter.


PARAM_FIELD

public static final java.lang.String PARAM_FIELD
Parameter name : fieldInfo Used for actions that have a fieldInfo as parameter.


PARAM_FILTER

public static final java.lang.String PARAM_FILTER
Parameter name : filter Used for actions that have a filter as parameter.


PARAM_SORT

public static final java.lang.String PARAM_SORT
Parameter name : sort Used for actions that have a sort as parameter.


PARAM_FIELD_MARKS

public static final java.lang.String PARAM_FIELD_MARKS
Parameter name : fieldInfo marks Used for actions that have a sort as parameter.


ACTION_ID_SEP

public static final char ACTION_ID_SEP
Action id separator used for composite action id.

See Also:
Constant Field Values
Constructor Detail

LyAction

public LyAction(LyAction template,
                LyClassInfo classInfo,
                java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
Constructs a new action for an action that applies on a classInfo. This allows to instantiate an action for a given classInfo. The parameter named _classInfo with the given classInfo is added on this new action.

Parameters:
template - Action template.
classInfo - Class info on which the action is applied.
parameters - Action parameters.

LyAction

public LyAction(java.lang.String id,
                LyAction template,
                LyClassInfo classInfo,
                java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
Constructs a new action for an action that applies on a classInfo. This allows to instantiate an action for a given classInfo. The parameter named _classInfo with the given classInfo is added on this new action.

Parameters:
id - Id of the action.
template - Action template.
classInfo - Class info on which the action is applied.
parameters - Action parameters.

LyAction

public LyAction(LyAction template,
                java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
Constructs a new action.

Parameters:
id - Id of the action.
template - Action template.
parameters - Action parameters.
Method Detail

getMark

public static int getMark(java.lang.String markName,
                          boolean add)
Gets mark index corresponding to the given mark name.

Parameters:
markName - Mark name.
add - indicates if the.mark must be added if it doesn't exit
Returns:
Mark value.

getMark

public static int getMark(java.lang.String markName)
Gets mark index corresponding to the given mark name.

Parameters:
markName - Mark name.
Returns:
Mark value.

getMarkName

public static java.lang.String getMarkName(int markIndex)
Get mark name for the given index of a mark.

Parameters:
markIndex - Index of the mark.
Returns:
Mark name.

free

public void free()
Method for freeing dynamic action.


getControllerClassName

public java.lang.String getControllerClassName()
Gets controller class name.

Returns:
Java name of controller class (may be null).

getControllerClass

public final java.lang.Class<?> getControllerClass()
Returns controller class.

Returns:
Java class that implements the controller of this action.

getBehaviorClassName

public java.lang.String getBehaviorClassName()
Gets behavior class name.

Returns:
Java name of behavior class (may be null).

getBehaviorClass

public final java.lang.Class<?> getBehaviorClass()
Return behavior class.

Returns:
Java class that implements the behavior of this action, null if no specific behavior is associated to this action.

getBuilderClassName

public java.lang.String getBuilderClassName()
Gets builder class name.

Returns:
Java name of builder class (may be null).

getBuilderClass

public final java.lang.Class<?> getBuilderClass()
Return builder class.

Returns:
Java class that implements the builder of this action. null if no specific builder is defined.

getView

public final java.lang.String getView()
Return XML view file.

Returns:
Path to XML file that contains the desciption of the view that should be used for this action, null if no specific builder is defined.

getTarget

public final java.lang.String getTarget()
Returns the target zone id for this action.

Returns:
The target zone id.

getMenu

public final java.lang.String getMenu()
Accessor to the menu name.

Returns:
the menu or null if action is not present in a menu.

getMin

public final int getMin()
Gets the minimum number of objects that must be selected to enable the action or 0 if no selection is accepted.

Returns:
Minimum number of objects, 0 means no selection required, 1 means that selections have no effect for this action.

getMax

public final int getMax()
Gets the maximum number of objects which can be selected to enable the action or -1 if no maximum is specified.

Returns:
Maximum number of objects, -1 means no limit.

getFilter

public final LyFilter getFilter()
Gets the filter associated with this action, and which may disable the action if selected objects don't match the filter.

Returns:
Action filter, or null if no filter is specified.

getParameter

public final java.lang.Object getParameter(java.lang.String name)
Gets value corresponding to the given parameter name. Shortcut for the following method with allowUnknowValue set to false.

Parameters:
name - Parameter name.
Returns:
Value of the parameter if found.
See Also:
getParameter(java.lang.String)

getParameter

public final java.lang.Object getParameter(java.lang.String name,
                                           boolean allowUnkownValue)
Gets value corresponding to the given parameter.

Parameters:
name - Parameter name.
allowUnknown - Parameter name.
Returns:
Untyped value of the parameter if found. Returns null if no parameter with the given name is found on this action and allowUnkownValue is set to true otherwise exceptions are thrown.
Throws:
java.lang.IllegalStateException - If no parameters are registered on this action (never thrown if allowUnkownValue is on).
java.lang.IllegalArgumentException - If the action doesn't have a parameter with the given name. (never thrown if allowUnkownValue is on).

getParameterMarks

public java.util.BitSet getParameterMarks(java.lang.String name,
                                          LyBitSet.Type type)
Gets value corresponding to the given parameter mark. The result is a BitSet. A type is given to known if marks apply to action, classInfo, fieldInfo or filter.

Parameters:
name - the name of the parameter
type - the type of expected bitset (for validation) Possible values are : LyBitSet.Type.A_MARKS, TYPE_F_MARKS, TYPE_C_MARKS...
Returns:
the marks

getLyParameter

public final LyParameter getLyParameter(java.lang.String name,
                                        boolean allowUnkownValue)
Gets parameter corresponding to the given parameter name.

Parameters:
name - Parameter name.
allowUnknown - Parameter name.
Returns:
The parameter if found. Null if no parameter with the given name is found on this action and allowUnkownValue is set to true otherwise exceptions are thrown.
Throws:
java.lang.IllegalStateException - If no parameters are registered on this action (never thrown if allowUnkownValue is on).
java.lang.IllegalArgumentException - If the action doesn't have a parameter with the given name. (never thrown if allowUnkownValue is on).

getParameterDecl

public LyParameterDecl getParameterDecl(java.lang.String name)
Gets a parameter declaration from a parameter name.

Parameters:
Name - of the parameter.
Returns:
The parameter declaration if found, null otherwise.

getParametersDecl

public final java.util.Vector<LyParameterDecl> getParametersDecl()
Gets all parameter declarations defined for one action. This method returns a copy of the table, this copy can freely be modified.

Returns:
Vector containing all parameter declarations, null if no parameter was declared for this action.

getParameters

public final java.util.Vector<LyParameter> getParameters()
Gets all parameters defined for one action. This method returns a copy of the table, this copy can freely be modified.

Returns:
Vector containing all parameters, null if no parameter was registered for this action.

getActions

public final LyInfoList<LyAction> getActions()
Gets sub-actions list : extra registered actions that can be invoked from action view.

Returns:
List of these actions.

getAction

public final LyAction getAction(int index)
Gets sub-action at the given index in sub-actions list.

Parameters:
index - Index of the searched sub-action.
Returns:
Sub-action at the given index, null if no sub-action is defined.

getActionCount

public final int getActionCount()
Gets number of sub-actions.

Returns:
Number of sub-actions of this action.

getShortcut

public final java.lang.String getShortcut()
Gets the shortcut associated with this action, and which appear in the corresponding menu item.

Returns:
Shortcut for the action.

getDefaultAction

public final LyAction getDefaultAction()
Gets the default action for this action. The default action is the one executed when the end-user double-clicks in action view.

Returns:
Default action for this action.

isActionRef

public final boolean isActionRef()
Is the current action an action_ref.

Returns:
true if the action is an action_ref

getEnvironment

public final LyEnvironment getEnvironment(LyEnvironment parentEnvironment)
Gets action environment containing specific action resources.

Parameters:
parentEnvironnement - Parent environment to which the returned environment has to be parented.
Returns:
A new environment parented to the given parent environment and containing the action resources, if this action has specific resources. Otherwise, the parent environment given as parameter is returned directly.

canBeInvoked

public boolean canBeInvoked(boolean checkClassInfo)
Method used to check if this action is invokable or not (i.e. all its required parameters have a value)

Parameters:
checkClassInfo - True if classInfo parameter is checked or ignored.
Returns:
True if this action can be invoked, false otherwise.

isViewable

public boolean isViewable()
Method used to check if this action is viewable or not (i.e. the action is executed in a view).

Returns:
True if this action is viewable, false otherwise.

getResources

public java.util.Vector<LyActionResource> getResources()
Get All resources defined for this action.

Returns:
a vector with all resources

getGeometry

public LyGeometry getGeometry()
Gets geometry information for action view (used with fat client only).


isAbstract

public final boolean isAbstract()
Checks if this action is abstract or not.

Returns:
True if abstract, false otherwise.

getRoot

public final LyAction getRoot()
Gets the 'root' template for this action. This action if no template for this action, otherwise calls getRoot on the template until the farthest template is found.

Returns:
Root template if any, this otherwise.

getClassInfo

public LyClassInfo getClassInfo()
Returns class info on which the action is applied if specified.

Returns:
The class info on which the action is applied (may be null).

getFieldInfos

public LyInfoList<LyFieldInfo> getFieldInfos(LyClassInfo classInfo,
                                             boolean useFieldMarks)
Gets list of fields concerned by the action if specified.

Parameters:
classInfo - Class info on which fields are searched if not given on action.
userFieldMarks - Indicates if field marks are taken into account or not.
Returns:
Info list containing fields concerned by the action, null if not specified.

hasMark

public final boolean hasMark(java.lang.String markName)
Check if a specific mark is set on this action from its name.

Parameters:
markName - Name of the mark tested for this action.
Returns:
True if the mark is set, false otherwise.

setParentEnvironment

public final void setParentEnvironment(LyEnvironment parentEnvironment)
Sets action parent environment (internal use).

Parameters:
parentEnvironnement - Parent environment to which the returned environment has to be parented.

getGenericMarks

public java.util.BitSet getGenericMarks()
Accessor to the generic marks attached to this instance.


getSpecificMarks

public java.lang.String[] getSpecificMarks()
Accessor to the marks attached to this instance (presented as an array of strings).


(c) January 2013 - W4 S.A.

Website: W4 S.A., contact us: support@w4global.com