Package lumis.doui.service
Class DouiServiceInterface
- java.lang.Object
-
- lumis.portal.serviceinterface.GenericServiceInterface
-
- lumis.doui.service.DouiServiceInterface
-
- All Implemented Interfaces:
IDouiServiceInterface
,IServiceInterface
,IServiceInterfaceMenu
- Direct Known Subclasses:
ActivityStreamServiceInterface
,AddChannelTemplateInterface
,AddInterface
,AddInterface
,AddInterface
,AddInterface
,AddInterface
,AddMemberInterface
,AddMembershipInterface
,AddPropertiesXslInterface
,AddSubChannelInterface
,AddTransformationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AppliedOnChannelsInterface
,AppliedOnPagesInterface
,ApplyUpdateInterface
,BannerDouiInterface
,BuildInformationInterface
,ChannelTemplatesAdministrationInterface
,ChatRoomHistoryInterface
,ConfigureDatabaseViewGroupServiceInterface
,ContentGoogleAnalyticsInterface
,ContentServiceInterface
,DouiAdministrationPropertyPageServiceInterface
,DouiDetailsServiceInterface
,DouiGenericListServiceInterface
,EditChannelTemplateInterface
,EditInterface
,EditInterface
,EditInterface
,EditInterface
,EditInterface
,EditSubChannelInterface
,FieldsInterface
,FileManagementPropertiesInterface
,FiltersInterface
,ImportContentInterface
,ImportExportInterface
,InterfaceHolderPropertiesInterface
,LayoutElementsPropertiesInterface
,LocalGroupDouiInterface
,LocalUserDouiInterface
,LoginInterface
,LogoutInterface
,MaxRowsInterface
,MemberGroupsInterface
,MemberGroupsInterface
,MembersInterface
,NotificationsServiceInterface
,OrderByInterface
,PortalPropertiesInterface
,PreviewContentInterface
,PropertiesInterface
,PublisherFilterInterface
,PublisherFilterSelectMetaDataContentInterface
,SearchPropertiesInterfaces
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectWorkflowInterface
,ServiceInstanceGoogleAnalyticsInterface
,StructureEditorServiceInterface
,SubChannelsAdministrationInterface
,UpdateChannelsInterface
,UsedByInterface
,UserSubscriptionInterface
,UserSubscriptionInterface
,XslEditorInterface
@StableMinor(version="14.2", sinceVersion="4.0") public class DouiServiceInterface extends GenericServiceInterface implements IServiceInterfaceMenu, IDouiServiceInterface
Base service interface implementation for the doui framework.- Since:
- 4.0.0
- Version:
- $Revision: 24985 $ $Date: 2022-05-02 23:04:30 -0300 (Mon, 02 May 2022) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
VALIDATE_RENDER_PARAMETER
-
Constructor Summary
Constructors Constructor Description DouiServiceInterface()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
addDefaultControls(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode)
void
addDefaultDouiDefinitionValues(SessionConfig sessionConfig, ServiceInterfaceConfig serviceInterfaceConfig, Node douiDefinitionNode, ITransaction transaction)
protected boolean
addDefaultFields(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode)
protected boolean
addDefaultFilters(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode)
protected boolean
addDefaultHyperLinks(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, ITransaction transaction)
protected Node
addDefaultInterfaceDouiDefinitionNode(String serviceInterfaceId, Node serviceDouiDefinitionNode)
protected boolean
addDefaultMaxRows(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode)
protected boolean
addDefaultOrderBy(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode)
protected boolean
addDefaultPostLoadProcessors(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode)
Adds the default post load processors to the given source node.protected boolean
addDefaultProcessActions(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode)
protected boolean
addDefaultSources(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode)
protected boolean
addDetailsHyperLink(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, ITransaction transaction)
protected boolean
addPrimaryKeyFilter(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode)
protected DouiContext
getContext(IServiceInterfaceRequest request, IServiceInterfaceResponse response, ITransaction transaction)
Instantiate DouiContext with the current request and response.protected String
getCustomMenu(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction)
protected String
getDefaultStyle()
protected Node
getInterfaceSourceFieldsNode(Node serviceDouiDefinitionNode, Node serviceInterfaceSourceNode)
Utility method that merges the fields in the given nodes and returns the merged resultant node.Node
getMenu(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction)
String
getRepositoryMenus(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction)
protected void
initDouiContext(DouiContext douiContext)
Initialize the Doui context, source container and control container.protected void
loadFromRequest(DouiContext douiContext)
Load controls from request.protected void
loadSources(DouiContext douiContext)
Load sources.void
processAction(IServiceInterfaceActionRequest request, IServiceInterfaceActionResponse response)
Called by the service interface container to allow the service interface to process an action request.protected void
processActions(DouiContext douiContext)
Process actions.void
register(SessionConfig sessionConfig, Node serviceInterfaceXmlNode, ITransaction transaction)
Called by the service interface manager when a service interface definition is registered.void
render(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response)
Called by the service interface container to allow the service interface to generate the content of the response based on its current state.void
renderBefore(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response)
Called by the service interface container before rendering the interface client side.protected void
renderData(IServiceInterfaceRenderResponse response, DouiContext douiContext)
Render data.protected boolean
validate(DouiContext douiContext)
Executes the controls validation.-
Methods inherited from class lumis.portal.serviceinterface.GenericServiceInterface
instanceAdded, instanceDeleted, instanceLoaded, instanceUnLoaded, load, unload
-
-
-
-
Field Detail
-
VALIDATE_RENDER_PARAMETER
public static final String VALIDATE_RENDER_PARAMETER
- See Also:
- Constant Field Values
-
-
Method Detail
-
getContext
protected DouiContext getContext(IServiceInterfaceRequest request, IServiceInterfaceResponse response, ITransaction transaction) throws PortalException
Instantiate DouiContext with the current request and response.- Parameters:
request
- the request being processed.response
- the response being constructed.transaction
- the current transaction.- Returns:
- an instance of DouiContext.
- Throws:
PortalException
- if an error occur constructing DouiContext.- Since:
- 5.6.0
-
initDouiContext
protected void initDouiContext(DouiContext douiContext) throws PortalException
Initialize the Doui context, source container and control container.- Parameters:
request
- the request being processed.response
- the response instance.- Throws:
PortalException
- if an error occur during the initialization process.- Since:
- 5.6.0
-
loadFromRequest
protected void loadFromRequest(DouiContext douiContext) throws PortalException
Load controls from request.- Parameters:
douiContext
- an instance of DouiContext.- Throws:
PortalException
- if an error occur.- Since:
- 5.6.0
-
validate
protected boolean validate(DouiContext douiContext) throws PortalException
Executes the controls validation.- Parameters:
douiContext
- the DouiContext instance.- Returns:
- true if the controls are valid.
- Throws:
PortalException
- if an error occur.- Since:
- 5.6.0
-
loadSources
protected void loadSources(DouiContext douiContext) throws PortalException
Load sources.- Parameters:
douiContext
- the DouiDefinition instance.- Throws:
PortalException
- if an error occur.- Since:
- 5.6.0
-
renderData
protected void renderData(IServiceInterfaceRenderResponse response, DouiContext douiContext) throws PortalException
Render data.- Parameters:
douiContext
- DouiContext instance.- Throws:
PortalException
- if an error occur during the render process.- Since:
- 5.6.0
-
processActions
protected void processActions(DouiContext douiContext) throws PortalException
Process actions.- Parameters:
douiContext
- instance of DouiContext.request
- the request being processed.response
- the response instance.controlsValidated
- indicates if the controls are valid.- Throws:
PortalException
- if an error occur during the action process.- Since:
- 5.6.0
-
render
public void render(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response) throws ServiceInterfaceException, PortalException
Called by the service interface container to allow the service interface to generate the content of the response based on its current state.Executes the following steps (implemented by the referenced methods):
- Create the Doui context:
getContext(IServiceInterfaceRequest, IServiceInterfaceResponse, ITransaction)
- Initialize the Doui context:
initDouiContext(DouiContext)
- Load information from request:
loadFromRequest(DouiContext)
- Perform validations:
validate(DouiContext)
- Load sources:
loadSources(DouiContext)
- Render data:
renderData(IServiceInterfaceRenderResponse, DouiContext)
- Specified by:
render
in interfaceIServiceInterface
- Overrides:
render
in classGenericServiceInterface
- Parameters:
request
- the render requestresponse
- the render response- Throws:
ServiceInterfaceException
- if the service interface has problems fulfilling the rendering requestPortalException
- if the service interface is unavailable to perform render at this time
- Create the Doui context:
-
processAction
public void processAction(IServiceInterfaceActionRequest request, IServiceInterfaceActionResponse response) throws ServiceInterfaceException, PortalException
Called by the service interface container to allow the service interface to process an action request. This method is called if the client request was originated by a URL created (by the service interface) with theRenderResponse.createActionURL()
method.Typically, in response to an action request, a service interface updates state based on the information sent in the action request parameters. In an action the service interface may:
- issue a redirect
- change its window state
- change its service interface mode
- modify its persistent state
- set render parameters
A client request triggered by an action URL translates into one action request and many render requests, one per service interface in the portal page. The action processing must be finished before the render requests can be issued.
Execute the following steps (implemented by the referenced methods):
- Create the Doui context:
getContext(IServiceInterfaceRequest, IServiceInterfaceResponse, ITransaction)
- Initialize the Doui context:
initDouiContext(DouiContext)
- Load information from request:
loadFromRequest(DouiContext)
- Perform validations:
validate(DouiContext)
- Process actions:
processActions(DouiContext)
- Specified by:
processAction
in interfaceIServiceInterface
- Overrides:
processAction
in classGenericServiceInterface
- Parameters:
request
- the action requestresponse
- the action response- Throws:
ServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this time
-
renderBefore
public void renderBefore(IServiceInterfaceRenderRequest request, IServiceInterfaceRenderResponse response) throws ServiceInterfaceException, PortalException
Called by the service interface container before rendering the interface client side. This method would generally print to the beforeWriter any client side scripts that must be loaded before rendering the interface.Execute the following steps (implemented by the referenced methods):
- Create the Doui context:
getContext(IServiceInterfaceRequest, IServiceInterfaceResponse, ITransaction)
- Initialize the Doui context:
initDouiContext(DouiContext)
- Render data:
renderData(IServiceInterfaceRenderResponse, DouiContext)
- Specified by:
renderBefore
in interfaceIServiceInterface
- Overrides:
renderBefore
in classGenericServiceInterface
- Parameters:
request
- the render requestresponse
- the render response- Throws:
ServiceInterfaceException
- if the service interface has problems fulfilling the rendering requestPortalException
- if the service interface is unavailable to perform render at this time
- Create the Doui context:
-
getDefaultStyle
protected String getDefaultStyle()
-
getMenu
public Node getMenu(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction) throws PortalException
- Specified by:
getMenu
in interfaceIServiceInterfaceMenu
- Throws:
PortalException
-
getCustomMenu
protected String getCustomMenu(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
getRepositoryMenus
public String getRepositoryMenus(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
register
public void register(SessionConfig sessionConfig, Node serviceInterfaceXmlNode, ITransaction transaction) throws PortalException
Description copied from interface:IServiceInterface
Called by the service interface manager when a service interface definition is registered. This method allows the Service Interface implementation to set its default values into the service interface definition xml.- Specified by:
register
in interfaceIServiceInterface
- Overrides:
register
in classGenericServiceInterface
- Parameters:
sessionConfig
- TODOtransaction
- TODO- Throws:
PortalException
-
addDefaultDouiDefinitionValues
public void addDefaultDouiDefinitionValues(SessionConfig sessionConfig, ServiceInterfaceConfig serviceInterfaceConfig, Node douiDefinitionNode, ITransaction transaction) throws PortalException
- Specified by:
addDefaultDouiDefinitionValues
in interfaceIDouiServiceInterface
- Throws:
PortalException
-
getInterfaceSourceFieldsNode
protected Node getInterfaceSourceFieldsNode(Node serviceDouiDefinitionNode, Node serviceInterfaceSourceNode) throws PortalException
Utility method that merges the fields in the given nodes and returns the merged resultant node. This method is intented to be used as a way to have access to the fields definition that will exist in the final interface source (that consists in this merge).- Parameters:
serviceDouiDefinitionNode
- the service doui definition node.serviceInterfaceSourceNode
- the service interface source node.- Returns:
- a fields node, with the merged information.
- Throws:
PortalException
- Since:
- 4.0.5
-
addDefaultInterfaceDouiDefinitionNode
protected Node addDefaultInterfaceDouiDefinitionNode(String serviceInterfaceId, Node serviceDouiDefinitionNode) throws PortalException
- Throws:
PortalException
-
addDefaultSources
protected boolean addDefaultSources(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultFields
protected boolean addDefaultFields(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultFilters
protected boolean addDefaultFilters(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultOrderBy
protected boolean addDefaultOrderBy(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultMaxRows
protected boolean addDefaultMaxRows(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultPostLoadProcessors
protected boolean addDefaultPostLoadProcessors(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode) throws PortalException
Adds the default post load processors to the given source node.- Parameters:
serviceInterfaceSourceNode
- the service interface source node.serviceDouiDefinitionNode
- the service doui definition node.serviceInterfaceXmlNode
- the interface doui definition node.- Returns:
- true if post load processors were added, false otherwise.
- Throws:
PortalException
- Since:
- 5.6.0
-
addDefaultControls
protected boolean addDefaultControls(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultHyperLinks
protected boolean addDefaultHyperLinks(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
addDefaultProcessActions
protected boolean addDefaultProcessActions(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDetailsHyperLink
protected boolean addDetailsHyperLink(Node serviceInterfaceDouiDefinitionNode, Node serviceDouiDefinitionNode, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
addPrimaryKeyFilter
protected boolean addPrimaryKeyFilter(Node serviceInterfaceSourceNode, Node serviceDouiDefinitionNode, Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
-