Package lumis.portal.serialization
Class BaseSerializationContext
- java.lang.Object
-
- lumis.portal.serialization.BaseSerializationContext
-
- Direct Known Subclasses:
DeserializationContext
,SerializationContext
public class BaseSerializationContext extends java.lang.Object
Base class for Serialization Context classes- Since:
- 4.0.7
- Version:
- $Revision: 17104 $ $Date: 2015-03-17 18:18:33 -0300 (Tue, 17 Mar 2015) $
-
-
Constructor Summary
Constructors Constructor Description BaseSerializationContext(SessionConfig sessionConfig, ITransaction transaction, java.lang.String rootChannelId, IDirectory directory, boolean progressEnabled, boolean includeContent)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getCurrentChannelPath()
ISerializer
getDefaultSerializer()
Returns the default object serializer for this serialization context.IDirectory
getDirectory()
java.util.Set<java.lang.String>
getGlobalGroups()
Returns the global groups for serializing.boolean
getIncludeContent()
int
getItemProgressMax()
int
getItemProgressValue()
int
getOverallProgressMax()
int
getOverallProgressValue()
java.lang.String
getProcessId()
boolean
getProgressEnabled()
IResource
getResource()
java.lang.String
getRootChannelId()
SerializationSettings
getSerializationSettings()
SessionConfig
getSessionConfig()
long
getStartTime()
ITransaction
getTransaction()
void
incrementItemProgressValue(int increment)
void
incrementOverallProgressValue(int increment)
boolean
isShallowSerialization()
Returns whether the serialization is recursive or not.void
logDebug(java.lang.String msg)
void
logDebug(java.lang.String msg, java.lang.Object o)
void
logDebug(java.lang.String msg, java.lang.Throwable t)
void
sendProgressFinalNotification(java.lang.String message, ProgressConfig.Type type)
void
sendProgressNotification(java.lang.String message, ProgressConfig.Type type, java.lang.String innerProgressId)
void
sendProgressNotification(org.w3c.dom.Document messageDoc, java.lang.String styleFilename, ProgressConfig.Type type)
void
setCurrentChannelPath(java.lang.String currentChannelPath)
void
setDefaultSerializer(ISerializer defaultSerializer)
Sets the default object serializer for this serialization context.void
setDirectory(IDirectory directory)
void
setItemProgressMax(int itemProgressMax)
void
setItemProgressValue(int itemProgressValue)
void
setOverallProgressMax(int overallProgressMax)
void
setOverallProgressValue(int overallProgressValue)
void
setProcessId(java.lang.String processId)
void
setRootChannelId(java.lang.String rootChannelId)
void
setSerializationSettings(SerializationSettings serializationSettings)
protected void
setShallowSerialization(boolean shallowSerialization)
Sets whether the serialization will serialize the structure recursively or not.void
setStartTime(long startTimeMillis)
void
setTransaction(ITransaction transaction)
void
updateProgressBar(int incrementOverallProgress, int incrementItemProgress, java.lang.String itemName)
void
updateProgressBar(int incrementOverallProgress, java.lang.String itemName)
-
-
-
Constructor Detail
-
BaseSerializationContext
public BaseSerializationContext(SessionConfig sessionConfig, ITransaction transaction, java.lang.String rootChannelId, IDirectory directory, boolean progressEnabled, boolean includeContent)
-
-
Method Detail
-
getGlobalGroups
public java.util.Set<java.lang.String> getGlobalGroups()
Returns the global groups for serializing. These global groups will be added to the destination when imported.- Returns:
- the global groups to be serialized.
- Since:
- 4.2.1
-
getSerializationSettings
public SerializationSettings getSerializationSettings()
-
setSerializationSettings
public void setSerializationSettings(SerializationSettings serializationSettings)
-
getRootChannelId
public java.lang.String getRootChannelId()
-
setRootChannelId
public void setRootChannelId(java.lang.String rootChannelId)
-
getDirectory
public IDirectory getDirectory()
-
setDirectory
public void setDirectory(IDirectory directory)
-
getSessionConfig
public SessionConfig getSessionConfig()
-
setTransaction
public void setTransaction(ITransaction transaction)
-
getTransaction
public ITransaction getTransaction()
-
getResource
public IResource getResource()
-
getProcessId
public java.lang.String getProcessId()
-
setProcessId
public void setProcessId(java.lang.String processId)
-
getItemProgressMax
public int getItemProgressMax()
-
setItemProgressMax
public void setItemProgressMax(int itemProgressMax)
-
getItemProgressValue
public int getItemProgressValue()
-
setItemProgressValue
public void setItemProgressValue(int itemProgressValue)
-
incrementItemProgressValue
public void incrementItemProgressValue(int increment)
-
getOverallProgressMax
public int getOverallProgressMax()
-
setOverallProgressMax
public void setOverallProgressMax(int overallProgressMax)
-
incrementOverallProgressValue
public void incrementOverallProgressValue(int increment)
-
getOverallProgressValue
public int getOverallProgressValue()
-
setOverallProgressValue
public void setOverallProgressValue(int overallProgressValue)
-
getStartTime
public long getStartTime()
-
setStartTime
public void setStartTime(long startTimeMillis)
-
getIncludeContent
public boolean getIncludeContent()
-
getProgressEnabled
public boolean getProgressEnabled()
-
updateProgressBar
public void updateProgressBar(int incrementOverallProgress, java.lang.String itemName) throws PortalException
- Throws:
PortalException
-
updateProgressBar
public void updateProgressBar(int incrementOverallProgress, int incrementItemProgress, java.lang.String itemName) throws PortalException
- Throws:
PortalException
-
sendProgressNotification
public void sendProgressNotification(java.lang.String message, ProgressConfig.Type type, java.lang.String innerProgressId) throws PortalException
- Throws:
PortalException
-
sendProgressNotification
public void sendProgressNotification(org.w3c.dom.Document messageDoc, java.lang.String styleFilename, ProgressConfig.Type type) throws PortalException
- Throws:
PortalException
-
sendProgressFinalNotification
public void sendProgressFinalNotification(java.lang.String message, ProgressConfig.Type type) throws PortalException
- Throws:
PortalException
-
getCurrentChannelPath
public java.lang.String getCurrentChannelPath()
-
setCurrentChannelPath
public void setCurrentChannelPath(java.lang.String currentChannelPath)
-
logDebug
public void logDebug(java.lang.String msg)
-
logDebug
public void logDebug(java.lang.String msg, java.lang.Object o)
-
logDebug
public void logDebug(java.lang.String msg, java.lang.Throwable t)
-
getDefaultSerializer
public ISerializer getDefaultSerializer()
Returns the default object serializer for this serialization context.- Returns:
- the default object serializer.
- Since:
- 5.0.0
-
setDefaultSerializer
public void setDefaultSerializer(ISerializer defaultSerializer)
Sets the default object serializer for this serialization context.- Parameters:
defaultSerializer
- the defaultSerializer value to set.- Since:
- 5.0.0
-
setShallowSerialization
protected void setShallowSerialization(boolean shallowSerialization)
Sets whether the serialization will serialize the structure recursively or not. SeeisShallowSerialization()
for more details on recursion implications.- Parameters:
shallowSerialization
- the shallow serialization value.- Since:
- 5.0.0
-
isShallowSerialization
public boolean isShallowSerialization()
Returns whether the serialization is recursive or not. When false all sub-channels are recursively serialized. When true only the root channel and its pages, service instances, local groups, page templates, acls, and all the globally referenced css files, interface instance xsl files and global groups are exported.- Returns:
- true if shallow serialization is set, false if serialization is recursive.
- Since:
- 5.0.0
-
-