lumis.doui.service
Class DouiServiceInterface

Package class diagram package DouiServiceInterface
java.lang.Object
  extended by lumis.portal.serviceinterface.GenericServiceInterface
      extended by lumis.doui.service.DouiServiceInterface
All Implemented Interfaces:
IDouiServiceInterface, IServiceInterface, IServiceInterfaceMenu
Direct Known Subclasses:
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, ConfigureURLShortenerServiceInterface, ContentServiceInterface, DouiAdministrationPropertyPageServiceInterface, DouiDetailsServiceInterface, DouiGenericListServiceInterface, EditChannelTemplateInterface, EditInterface, EditInterface, EditInterface, EditInterface, EditInterface, EditSubChannelInterface, FieldsInterface, FileManagementPropertiesInterface, FiltersInterface, ImportExportInterface, InterfaceHolderPropertiesInterface, LayoutElementsPropertiesInterface, LocalGroupDouiInterface, LocalUserDouiInterface, LoginInterface, LogoutInterface, MaxRowsInterface, MemberGroupsInterface, MemberGroupsInterface, MembersInterface, OrderByInterface, PortalPropertiesInterface, PreviewServiceInterface, PropertiesInterface, SearchPropertiesInterfaces, SelectRepositoryInterface, SelectRepositoryInterface, SelectRepositoryInterface, SelectRepositoryInterface, SelectVersionInterface, SelectWorkflowInterface, SubChannelsAdministrationInterface, UpdateChannelsInterface, UsedByInterface, UserSubscriptionInterface, UserSubscriptionInterface, XslEditorInterface

@StableMinor(version="6.2",
             sinceVersion="4.0")
public class DouiServiceInterface
extends GenericServiceInterface
implements IServiceInterfaceMenu, IDouiServiceInterface

Base service interface implementation for the doui framework.

Since:
4.0.0

Field Summary
static String VALIDATE_RENDER_PARAMETER
           
 
Constructor Summary
DouiServiceInterface()
           
 
Method Summary
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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VALIDATE_RENDER_PARAMETER

public static final String VALIDATE_RENDER_PARAMETER
See Also:
Constant Field Values
Constructor Detail

DouiServiceInterface

public DouiServiceInterface()
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):

Specified by:
render in interface IServiceInterface
Overrides:
render in class GenericServiceInterface
Parameters:
request - the render request
response - the render response
Throws:
ServiceInterfaceException - if the service interface has problems fulfilling the rendering request
PortalException - if the service interface is unavailable to perform render at this time

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 the RenderResponse.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:

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):

Specified by:
processAction in interface IServiceInterface
Overrides:
processAction in class GenericServiceInterface
Parameters:
request - the action request
response - the action response
Throws:
ServiceInterfaceException - if the service interface has problems fulfilling the request
PortalException - 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):

Specified by:
renderBefore in interface IServiceInterface
Overrides:
renderBefore in class GenericServiceInterface
Parameters:
request - the render request
response - the render response
Throws:
ServiceInterfaceException - if the service interface has problems fulfilling the rendering request
PortalException - if the service interface is unavailable to perform render at this time

getDefaultStyle

protected String getDefaultStyle()

getMenu

public Node getMenu(SessionConfig sessionConfig,
                    ServiceInterfaceInstanceConfig config,
                    ITransaction transaction)
             throws PortalException
Specified by:
getMenu in interface IServiceInterfaceMenu
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 interface IServiceInterface
Overrides:
register in class GenericServiceInterface
Parameters:
sessionConfig - TODO
transaction - TODO
Throws:
PortalException

addDefaultDouiDefinitionValues

public void addDefaultDouiDefinitionValues(SessionConfig sessionConfig,
                                           ServiceInterfaceConfig serviceInterfaceConfig,
                                           Node douiDefinitionNode,
                                           ITransaction transaction)
                                    throws PortalException
Specified by:
addDefaultDouiDefinitionValues in interface IDouiServiceInterface
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


Lumisportal  6.2.0.120405 - Copyright © 2006–2012 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.