Class DouiService

    • Constructor Detail

      • DouiService

        public DouiService()
    • Method Detail

      • restLumGetDataPost

        @Path("/lumgetdata/{restInterfaceName}")
        @POST
        @Produces({"application/json","application/xml"})
        public final Response restLumGetDataPost​(@PathParam("restShortName")
                                                 String restShortName,
                                                 @PathParam("restInterfaceName")
                                                 String restInterfaceName,
                                                 @Context
                                                 HttpServletRequest servletRequest)
        Sub-resource to treats request on POST HTTP method. This sub-resource is responsible for load a REST interface and return the information as JSON or XML format.
        Parameters:
        restShortName - instance of service target that the information will be loaded.
        restInterfaceName - name of the rest interface that will be loaded, optionally including an extension (.json or .xml) used to choose the response format.
        servletRequest - request object that contains all information that was sent by user.
        Returns:
        returns the information loaded from rest interface as JSON or XML format.
        Since:
        6.1.0
      • restLumGetDataGet

        @Path("/lumgetdata/{restInterfaceName}")
        @GET
        @Produces({"application/json","application/xml"})
        public final Response restLumGetDataGet​(@PathParam("restShortName")
                                                String restShortName,
                                                @PathParam("restInterfaceName")
                                                String restInterfaceName,
                                                @Context
                                                HttpServletRequest servletRequest)
        Sub-resource to treats request on GET HTTP method. This sub-resource is responsible for load a REST interface and return the information as JSON or XML format.
        Parameters:
        restShortName - instance of service target that the information will be loaded.
        restInterfaceName - name of the rest interface that will be loaded, optionally including an extension (.json or .xml) used to choose the response format.
        servletRequest - request object that contains all information that was sent by user.
        Returns:
        returns the information loaded from rest interface as JSON or XML format.
        Since:
        6.1.0
      • restDoProcessAction

        @Path("/lumPA/{interfaceSimpleId: [a-zA-Z][\\w]*}.json")
        @POST
        public final Response restDoProcessAction​(@PathParam("interfaceSimpleId")
                                                  String interfaceSimpleId,
                                                  @PathParam("restShortName")
                                                  String restShortName,
                                                  @QueryParam("lumActionId")
                                                  String lumActionId,
                                                  @Context
                                                  UriInfo uriInfo,
                                                  @Context
                                                  HttpServletRequest request)
        Process action call API.
        This method is intended to be used typically, but not limited to, from the browser, for those who want to execute a given process action.
        Before call this API, user must already have performed any required authentication.
        The default implementation will return:
        • 307 redirect to the URL that will perform the process action.
        • Bad request (400) if there's something wrong with the request.
        • Forbidden (403) if user has no permission to perform the given request.
        • Internal server error (500) if something went wrong during the processing.

        To override the default behavior, override the method restCallProcessAction(String, String, String, UriInfo).
        Parameters:
        interfaceSimpleId - The target interface simple identifier. It is the part after the last '.' character of interface identifier.
        restShortName - The target service instance's rest short name.
        lumActionId - the target process action identifier.
        uriInfo - the URI information about the request.
        request - the request.
        Returns:
        the Response to be sent to the client.
        Since:
        10.4.0
      • restDoProcessActionWithActionId

        @Path("/lumPA/{interfaceSimpleId: [a-zA-Z][\\w]*}/{lumActionId: [a-zA-Z][\\w]*}.json")
        @POST
        public final Response restDoProcessActionWithActionId​(@PathParam("interfaceSimpleId")
                                                              String interfaceSimpleId,
                                                              @PathParam("restShortName")
                                                              String restShortName,
                                                              @PathParam("lumActionId")
                                                              String lumActionId,
                                                              @Context
                                                              UriInfo uriInfo,
                                                              @Context
                                                              HttpServletRequest request)
        Process action call API.
        This method is intended to be used typically, but not limited to, from the browser, for those who want to execute a given process action.
        Before call this API, user must already have performed any required authentication.
        The default implementation will return:
        • 307 redirect to the URL that will perform the process action.
        • Bad request (400) if there's something wrong with the request.
        • Forbidden (403) if user has no permission to perform the given request.
        • Internal server error (500) if something went wrong during the processing.

        To override the default behavior, override the method restCallProcessAction(String, String, String, UriInfo).
        Parameters:
        interfaceSimpleId - The target interface simple identifier. It is the part after the last '.' character of interface identifier.
        restShortName - The target service instance's rest short name.
        lumActionId - the target process action identifier.
        uriInfo - the URI information about the request.
        request - the request.
        Returns:
        the Response to be sent to the client.
        Since:
        10.4.0
      • restCallProcessAction

        protected Response restCallProcessAction​(String interfaceSimpleId,
                                                 String restShortName,
                                                 String lumActionId,
                                                 UriInfo uriInfo)
        Process action call API.
        This method is intended to be used typically, but not limited to, from the browser, for those who want to execute a given process action.
        Before call this API, user must already have performed any required authentication.
        The default implementation will return:
        • 307 redirect to the URL that will perform the process action.
        • Bad request (400) if there's something wrong with the request.
        • Forbidden (403) if user has no permission to perform the given request.
        • Internal server error (500) if something went wrong during the processing.

        In the default implementation, this method is called by both restDoProcessAction(String, String, String, UriInfo, HttpServletRequest) and restDoProcessActionWithActionId(String, String, String, UriInfo, HttpServletRequest).
        Parameters:
        interfaceSimpleId - The target interface simple identifier. It is the part after the last '.' character of interface identifier.
        restShortName - The target service instance's rest short name.
        lumActionId - the target process action identifier.
        uriInfo - the URI information about the request.
        Returns:
        the Response to be sent to the client.
        Since:
        10.4.0
      • restGetProcessActionRestHelp

        @Path("/lumPA/{interfaceSimpleId: [a-zA-Z][\\w]*}/help")
        @GET
        public Response restGetProcessActionRestHelp​(@PathParam("interfaceSimpleId")
                                                     String interfaceSimpleId,
                                                     @PathParam("restShortName")
                                                     String restShortName,
                                                     @Context
                                                     HttpServletRequest req,
                                                     @Context
                                                     HttpServletResponse resp)
                                              throws Exception
        Returns the help for the process action call of the given service interface in the given service instance (given in form of rest short name).
        In the default implementation, this method will find all data controls of the requested interface and will write as an HTML response the parameters described by IDataControl.getRequestHelpDefinition(). The default implementation will return:
        • An HTML (response code 200) with the parameters.
        • Bad request (400) if there's something wrong with the request.
        • Forbidden (403) if user has no permission to perform the given request.
        • Internal server error (500) if something went wrong during the processing.
        Parameters:
        interfaceSimpleId - The target interface simple identifier. It is the part after the last '.' character of interface identifier.
        restShortName - The target service instance's rest short name.
        req - The Servlet request.
        resp - The Servlet response.
        Returns:
        the response code.
        Throws:
        Exception
        Since:
        10.4.0
      • usesImageService

        @Deprecated
        public boolean usesImageService​(ITransaction transaction)
                                 throws PortalException
        Deprecated.
        Description copied from interface: IDouiService
        Indicates if this service uses an image service (as repository, for example).
        Specified by:
        usesImageService in interface IDouiService
        Parameters:
        transaction - the transaction for persistence access.
        Returns:
        true if this service uses a image service, false otherwise.
        Throws:
        PortalException
      • usesMediaRepository

        public boolean usesMediaRepository​(ITransaction transaction)
                                    throws PortalException
        Description copied from interface: IDouiService
        Indicates if this service may use a media repository.
        Specified by:
        usesMediaRepository in interface IDouiService
        Parameters:
        transaction - the transaction for persistence access.
        Returns:
        true if this service may use a media service, false otherwise.
        Throws:
        PortalException
      • usesDocumentService

        public boolean usesDocumentService​(ITransaction transaction)
                                    throws PortalException
        Description copied from interface: IDouiService
        Indicates if this service uses a document service (as repository, for example).
        Specified by:
        usesDocumentService in interface IDouiService
        Parameters:
        transaction - the transaction for persistence access.
        Returns:
        true if this service uses a document service, false otherwise.
        Throws:
        PortalException
      • usesWidgetRepository

        public boolean usesWidgetRepository​(ITransaction transaction)
                                     throws PortalException
        Description copied from interface: IDouiService
        Indicates if this service uses a widget repository.
        Specified by:
        usesWidgetRepository in interface IDouiService
        Parameters:
        transaction - the transaction for persistence access.
        Returns:
        true if this service uses a widget repository, false otherwise.
        Throws:
        PortalException
      • hasHtmlField

        public boolean hasHtmlField​(ITransaction transaction)
                             throws PortalException
        Description copied from interface: IDouiService
        Indicates if this service has an html field.
        Specified by:
        hasHtmlField in interface IDouiService
        Parameters:
        transaction - the transaction for persistence access.
        Returns:
        true if this service has an html field, false otherwise.
        Throws:
        PortalException
      • setDataTypeAttributes

        protected void setDataTypeAttributes​(Node douiDefinitionNode,
                                             ITransaction transaction)
                                      throws PortalException
        Replace number data type for integer data type, for backward compatibility.
        Parameters:
        douiDefinitionNode - the doui definition to adjust.
        transaction - the transaction for persistence access.
        Throws:
        PortalException
        Since:
        4.0.4
      • setPositionAttributes

        protected void setPositionAttributes​(Node douiDefinitionNode,
                                             ITransaction transaction)
                                      throws PortalException
        Sets default attribute values for position field.
        Parameters:
        douiDefinitionNode - the douidefinition xml node.
        transaction - the transaction for persistence access.
        Throws:
        PortalException
        Since:
        10.3.0