lumis.content.service.serialization
Class ContentServiceSerializationManager

Package class diagram package ContentServiceSerializationManager
java.lang.Object
  extended by lumis.content.service.serialization.ContentServiceSerializationManager
All Implemented Interfaces:
IContentServiceSerializationManager

public class ContentServiceSerializationManager
extends Object
implements IContentServiceSerializationManager

Manager for Content Service serialization

Since:
4.0.8

Constructor Summary
ContentServiceSerializationManager()
           
 
Method Summary
protected  int countData(Node sourceNode, ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSourceSerializableConfig source)
           
 void deserialize(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
          Deserialize a content service instance (structure only: content was not yet implemented).
protected  void deserializeAttachedFiles(lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileList, ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
          Detectes the files names that need to be deserialized and creates the files in the data directory.
protected  void deserializeData(lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentData, ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
          Deserializes the given content into the respective tables.
protected  void deserializeTableData(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig tableConfig, boolean progressEnabled, ITransaction transaction)
          Reads the table name, column names and row data from the given xml node and deserializes the data into the appropriate table.
protected  void deserializeTableDataFile(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig tableConfig, int fileNum, boolean progressEnabled, ITransaction transaction)
           
protected  void getFileData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData, Collection<String> fileIds, ITransaction transaction)
          Serializes the file xml data into the given StringBuilder variable fileData.
protected  int getFileDataCount(ServiceInstanceSerializationContext serviceInstanceSerializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData, Collection<String> fileIds, ITransaction transaction)
           
protected  void getFilesData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig filesData, lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig filesListData, Collection<String> filesIds, ITransaction transaction)
          Serializes the files xml data into the given StringBuilder variable fileData.
protected  int getFilesDataCount(ServiceInstanceSerializationContext serviceInstanceSerializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig filesData, lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig filesListData, Collection<String> filesIds, ITransaction transaction)
           
protected  void getMetaDataAssociatedData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig resultsStructure, String metaDataId, ITransaction transaction)
          Serializes the content metadata associated data into the given StringBuilder.
protected  void getQueryData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig tableSerializedData, String query, String filterFieldValue, ITransaction transaction)
          Executes and serializes the query results into the given StringBuilder
protected  int getQueryDataCount(String query, String filterFieldValue, ITransaction transaction)
          Returns a query data's row count
protected  void getTableData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig resultsStructure, String filterFieldId, String filterFieldValue, ITransaction transaction)
          Serializes the table data into the given StringBuilder.
protected  int getTableDataCount(lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig resultsStructure, String filterFieldId, String filterFieldValue, ITransaction transaction)
          Returns a table data's row count
protected  void loadData(Node sourceNode, ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSourceSerializableConfig source)
          Serializes all data, metadata and files associated with the given source.
protected  void loadData(Node sourceNode, ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSourceSerializableConfig source, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSourceSerializableConfig relatedSource, Node sourceRelationNode)
           
 void serialize(ServiceInstanceSerializationContext serviceInstanceSerializationContext)
          Serialize a content service instance (structure only: content was not yet implemented).
protected  void serializeAttachedFile(ServiceInstanceSerializationContext serializationContext, String filePath)
          Serializes the given file into the serialization context.
protected  void serializeAttachedFiles(ServiceInstanceSerializationContext serializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData)
          Serializes all referenced files in the variable filesXmlString into the serialization context.
protected  void serializeData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig)
          Serializes the content data to a the given StringBuilder.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentServiceSerializationManager

public ContentServiceSerializationManager()
Method Detail

deserialize

public void deserialize(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
                 throws PortalException
Description copied from interface: IContentServiceSerializationManager
Deserialize a content service instance (structure only: content was not yet implemented).

Specified by:
deserialize in interface IContentServiceSerializationManager
Throws:
PortalException

deserializeData

protected void deserializeData(lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentData,
                               ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
                        throws PortalException
Deserializes the given content into the respective tables.

Parameters:
contentData -
serviceInstanceDeserializationContext -
Throws:
PortalException
Since:
4.0.11

deserializeAttachedFiles

protected void deserializeAttachedFiles(lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileList,
                                        ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
                                 throws PortalException
Detectes the files names that need to be deserialized and creates the files in the data directory.

Parameters:
fileDataNode -
serviceInstanceDeserializationContext -
Throws:
PortalException
Since:
4.0.11

deserializeTableData

protected void deserializeTableData(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext,
                                    String sourceId,
                                    lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig tableConfig,
                                    boolean progressEnabled,
                                    ITransaction transaction)
                             throws PortalException
Reads the table name, column names and row data from the given xml node and deserializes the data into the appropriate table.

Parameters:
progressEnabled - TODO
transaction -
tableDataNode -
Throws:
PortalException
Since:
4.0.11

deserializeTableDataFile

protected void deserializeTableDataFile(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext,
                                        String sourceId,
                                        lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig tableConfig,
                                        int fileNum,
                                        boolean progressEnabled,
                                        ITransaction transaction)
                                 throws PortalException
Throws:
PortalException

serialize

public void serialize(ServiceInstanceSerializationContext serviceInstanceSerializationContext)
               throws PortalException
Description copied from interface: IContentServiceSerializationManager
Serialize a content service instance (structure only: content was not yet implemented).

Specified by:
serialize in interface IContentServiceSerializationManager
Throws:
PortalException

serializeData

protected void serializeData(ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                             lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig)
                      throws PortalException
Serializes the content data to a the given StringBuilder.

This method parses the douidefinition of the given content service and for each source that is of type 'contentTable' and that has a 'table' tag within it, it reads the table data with all the related metadata and puts this information in an xml string stored in the contentData variable passed in.

If any source has field data types of file or files, the respective files are also included in the exported data.

Parameters:
serviceInstanceSerializationContext -
contentData -
Throws:
PortalException
Since:
4.0.11

loadData

protected void loadData(Node sourceNode,
                        ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                        lumis.content.service.serialization.ContentServiceSerializationManager.ContentSourceSerializableConfig source)
                 throws PortalException
Serializes all data, metadata and files associated with the given source.

Parameters:
sourceNode -
tableName -
serviceInstanceSerializationContext -
contentData -
Throws:
PortalException
Since:
4.0.11

loadData

protected void loadData(Node sourceNode,
                        ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                        lumis.content.service.serialization.ContentServiceSerializationManager.ContentSourceSerializableConfig source,
                        lumis.content.service.serialization.ContentServiceSerializationManager.ContentSourceSerializableConfig relatedSource,
                        Node sourceRelationNode)
                 throws PortalException
Throws:
PortalException

countData

protected int countData(Node sourceNode,
                        ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                        lumis.content.service.serialization.ContentServiceSerializationManager.ContentSourceSerializableConfig source)
                 throws PortalException
Throws:
PortalException

serializeAttachedFiles

protected void serializeAttachedFiles(ServiceInstanceSerializationContext serializationContext,
                                      lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData)
                               throws PortalException
Serializes all referenced files in the variable filesXmlString into the serialization context.

Parameters:
serializationContext -
filesXmlString -
Throws:
PortalException
Since:
4.0.11

serializeAttachedFile

protected void serializeAttachedFile(ServiceInstanceSerializationContext serializationContext,
                                     String filePath)
                              throws SerializationException
Serializes the given file into the serialization context.

Parameters:
serializationContext -
filePath -
Throws:
SerializationException
Since:
4.0.11

getFileData

protected void getFileData(ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                           String sourceId,
                           lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData,
                           Collection<String> fileIds,
                           ITransaction transaction)
                    throws PortalException
Serializes the file xml data into the given StringBuilder variable fileData.

Parameters:
fileData -
fileIds -
transaction -
Throws:
PortalException
Since:
4.0.11

getFileDataCount

protected int getFileDataCount(ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                               String sourceId,
                               lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData,
                               Collection<String> fileIds,
                               ITransaction transaction)
                        throws PortalException
Throws:
PortalException

getFilesData

protected void getFilesData(ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                            String sourceId,
                            lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig filesData,
                            lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData,
                            lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig filesListData,
                            Collection<String> filesIds,
                            ITransaction transaction)
                     throws PortalException
Serializes the files xml data into the given StringBuilder variable fileData.

Parameters:
filesData -
fileData -
filesListData -
filesIds -
transaction -
Throws:
PortalException
Since:
4.0.11

getFilesDataCount

protected int getFilesDataCount(ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                                String sourceId,
                                lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig filesData,
                                lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileData,
                                lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig filesListData,
                                Collection<String> filesIds,
                                ITransaction transaction)
                         throws PortalException
Throws:
PortalException

getMetaDataAssociatedData

protected void getMetaDataAssociatedData(ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                                         String sourceId,
                                         lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig resultsStructure,
                                         String metaDataId,
                                         ITransaction transaction)
                                  throws PortalException
Serializes the content metadata associated data into the given StringBuilder.

Parameters:
resultsData -
associatedTable -
metaDataId -
transaction -
Throws:
PortalException
Since:
4.0.11

getTableData

protected void getTableData(ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                            String sourceId,
                            lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig resultsStructure,
                            String filterFieldId,
                            String filterFieldValue,
                            ITransaction transaction)
                     throws PortalException
Serializes the table data into the given StringBuilder.

Parameters:
filterFieldId -
filterFieldValue -
transaction -
resultsData -
tableName -
Throws:
PortalException
Since:
4.0.11

getTableDataCount

protected int getTableDataCount(lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig resultsStructure,
                                String filterFieldId,
                                String filterFieldValue,
                                ITransaction transaction)
                         throws PortalException
Returns a table data's row count

Parameters:
serviceInstanceSerializationContext -
sourceId -
resultsStructure -
filterFieldId -
filterFieldValue -
transaction -
Returns:
Throws:
PortalException

getQueryDataCount

protected int getQueryDataCount(String query,
                                String filterFieldValue,
                                ITransaction transaction)
                         throws PortalException
Returns a query data's row count

Parameters:
query -
filterFieldValue -
transaction -
Returns:
Throws:
PortalException

getQueryData

protected void getQueryData(ServiceInstanceSerializationContext serviceInstanceSerializationContext,
                            String sourceId,
                            lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig tableSerializedData,
                            String query,
                            String filterFieldValue,
                            ITransaction transaction)
                     throws PortalException
Executes and serializes the query results into the given StringBuilder

Parameters:
query -
filterFieldValue -
transaction -
queryResultsData -
tableName -
Throws:
PortalException
Since:
4.0.11


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