@StableMinor(version="12.4", sinceVersion="4.0") public class GenericService extends Object implements IService
Modifier and Type | Field and Description |
---|---|
protected ServiceConfig |
serviceConfig |
Constructor and Description |
---|
GenericService() |
Modifier and Type | Method and Description |
---|---|
void |
autoAddDependencies(SessionConfig sessionConfig,
ServiceInstanceConfig config,
ITransaction transaction)
Adds service specific dependencies.
|
void |
deserializeContent(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
Deserializes service instance Content.
|
Element |
getDefaultServiceInstanceMenu(ServiceInstanceConfig serviceInstance)
Returns the default service instance menu definition to use for a service instance.
|
protected String |
getResourceClassName() |
void |
instanceAdded(SessionConfig sessionConfig,
ServiceInstanceConfig config,
ITransaction transaction)
Called by the service container to indicate that a service instance has
been added.
|
void |
instanceDeleted(SessionConfig sessionConfig,
ServiceInstanceConfig config,
ITransaction transaction)
Called by the service container to indicate that a service instance is
about to be deleted.
|
void |
instanceDeserialized(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
Called after an service instance is deserialized.
|
void |
instanceDeserialized(SessionConfig sessionConfig,
String serviceInstanceId,
DeserializationConfig deserializationConfig,
Node accessControlListNode,
ITransaction transaction)
Called after an service instance is deserialized.
|
void |
instanceLoaded(ServiceInstanceConfig config)
Deprecated.
|
void |
instanceMoved(SessionConfig sessionConfig,
ServiceInstanceConfig serviceInstance,
IPortalBaseFolder oldWebRootFolder,
IPortalBaseFolder newWebRootFolder,
ITransaction transaction)
Called to indicate the given service instance has been moved from a
web root base folder to another one. |
void |
instanceMoved(SessionConfig sessionConfig,
ServiceInstanceConfig serviceInstance,
IWebsite oldWebsite,
IWebsite newWebsite,
ITransaction transaction)
Called to indicate the given service instance has been moved from a
website to another one. |
void |
instanceSerialized(ServiceInstanceSerializationContext serviceInstanceSerializationContext)
Called after the serialization of a service instance.
|
void |
instanceSerialized(SessionConfig sessionConfig,
String serviceInstanceId,
OutputStream outputStream,
ITransaction transaction)
Called after the serialization of a service instance.
|
void |
instanceUnloaded(ServiceInstanceConfig config)
Deprecated.
|
void |
load(ServiceConfig config)
Called by the service container to indicate to a service that the service
is being activated.
|
void |
postRegister(SessionConfig sessionConfig,
ServiceConfig serviceConfig,
ITransaction transaction)
Called by the service manager after a service definition is registered.
|
void |
postUnregister(SessionConfig sessionConfig,
ITransaction transaction)
Called by the service manager after a service has been unregistered.
|
void |
preRegister(SessionConfig sessionConfig,
Node serviceXmlNode,
ITransaction transaction)
Called by the service manager when a service definition is about to be
registered.
|
void |
preUnregister(SessionConfig sessionConfig,
ITransaction transaction)
Called by the service manager when a service is about to be unregistered.
|
void |
unload(ServiceConfig config)
Called by the service container to indicate to a service that the it is
being de-activated.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
checkFileAccess, instanceMoved
protected ServiceConfig serviceConfig
public void preUnregister(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
IService
preUnregister
in interface IService
sessionConfig
- the user session information.transaction
- transaction for persistence access.PortalException
public void postUnregister(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
IService
postUnregister
in interface IService
sessionConfig
- the user session information.transaction
- transaction for persistence access.PortalException
public void preRegister(SessionConfig sessionConfig, Node serviceXmlNode, ITransaction transaction) throws PortalException
IService
preRegister
in interface IService
sessionConfig
- TODOtransaction
- TODOPortalException
public void postRegister(SessionConfig sessionConfig, ServiceConfig serviceConfig, ITransaction transaction) throws PortalException
IService
postRegister
in interface IService
PortalException
protected String getResourceClassName()
public void load(ServiceConfig config) throws ServiceException, PortalException
IService
The service container calls the init
method exactly once
after instantiating the service. The init
method must
complete successfully before any interfaces are created.
The service container cannot place the service into service if the
init
method
ServiceException
load
in interface IService
config
- a ServiceConfig
object containing the service's
configuration and initialization parametersServiceException
- if an exception has occurred that interferes with the
service interface's normal operation.PortalException
public void unload(ServiceConfig config) throws ServiceException, PortalException
IService
Before the service container calls the destroy method, it should allow any threads that are currently processing requests within the service object to complete execution. To avoid waiting forever, the service container can optionally wait for a predefined time before destroying the service object.
This method enables the service to do the following:
unload
in interface IService
config
- a ServiceConfig
object containing the service's
configurationServiceException
PortalException
@Deprecated public void instanceLoaded(ServiceInstanceConfig config) throws ServiceException
IService
instanceLoaded
in interface IService
config
- a ServiceInstanceConfig
object containing the
service's configurationServiceException
@Deprecated public void instanceUnloaded(ServiceInstanceConfig config) throws ServiceException
IService
instanceUnloaded
in interface IService
config
- a ServiceInstanceConfig
object containing the
service's configurationServiceException
public void instanceDeleted(SessionConfig sessionConfig, ServiceInstanceConfig config, ITransaction transaction) throws ServiceException, PortalException
IService
instanceDeleted
in interface IService
config
- a ServiceInstanceConfig
object containing the
service's configurationServiceException
PortalException
public void instanceMoved(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstance, IWebsite oldWebsite, IWebsite newWebsite, ITransaction transaction) throws ServiceException, PortalException
IService
website
to another one. The websites are, necessarily,
different and they may be null
, but not both.instanceMoved
in interface IService
sessionConfig
- the user's session.serviceInstance
- the service instance.oldWebsite
- the old website.newWebsite
- the new website.transaction
- the transaction.ServiceException
PortalException
public void instanceMoved(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstance, IPortalBaseFolder oldWebRootFolder, IPortalBaseFolder newWebRootFolder, ITransaction transaction) throws ServiceException, PortalException
IService
web root base folder
to another one. Both
folders are necessarily not null
.instanceMoved
in interface IService
sessionConfig
- the user's session.serviceInstance
- the service instance.oldWebRootFolder
- the old web root folder.newWebRootFolder
- the new web root folder.transaction
- the transaction.ServiceException
PortalException
public void autoAddDependencies(SessionConfig sessionConfig, ServiceInstanceConfig config, ITransaction transaction) throws ServiceException, PortalException
IService
autoAddDependencies
in interface IService
ServiceException
PortalException
public void instanceDeserialized(SessionConfig sessionConfig, String serviceInstanceId, DeserializationConfig deserializationConfig, Node accessControlListNode, ITransaction transaction) throws PortalException
IService
instanceDeserialized
in interface IService
sessionConfig
- user session information.serviceInstanceId
- the service instance id.deserializationConfig
- the deserialization configuration.accessControlListNode
- the deserialized acl node.transaction
- the transaction for persistence access.PortalException
IService.instanceSerialized(SessionConfig, String, OutputStream, ITransaction)
public void instanceSerialized(SessionConfig sessionConfig, String serviceInstanceId, OutputStream outputStream, ITransaction transaction) throws PortalException
IService
#aclDeserialized
.instanceSerialized
in interface IService
sessionConfig
- user session information.serviceInstanceId
- the service instance id.outputStream
- the serialization outputStream.transaction
- the transaction for persistence access.PortalException
IService.instanceDeserialized(SessionConfig, String, DeserializationConfig, Node, ITransaction)
public void instanceAdded(SessionConfig sessionConfig, ServiceInstanceConfig config, ITransaction transaction) throws ServiceException, PortalException
IService
IService.autoAddDependencies(lumis.portal.authentication.SessionConfig, lumis.portal.serviceinstance.ServiceInstanceConfig, lumis.util.ITransaction)
method.instanceAdded
in interface IService
config
- a ServiceInstanceConfig
object containing the
service's configurationServiceException
PortalException
public void instanceDeserialized(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext) throws PortalException
IService
instanceDeserialized
in interface IService
PortalException
public void instanceSerialized(ServiceInstanceSerializationContext serviceInstanceSerializationContext) throws PortalException
IService
instanceSerialized
in interface IService
PortalException
public void deserializeContent(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext) throws PortalException
IService
deserializeContent
in interface IService
PortalException
public Element getDefaultServiceInstanceMenu(ServiceInstanceConfig serviceInstance) throws PortalException
IService
This default is used if this service does not have a explicit menu definition in its
servicedefinition.xml
.
getDefaultServiceInstanceMenu
in interface IService
serviceInstance
- the service instance.PortalException
- if the menu could not be generated.LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.