Class UIHttpManagerComponent

    • Method Detail

      • createWithURIWithParameters

        public static UIHttpManagerComponent createWithURIWithParameters​(String uriWithParameters)
        Creates an instance of this class in order to call the EBX® user interface from an external application. A URI to EBX® user interface with parameters can be specified.
        Parameters:
        uriWithParameters - URI with parameters to EBX® web application.
        Since:
        6.0.0
      • createWithBaseURI

        @Deprecated
        public static UIHttpManagerComponent createWithBaseURI​(String baseURI,
                                                               boolean enforceStrongEncoding)
        Deprecated.
        Since 5.9.0, use instead createWithBaseURI(String).
        Creates an instance of this class in order to call the EBX® user interface from an external application.
        Parameters:
        baseURI - Base URI to EBX® web application.
        enforceStrongEncoding - This parameter is now ignored.
      • createWithBaseURI

        public static UIHttpManagerComponent createWithBaseURI​(String baseURI,
                                                               AdaptationName aManagerReference)
        Creates an instance of this class in order to call the EBX® user interface from an external application.

        The default deployment requires a URL base of the following form:

        http://<host>[:<port>]/ebx/

        Or, if the Java application is running on the same application server:

        /ebx/

        Note: The URI base must refer to the servlet named com.onwbp.front.FrontServlet defined in the web application ebx.war (see file /WEB-INF/web.xml in ebx.war).

        Parameters:
        baseURI - Base URI to EBX® web application (see examples above).
        aManagerReference - Identifier of the EBX® user interface dataset (for example, ebx-manager).
      • createWithBaseURI

        @Deprecated
        public static UIHttpManagerComponent createWithBaseURI​(String baseURI,
                                                               boolean enforceStrongEncoding,
                                                               AdaptationName aManagerReference)
        Deprecated.
        Creates an instance of this class in order to call the EBX® user interface from an external application.

        The default deployment requires a URL base of the following form:

        http://<host>[:<port>]/ebx/

        Or, if the Java application is running on the same application server:

        /ebx/

        Note: The URI base must refer to the servlet named com.onwbp.front.FrontServlet defined in the web application ebx.war (see file /WEB-INF/web.xml in ebx.war).

        Parameters:
        baseURI - Base URI to EBX® web application (see examples above).
        enforceStrongEncoding - This parameter is now ignored.
        aManagerReference - Identifier of the EBX® user interface dataset (for example, ebx-manager).
      • createWithURIWithParametersForSubSession

        public static UIHttpManagerComponent createWithURIWithParametersForSubSession​(String uriWithParameters,
                                                                                      Session aSession)
        Creates an instance of this class in order to call the EBX® user interface in a separate sub-session (namely, a Web Component). As this uses a sub-session, the URL obtained by this type of component is not a permanent link (permalink). It is automatically authenticated and inherits all its properties from its parent session, except trackingInfo (these inherited properties are available using the Session interface).

        The Web Component must be invoked within a pop-up, inner pop-up, or iFrame. A standard inner pop-up can be created by using the method UIComponentWriter.buildButtonPreview(String).

        A URI to EBX® user interface, including parameters for this instance, can be specified.

        Parameters:
        uriWithParameters - URI with parameters to EBX® web application.
        aSession - Current user session in EBX® user interface.
        Since:
        6.0.0
        See Also:
        UIResourceLocator.createWebComponentForSubSession()
      • getURIWithParameters

        public String getURIWithParameters​(String aBaseURI)
      • getURIWithParameters

        public String getURIWithParameters()
        This function returns the URI to EBX® user interface, including the parameters specified by this instance.

        Note: This method may return a String whose length is not supported by the browser or the Servlet Container.

        User authentication parameters have to be added according to the current user directory implementation.

        See Also:
        Directory.authenticateUserFromHttpRequest(HttpServletRequest)
      • getHttpParameterNames

        public List<String> getHttpParameterNames()
        Returns the names of the HTTP parameters that are specified by this instance.

        Since the method getURIWithParameters() may give a URI that is too long, this method can be used for building a POST request.

        See Also:
        getHttpParameterValue(String)
      • getHttpParameterValue

        public String getHttpParameterValue​(String aParameterName)
        Returns the String value of a parameter, returns null if the parameter is not defined.

        See Also:
        getHttpParameterNames()
      • initFromHttpRequest

        public final void initFromHttpRequest​(HttpServletRequest request)
                                       throws IllegalArgumentException
        Initializes this instance with the specified incoming request.

        This method can be used to "forward" EBX® Web Component parameters to another page to perform the actual call.

        Throws:
        IllegalArgumentException
      • setUserLoginPassword

        public void setUserLoginPassword​(String userLogin,
                                         String userPassword)
        Specifies the login and password with which to authenticate the user.

        The authentication process is detailed in this class comment.

      • getHomeKey

        public HomeKey getHomeKey()
      • getXPathString

        public String getXPathString()
      • selectHome

        public void selectHome​(HomeKey aDataSpaceOrSnapshotKey)
        Selects the specified dataspace or snapshot.
        Throws:
        IllegalArgumentException - if aDataSpaceOrSnapshotKey is null.
      • selectInstance

        public void selectInstance​(HomeKey aDataSpaceOrSnapshotKey,
                                   AdaptationName aDataSetReference)
        Selects the specified dataset.
        Throws:
        IllegalArgumentException - if aDataSpaceOrSnapshotKey is null or aDataSetReference is null.
      • select

        public void select​(HomeKey aDataSpaceOrSnapshotKey,
                           AdaptationName aDataSetReference,
                           String aXPathExpression)
                    throws IllegalArgumentException
        Specifies an entity selection in the EBX® repository.

        This is the most general method of performing an entity selection.

        Parameters:
        aDataSpaceOrSnapshotKey - identifies a dataspace or a snapshot in the repository.
        aDataSetReference - identifies a dataset in the dataspace or snapshot. If null, this method is the same as selectHome(HomeKey).
        aXPathExpression - XPath expression specifying a selection in the dataset. If null and dataset not null, this method is the same as selectInstance(HomeKey, AdaptationName); if not null and the XPath expression specifies a predicate, this parameter overrides the method setPredicate.
        Throws:
        IllegalArgumentException - if aDataSpaceOrSnapshotKey is null, or aDataSetReference is null but not aXPathExpression.
        IllegalArgumentException - if aXPathExpression contains a relative path to the dataset node.
        See Also:
        setPredicate(String)
      • selectInstanceOrOccurrenceWithPredicate

        public void selectInstanceOrOccurrenceWithPredicate​(Adaptation aDataSetOrRecord,
                                                            String aPredicate)
        Selects the specified dataset or record with the specified predicate restriction.
        Parameters:
        aPredicate - the predicate that defines the selection; if not null, this parameter overrides the method setPredicate.
        Throws:
        IllegalArgumentException - if aDataSetOrRecord is null.
        See Also:
        XPath supported syntax. , setPredicate(String)
      • selectWorkflowView

        public final void selectWorkflowView​(WorkflowView aWorkflowView)
        Selects the specified workflow view using the service ServiceKey.WORKFLOW.

        Note: The method setService(ServiceKey) will override parameters that have been automatically set by this method.

        Parameters:
        aWorkflowView - the key of the workflow view to select.
        Since:
        5.4.3
      • selectPerspective

        public final void selectPerspective​(String aPerspectiveName)
        Selects the specified perspective.
        Parameters:
        aPerspectiveName - the name of the perspective to select.
        Since:
        5.9.0 fix B
      • selectPerspectiveAction

        public final void selectPerspectiveAction​(String aPerspectiveName,
                                                  String aPerspectiveActionName)
        Selects the specified perspective action.
        Parameters:
        aPerspectiveName - the name of the perspective to select.
        aPerspectiveActionName - the name of the perspective action to select.
        Since:
        5.9.0 fix B
      • setFirstCallDisplay

        public final void setFirstCallDisplay​(FirstCallDisplay aFirstCallDisplay)
        Specifies what must be displayed upon first call, either the whole tabular or hierarchical or a record.
        Since:
        5.6.1
      • setFirstCallDisplayRecord

        public final void setFirstCallDisplayRecord​(String aFirstCallDisplayPredicate)
        Specifies that a record must be displayed upon first call. If the specified predicate is not empty, the corresponding record will be opened. Otherwise, opens the first record in the request.
        Since:
        5.7.1
        See Also:
        FirstCallDisplay.record
      • setFirstCallDisplayHierarchyExpanded

        public final void setFirstCallDisplayHierarchyExpanded()
        Specifies that the hierarchy must be displayed expanded. If a predicate is specified on the target table, the hierarchy will be expanded up to the nodes that match the predicate (see select(HomeKey, AdaptationName, String)).
        Since:
        5.8.0 fix D
        See Also:
        FirstCallDisplay.view
      • getService

        public ServiceKey getService()
        Returns the service to be activated, null if no specific service has been set.
      • setService

        public void setService​(ServiceKey aServiceKey)
        Specifies the service to be activated.

        If no service is defined, the entity specified using the select... methods is selected.

        If a service is specified, it may require the selection of some entities (and additional parameters for specific services). Built-in services are documented in the class ServiceKey) and specific services are documented in their own declarations.

        Parameters:
        aServiceKey - The service that must be activated when the EBX® Web Component is called, null if no specific service is activated.
      • getCompareFilter

        public CompareFilter getCompareFilter()
        Returns the comparison filter defined for this Web Component.
        Since:
        5.4.2
      • setCompareFilter

        public void setCompareFilter​(CompareFilter compareFilter)
        Specifies the comparator filter for this Web Component.

        This property is interpreted only if the service ServiceKey.COMPARE is set.

        Since:
        5.4.2
      • setScope

        public void setScope​(UIHttpManagerComponent.Scope scope)
        Specifies the scope for this Web Component.

        If unspecified, a minimal scope will be applied and the user will only be able to work with the selected content.

        Since:
        5.2.2
      • getRedirectionURI

        public String getRedirectionURI()
        Returns the URI that will be used to redirect the user after closing a session of EBX® user interface.
      • getTrackingInfo

        public String getTrackingInfo()
        Returns tracking info for the new user session, returns null if no specific tracking info has been set.
        See Also:
        Session.getTrackingInfo()
      • setTrackingInfo

        public void setTrackingInfo​(String trackingInfo)
        Specifies tracking info for the new user session.
        See Also:
        Session.getTrackingInfo()
      • getLocale

        public Locale getLocale()
        Returns the locale specified for the new user session, returns null if no specific locale has been set.
        See Also:
        Session.getLocale()
      • setLocale

        public void setLocale​(Locale locale)
        Specifies the locale for the new user session.
        See Also:
        Session.getLocale()
      • compareSelectionWithEntity

        public void compareSelectionWithEntity​(HomeKey homeOnRightKey,
                                               AdaptationName instanceOnRight,
                                               String tableOrOccurrenceOnRight)
        Specifies the activation of the comparison service.

        The user is directed to the comparison interface:

        • The selected entity, specified by one of the select... methods, is displayed on the left side.
        • The entity that is specified by the arguments of this method is displayed on the right side..

        Entities that can be compared are: two dataspaces or versions, two datasets, two tables, or two table records.

        Parameters:
        homeOnRightKey - identifies a dataspace or a snapshot in the repository.
        instanceOnRight - identifies a dataset in the specified dataspace or snapshot, null if comparing homes. The reference to a dataset is obtained by invoking the method Adaptation.getAdaptationName().
        tableOrOccurrenceOnRight - XPath expression that specifies either a unique table record in the specified dataset, or a table, or null if comparing dat sets or homes. The XPath expression that uniquely identifies a unique table record is directly obtained by invoking the method Adaptation.toXPathExpression().
        See Also:
        select(HomeKey, AdaptationName, String)
      • getViewPublication

        public String getViewPublication()
        Returns the published custom view that will be applied to the selected content.
        Since:
        6.0.0
        See Also:
        setViewPublication(String)
      • setViewPublication

        public void setViewPublication​(String aPublication)
        Specifies the published custom view that will be applied to the selected content.

        The predicate specified by the custom view will be combined with the local predicate, if specified, as a logical 'AND' operation.

        Parameters:
        aPublication - the unique publication name of the custom view to be applied.
        Since:
        5.2.3
        See Also:
        Technical reference
      • getPerspectiveName

        public final String getPerspectiveName()
        Returns the selected perspective name.
        Since:
        6.0.0
      • showAllDataSetFeatures

        public void showAllDataSetFeatures()
        If called, all dataset features will be displayed. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.DataSetFeatures
      • showDataSetFeatures

        public void showDataSetFeatures​(List<String> aFeaturesListToDisplay)
        If called, all dataset features will be hidden except those specified by the given list. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.DataSetFeatures
      • showDataSetFeature

        public void showDataSetFeature​(String aFeature)
        If called, all dataset features will be hidden except the one specified. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.DataSetFeatures
      • hideDataSetFeatures

        public void hideDataSetFeatures​(List<String> aFeaturesListToHide)
        If called, all dataset features will be displayed except those specified by the given list. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.DataSetFeatures
      • hideDataSetFeature

        public void hideDataSetFeature​(String aFeature)
        If called, all dataset features will be displayed except the one specified. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.DataSetFeatures
      • showAllRecordFeatures

        public void showAllRecordFeatures()
        If called, all record features will be displayed. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.RecordFeatures
      • showRecordFeatures

        public void showRecordFeatures​(List<String> aFeaturesListToDisplay)
        If called, all record features will be hidden except those specified by the given list. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.RecordFeatures
      • showRecordFeature

        public void showRecordFeature​(String aFeature)
        If called, all record features will be hidden except the one specified. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.RecordFeatures
      • hideRecordFeatures

        public void hideRecordFeatures​(List<String> aFeaturesListToHide)
        If called, all record features will be displayed except those specified by the given list. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.RecordFeatures
      • hideRecordFeature

        public void hideRecordFeature​(String aFeature)
        If called, all record features will be displayed except the one specified. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.RecordFeatures
      • showAllViewFeatures

        public void showAllViewFeatures()
        If called, all table or hierarchy features will be displayed. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.ViewFeatures
      • showViewFeatures

        public void showViewFeatures​(List<String> aFeaturesListToDisplay)
        If called, all table or hierarchy features will be hidden except those specified by the given list. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.ViewFeatures
      • showViewFeature

        public void showViewFeature​(String aFeature)
        If called, all table or hierarchy features will be hidden except the one specified. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.ViewFeatures
      • hideAllViewFeatures

        public void hideAllViewFeatures()
        If called, all table or hierarchy features will be hidden.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.ViewFeatures
      • hideViewFeatures

        public void hideViewFeatures​(List<String> aFeaturesListToHide)
        If called, all table or hierarchy features will be displayed except those specified by the given list. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.ViewFeatures
      • hideViewFeature

        public void hideViewFeature​(String aFeature)
        If called, all table or hierarchy features will be displayed except the one specified. Note that the user permission will not be ignored.
        Since:
        5.4.0
        See Also:
        UIHttpManagerComponent.ViewFeatures
      • setPageSize

        public void setPageSize​(int aPageSize)
        Sets the number of rows that will be displayed per page. If a hierarchy is applied using the method setViewPublication(String), this is the number of records that will be shown for each level of the hierarchy.
        Since:
        5.4.2