Package ch.ivyteam.ivy.request
Interface IRequest
-
- All Known Subinterfaces:
IApplicationRequest
,IHttpRequest
,IProcessModelVersionRequest
,IProcessRequest
,ITaskRequest
public interface IRequest
This is common interface for all requests handled by ivy- Since:
- 16.05.2006
- API:
- This is a public API.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description String
getFirstParameter(String paramName)
Gets the first parameter value if the given parameter name refers to an array or list of parameter values.Object
getLocalParameter(String paramName)
Gets the request parameter with the given name.Object
getParameter(String paramName)
Gets the request parameter with the given name.Iterator<String>
getParameterNames()
Gets the names of the parameters of this request.Map<String,Object>
getParameters()
Gets the parameters of this request.Object[]
getParameterValues(String paramName)
Gets the parameter values of this request.IRequest
getParentRequest()
Gets the parent request.String
getRequestPath()
Gets the request pathvoid
setParameter(String name, Object value)
Sets the parameter on this request.String
toString()
Gets a string representation of this request
-
-
-
Method Detail
-
getRequestPath
String getRequestPath()
Gets the request path- Returns:
- request path
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getParameter
Object getParameter(String paramName)
Gets the request parameter with the given name. If the key can not be resolved locally, then the parent request's will be asked. UsegetLocalParameter(String)
if you only want to search this request's parameters.- Parameters:
paramName
- the name of the parameter to get- Returns:
- parameter value or null if parameter is neither set on this request nor on any parent request
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getLocalParameter
Object getLocalParameter(String paramName)
Gets the request parameter with the given name. Only this request's parameter's are searched, the parent request's parameters are ignored. UsegetParameter(String)
if you want to search parent request parameters as well.- Parameters:
paramName
-- Returns:
- parameter value or null if parameter is not known on this request
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getFirstParameter
String getFirstParameter(String paramName)
Gets the first parameter value if the given parameter name refers to an array or list of parameter values. If it is a single-valued parameter then the single value will be returned (i.e. same semantics asgetParameter(String)
).- Parameters:
paramName
- the name of the parameter to get- Returns:
- first parameter value or null if parameter is not set (always a string)
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getParameterValues
Object[] getParameterValues(String paramName)
Gets the parameter values of this request. The values of the parent request(s) are not returned.- Parameters:
paramName
- the name of the parameter to get- Returns:
- parameter values
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getParameterNames
Iterator<String> getParameterNames()
Gets the names of the parameters of this request. The names of the parameters of the parent request(s) are not returned.- Returns:
- iterator with the names
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getParameters
Map<String,Object> getParameters()
Gets the parameters of this request. The parameters of the parent request(s) are not returned.- Returns:
- the parameters
- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
toString
String toString()
Gets a string representation of this request- Returns:
- string representation
- API:
- This public API is available in Java.
-
setParameter
void setParameter(String name, Object value)
Sets the parameter on this request. If the same parameter is defined on a parent request then the original value will remain unchanged and will be shadowed with the new value.I.e. the new parameter value will be local to this request and will be removed (thus returning to the old value) as soon as this request ends and the parent request continues.
- Parameters:
name
- the name of the parameter to setvalue
- the value of the parameter- API:
- This public API is available in IvyScript and Java. It has the visibility NOVICE.
-
getParentRequest
IRequest getParentRequest()
Gets the parent request. Maybe null.
A request can be run/embedded in the context of an outer request. This method returns the outer or parent request.- Returns:
- parent request
- API:
- This public API is available in IvyScript and Java. It has the visibility ADVANCED.
-
-