org.opencms.synchronize
Class CmsSynchronizeSettings

java.lang.Object
  extended by org.opencms.synchronize.CmsSynchronizeSettings
All Implemented Interfaces:
java.io.Serializable

public class CmsSynchronizeSettings
extends java.lang.Object
implements java.io.Serializable

Contains the settings for the synchronization.

Since:
6.0.0
Version:
$Revision: 1.18 $
Author:
Alexander Kandzior
See Also:
Serialized Form

Constructor Summary
CmsSynchronizeSettings()
          Empty constructor, called from the configuration.
 
Method Summary
 void checkValues(CmsObject cms)
          Performs a check if the values that have been set are valid.
 java.lang.String getDestinationPathInRfs()
          Returns the destination path of the synchronization in the "real" file system.
 java.util.List getSourceListInVfs()
          Returns the source path list of the synchronization in the OpenCms VFS.
 boolean isEnabled()
          Returns the enabled flag which indicates if this synchronize settings are enabled or not.
 boolean isSyncEnabled()
          Returns true if the synchonization is enabled.
protected  java.util.List optimizeSourceList(java.util.List sourceListInVfs)
          Optimizes the list of VFS source files by removing all resources that have a parent resource already included in the list.
 void setDestinationPathInRfs(java.lang.String destinationPathInRfs)
          Sets the destination path of the synchronization in the "real" file system.
 void setEnabled(boolean enabled)
          Sets the enabled flag which indicates if this synchronize settings are enabled or not.
 void setSourceListInVfs(java.util.List sourceListInVfs)
          Sets the source path list of the synchronization in the OpenCms VFS.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CmsSynchronizeSettings

public CmsSynchronizeSettings()
Empty constructor, called from the configuration.

Method Detail

checkValues

public void checkValues(CmsObject cms)
                 throws CmsException
Performs a check if the values that have been set are valid.

Parameters:
cms - the current users OpenCms context
Throws:
CmsException - in case the values are not valid

getDestinationPathInRfs

public java.lang.String getDestinationPathInRfs()
Returns the destination path of the synchronization in the "real" file system.

Returns:
the destination path of the synchronization in the "real" file system

getSourceListInVfs

public java.util.List getSourceListInVfs()
Returns the source path list of the synchronization in the OpenCms VFS.

The objects in the list are of type String.

Returns:
the source path list of the synchronization in the OpenCms VFS

isEnabled

public boolean isEnabled()
Returns the enabled flag which indicates if this synchronize settings are enabled or not.

Returns:
the enabled flag

isSyncEnabled

public boolean isSyncEnabled()
Returns true if the synchonization is enabled.

The synchonization is enabled if both source and destination path is set, and also the enabled flag is true.

Returns:
true if the synchonization is enabled

setDestinationPathInRfs

public void setDestinationPathInRfs(java.lang.String destinationPathInRfs)
Sets the destination path of the synchronization in the "real" file system.

Parameters:
destinationPathInRfs - the destination path of the synchronization in the "real" file system to set

setEnabled

public void setEnabled(boolean enabled)
Sets the enabled flag which indicates if this synchronize settings are enabled or not.

Parameters:
enabled - the enabled flag to set

setSourceListInVfs

public void setSourceListInVfs(java.util.List sourceListInVfs)
Sets the source path list of the synchronization in the OpenCms VFS.

The objects in the list must be of type String.

Parameters:
sourceListInVfs - the source path list of the synchronization in the OpenCms VFS to set

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

optimizeSourceList

protected java.util.List optimizeSourceList(java.util.List sourceListInVfs)
Optimizes the list of VFS source files by removing all resources that have a parent resource already included in the list.

Parameters:
sourceListInVfs - the list of VFS resources to optimize
Returns:
the optimized result list