Package lumis.portal.serialization
Interface ISerializationManager2
-
- All Known Implementing Classes:
SerializationManager2
public interface ISerializationManager2
Manager interface for portal objects serialization and deserialization- Since:
- 4.0.7
- Version:
- $Revision: 22603 $ $Date: 2019-03-28 21:05:11 -0300 (Thu, 28 Mar 2019) $
-
-
Field Summary
Fields Modifier and Type Field Description static String
ATTRIBUTE_DESERIALIZING
Attribute set in the transaction indicating that deserialization is in execution.static String
ATTRIBUTE_SERIALIZING
Attribute set in the transaction indicating that serialization is in execution.
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
beginDeserializeChannel(DeserializationContext deserializationContext)
Deserialize a channel from a xml file asynchronously.void
beginDeserializeServiceInstanceContent(DeserializationContext deserializationContext, String serviceInstanceId)
Deserialize the contents of aServiceInstanceConfig
from a xml file asynchronously.void
beginSerializeChannel(SerializationContext serializationContext)
Serialize a channel to a xml file asynchronously.String
deserializeChannel(DeserializationContext deserializationContext)
Deserialize a channel from a xml file.<T> T
deserializeObject(Class<T> objectClass, IDirectory directory, String filePath, String alias, boolean fileIsOptional)
<T> T
deserializeObject(Class<T> objectClass, IDirectory directory, String filePath, String alias, ISerializer serializer, boolean fileIsOptional)
Deserializes an object from a file in a directory.<T> T
deserializeObject(Class<T> objectClass, IDirectory directory, String filePath, String alias, SerializationSettings serializationSettings, boolean fileIsOptional)
void
deserializePage(DeserializationContext deserializationContext, String pageId, boolean setupSerializationContext, boolean checkUnresolvedDependencies)
Deserialize a page from a xml file.SerializationSettings
getExternalDependenciesSerializationSettings()
Deprecated.void
serializeChannel(SerializationContext serializationContext)
Serialize a channel to a xml file.void
serializeMap(Map<String,String> map, IDirectory directory, String filePath, String alias)
Serializes a Map object where the name and value are of type String.void
serializeObject(Object o, IDirectory directory, String filePath, String alias)
void
serializeObject(Object object, IDirectory directory, String filePath, String alias, ISerializer serializer)
Serializes an object to a file in a directory.void
serializeObject(Object o, IDirectory directory, String filePath, String alias, SerializationSettings serializationSettings)
String
serializeObjectToString(Object o, String alias)
Serialize an object to a xml String.String
serializeObjectToString(Object o, String alias, ISerializer serializer)
Serialize an object to a xml String, using a given XStream objectString
serializeObjectToString(Object o, String alias, SerializationSettings serializationSettings)
Serialize an object to a xml String, using custom serialization settingsvoid
serializePage(SerializationContext serializationContext, String pageId, boolean setupSerializationContext)
Serialize a page to a xml file.
-
-
-
Field Detail
-
ATTRIBUTE_SERIALIZING
static final String ATTRIBUTE_SERIALIZING
Attribute set in the transaction indicating that serialization is in execution.- Since:
- 5.0.0
- See Also:
- Constant Field Values
-
ATTRIBUTE_DESERIALIZING
static final String ATTRIBUTE_DESERIALIZING
Attribute set in the transaction indicating that deserialization is in execution.- Since:
- 4.2.1
- See Also:
- Constant Field Values
-
-
Method Detail
-
serializeChannel
void serializeChannel(SerializationContext serializationContext) throws ManagerException, PortalException
Serialize a channel to a xml file.- Parameters:
serializationContext
- context object that contains all operation settings- Throws:
ManagerException
PortalException
-
beginSerializeChannel
void beginSerializeChannel(SerializationContext serializationContext) throws ManagerException, PortalException
Serialize a channel to a xml file asynchronously.- Parameters:
serializationContext
- context object that contains all operation settings- Throws:
ManagerException
PortalException
-
deserializeChannel
String deserializeChannel(DeserializationContext deserializationContext) throws ManagerException, PortalException
Deserialize a channel from a xml file.- Parameters:
deserializationContext
- context object that contains all operation settings- Returns:
- Throws:
ManagerException
PortalException
-
beginDeserializeChannel
void beginDeserializeChannel(DeserializationContext deserializationContext) throws ManagerException, PortalException
Deserialize a channel from a xml file asynchronously.- Parameters:
deserializationContext
- context object that contains all operation settings- Throws:
ManagerException
PortalException
-
beginDeserializeServiceInstanceContent
void beginDeserializeServiceInstanceContent(DeserializationContext deserializationContext, String serviceInstanceId) throws ManagerException, PortalException
Deserialize the contents of aServiceInstanceConfig
from a xml file asynchronously.- Parameters:
deserializationContext
- context object that contains all operation settings.serviceInstanceId
- the service instance identifier.- Throws:
ManagerException
PortalException
- Since:
- 11.2.0
-
serializePage
void serializePage(SerializationContext serializationContext, String pageId, boolean setupSerializationContext) throws ManagerException, PortalException
Serialize a page to a xml file.- Parameters:
serializationContext
- context object that contains all operation settingspageId
- page to be serializedsetupSerializationContext
- indicates if the serialization settings must be set before the operation- Throws:
ManagerException
PortalException
-
deserializePage
void deserializePage(DeserializationContext deserializationContext, String pageId, boolean setupSerializationContext, boolean checkUnresolvedDependencies) throws ManagerException, PortalException
Deserialize a page from a xml file.- Parameters:
deserializationContext
- context object that contains all operation settingspageId
- page to be deserializedsetupSerializationContext
- indicates if the serialization settings must be set before the operationcheckUnresolvedDependencies
- indicates when the existence of unresolved dependencies must raise aSerializationException
- Throws:
ManagerException
PortalException
-
serializeObjectToString
String serializeObjectToString(Object o, String alias) throws SerializationException
Serialize an object to a xml String.- Parameters:
o
- object to be serializedalias
- alias (tag name) for the object- Returns:
- Throws:
SerializationException
-
serializeObjectToString
String serializeObjectToString(Object o, String alias, SerializationSettings serializationSettings) throws SerializationException
Serialize an object to a xml String, using custom serialization settings- Parameters:
o
- object to be serializedalias
- alias (tag name) for the objectserializationSettings
- serialization settings for the operation- Returns:
- Throws:
SerializationException
-
serializeObjectToString
String serializeObjectToString(Object o, String alias, ISerializer serializer) throws SerializationException
Serialize an object to a xml String, using a given XStream object- Parameters:
o
- object to be serializedalias
- alias (tag name) for the object.serializer
- the object serializer instance.- Returns:
- String representation of the object.
- Throws:
SerializationException
-
serializeObject
void serializeObject(Object o, IDirectory directory, String filePath, String alias) throws SerializationException
- Throws:
SerializationException
-
serializeObject
void serializeObject(Object o, IDirectory directory, String filePath, String alias, SerializationSettings serializationSettings) throws SerializationException
- Throws:
SerializationException
-
serializeObject
void serializeObject(Object object, IDirectory directory, String filePath, String alias, ISerializer serializer) throws SerializationException
Serializes an object to a file in a directory.- Parameters:
object
- the object.directory
- the directory.filePath
- the file path in the directory.alias
- the alias for the object.serializer
- the object serializer instance.- Throws:
SerializationException
- Since:
- 5.0.0
-
serializeMap
void serializeMap(Map<String,String> map, IDirectory directory, String filePath, String alias) throws SerializationException
Serializes a Map object where the name and value are of type String.- Parameters:
map
- the map object to be serialized.directory
- the directory objecto to be serialized to.filePath
- the file path within the directory.alias
- alias to use for the Map object.- Throws:
SerializationException
- Since:
- 5.0.0
-
deserializeObject
<T> T deserializeObject(Class<T> objectClass, IDirectory directory, String filePath, String alias, SerializationSettings serializationSettings, boolean fileIsOptional) throws SerializationException
- Throws:
SerializationException
-
deserializeObject
<T> T deserializeObject(Class<T> objectClass, IDirectory directory, String filePath, String alias, boolean fileIsOptional) throws SerializationException
- Throws:
SerializationException
-
deserializeObject
<T> T deserializeObject(Class<T> objectClass, IDirectory directory, String filePath, String alias, ISerializer serializer, boolean fileIsOptional) throws SerializationException
Deserializes an object from a file in a directory.- Type Parameters:
T
- the object type.- Parameters:
objectClass
- the object class type.directory
- the directory.filePath
- the file path in the directory.alias
- the alias for the object.serializer
- the object serializer instance.fileIsOptional
- iftrue
, the file may not exist, which causes the return to benull
.- Returns:
- the deserialized object, or
null
iffileIsOptional
is true and the file is not found. - Throws:
SerializationException
- Since:
- 5.0.0
-
getExternalDependenciesSerializationSettings
@Deprecated SerializationSettings getExternalDependenciesSerializationSettings()
Deprecated.
-
-