Interface UserServiceRequest
-
- All Known Subinterfaces:
UserServiceAjaxContext,UserServiceEventContext,UserServiceGetContext,UserServiceGetCreatedRecordContext<S>,UserServiceInitializeContext<S>,UserServicePaneContext,UserServiceProcessEventOutcomeContext<S>,UserServiceRawPaneContext,UserServiceSetupDisplayContext<S>,UserServiceSetupObjectContext<S>,UserServiceValidateContext<S>
public interface UserServiceRequestDefines an interface to provide information about a request for a user service.- Since:
- 5.8.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancanClose()Returnsfalseif the close button or URL should not be displayed.PerspectivegetCurrentPerspective()Returns the current perspective.StringgetParameter(String aParameterName)Returns the value defined by the specified parameter in the HTTP request.String[]getParameterValues(String aParameterName)Returns an array containing the values defined by the specified parameter in the HTTP request.RepositorygetRepository()Returns the current repository.StringgetServiceDescription()Returns the description of the service, localized for the session's current locale.ServiceKeygetServiceKey()Returns the current service key.StringgetServiceLabel()Returns the label of the service, localized for the session current locale.StringgetServiceModuleName()Returns the name of the module that declares the service being executed.SessiongetSession()Returns the current session.booleanisInitialDisplay()Returnstrueif the user service is being displayed for the first time.
-
-
-
Method Detail
-
getSession
Session getSession()
Returns the current session. Never returnsnull.
-
getRepository
Repository getRepository()
Returns the current repository. Never returnsnull.
-
isInitialDisplay
boolean isInitialDisplay()
Returnstrueif the user service is being displayed for the first time.
-
canClose
boolean canClose()
Returnsfalseif the close button or URL should not be displayed.In some contexts, a user service may not be closable. This happens, for example, when a user service is displayed by a perspective action menu with no selection on close configured.
Current implementation automatically hides standard close and close and save buttons from the bottom toolbar but it is the developper's responsibility to hide URLs or other buttons that may close the user service without redirecting the user to another screen.
-
getParameter
String getParameter(String aParameterName)
Returns the value defined by the specified parameter in the HTTP request.If the specified parameter has multiple values, the returned value is the first one returned by
getParameterValues(String).- Parameters:
aParameterName- the name of the parameter.- Returns:
- the parameter's value or
nullif not found. - See Also:
getParameterValues(String)
-
getParameterValues
String[] getParameterValues(String aParameterName)
Returns an array containing the values defined by the specified parameter in the HTTP request.- Parameters:
aParameterName- the name of the parameter.- Returns:
- an array containing the parameter's values,
nullif not found. - See Also:
getParameter(String)
-
getServiceKey
ServiceKey getServiceKey()
Returns the current service key.
-
getServiceModuleName
String getServiceModuleName()
Returns the name of the module that declares the service being executed.- Returns:
- the module name.
-
getServiceLabel
String getServiceLabel()
Returns the label of the service, localized for the session current locale.The label of the service is specified in the data model, under the node
xs:annotation/xs:documentation.- Returns:
- the label of the service.
-
getServiceDescription
String getServiceDescription()
Returns the description of the service, localized for the session's current locale.The description of the service is specified in the data model, under the node
xs:annotation/xs:documentation.- Returns:
- the description of the service. May return
nullif the description is not available.
-
getCurrentPerspective
Perspective getCurrentPerspective()
Returns the current perspective.- Since:
- 6.0.0
-
-