Class ServiceContext
- All Implemented Interfaces:
UIResourceLocator
Please refer to the current documentation on user services for more information.
-
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddMessage(UserMessage aMessage) Deprecated.Adds a message regarding the validation of the form in the page.abstract ProcedureResultDeprecated.Executes the specified procedure and calls its implementation of the methodProcedure.execute.abstract ProcedureResultDeprecated.Executes the specified procedure.abstract AdaptationDeprecated.Returns the dataset or record currently selected in the user interface.abstract HierarchyNodeDeprecated.abstract AdaptationHomeDeprecated.Returns the dataspace currently selected in the user interface.abstract SchemaNodeDeprecated.Returns the data model node currently selected in the current Adaptation.abstract PathDeprecated.Returns the path of the node currently selected in the user interface.abstract RequestDeprecated.Returns the request corresponding to the current table view in the EBX® user interface, including the filters and sort criteria set on the view.abstract RequestDeprecated.Returns the request over the records of the current hierarchy leaves.abstract RequestDeprecated.Returns the request over the records currently selected in the EBX® user interface.abstract SchemaNodeDeprecated.Returns the table node currently selected in EBX®.abstract LocaleDeprecated.Returns the current locale of the user interface session.abstract StringDeprecated.Returns the name of the module that declares the service being executed.abstract List<HierarchyNode>Deprecated.Returns the nodes currently selected in a hierarchy.abstract List<Adaptation>Deprecated.Returns the records currently selected in the user interface.static final ServiceContextgetServiceContext(HttpServletRequest aRequest) Deprecated.Retrieves a context instance from HTTP request attributes.abstract StringDeprecated.Returns the description of the service, localized for the session's current locale.abstract ServiceKeyDeprecated.Returns the key of the current service.abstract StringDeprecated.Returns the label of the service, localized for the session's current locale.abstract SessionDeprecated.Returns the current session context.abstract UIServiceComponentWriterDeprecated.This method can be used in a Servlet to get a component writer in order to add standard EBX® components.abstract UIServiceComponentWritergetUIComponentWriterForJSP(JspWriter aJspWriter) Deprecated.This method can be used in a JSP to get a component writer to add some integrated components.abstract StringDeprecated.Returns a user interface URL indicating that the execution of this service is finished.abstract StringDeprecated.Returns a user interface URL indicating that the execution of this service is finished.abstract StringgetURLForForwardingToResource(String aResourcePath) Deprecated.Returns a user interface URL forwarding this service execution to the specified resource.abstract StringgetURLForIncludingResource(String aResourcePath) Deprecated.Returns a user interface URL indicating that this service execution continues to the resource specified.abstract StringgetURLForServiceSelection(AdaptationHome aHome, Adaptation aRecordOrInstance, SchemaNode aNode, ServiceKey aServiceKey) Deprecated.Returns a user interface URL that selects the specified node in the given record or dataset and starts the specified service on it, in the context of the givenAdaptationHome.abstract StringgetURLForServiceSelection(AdaptationHome aHome, Adaptation aRecordOrInstance, ServiceKey aServiceKey) Deprecated.Returns a user interface URL that selects the specified record or dataset and starts the specified service on it, in the context of the givenAdaptationHome.abstract StringgetURLForServiceSelection(AdaptationHome aHome, ServiceKey aServiceKey) Deprecated.Returns a user interface URL that selects the specified dataspace and starts the specified service on it.abstract StringgetURLForServiceSelection(Adaptation aRecordOrInstance, SchemaNode aNode, ServiceKey aServiceKey) Deprecated.Returns a user interface URL which selects the specified node in the given record or dataset and starts the specified service on it.abstract StringgetURLForServiceSelection(Adaptation aRecordOrInstance, ServiceKey aServiceKey) Deprecated.Returns a user interface URL which selects the specified record or dataset and starts the specified service on it.abstract StringgetURLForServiceSelection(ServiceKey aServiceKey) Deprecated.Returns a user interface URL to start the specified service.abstract List<SchemaNode>Deprecated.Returns the nodes (or "columns" from a user perspective) that are currently displayed by the tabular view.abstract booleanDeprecated.abstract booleanDeprecated.Returnstrueif the current service is called from a dataspace or snapshot menu.abstract booleanDeprecated.Returnstrueif the current service is called from a dataset menu.abstract booleanDeprecated.Returnstrueif the current service is called from a record page.abstract booleanDeprecated.Returnstrueif the current service is called on the whole table view.abstract booleanDeprecated.Returnstrueif the current service is called on the selected records of the view.final voidDeprecated.Enables the context-sensitive help button in the header of the workspace.final voidsetTitle(UserMessage aMessage) Deprecated.Replaces the default title of the user service in the header of the workspace.Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.orchestranetworks.ui.UIResourceLocator
createWebComponentForRootSession, createWebComponentForSubSession, getURLForAjaxComponent, getURLForAjaxComponent, getURLForPerspectiveSelection, getURLForPerspectiveSelection, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForResource, getURLForRest, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForSelection, getURLForViewSelection
-
Method Details
-
getServiceContext
Deprecated.Retrieves a context instance from HTTP request attributes. This method will not returnnullwhile in the context of a service execution (this means that the user interface is performing a server-side include). -
execute
Deprecated.Executes the specified procedure.This method is equivalent to:
ServiceContext.execute(true, aProcedure);- See Also:
-
execute
Deprecated.Executes the specified procedure and calls its implementation of the methodProcedure.execute.- Parameters:
addErrorMessageIfException- specifies whether the user interface automatically reports an error message whenever the execution has encountered an error.aProcedure- the procedure to be executed.- Returns:
- the result of the execution (particularly, whether it has thrown an exception).
- Since:
- 5.2.1
-
getCurrentHome
Deprecated.Returns the dataspace currently selected in the user interface. -
getCurrentAdaptation
Deprecated.Returns the dataset or record currently selected in the user interface.This method returns a dataset if:
- the current service is running from a dataset menu (see
isCalledOnInstance()); - the current service is running on a whole table,
from "Services on table" menu category (see
isCalledOnTable()); - the current service is running on a table selection,
from "Services on selected records" menu category, and more than one record is selected (see
isCalledOnTableSelection()).
This method returns a record if:
- the current service is running on a table selection
and exactly one record is selected (see
isCalledOnTableSelection()); - the current service is running on a page record (see
isCalledOnOccurrencePage()); - the current service is running on a hierarchy node (see
isCalledOnHierarchyNode()).
- Throws:
IllegalStateException- if the current service is running on a dataspace or snapshot (seeisCalledOnHome()).- See Also:
- the current service is running from a dataset menu (see
-
getCurrentRequest
Deprecated.Returns the request corresponding to the current table view in the EBX® user interface, including the filters and sort criteria set on the view. Returnsnullif this service is called outside a table context.If this service is invoked in a hierarchy view, returns the request on the target table. Filters are not applied (except record-level permission rules, if any).
- See Also:
-
getCurrentRequestOnSelectedOccurrences
Deprecated.Returns the request over the records currently selected in the EBX® user interface. Returnsnullif this service is called outside the context of a table.If no records are selected, the returned request will have an empty result.
- See Also:
-
getCurrentRequestOnHierarchyLeaves
Deprecated.Returns the request over the records of the current hierarchy leaves. Returnsnullif this service is called outside the context of a hierarchy.- Since:
- 5.8.0
- See Also:
-
getSelectedOccurrences
Deprecated.Returns the records currently selected in the user interface.- Returns:
- a List of
Adaptationthat correspond to the records selected in the user interface, or an empty list if the service is being executed on a data set or from the contextual menu of a hierarchy node. - Throws:
UnsupportedOperationException- if too many records are specified; the limit is specified by the propertyebx.view.restrictSelectionsOnLargeLists.threshold. If large volumes of data are involved, it is recommended to use the methodgetCurrentRequestOnSelectedOccurrences()instead.- See Also:
-
getViewedSchemaNodes
Deprecated.Returns the nodes (or "columns" from a user perspective) that are currently displayed by the tabular view.Returns
nullif this service is called outside a table view or if no specific filtering has been applied to columns. -
getCurrentNode
Deprecated.Returns the data model node currently selected in the current Adaptation. If called on a table records selection, this method always returns the current table node.- Throws:
IllegalStateException- if the current service is running on a dataspace or snapshot (seeisCalledOnHome()).- See Also:
-
getCurrentTable
Deprecated.Returns the table node currently selected in EBX®. In a hierarchy view, this is the target table.- Throws:
IllegalStateException- if the current service is running outside a table context.- Since:
- 5.6.0
-
getCurrentHierarchyNode
Deprecated. -
getSelectedHierarchyNodes
Deprecated.Returns the nodes currently selected in a hierarchy.- Returns:
- List of
HierarchyNodethat corresponds to the nodes selected in the user interface displayed hierarchy. Returnsnullif the current service is not called in the context of a hierarchy.
-
getCurrentPathInAdaptation
Deprecated.Returns the path of the node currently selected in the user interface.- Throws:
IllegalStateException- if the current service is running on a dataspace or on a snapshot (seeisCalledOnHome()).
-
getLocale
Deprecated.Returns the current locale of the user interface session.- See Also:
-
getSession
Deprecated.Returns the current session context. -
getServiceLabel
Deprecated.Returns the label of the service, localized for the session's current locale.The label of the service is specified in the data model, under the node
xs:annotation/xs:documentation.- See Also:
-
getServiceKey
Deprecated.Returns the key of the current service.- Since:
- 5.4.1
- See Also:
-
getServiceDescription
Deprecated.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. -
addMessage
Deprecated.Adds a message regarding the validation of the form in the page. This message will be displayed in the standard message pane of the user interface. -
setContextSensitiveHelpURL
Deprecated.Enables the context-sensitive help button in the header of the workspace.Clicking on the button displays the help pop-up with the target URL.
The simple help button can also be placed anywhere with
UIComponentWriter.addButtonHelp(String).- Parameters:
aURL- the URL of the pop-up content.- Since:
- 5.2.3
-
setTitle
Deprecated.Replaces the default title of the user service in the header of the workspace.- Parameters:
aMessage- the text of the title.- Since:
- 5.2.3
-
getURLForIncludingResource
Deprecated.Returns a user interface URL indicating that this service execution continues to the resource specified.The resource must be in the same web application as the service.
- Parameters:
aResourcePath- path of the resource in its web application (it must not contain the web application's specific path).- See Also:
-
getURLForForwardingToResource
Deprecated.Returns a user interface URL forwarding this service execution to the specified resource.The resource must be in the same web application as the service.
- Parameters:
aResourcePath- absolute path of the resource in its web application (it must not contain the web application's specific path, and must start with '/').- Since:
- 5.5.0
- See Also:
-
getURLForEndingService
Deprecated.Returns a user interface URL indicating that the execution of this service is finished.- See Also:
-
getURLForEndingServiceInPopup
Deprecated.Returns a user interface URL indicating that the execution of this service is finished. After closing the service, the pop-up in which it was displayed is closed automatically. The service must have been called using a preview button, displaying it in an inner pop-up. This method must not be called to close a service in the main window. -
getURLForServiceSelection
Deprecated.Returns a user interface URL to start the specified service. When the URL is accessed, the service will be launched on the current content, unless this service automatically selects its own target content (for example,ServiceKey.WORKFLOW).- Throws:
IllegalArgumentException- if the built-in service is not supported by this method; this is the case forMASSDELETE,COMPARE, andCLOSE.- Since:
- 5.4.3
- See Also:
-
getURLForServiceSelection
public abstract String getURLForServiceSelection(Adaptation aRecordOrInstance, ServiceKey aServiceKey) Deprecated.Returns a user interface URL which selects the specified record or dataset and starts the specified service on it.- Throws:
IllegalArgumentException- if the built-in service is not supported by this method; this is the case forMASSDELETE,COMPARE, andCLOSE.- Since:
- 5.3.0
- See Also:
-
getURLForServiceSelection
Deprecated.Returns a user interface URL that selects the specified dataspace and starts the specified service on it.- Throws:
IllegalArgumentException- if the built-in service is not supported by this method; this is the case forMASSDELETE,COMPARE, andCLOSE.- Since:
- 5.4.2
- See Also:
-
getURLForServiceSelection
public abstract String getURLForServiceSelection(AdaptationHome aHome, Adaptation aRecordOrInstance, ServiceKey aServiceKey) Deprecated.Returns a user interface URL that selects the specified record or dataset and starts the specified service on it, in the context of the givenAdaptationHome.- Throws:
IllegalArgumentException- if the built-in service is not supported by this method; this is the case forMASSDELETE,COMPARE, andCLOSE.- Since:
- 5.4.2
- See Also:
-
getURLForServiceSelection
public abstract String getURLForServiceSelection(Adaptation aRecordOrInstance, SchemaNode aNode, ServiceKey aServiceKey) Deprecated.Returns a user interface URL which selects the specified node in the given record or dataset and starts the specified service on it.- Throws:
IllegalArgumentException- if the built-in service is not supported by this method; this is the case forMASSDELETE,COMPARE, andCLOSE.- Since:
- 5.3.1
- See Also:
-
getURLForServiceSelection
public abstract String getURLForServiceSelection(AdaptationHome aHome, Adaptation aRecordOrInstance, SchemaNode aNode, ServiceKey aServiceKey) Deprecated.Returns a user interface URL that selects the specified node in the given record or dataset and starts the specified service on it, in the context of the givenAdaptationHome.- Throws:
IllegalArgumentException- if the built-in service is not supported by this method; this is the case forMASSDELETE,COMPARE, andCLOSE.- Since:
- 5.4.2
- See Also:
-
isCalledOnHome
public abstract boolean isCalledOnHome()Deprecated.Returnstrueif the current service is called from a dataspace or snapshot menu.- See Also:
-
isCalledOnInstance
public abstract boolean isCalledOnInstance()Deprecated.Returnstrueif the current service is called from a dataset menu.- See Also:
-
isCalledOnTable
public abstract boolean isCalledOnTable()Deprecated.Returnstrueif the current service is called on the whole table view.In this case, it is expected that the service will be applied to the whole view or to the filtered view. It is obtained by calling the method
getCurrentRequest().- See Also:
-
isCalledOnHierarchyNode
public abstract boolean isCalledOnHierarchyNode()Deprecated. -
isCalledOnTableSelection
public abstract boolean isCalledOnTableSelection()Deprecated.Returnstrueif the current service is called on the selected records of the view.In this case, it is expected that the service be applied to the selected records. They are obtained by calling the method
getSelectedOccurrences().- See Also:
-
isCalledOnOccurrencePage
public abstract boolean isCalledOnOccurrencePage()Deprecated.Returnstrueif the current service is called from a record page.In this case, it is expected that the service will be applied to the current record. It is obtained by calling the method
getCurrentAdaptation().- See Also:
-
getUIComponentWriter
Deprecated.This method can be used in a Servlet to get a component writer in order to add standard EBX® components.Attention: This getter must not be called from a JSP. Use
getUIComponentWriterForJSP(JspWriter)instead.- Since:
- 5.2.0
-
getUIComponentWriterForJSP
Deprecated.This method can be used in a JSP to get a component writer to add some integrated components.Attention: This method must be called by only one JSP page. In the case of
jsp:include, this method must not be called from the initial page and the target page at the same time.- Parameters:
aJspWriter- theoutbuffer used to write HTML- Since:
- 5.2.0
-
getModuleName
Deprecated.Returns the name of the module that declares the service being executed.- Since:
- 5.2.3
-
UserServiceAPI should be used instead.