Class CmsSynchronizeSettings

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

public class CmsSynchronizeSettings extends Object implements Serializable
Contains the settings for the synchronization.

Since:
6.0.0
See Also:
  • Constructor Details

  • Method Details

    • 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

      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

      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(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(List<String> 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 String toString()
      Overrides:
      toString in class Object
      See Also:
    • optimizeSourceList

      protected List<String> optimizeSourceList(List<String> 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