|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.info.LyTag
leon.info.LyInfo
leon.info.LyObjectInfo
leon.info.LyAction
public class LyAction
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
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 |
---|
public static final java.lang.String __version
public static final java.lang.String ID_CONSULT
public static final java.lang.String ID_CREATE
public static final java.lang.String ID_CREATEWS
public static final java.lang.String ID_CLONE
public static final java.lang.String ID_COPY
public static final java.lang.String ID_PASTE
public static final java.lang.String ID_SET
public static final java.lang.String ID_SETWS
public static final java.lang.String ID_DELETE
public static final java.lang.String ID_DELETEWS
public static final java.lang.String ID_PRINT
public static final java.lang.String ID_PRINT_TABLE
public static final java.lang.String ID_PASSWORD
public static final java.lang.String ID_SAVE_AS
public static final java.lang.String ID_ACTIVATE
public static final java.lang.String ID_IMPORT
public static final java.lang.String ID_EXPORT
public static final java.lang.String ID_XREF
public static final java.lang.String ID_MAP
public static final java.lang.String ID_TABLE
public static final java.lang.String ID_MULTI_PAGE_TABLE
public static final java.lang.String ID_TREE
public static final java.lang.String ID_LOGIN
public static final java.lang.String ID_DASHBOARD
public static final java.lang.String ID_EXIT
public static final java.lang.String ID_EXEC
public static final java.lang.String ID_MAIL
public static final java.lang.String ID_WAITING_VIEW
public static final java.lang.String ID_TEXT
public static final java.lang.String ID_MODIFY
public static final java.lang.String ID_REPORTING
public static final java.lang.String ID_PREVIOUS_PAGE
public static final java.lang.String ID_NEXT_PAGE
public static final java.lang.String ID_CONTEXT
public static final java.lang.String ID_NEW_FILTER
public static final java.lang.String ID_SET_FILTER
public static final java.lang.String ID_START_MODULE
public static final java.lang.String ID_SHOW
public static final java.lang.String ID_HIDE
public static final java.lang.String ID_UNDO
public static final java.lang.String ID_REDO
public static final java.lang.String ID_SELECT
public static final java.lang.String ID_SELECT_BY_NAME
public static final java.lang.String ID_SELECT_FILE
public static final java.lang.String ID_CONSULT_RELATION_TABLE
public static final java.lang.String ID_SET_RELATION_TABLE
public static final java.lang.String ID_FAST_FILTER
public static final java.lang.String ID_UPDATE_ARRAY_VALUE
public static final java.lang.String ID_MOVE_UP_TOOL
public static final java.lang.String ID_MOVE_DOWN_TOOL
public static final java.lang.String ID_CHOOSE
public static final java.lang.String ID_SORT_WIZARD
public static final java.lang.String ID_USER_INPUT
public static final java.lang.String ID_IMPORT_TABLE
public static final java.lang.String ID_EXPORT_PREVIEW
public static final java.lang.String ID_DATE_TOOL
public static final java.lang.String ID_CHART_FILE
public static final java.lang.String ID_DELETE_CHART
public static final java.lang.String ID_SET_EMPTY
public static final java.lang.String ID_GANTT
public static final java.lang.String ID_CHART
public static final java.lang.String ID_CANVAS
public static final int MARK_DEFAULT
public static final int MARK_TOOL
public static final int MARK_FORM
public static final int MARK_TRANSVERSE
public static final int MARK_HIDDEN
public static final int MARK_DIALOG
public static final int MARK_NO_TITLEBAR
public static final int MARK_NO_TOOLBAR
public static final int MARK_NO_COMMANDS
public static final int MARK_NO_TABS
public static final int MARK_NO_MENU
public static final int MARK_STATUS
public static final int MARK_NO_MENUBAR
public static final int MARK_FRAME_VIEW
public static final int MARK_MODAL
public static final int MARK_NO_MESSAGES
public static final int MARK_NO_DECORATION
public static final int MARK_NO_CONTEXT
public static final int MARK_PORTLET
public static final int MARK_WEBSERVICE
public static final int MARK_MOBILEONLY
public static final int MARK_NOTFORMOBILE
public static final int MARK_POPUP
public static final int MARK_MOBILEWEBVIEW
public static final java.lang.String PARAM_CLASS
public static final java.lang.String PARAM_FIELD
public static final java.lang.String PARAM_FILTER
public static final java.lang.String PARAM_SORT
public static final java.lang.String PARAM_FIELD_MARKS
public static final char ACTION_ID_SEP
Constructor Detail |
---|
public LyAction(LyAction template, LyClassInfo classInfo, java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
template
- Action template.classInfo
- Class info on which the action is applied.parameters
- Action parameters.public LyAction(java.lang.String id, LyAction template, LyClassInfo classInfo, java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
id
- Id of the action.template
- Action template.classInfo
- Class info on which the action is applied.parameters
- Action parameters.public LyAction(LyAction template, java.util.Hashtable<java.lang.String,java.lang.Object> parameters)
id
- Id of the action.template
- Action template.parameters
- Action parameters.Method Detail |
---|
public static int getMark(java.lang.String markName, boolean add)
markName
- Mark name.add
- indicates if the.mark must be added if it doesn't exit
public static int getMark(java.lang.String markName)
markName
- Mark name.
public static java.lang.String getMarkName(int markIndex)
markIndex
- Index of the mark.
public void free()
public java.lang.String getControllerClassName()
public final java.lang.Class<?> getControllerClass()
public java.lang.String getBehaviorClassName()
public final java.lang.Class<?> getBehaviorClass()
public java.lang.String getBuilderClassName()
public final java.lang.Class<?> getBuilderClass()
public final java.lang.String getView()
public final java.lang.String getTarget()
public final java.lang.String getMenu()
public final int getMin()
public final int getMax()
public final LyFilter getFilter()
public final java.lang.Object getParameter(java.lang.String name)
name
- Parameter name.
getParameter(java.lang.String)
public final java.lang.Object getParameter(java.lang.String name, boolean allowUnkownValue)
name
- Parameter name.allowUnknown
- Parameter name.
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).public java.util.BitSet getParameterMarks(java.lang.String name, LyBitSet.Type type)
name
- the name of the parametertype
- the type of expected bitset (for validation) Possible values are :
LyBitSet.Type.A_MARKS, TYPE_F_MARKS, TYPE_C_MARKS...
public final LyParameter getLyParameter(java.lang.String name, boolean allowUnkownValue)
name
- Parameter name.allowUnknown
- Parameter name.
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).public LyParameterDecl getParameterDecl(java.lang.String name)
Name
- of the parameter.
public final java.util.Vector<LyParameterDecl> getParametersDecl()
public final java.util.Vector<LyParameter> getParameters()
public final LyInfoList<LyAction> getActions()
public final LyAction getAction(int index)
index
- Index of the searched sub-action.
public final int getActionCount()
public final java.lang.String getShortcut()
public final LyAction getDefaultAction()
public final boolean isActionRef()
public final LyEnvironment getEnvironment(LyEnvironment parentEnvironment)
parentEnvironnement
- Parent environment to which the returned environment has to be
parented.
public boolean canBeInvoked(boolean checkClassInfo)
checkClassInfo
- True if classInfo parameter is checked or ignored.
public boolean isViewable()
public java.util.Vector<LyActionResource> getResources()
public LyGeometry getGeometry()
public final boolean isAbstract()
public final LyAction getRoot()
public LyClassInfo getClassInfo()
public LyInfoList<LyFieldInfo> getFieldInfos(LyClassInfo classInfo, boolean useFieldMarks)
classInfo
- Class info on which fields are searched if not given on action.userFieldMarks
- Indicates if field marks are taken into account or not.
public final boolean hasMark(java.lang.String markName)
markName
- Name of the mark tested for this action.
public final void setParentEnvironment(LyEnvironment parentEnvironment)
parentEnvironnement
- Parent environment to which the returned environment has to be
parented.public java.util.BitSet getGenericMarks()
public java.lang.String[] getSpecificMarks()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |