Interface IServiceInterface
-
- All Known Implementing Classes:
ActivityStreamServiceInterface
,AddChannelTemplateInterface
,AddInterface
,AddInterface
,AddInterface
,AddInterface
,AddInterface
,AddMemberInterface
,AddMembershipInterface
,AddPropertiesXslInterface
,AddSubChannelInterface
,AddTransformationInterface
,AddWebsiteServiceInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AdministrationInterface
,AiAssistantServiceInterface
,AnalyticsHolderServiceInterface
,AppliedOnChannelsInterface
,AppliedOnPagesInterface
,ApplyUpdateInterface
,BannerDouiInterface
,BuildInformationInterface
,ChannelTemplatesAdministrationInterface
,ChatRoomHistoryInterface
,ChatRoomParticipateInterface
,CommentListServiceInterface
,CommentQuickListServiceInterface
,CommunityAdministratorAddServiceInterface
,CommunityEditServiceInterface
,CommunityMembershipRequestsServiceInterface
,ConfigureDatabaseViewGroupServiceInterface
,ContentAdministrationAddPropertyPageServiceInterface
,ContentAdministrationEditPropertyPageServiceInterface
,ContentAdministrationEmbeddedAddPropertyPageServiceInterface
,ContentAdministrationListServiceInterface
,ContentAdministrationPropertyPageServiceInterface
,ContentDetailsServiceInterface
,ContentGenericListServiceInterface
,ContentListServiceInterface
,ContentQuickListServiceInterface
,ContentServiceInterface
,CreateProjectServiceInterface
,DisplayHtml
,DocumentEditServiceInterface
,DouiAdministrationAddPropertyPageServiceInterface
,DouiAdministrationEditPropertyPageServiceInterface
,DouiAdministrationEmbeddedAddPropertyPageServiceInterface
,DouiAdministrationListServiceInterface
,DouiAdministrationPropertyPageServiceInterface
,DouiDetailsServiceInterface
,DouiGenericListServiceInterface
,DouiListServiceInterface
,DouiQuickListServiceInterface
,DouiServiceInterface
,EditChannelTemplateInterface
,EditFieldsServiceInterface
,EditInterface
,EditInterface
,EditInterface
,EditInterface
,EditInterface
,EditSubChannelInterface
,EditTransformationInterface
,EditWebsiteServiceInterface
,FieldsInterface
,FileManagementPropertiesInterface
,FiltersInterface
,GenericServiceInterface
,HierarchicalContentAdministrationInterface
,HierarchicalContentDetailsInterface
,HolderServiceInterface
,HtmlContentDetailsInterface
,HtmlSnippetDouiAdminAddInterface
,HtmlSnippetDouiAdminEditInterface
,HtmlSnippetDouiAdminListInterface
,HtmlSnippetDouiInterface
,ImportContentInterface
,ImportExportInterface
,InterfaceHolderPropertiesInterface
,LayoutElementsPropertiesInterface
,LocalGroupDouiInterface
,LocalUserDouiInterface
,LoginInterface
,LogoutInterface
,MaxRowsInterface
,MediaEditServiceInterface
,MemberGroupsInterface
,MemberGroupsInterface
,MembersInterface
,NotificationsServiceInterface
,OrderByInterface
,PageBlockViewInterface
,PortalPropertiesInterface
,PortletServiceInterface
,PositionFieldOrderInterface
,PreviewContentInterface
,PreviewServiceInterface
,PropertiesInterface
,PublisherFilterInterface
,PublisherFilterSelectMetaDataContentInterface
,RemotePortletServiceInterface
,SearchPropertiesInterfaces
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectRepositoryInterface
,SelectVersionInterface
,SelectWorkflowInterface
,ServiceInterfaceHolder
,SocialNetworkAccountAddPropertyPage
,StructureEditorServiceInterface
,StyledServiceInterface
,SubChannelsAdministrationInterface
,ThemeAdministrationPropertyPage
,UFrameServiceInterface
,UpdateChannelsInterface
,UsedByInterface
,UserSubscriptionInterface
,UserSubscriptionInterface
,VirtualAssistantFloatingChatInterface
,WebPage
,WebServiceViewer
,WidgetListServiceInterface
,XslEditorInterface
@StableMinor(version="17.0", sinceVersion="4.0") public interface IServiceInterface
TheServiceInterface
interface is used by the service interface container to invoke the service interfaces. Every service interface has to implement this interface, either by directly implementing it, or by using an existing class implementing the ServiceInterface interface.A service interface is a Java technology-based web component. It is managed by the service interface container and processes requests and generates dynamic content as response. ServiceInterfaces are used by portals as pluggable user interface components.
The content generated by a service interface is called a fragment. A fragment is a piece of markup (e.g. HTML, XHTML, WML) adhering to certain rules and can be aggregated with other fragments into a complete document. The content of a service interface is normally aggregated with the content of other service interfaces into the portal page.
The service interface container instanciates service interfaces, manages their lifecycle and invoking them to process requests. The lifecycle consists of:
- initializing the service interface using using the
init
method - request processsing
- taking the service interface out of service using the
destroy
method
Request processing is divided into two types:
- action requests handled through the
processAction
method, to perform actions targeted to the service interface - render requests handled through the
render
method, to perform the render operation
- Since:
- 4.0.9
- Version:
- $Revision$ $Date$
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
initializeRequest(IServiceInterfaceRequest originalRequest, IRequestInitializer requestInitializer)
Initializes the request by changing the given request initializer.void
instanceAdded(ServiceInterfaceInstanceConfig config, ITransaction transaction)
Called by the service container to indicate that a service interface instance has been addedvoid
instanceDeleted(ServiceInterfaceInstanceConfig config)
Called by the service container to indicate that a service interface instance has been deletedvoid
instanceLoaded(ServiceInterfaceInstanceConfig config)
void
instanceUnLoaded(ServiceInterfaceInstanceConfig config)
Called by the service container to indicate that a service interface instance is about to be destroyeddefault boolean
isRequestInitializerSupported(ServiceInterfaceConfig serviceInterface)
Returns whether the given service interface supports request initialization.void
load(ServiceInterfaceConfig config)
Called by the service interface container to indicate to a service interface that the service interface is being placed into service.void
processAction(IServiceInterfaceActionRequest request, IServiceInterfaceActionResponse response)
Called by the service interface container to allow the service interface to process an action request.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.void
unload()
Called by the service interface container to indicate to a service interface that the service interface is being taken out of service.
-
-
-
Method Detail
-
register
void register(SessionConfig sessionConfig, org.w3c.dom.Node serviceInterfaceXmlNode, ITransaction transaction) throws PortalException
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.- Parameters:
sessionConfig
- TODOserviceInterfaceXmlNode
-transaction
- TODO- Throws:
PortalException
-
load
void load(ServiceInterfaceConfig config) throws ServiceInterfaceException, PortalException
Called by the service interface container to indicate to a service interface that the service interface is being placed into service.The service interface container calls the
init
method exactly once after instantiating the service interface. Theinit
method must complete successfully before the service interface can receive any requests.The service interface container cannot place the service interface into service if the
init
method- Throws a
ServiceInterfaceException
- Does not return within a time period defined by the service interface container.
- Parameters:
config
- aServiceInterfaceConfig
object containing the service interface's configuration and initialization parameters- Throws:
ServiceInterfaceException
- if an exception has occurred that interferes with the service interface's normal operation.PortalException
- if the service interface cannot perform the initialization at this time.
- Throws a
-
unload
void unload() throws ServiceInterfaceException, PortalException
Called by the service interface container to indicate to a service interface that the service interface is being taken out of service.Before the service interface container calls the destroy method, it should allow any threads that are currently processing requests within the service interface object to complete execution. To avoid waiting forever, the service interface container can optionally wait for a predefined time before destroying the service interface object.
This method enables the service interface to do the following:
- clean up any resources that it holds (for example, memory, file handles, threads)
- make sure that any persistent state is synchronized with the service interface current state in memory.
- Throws:
ServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this time
-
instanceLoaded
void instanceLoaded(ServiceInterfaceInstanceConfig config) throws ServiceInterfaceException, PortalException
- Parameters:
config
- aServiceInterfaceInstanceConfig
object containing the service interface instance's configuration and initialization parameters- Throws:
ServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this time
-
instanceUnLoaded
void instanceUnLoaded(ServiceInterfaceInstanceConfig config) throws ServiceInterfaceException, PortalException
Called by the service container to indicate that a service interface instance is about to be destroyed- Parameters:
config
- aServiceInterfaceInstanceConfig
object containing the service interface instance's configuration and initialization parameters- Throws:
ServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this time
-
instanceAdded
void instanceAdded(ServiceInterfaceInstanceConfig config, ITransaction transaction) throws ServiceInterfaceException, PortalException
Called by the service container to indicate that a service interface instance has been added- Parameters:
config
- aServiceInterfaceInstanceConfig
object containing the service interface instance's configuration and initialization parameters- Throws:
ServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this time
-
instanceDeleted
void instanceDeleted(ServiceInterfaceInstanceConfig config) throws ServiceInterfaceException, PortalException
Called by the service container to indicate that a service interface instance has been deleted- Parameters:
config
- aServiceInterfaceInstanceConfig
object containing the service interface instance's configuration and initialization parameters- Throws:
ServiceInterfaceException
- if the service interface has problems fulfilling the requestPortalException
- if the service interface is unavailable to process the action at this time
-
processAction
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.
- 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
-
render
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.- 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
-
renderBefore
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.- 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
-
isRequestInitializerSupported
default boolean isRequestInitializerSupported(ServiceInterfaceConfig serviceInterface) throws PortalException
Returns whether the given service interface supports request initialization.- Parameters:
serviceInterface
- the service interface- Returns:
- whether the given service interface supports request initialization.
- Throws:
PortalException
- Since:
- 15.0.0
-
initializeRequest
default void initializeRequest(IServiceInterfaceRequest originalRequest, IRequestInitializer requestInitializer) throws PortalException
Initializes the request by changing the given request initializer.- Parameters:
originalRequest
- the original requestrequestInitializer
- the request initializer- Throws:
PortalException
- Since:
- 15.0.0
-
-