public abstract class ActionDefinition extends Named implements ActionGroup
Modifier and Type | Field and Description |
---|---|
protected ArgumentContent |
accesscriteria |
protected int |
accesscriteriaindex |
protected boolean |
accesscriteriaisinput |
Constructor and Description |
---|
ActionDefinition(java.lang.String name)
creates a user defined (not autogenerated) action
|
ActionDefinition(java.lang.String name,
boolean autogenerated)
creates an action defining if autogenerated or not
|
ActionDefinition(java.lang.String name,
java.lang.String specification)
creates an action (user-defined) with a specification to include in the
javadoc of the action
|
ActionDefinition(java.lang.String name,
java.lang.String specification,
boolean autogenerated)
creates an action with a specification to include in the javadoc of the
action
|
Modifier and Type | Method and Description |
---|---|
void |
addBusinessRule(java.lang.String businessrule)
adds a business rule (in plain text) for the action rules to be added to the
action javadoc
|
void |
addOutputArgument(ArgumentContent thisargument)
adds an output argument to this action
|
void |
addOutputArgumentAsAccessCriteria(ArgumentContent thisargument)
adds this output argument as security criteria.
|
void |
forceNoAddress()
This will ensure the function will never have an address for the action.
|
void |
generateToFile(SourceGenerator sg,
Module module)
generates the abstract class of the action to file.
|
ArgumentContent |
getAccessCriteria() |
int |
getAccessCriteriaIndex() |
ActionDefinition[] |
getActionsInGroup() |
java.lang.String |
getButtonlabel() |
abstract NamedList<ArgumentContent> |
getInputArguments() |
Module |
getModule() |
ArgumentContent |
getOutputArgument(int i)
get the output argument at the given index
|
int |
getOutputArgumentNumber() |
abstract ObjectArgument |
getSecurityobjectargument()
this method returns the object argument used for security if it exists
|
abstract ObjectIdArgument |
getSecurityobjectidargument()
this method returns the object argument id used for security if it exists
|
boolean |
isAccessCriteriaInput() |
boolean |
isAddressGenerated(NamedList<ArgumentContent> inputarguments)
depending on the arguments, the action can have an address generated that is
similar to an URL link.
|
boolean |
isAutogenerated() |
void |
setButtonlabel(java.lang.String buttonlabel)
sets the button label (will be shown when buttons appear in automatic pages
for this action)
|
void |
setModule(Module module)
sets the parent module
|
java.lang.String |
toString() |
changeName, cleanName, equals, getName
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName
protected int accesscriteriaindex
protected boolean accesscriteriaisinput
protected ArgumentContent accesscriteria
public ActionDefinition(java.lang.String name)
name
- name of the action, should be unique in the module and a valid
java method name (starts by a letter...)public ActionDefinition(java.lang.String name, boolean autogenerated)
name
- name of the action, should be unique in the module and a
valid java method name (starts by a letter...)autogenerated
- true if autogenerated, false if user generatedpublic ActionDefinition(java.lang.String name, java.lang.String specification)
name
- name of the action, should be unique in the module and a
valid java method name (starts by a letter...)specification
- a free text specificationpublic ActionDefinition(java.lang.String name, java.lang.String specification, boolean autogenerated)
name
- name of the action, should be unique in the module and a
valid java method name (starts by a letter...)specification
- a free text specificationautogenerated
- true if autogenerated, false if user generatedpublic java.lang.String toString()
toString
in class java.lang.Object
public ActionDefinition[] getActionsInGroup()
getActionsInGroup
in interface ActionGroup
public Module getModule()
public java.lang.String getButtonlabel()
public int getOutputArgumentNumber()
public ArgumentContent getOutputArgument(int i)
i
- index between 0 (included) and getOutputArgumentNumber (excluded)public void setButtonlabel(java.lang.String buttonlabel)
buttonlabel
- button label to usepublic int getAccessCriteriaIndex()
public void forceNoAddress()
public abstract NamedList<ArgumentContent> getInputArguments()
public boolean isAddressGenerated(NamedList<ArgumentContent> inputarguments)
inputarguments
- list of input argumenntspublic abstract ObjectArgument getSecurityobjectargument()
public abstract ObjectIdArgument getSecurityobjectidargument()
public boolean isAutogenerated()
public void setModule(Module module)
module
- the module to addpublic void addBusinessRule(java.lang.String businessrule)
businessrule
- business rule to addpublic void addOutputArgument(ArgumentContent thisargument)
thisargument
- argument to addpublic boolean isAccessCriteriaInput()
public ArgumentContent getAccessCriteria()
public void addOutputArgumentAsAccessCriteria(ArgumentContent thisargument)
thisargument
- argument to add as output access criteriapublic void generateToFile(SourceGenerator sg, Module module) throws java.io.IOException
sg
- source generatormodule
- parent modulejava.io.IOException
- if anything bad happens while writing the file.