Class ServiceContext

    • Method Detail

      • getServiceContext

        public static final ServiceContext getServiceContext​(HttpServletRequest aRequest)
        Deprecated.
        Retrieves a context instance from HTTP request attributes. This method will not return null while in the context of a service execution (this means that the user interface is performing a server-side include).
      • execute

        public abstract ProcedureResult execute​(boolean addErrorMessageIfException,
                                                Procedure aProcedure)
        Deprecated.
        Executes the specified procedure and calls its implementation of the method Procedure.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

        public abstract AdaptationHome getCurrentHome()
        Deprecated.
        Returns the dataspace currently selected in the user interface.
      • getCurrentRequest

        public abstract Request 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. Returns null if 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:
        isCalledOnTable()
      • getCurrentRequestOnSelectedOccurrences

        public abstract Request getCurrentRequestOnSelectedOccurrences()
        Deprecated.
        Returns the request over the records currently selected in the EBX® user interface. Returns null if 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:
        isCalledOnTableSelection()
      • getCurrentRequestOnHierarchyLeaves

        public abstract Request getCurrentRequestOnHierarchyLeaves()
        Deprecated.
        Returns the request over the records of the current hierarchy leaves. Returns null if this service is called outside the context of a hierarchy.
        Since:
        5.8.0
        See Also:
        isCalledOnTable()
      • getViewedSchemaNodes

        public abstract List<SchemaNode> getViewedSchemaNodes()
        Deprecated.
        Returns the nodes (or "columns" from a user perspective) that are currently displayed by the tabular view.

        Returns null if this service is called outside a table view or if no specific filtering has been applied to columns.

        See Also:
        isCalledOnTable(), ExportSpec.setRequestSchemaNodes(List)
      • getCurrentNode

        public abstract SchemaNode 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 (see isCalledOnHome() ).
        See Also:
        getCurrentAdaptation()
      • getCurrentTable

        public abstract SchemaNode 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

        public abstract HierarchyNode getCurrentHierarchyNode()
        Deprecated.
      • getSelectedHierarchyNodes

        public abstract List<HierarchyNode> getSelectedHierarchyNodes()
        Deprecated.
        Returns the nodes currently selected in a hierarchy.
        Returns:
        List of HierarchyNode that corresponds to the nodes selected in the user interface displayed hierarchy. Returns null if the current service is not called in the context of a hierarchy.
      • getCurrentPathInAdaptation

        public abstract Path 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 (see isCalledOnHome() ).
      • getLocale

        public abstract Locale getLocale()
        Deprecated.
        Returns the current locale of the user interface session.
        See Also:
        Session.getLocale()
      • getSession

        public abstract Session getSession()
        Deprecated.
        Returns the current session context.
      • getServiceLabel

        public abstract String 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:
        setTitle(UserMessage)
      • getServiceKey

        public abstract ServiceKey getServiceKey()
        Deprecated.
        Returns the key of the current service.
        Since:
        5.4.1
        See Also:
        ServiceKey
      • getServiceDescription

        public abstract String 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

        public abstract void addMessage​(UserMessage aMessage)
        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

        public final void setContextSensitiveHelpURL​(String aURL)
        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

        public final void setTitle​(UserMessage aMessage)
        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

        public abstract String getURLForIncludingResource​(String aResourcePath)
        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:
        UIResourceLocator
      • getURLForForwardingToResource

        public abstract String getURLForForwardingToResource​(String aResourcePath)
        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:
        UIResourceLocator
      • getURLForEndingService

        public abstract String getURLForEndingService()
        Deprecated.
        Returns a user interface URL indicating that the execution of this service is finished.
        See Also:
        UIResourceLocator
      • getURLForServiceSelection

        public abstract String getURLForServiceSelection​(ServiceKey aServiceKey)
        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 for MASSDELETE, COMPARE, and CLOSE.
        Since:
        5.4.3
        See Also:
        UIResourceLocator
      • 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 for MASSDELETE, COMPARE, and CLOSE.
        Since:
        5.3.0
        See Also:
        UIResourceLocator
      • isCalledOnHome

        public abstract boolean isCalledOnHome()
        Deprecated.
        Returns true if the current service is called from a dataspace or snapshot menu.
        See Also:
        getCurrentHome()
      • isCalledOnInstance

        public abstract boolean isCalledOnInstance()
        Deprecated.
        Returns true if the current service is called from a dataset menu.
        See Also:
        getCurrentAdaptation()
      • isCalledOnTable

        public abstract boolean isCalledOnTable()
        Deprecated.
        Returns true if 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:
        getCurrentRequest()
      • isCalledOnHierarchyNode

        public abstract boolean isCalledOnHierarchyNode()
        Deprecated.
      • isCalledOnTableSelection

        public abstract boolean isCalledOnTableSelection()
        Deprecated.
        Returns true if 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:
        getSelectedOccurrences()
      • isCalledOnOccurrencePage

        public abstract boolean isCalledOnOccurrencePage()
        Deprecated.
        Returns true if 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:
        getCurrentAdaptation()
      • getUIComponentWriter

        public abstract UIServiceComponentWriter 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

        public abstract UIServiceComponentWriter getUIComponentWriterForJSP​(JspWriter aJspWriter)
        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 - the out buffer used to write HTML
        Since:
        5.2.0
      • getModuleName

        public abstract String getModuleName()
        Deprecated.
        Returns the name of the module that declares the service being executed.
        Since:
        5.2.3