public class ObjectArgument extends ArgumentContent
Constructor and Description |
---|
ObjectArgument(java.lang.String name,
DataObjectDefinition payload) |
ObjectArgument(java.lang.String name,
DataObjectDefinition payload,
boolean securityargument)
creates an argument content holding the payload of an object
|
Modifier and Type | Method and Description |
---|---|
ArgumentContent |
generateCopy(java.lang.String newname)
generates a deep copy of the argument with a new name
|
java.lang.String |
getGenericDataEltName() |
java.util.ArrayList<java.lang.String> |
getImports() |
DataObjectDefinition |
getMasterObject()
This method is used to assess if a security argument is used in a manner
compatible with security rules
|
DataObjectDefinition |
getPayload() |
java.lang.String |
getPreciseDataEltName() |
java.lang.String |
getPreciseDataEltTypeName() |
java.lang.String |
getPreciseDataEltTypeNameWithArgument() |
java.lang.String |
getType() |
java.lang.String |
initblank() |
boolean |
needDefinitionForInit() |
void |
writeImports(SourceGenerator sg,
Module module)
writes to a java class the imports necessary for automatic generation of
actions using this parameter
|
getDisplaylabel, isOptional, isSecurityrelevant, setDisplaylabel, setOptional
changeName, cleanName, equals, getName
public ObjectArgument(java.lang.String name, DataObjectDefinition payload)
public ObjectArgument(java.lang.String name, DataObjectDefinition payload, boolean securityargument)
name
- name of the argument, should be unique amongst input
and output argument, should be a valid java field
namepayload
- the type of data object held as payloadsecurityargument
- if true, this argument is the security argument. If
input argument of an action, a check will be done
before the action, if output argument of an action,
data will be filtered before being sent to the clientpublic java.lang.String getType()
getType
in class ArgumentContent
public java.lang.String getGenericDataEltName()
getGenericDataEltName
in class ArgumentContent
public java.lang.String getPreciseDataEltTypeName()
getPreciseDataEltTypeName
in class ArgumentContent
public java.lang.String getPreciseDataEltTypeNameWithArgument()
getPreciseDataEltTypeNameWithArgument
in class ArgumentContent
public DataObjectDefinition getPayload()
public boolean needDefinitionForInit()
needDefinitionForInit
in class ArgumentContent
public java.lang.String getPreciseDataEltName()
getPreciseDataEltName
in class ArgumentContent
public void writeImports(SourceGenerator sg, Module module) throws java.io.IOException
ArgumentContent
writeImports
in class ArgumentContent
sg
- source generatormodule
- parent modulejava.io.IOException
- if any error is encountered writing to a filepublic ArgumentContent generateCopy(java.lang.String newname)
ArgumentContent
generateCopy
in class ArgumentContent
newname
- new namepublic java.util.ArrayList<java.lang.String> getImports()
getImports
in class ArgumentContent
public java.lang.String initblank()
initblank
in class ArgumentContent
public DataObjectDefinition getMasterObject()
ArgumentContent
getMasterObject
in class ArgumentContent