@StableMinor(version="12.4", sinceVersion="10.4") public class ContentService extends DouiService implements IServiceClockDefinitionProvider
A content service extends the doui service including meta-data information to existing data.
The following are the standard meta-data extensions that content adds to the doui framework.
serviceConfig
Constructor and Description |
---|
ContentService() |
Modifier and Type | Method and Description |
---|---|
boolean |
checkFileAccess(FileConfig file)
Returns whether the current user has access to the given file.
|
void |
deleteContent(SessionConfig sessionConfig,
ServiceInstanceConfig config,
ITransaction transaction) |
void |
deserializeContent(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
Deserializes service instance Content.
|
Node |
getClocks(SessionConfig sessionConfig,
ServiceConfig config,
ITransaction transaction) |
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 serviceInstanceConfig,
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 node,
ITransaction transaction)
Called after an service instance is deserialized.
|
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 |
postRegister(SessionConfig sessionConfig,
ServiceConfig serviceConfig,
ITransaction transaction)
Called by the service manager after a service definition is registered.
|
void |
preUnregister(SessionConfig sessionConfig,
ITransaction transaction)
Called by the service manager when a service is about to be unregistered.
|
protected void |
registerActivityObjectTypes(ServiceConfig serviceConfig,
Node serviceDefinitionNode)
Registers
object types of the activity stream framework that contents of this service
are considered of. |
IServiceInterfaceUrl |
resolveHyperLink(SessionConfig sessionConfig,
HyperLinkConfig hyperLinkConfig,
ITransaction transaction)
Resolves an hyperlink to the corresponding URL.
|
protected Node |
setMetaDataField(Node source,
String metaDataAtributeName,
String fieldId,
String fieldName,
String fieldDataType,
boolean display) |
protected Node |
setMetaDataFieldIfRequested(String propertyName,
Node source,
Node metaDataNode,
String metaDataAttributeName,
String fieldId,
String fieldName,
String fieldDataType) |
protected void |
setMetaDataFields(Node douiDefinitionNode)
Detects the meta-data configurations and converts them to the appropriate source fields.
|
protected void |
setSourceFieldAttributes(SessionConfig sessionConfig,
ServiceConfig serviceConfig,
Node douiDefinitionNode,
ITransaction transaction) |
protected void |
unregisterActivityObjectTypes()
Unregister
activity object types . |
addDefaultDouiDefinitionValues, autoAddDependencies, hasHtmlField, restCallProcessAction, restDoProcessAction, restDoProcessActionWithActionId, restGetProcessActionRestHelp, restLumGetDataGet, restLumGetDataPost, setDataTypeAttributes, setDisplayAttributes, setIncludeAlwaysAttributes, setLookupAttributes, setPositionAttributes, setPriorityOptions, setValidationAttributes, usesDocumentService, usesFileManager, usesImageService, usesMediaRepository, usesWidgetRepository
instanceLoaded, instanceMoved, instanceMoved, instanceUnloaded, load, postUnregister, preRegister, unload
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
instanceLoaded, instanceMoved, instanceMoved, instanceMoved, instanceUnloaded, load, postUnregister, preRegister, unload
public Node getClocks(SessionConfig sessionConfig, ServiceConfig config, ITransaction transaction) throws PortalException
getClocks
in interface IServiceClockDefinitionProvider
PortalException
public void preUnregister(SessionConfig sessionConfig, ITransaction transaction) throws PortalException
IService
preUnregister
in interface IService
preUnregister
in class DouiService
sessionConfig
- the user session information.transaction
- transaction for persistence access.PortalException
protected void unregisterActivityObjectTypes() throws PortalException
activity object types
.
Called by preUnregister(SessionConfig, ITransaction)
.
PortalException
public void postRegister(SessionConfig sessionConfig, ServiceConfig serviceConfig, ITransaction transaction) throws PortalException
IService
postRegister
in interface IService
postRegister
in class DouiService
PortalException
protected void registerActivityObjectTypes(ServiceConfig serviceConfig, Node serviceDefinitionNode) throws PortalException
object types
of the activity stream framework that contents of this service
are considered of.
Called by postRegister(SessionConfig, ServiceConfig, ITransaction)
.
serviceConfig
- the service being registered.serviceDefinitionNode
- the service definition node.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
getDefaultServiceInstanceMenu
in class DouiService
serviceInstance
- the service instance.PortalException
- if the menu could not be generated.public void instanceAdded(SessionConfig sessionConfig, ServiceInstanceConfig serviceInstanceConfig, ITransaction transaction) throws ServiceException, PortalException
IService
IService.autoAddDependencies(lumis.portal.authentication.SessionConfig, lumis.portal.serviceinstance.ServiceInstanceConfig, lumis.util.ITransaction)
method.instanceAdded
in interface IService
instanceAdded
in class DouiService
serviceInstanceConfig
- a ServiceInstanceConfig
object containing the
service's configurationServiceException
PortalException
public void instanceDeleted(SessionConfig sessionConfig, ServiceInstanceConfig config, ITransaction transaction) throws ServiceException, PortalException
IService
instanceDeleted
in interface IService
instanceDeleted
in class DouiService
config
- a ServiceInstanceConfig
object containing the
service's configurationServiceException
PortalException
public void deleteContent(SessionConfig sessionConfig, ServiceInstanceConfig config, ITransaction transaction) throws PortalException
PortalException
protected String getResourceClassName()
getResourceClassName
in class DouiService
protected void setSourceFieldAttributes(SessionConfig sessionConfig, ServiceConfig serviceConfig, Node douiDefinitionNode, ITransaction transaction) throws PortalException
setSourceFieldAttributes
in class DouiService
PortalException
protected void setMetaDataFields(Node douiDefinitionNode) throws PortalException
The following is a list of fields that always are included for content data regardless of what meta-data is specified
douiDefinitionNode
- PortalException
protected Node setMetaDataFieldIfRequested(String propertyName, Node source, Node metaDataNode, String metaDataAttributeName, String fieldId, String fieldName, String fieldDataType) throws PortalException
PortalException
protected Node setMetaDataField(Node source, String metaDataAtributeName, String fieldId, String fieldName, String fieldDataType, boolean display) throws PortalException
PortalException
public void instanceDeserialized(SessionConfig sessionConfig, String serviceInstanceId, DeserializationConfig deserializationConfig, Node node, ITransaction transaction) throws PortalException
IService
instanceDeserialized
in interface IService
instanceDeserialized
in class GenericService
sessionConfig
- user session information.serviceInstanceId
- the service instance id.deserializationConfig
- the deserialization configuration.node
- 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
instanceSerialized
in class GenericService
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 instanceDeserialized(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext) throws PortalException
IService
instanceDeserialized
in interface IService
instanceDeserialized
in class DouiService
PortalException
public void instanceSerialized(ServiceInstanceSerializationContext serviceInstanceSerializationContext) throws PortalException
IService
instanceSerialized
in interface IService
instanceSerialized
in class GenericService
PortalException
public void deserializeContent(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext) throws PortalException
IService
deserializeContent
in interface IService
deserializeContent
in class GenericService
PortalException
public IServiceInterfaceUrl resolveHyperLink(SessionConfig sessionConfig, HyperLinkConfig hyperLinkConfig, ITransaction transaction) throws PortalException
DouiService
DouiService delegates this resolution to a DouiHyperLinkResolver
.
resolveHyperLink
in interface IHyperLinkResolver
resolveHyperLink
in class DouiService
sessionConfig
- the user session information.hyperLinkConfig
- hyperlink informationtransaction
- the transaction for persistence access.PortalException
public boolean checkFileAccess(FileConfig file) throws PortalException
IService
checkFileAccess
in interface IService
file
- the file.PortalException
LumisXP 12.4.0.200625 - Copyright © 2006–2020 Lumis EIP Tecnologia da Informação LTDA. All Rights Reserved.