Interface ExtensionParameters
-
- All Superinterfaces:
ExtensionParametersComp
public interface ExtensionParameters extends ExtensionParametersComp
-
-
Field Summary
Fields Modifier and Type Field Description static String
REQUESTTYPE_INIT
static String
REQUESTTYPE_PERSIST
static String
REQUESTTYPE_RETRIEVEPAGE
static String
SOURCE_DEFINITIONSELECTOR
static String
SOURCE_EDITPAGE
static String
SOURCE_HOMEPAGE
static String
SOURCE_JOBCHAINEPARAMETEREDITOR
static String
SOURCE_MAINPAGE
static String
SOURCE_POPUPMENU
static String
SOURCE_SHOWPAGE
static String
SOURCE_TOOLBAR
static String
SOURCE_UNKNOWN
static char
TYPE_BOOLEAN
static char
TYPE_BUSINESSKEY
static char
TYPE_CONSTANT
static char
TYPE_DATETIME
static char
TYPE_ENUMERATION
static char
TYPE_FOREIGNKEY
static char
TYPE_MILLIS
static char
TYPE_NUMBER
static char
TYPE_STRING
static char
TYPE_TIMEZONE
static char
TYPE_UNIQUEID
static char
TYPE_UNKNOWN
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Set<String>
getConstantNames()
Get the names of the constants that are present in this request.String
getConstantValue(String name)
Get the value of the constant with the given name.String
getContextIsolationGroup()
Get the isolation group of the user executing the actionString
getContextRequestType()
The type of this request.String
getContextSource()
The source of the action.Map<String,String>
getContextSubjectFields()
Get the fields that were send over that identify the subject that executed the action.String
getContextURL()
URL of the Cronacle system where the action comes fromString
getExtensionName()
The name of the extension that got executedString
getExtensionObjectType()
What was the objecttype of the page where the user executed the Extension.String
getExtensionType()
What was the type of the extension the user executes.String
getInvocationFieldName()
Since each invocation of the Extension Point stores its data separately from other invocations, this id must be added to the request made from the client back to the server to guarantee retrieving the same data.String
getInvocationID()
Since each invocation of the Extension Point stores its data separately from other invocations, this id must be added to the request made from the client back to the server to guarantee retrieving the same data.Map<String,String>
getObject(int index)
Get a map of key value pairs for the object at index.int
getObjectCount()
return the number of objects that are present in the parametersString
getObjectFieldName(String key)
The keys returned by getObject() contain extra information.char
getObjectFieldType(String key)
The keys returned by getObject() contain extra information.Object
getObjectFieldValue(int index, char type, String name, SchedulerSession session)
Return the value of a given field by name and type.String
getObjectType(int index)
Return the object type of the object at position indexString
getOutput()
Where is the output going to be rendered to.String
getParameter(String name)
Returns the value of a request parameter as aString
, ornull
if the parameter does not exist.Map<String,String[]>
getParameterMap()
Returns a java.util.Map of the parameters of this request.RWIterable<String>
getParameterNames()
Returns anEnumeration
ofString
objects containing the names of the parameters contained in this request.String[]
getParameterValues(String name)
Returns an array ofString
objects containing all of the values the given request parameter has, ornull
if the parameter does not exist.Part
getPart(String name)
Get the part for the given parameter name.Collection<Part>
getParts()
Return all Parts in this request.boolean
isMultiPartRequest()
Is the request that these parameters belong to a multipart/form-data request.
-
-
-
Field Detail
-
TYPE_BOOLEAN
static final char TYPE_BOOLEAN
- See Also:
- Constant Field Values
-
TYPE_CONSTANT
static final char TYPE_CONSTANT
- See Also:
- Constant Field Values
-
TYPE_DATETIME
static final char TYPE_DATETIME
- See Also:
- Constant Field Values
-
TYPE_ENUMERATION
static final char TYPE_ENUMERATION
- See Also:
- Constant Field Values
-
TYPE_FOREIGNKEY
static final char TYPE_FOREIGNKEY
- See Also:
- Constant Field Values
-
TYPE_BUSINESSKEY
static final char TYPE_BUSINESSKEY
- See Also:
- Constant Field Values
-
TYPE_MILLIS
static final char TYPE_MILLIS
- See Also:
- Constant Field Values
-
TYPE_NUMBER
static final char TYPE_NUMBER
- See Also:
- Constant Field Values
-
TYPE_STRING
static final char TYPE_STRING
- See Also:
- Constant Field Values
-
TYPE_UNIQUEID
static final char TYPE_UNIQUEID
- See Also:
- Constant Field Values
-
TYPE_TIMEZONE
static final char TYPE_TIMEZONE
- See Also:
- Constant Field Values
-
TYPE_UNKNOWN
static final char TYPE_UNKNOWN
- See Also:
- Constant Field Values
-
SOURCE_POPUPMENU
static final String SOURCE_POPUPMENU
- See Also:
- Constant Field Values
-
SOURCE_TOOLBAR
static final String SOURCE_TOOLBAR
- See Also:
- Constant Field Values
-
SOURCE_JOBCHAINEPARAMETEREDITOR
static final String SOURCE_JOBCHAINEPARAMETEREDITOR
- See Also:
- Constant Field Values
-
SOURCE_EDITPAGE
static final String SOURCE_EDITPAGE
- See Also:
- Constant Field Values
-
SOURCE_SHOWPAGE
static final String SOURCE_SHOWPAGE
- See Also:
- Constant Field Values
-
SOURCE_HOMEPAGE
static final String SOURCE_HOMEPAGE
- See Also:
- Constant Field Values
-
SOURCE_MAINPAGE
static final String SOURCE_MAINPAGE
- See Also:
- Constant Field Values
-
SOURCE_DEFINITIONSELECTOR
static final String SOURCE_DEFINITIONSELECTOR
- See Also:
- Constant Field Values
-
SOURCE_UNKNOWN
static final String SOURCE_UNKNOWN
- See Also:
- Constant Field Values
-
REQUESTTYPE_INIT
static final String REQUESTTYPE_INIT
- See Also:
- Constant Field Values
-
REQUESTTYPE_PERSIST
static final String REQUESTTYPE_PERSIST
- See Also:
- Constant Field Values
-
REQUESTTYPE_RETRIEVEPAGE
static final String REQUESTTYPE_RETRIEVEPAGE
- See Also:
- Constant Field Values
-
-
Method Detail
-
getParameter
String getParameter(String name)
Returns the value of a request parameter as aString
, ornull
if the parameter does not exist. Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data.You should only use this method when you are sure the parameter has only one value. If the parameter might have more than one value, use
getParameterValues(java.lang.String)
.If you use this method with a multivalued parameter, the value returned is equal to the first value in the array returned by
getParameterValues
.If the parameter data was sent in the request body, such as occurs with an HTTP POST request, then reading the body directly via
ExtensionPointHttpServletRequest.getInputStream()
orExtensionPointHttpServletRequest.getReader()
can interfere with the execution of this method.- Parameters:
name
- aString
specifying the name of the parameter- Returns:
- a
String
representing the single value of the parameter - See Also:
getParameterValues(java.lang.String)
-
getParameterNames
RWIterable<String> getParameterNames()
Returns anEnumeration
ofString
objects containing the names of the parameters contained in this request. If the request has no parameters, the method returns an emptyEnumeration
.- Specified by:
getParameterNames
in interfaceExtensionParametersComp
- Returns:
- an
Enumeration
ofString
objects, eachString
containing the name of a request parameter; or an emptyEnumeration
if the request has no parameters
-
getParameterValues
String[] getParameterValues(String name)
Returns an array ofString
objects containing all of the values the given request parameter has, ornull
if the parameter does not exist.If the parameter has a single value, the array has a length of 1.
- Parameters:
name
- aString
containing the name of the parameter whose value is requested- Returns:
- an array of
String
objects containing the parameter's values - See Also:
getParameter(java.lang.String)
-
getParameterMap
Map<String,String[]> getParameterMap()
Returns a java.util.Map of the parameters of this request. Request parameters are extra information sent with the request. For HTTP servlets, parameters are contained in the query string or posted form data.- Returns:
- an immutable java.util.Map containing parameter names as keys and parameter values as map values. The keys in the parameter map are of type String. The values in the parameter map are of type String array.
-
getContextSource
String getContextSource()
The source of the action. See SOURCE_XXX constants for possible values.- Returns:
- the source
-
getContextRequestType
String getContextRequestType()
The type of this request. See REQUESTTYPE_XXX constants for possible values. For Extension Points that can have multiple calls for the same Extension (e.g. EditPage), it indicates what request type is being made.- Returns:
- the type of the request
-
getContextURL
String getContextURL()
URL of the Cronacle system where the action comes from- Returns:
- the url
-
getContextIsolationGroup
String getContextIsolationGroup()
Get the isolation group of the user executing the action- Returns:
- the name of the isolation group
-
getContextSubjectFields
Map<String,String> getContextSubjectFields()
Get the fields that were send over that identify the subject that executed the action. The keys contain the names of the fields, the values are the values of those fields- Returns:
- a map that contain key value pairs that make up the subject
-
getExtensionName
String getExtensionName()
The name of the extension that got executed- Returns:
- the name of the extension
-
getExtensionType
String getExtensionType()
What was the type of the extension the user executes. Only valid when ContextSource is ToolBar- Returns:
- Basic for global toolbar Extension, Object for an object related Extension
-
getExtensionObjectType
String getExtensionObjectType()
What was the objecttype of the page where the user executed the Extension. Not set when ExtensionType == Basic- Returns:
- the ObjectType
-
getInvocationFieldName
String getInvocationFieldName()
Since each invocation of the Extension Point stores its data separately from other invocations, this id must be added to the request made from the client back to the server to guarantee retrieving the same data. This is the field name that must be used- Returns:
- the field name that must be used for sending the invocation ID
-
getInvocationID
String getInvocationID()
Since each invocation of the Extension Point stores its data separately from other invocations, this id must be added to the request made from the client back to the server to guarantee retrieving the same data.- Returns:
- the invocation ID
-
getOutput
String getOutput()
Where is the output going to be rendered to.- Returns:
- "popup" or "tabpage", or null when not set.
-
getObjectCount
int getObjectCount()
return the number of objects that are present in the parameters- Returns:
- the number of objects present, or 0 if there are none.
-
getObjectType
String getObjectType(int index)
Return the object type of the object at position index- Parameters:
index
- of the object- Returns:
- the object type
- Throws:
IndexOutOfBoundsException
-
getObject
Map<String,String> getObject(int index)
Get a map of key value pairs for the object at index. The values send over is determined by the DeploymentDescriptor. UniqueId is always send over. The key contains a concatenation of field type and name. Use getObjectFieldType() and getObjectFieldName() to get the different parts.- Parameters:
index
- of the object requested- Returns:
- a map with key value pairs for the object
- Throws:
IndexOutOfBoundsException
-
getObjectFieldType
char getObjectFieldType(String key)
The keys returned by getObject() contain extra information. This method returns what the type of the field is.- Parameters:
key
- to return the type for- Returns:
- the type of the field
-
getObjectFieldName
String getObjectFieldName(String key)
The keys returned by getObject() contain extra information. This method returns what the name of the field is.- Parameters:
key
- to reutrn the name for- Returns:
- the name of the field
-
getObjectFieldValue
Object getObjectFieldValue(int index, char type, String name, SchedulerSession session)
Return the value of a given field by name and type. The value will be converted to the type that it was originally- Parameters:
index
- of the objecttype
- of the field, must match original type when it was encodedname
- of the field requestedsession
- used to retrieve scheduler entities- Returns:
- the value of the field as the type it originally was.
- Throws:
IndexOutOfBoundsException
-
getConstantNames
Set<String> getConstantNames()
Get the names of the constants that are present in this request. Constants are defined in the deployment descriptor as parameters of type constant. They are part of the parameters for an object send over. however, if there are no objects available, then this method can be used to retrieve the constants.- Returns:
- the Set of names for the defined constants, or an empty set when there are no constants present.
-
getConstantValue
String getConstantValue(String name)
Get the value of the constant with the given name. Constants are defined in the deployment descriptor as parameters of type constant. They are part of the parameters for an object send over. however, if there are no objects available, then this method can be used to retrieve the constants.- Parameters:
name
- of the constant to retrieve.- Returns:
- the value for the given constant, or null of the constant is not present in the request.
-
isMultiPartRequest
boolean isMultiPartRequest()
Is the request that these parameters belong to a multipart/form-data request. Only when this method returns true can the methods getPart(String name) and getParts() be called.- Returns:
- true when this is a multipart/from-data request, false otherwise
-
getPart
Part getPart(String name) throws IOException, IllegalStateException
Get the part for the given parameter name. It will return the part for both files and regular parameters.- Parameters:
name
- of the part to return- Returns:
- the part for the given name, or null when the part name could not be found
- Throws:
IOException
IllegalStateException
- when this is not a multipart/form-data request
-
getParts
Collection<Part> getParts() throws IOException, IllegalStateException
Return all Parts in this request.- Returns:
- a collection of Parts present in the request
- Throws:
IOException
IllegalStateException
- when this is not a multipart/form-data request.
-
-