lumis.content.service
Class ContentService

Package class diagram package ContentService
java.lang.Object
  extended by lumis.portal.service.GenericService
      extended by lumis.doui.service.DouiService
          extended by lumis.content.service.ContentService
All Implemented Interfaces:
IDouiService, IHyperLinkResolver, IService, IServiceClockDefinitionProvider
Direct Known Subclasses:
ChatRoomService, ColService, NavigationService

@StableMinor(version="4.1",
             sinceVersion="4.0")
public class ContentService
extends DouiService
implements IServiceClockDefinitionProvider

Service with content capabilities base implementation.

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.

Since:
4.0.0

Field Summary
 
Fields inherited from class lumis.portal.service.GenericService
serviceConfig
 
Constructor Summary
ContentService()
           
 
Method Summary
 void deleteContent(SessionConfig sessionConfig, ServiceInstanceConfig config, ITransaction transaction)
           
protected  void deleteData(SessionConfig sessionConfig, ServiceInstanceConfig config, List<String> itemIdsTemp, Node currentSourceDefinitionNode, ITransaction transaction)
           
protected  void deleteRelatedData(SessionConfig sessionConfig, ServiceInstanceConfig config, Collection<String> itemIdsTemp, Node currentSourceDefinitionNode, String foreignPrimaryKeyFieldId, ITransaction transaction)
           
protected  void deleteRelatedFiles(SessionConfig sessionConfig, ServiceInstanceConfig config, Collection<String> itemIdsTemp, Node currentSourceDefinitionNode, String primaryKeyFieldId, ITransaction transaction)
           
 Node getClocks(SessionConfig sessionConfig, ServiceConfig config, ITransaction transaction)
           
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  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)
           
 
Methods inherited from class lumis.doui.service.DouiService
addDefaultDouiDefinitionValues, autoAddDependencies, resolveHyperLink, setDataTypeAttributes, setDisplayAttributes, setIncludeAlwaysAttributes, setLookupAttributes, setPriorityOptions, setValidationAttributes, usesDocumentService, usesFileManager, usesImageService
 
Methods inherited from class lumis.portal.service.GenericService
instanceLoaded, instanceUnloaded, load, postUnregister, preRegister, 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.service.IService
instanceLoaded, instanceUnloaded, load, postUnregister, preRegister, unload
 

Constructor Detail

ContentService

public ContentService()
Method Detail

getClocks

public Node getClocks(SessionConfig sessionConfig,
                      ServiceConfig config,
                      ITransaction transaction)
               throws PortalException
Specified by:
getClocks in interface IServiceClockDefinitionProvider
Throws:
PortalException

preUnregister

public void preUnregister(SessionConfig sessionConfig,
                          ITransaction transaction)
                   throws PortalException
Description copied from interface: IService
Called by the service manager when a service is about to be unregistered.

Specified by:
preUnregister in interface IService
Overrides:
preUnregister in class DouiService
Parameters:
sessionConfig - the user session information.
transaction - transaction for persistence access.
Throws:
PortalException

postRegister

public void postRegister(SessionConfig sessionConfig,
                         ServiceConfig serviceConfig,
                         ITransaction transaction)
                  throws PortalException
Description copied from interface: IService
Called by the service manager after a service definition is registered. This method allows the Service implementation to perform any custom registration that the service may require.

Specified by:
postRegister in interface IService
Overrides:
postRegister in class DouiService
Throws:
PortalException

instanceAdded

public void instanceAdded(SessionConfig sessionConfig,
                          ServiceInstanceConfig serviceInstanceConfig,
                          ITransaction transaction)
                   throws ServiceException,
                          PortalException
Description copied from interface: IService
Called by the service container to indicate that a service instance has been added. Dependencies between services must never be created inside this method. Dependencies must be created in the IService.autoAddDependencies(lumis.portal.authentication.SessionConfig, lumis.portal.serviceinstance.ServiceInstanceConfig, lumis.util.ITransaction) method.

Specified by:
instanceAdded in interface IService
Overrides:
instanceAdded in class DouiService
serviceInstanceConfig - a ServiceInstanceConfig object containing the service's configuration
Throws:
ServiceException
PortalException

instanceDeleted

public void instanceDeleted(SessionConfig sessionConfig,
                            ServiceInstanceConfig config,
                            ITransaction transaction)
                     throws ServiceException,
                            PortalException
Description copied from interface: IService
Called by the service container to indicate that a service instance is about to be deleted.

Specified by:
instanceDeleted in interface IService
Overrides:
instanceDeleted in class GenericService
config - a ServiceInstanceConfig object containing the service's configuration
Throws:
ServiceException
PortalException

deleteContent

public void deleteContent(SessionConfig sessionConfig,
                          ServiceInstanceConfig config,
                          ITransaction transaction)
                   throws PortalException
Throws:
PortalException

deleteData

protected void deleteData(SessionConfig sessionConfig,
                          ServiceInstanceConfig config,
                          List<String> itemIdsTemp,
                          Node currentSourceDefinitionNode,
                          ITransaction transaction)
                   throws PortalException
Throws:
PortalException

deleteRelatedData

protected void deleteRelatedData(SessionConfig sessionConfig,
                                 ServiceInstanceConfig config,
                                 Collection<String> itemIdsTemp,
                                 Node currentSourceDefinitionNode,
                                 String foreignPrimaryKeyFieldId,
                                 ITransaction transaction)
                          throws PortalException
Throws:
PortalException

deleteRelatedFiles

protected void deleteRelatedFiles(SessionConfig sessionConfig,
                                  ServiceInstanceConfig config,
                                  Collection<String> itemIdsTemp,
                                  Node currentSourceDefinitionNode,
                                  String primaryKeyFieldId,
                                  ITransaction transaction)
                           throws PortalException
Throws:
PortalException

getResourceClassName

protected String getResourceClassName()
Overrides:
getResourceClassName in class DouiService

setSourceFieldAttributes

protected void setSourceFieldAttributes(SessionConfig sessionConfig,
                                        ServiceConfig serviceConfig,
                                        Node douiDefinitionNode,
                                        ITransaction transaction)
                                 throws PortalException
Overrides:
setSourceFieldAttributes in class DouiService
Throws:
PortalException

setMetaDataFields

protected void setMetaDataFields(Node douiDefinitionNode)
                          throws PortalException
Detects the meta-data configurations and converts them to the appropriate source fields.

The following is a list of fields that always are included for content data regardless of what meta-data is specified

The following is the mapping between a meta-data configuration and the source field Ids created.

Parameters:
douiDefinitionNode -
Throws:
PortalException
Since:
4.0.0

setMetaDataFieldIfRequested

protected Node setMetaDataFieldIfRequested(String propertyName,
                                           Node source,
                                           Node metaDataNode,
                                           String metaDataAttributeName,
                                           String fieldId,
                                           String fieldName,
                                           String fieldDataType)
                                    throws PortalException
Throws:
PortalException

setMetaDataField

protected Node setMetaDataField(Node source,
                                String metaDataAtributeName,
                                String fieldId,
                                String fieldName,
                                String fieldDataType,
                                boolean display)
                         throws PortalException
Throws:
PortalException

instanceDeserialized

public void instanceDeserialized(SessionConfig sessionConfig,
                                 String serviceInstanceId,
                                 DeserializationConfig deserializationConfig,
                                 Node node,
                                 ITransaction transaction)
                          throws PortalException
Description copied from interface: IService
Called after an service instance is deserialized.

Specified by:
instanceDeserialized in interface IService
Overrides:
instanceDeserialized in class GenericService
Parameters:
sessionConfig - user session information.
serviceInstanceId - the service instance id.
deserializationConfig - the deserialization configuration.
node - the deserialized acl node.
transaction - the transaction for persistence access.
Throws:
PortalException
See Also:
IService.instanceSerialized(SessionConfig, String, OutputStream, ITransaction)

instanceSerialized

public void instanceSerialized(SessionConfig sessionConfig,
                               String serviceInstanceId,
                               OutputStream outputStream,
                               ITransaction transaction)
                        throws PortalException
Description copied from interface: IService
Called after the serialization of a service instance. The service may add custom information on the output stream, and they will be available during #aclDeserialized.

Specified by:
instanceSerialized in interface IService
Overrides:
instanceSerialized in class GenericService
Parameters:
sessionConfig - user session information.
serviceInstanceId - the service instance id.
outputStream - the serialization outputStream.
transaction - the transaction for persistence access.
Throws:
PortalException
See Also:
IService.instanceDeserialized(SessionConfig, String, DeserializationConfig, Node, ITransaction)

instanceDeserialized

public void instanceDeserialized(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
                          throws PortalException
Description copied from interface: IService
Called after an service instance is deserialized.

Specified by:
instanceDeserialized in interface IService
Overrides:
instanceDeserialized in class GenericService
Throws:
PortalException

instanceSerialized

public void instanceSerialized(ServiceInstanceSerializationContext serviceInstanceSerializationContext)
                        throws PortalException
Description copied from interface: IService
Called after the serialization of a service instance. The service may serialize additional structure or data

Specified by:
instanceSerialized in interface IService
Overrides:
instanceSerialized in class GenericService
Throws:
PortalException


Lumisportal  4.1.0.071221 - Copyright © 2001-2007, Lumis. All Rights Reserved.