Class ContentServiceSerializationManager
- java.lang.Object
-
- 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
- Version:
- $Revision: 24707 $ $Date: 2021-09-13 09:33:01 -0300 (Mon, 13 Sep 2021) $
-
-
Constructor Summary
Constructors Constructor Description ContentServiceSerializationManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
deserialize(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
Deserialize a content service instance (structure only).protected void
deserializeAttachedFiles(lumis.content.service.serialization.ContentServiceSerializationManager.FileTableSerializableConfig fileList, ServiceInstanceDeserializationContext serviceInstanceDeserializationContext, Set<String> ignoredDataFullPaths)
Detectes the files names that need to be deserialized and creates the files in the data directory.void
deserializeContent(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
Deserialize a content service instance (content only).protected void
deserializeData(lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentData, ServiceInstanceDeserializationContext serviceInstanceDeserializationContext)
Deserializes the given content into the respective tables.protected Set<String>
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 Set<String>
deserializeTableDataFile(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig tableConfig, int fileNum, boolean progressEnabled, ITransaction transaction)
void
serialize(ServiceInstanceSerializationContext serviceInstanceSerializationContext)
Serialize a content service instance (content and structure).protected void
serializeAllContentMetadata(ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig, String serviceInstanceId)
protected void
serializeAllFileData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig, String serviceInstanceId)
protected void
serializeAllTransformedFileData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig, String serviceInstanceId)
Serializes physical files that were transformed from a FileConfig.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
serializeContentMetaData(String query, String tableName, ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig, String serviceInstanceId, ITransaction transaction)
protected void
serializeData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig)
Serializes the content data to a the given StringBuilder.protected void
serializeQueryResults(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
-
-
-
Method Detail
-
serialize
public void serialize(ServiceInstanceSerializationContext serviceInstanceSerializationContext) throws PortalException
Description copied from interface:IContentServiceSerializationManager
Serialize a content service instance (content and structure).- Specified by:
serialize
in interfaceIContentServiceSerializationManager
- 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
-
serializeAllFileData
protected void serializeAllFileData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig, String serviceInstanceId) throws PortalException
- Throws:
PortalException
-
serializeAllTransformedFileData
protected void serializeAllTransformedFileData(ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig, String serviceInstanceId) throws PortalException
Serializes physical files that were transformed from a FileConfig.- Parameters:
serviceInstanceSerializationContext
-contentConfig
-serviceInstanceId
-- Throws:
PortalException
- Since:
- 6.1.0
-
serializeAllContentMetadata
protected void serializeAllContentMetadata(ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig, String serviceInstanceId) throws PortalException
- Throws:
PortalException
-
serializeContentMetaData
protected void serializeContentMetaData(String query, String tableName, ServiceInstanceSerializationContext serviceInstanceSerializationContext, lumis.content.service.serialization.ContentServiceSerializationManager.ContentSerializableConfig contentConfig, String serviceInstanceId, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
serializeQueryResults
protected void serializeQueryResults(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
-
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 PortalException
Serializes the given file into the serialization context.- Parameters:
serializationContext
-filePath
-- Throws:
SerializationException
PortalException
- Since:
- 4.0.11
-
deserialize
public void deserialize(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext) throws PortalException
Description copied from interface:IContentServiceSerializationManager
Deserialize a content service instance (structure only).- Specified by:
deserialize
in interfaceIContentServiceSerializationManager
- Throws:
PortalException
-
deserializeContent
public void deserializeContent(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext) throws PortalException
Description copied from interface:IContentServiceSerializationManager
Deserialize a content service instance (content only).- Specified by:
deserializeContent
in interfaceIContentServiceSerializationManager
- Parameters:
serviceInstanceDeserializationContext
- context of deserialization- 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, Set<String> ignoredDataFullPaths) 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 Set<String> 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
- TODOtransaction
-tableDataNode
-- Throws:
PortalException
- Since:
- 4.0.11
-
deserializeTableDataFile
protected Set<String> deserializeTableDataFile(ServiceInstanceDeserializationContext serviceInstanceDeserializationContext, String sourceId, lumis.content.service.serialization.ContentServiceSerializationManager.TableSerializableConfig tableConfig, int fileNum, boolean progressEnabled, ITransaction transaction) throws PortalException
- Throws:
PortalException
-
-