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
,HtmlSnippetDouiInterface
,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="15.0", 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: 25304 $ $Date: 2022-10-22 22:51:05 -0300 (Sat, 22 Oct 2022) $
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.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(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode)
void
addDefaultDouiDefinitionValues(SessionConfig sessionConfig, ServiceInterfaceConfig serviceInterfaceConfig, org.w3c.dom.Node douiDefinitionNode, ITransaction transaction)
protected boolean
addDefaultFields(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode)
protected boolean
addDefaultFilters(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode)
protected boolean
addDefaultHyperLinks(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, ITransaction transaction)
protected org.w3c.dom.Node
addDefaultInterfaceDouiDefinitionNode(java.lang.String serviceInterfaceId, org.w3c.dom.Node serviceDouiDefinitionNode)
protected boolean
addDefaultMaxRows(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode)
protected boolean
addDefaultOrderBy(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode)
protected boolean
addDefaultPostLoadProcessors(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode)
Adds the default post load processors to the given source node.protected boolean
addDefaultProcessActions(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode)
protected boolean
addDefaultSources(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode)
protected boolean
addDetailsHyperLink(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, ITransaction transaction)
protected boolean
addPrimaryKeyFilter(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode)
protected DouiContext
getContext(IServiceInterfaceRequest request, IServiceInterfaceResponse response, ITransaction transaction)
Instantiate DouiContext with the current request and response.protected java.lang.String
getCustomMenu(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction)
protected java.lang.String
getDefaultStyle()
protected org.w3c.dom.Node
getInterfaceSourceFieldsNode(org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceSourceNode)
Utility method that merges the fields in the given nodes and returns the merged resultant node.org.w3c.dom.Node
getMenu(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction)
java.lang.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, org.w3c.dom.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
calculateIsRequestInitializerSupported, instanceAdded, instanceDeleted, instanceLoaded, instanceUnLoaded, isRequestInitializerSupported, load, unload
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface lumis.portal.serviceinterface.IServiceInterface
initializeRequest
-
-
-
-
Field Detail
-
VALIDATE_RENDER_PARAMETER
public static final java.lang.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 java.lang.String getDefaultStyle()
-
getMenu
public org.w3c.dom.Node getMenu(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction) throws PortalException
- Specified by:
getMenu
in interfaceIServiceInterfaceMenu
- Throws:
PortalException
-
getCustomMenu
protected java.lang.String getCustomMenu(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
getRepositoryMenus
public java.lang.String getRepositoryMenus(SessionConfig sessionConfig, ServiceInterfaceInstanceConfig config, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
register
public void register(SessionConfig sessionConfig, org.w3c.dom.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, org.w3c.dom.Node douiDefinitionNode, ITransaction transaction) throws PortalException
- Specified by:
addDefaultDouiDefinitionValues
in interfaceIDouiServiceInterface
- Throws:
PortalException
-
getInterfaceSourceFieldsNode
protected org.w3c.dom.Node getInterfaceSourceFieldsNode(org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.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 org.w3c.dom.Node addDefaultInterfaceDouiDefinitionNode(java.lang.String serviceInterfaceId, org.w3c.dom.Node serviceDouiDefinitionNode) throws PortalException
- Throws:
PortalException
-
addDefaultSources
protected boolean addDefaultSources(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultFields
protected boolean addDefaultFields(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultFilters
protected boolean addDefaultFilters(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultOrderBy
protected boolean addDefaultOrderBy(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultMaxRows
protected boolean addDefaultMaxRows(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultPostLoadProcessors
protected boolean addDefaultPostLoadProcessors(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.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(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDefaultHyperLinks
protected boolean addDefaultHyperLinks(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
addDefaultProcessActions
protected boolean addDefaultProcessActions(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
addDetailsHyperLink
protected boolean addDetailsHyperLink(org.w3c.dom.Node serviceInterfaceDouiDefinitionNode, org.w3c.dom.Node serviceDouiDefinitionNode, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
addPrimaryKeyFilter
protected boolean addPrimaryKeyFilter(org.w3c.dom.Node serviceInterfaceSourceNode, org.w3c.dom.Node serviceDouiDefinitionNode, org.w3c.dom.Node serviceInterfaceXmlNode) throws PortalException
- Throws:
PortalException
-
-