Package org.opencms.synchronize
Class CmsSynchronizeSettings
java.lang.Object
org.opencms.synchronize.CmsSynchronizeSettings
- All Implemented Interfaces:
Serializable
Contains the settings for the synchronization.
- Since:
- 6.0.0
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkValues
(CmsObject cms) Performs a check if the values that have been set are valid.Returns the destination path of the synchronization in the "real" file system.Returns the source path list of the synchronization in the OpenCms VFS.boolean
Returns the enabled flag which indicates if this synchronize settings are enabled or not.boolean
Returnstrue
if the synchonization is enabled.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.void
setDestinationPathInRfs
(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
(List<String> sourceListInVfs) Sets the source path list of the synchronization in the OpenCms VFS.toString()
-
Constructor Details
-
CmsSynchronizeSettings
public CmsSynchronizeSettings()Empty constructor, called from the configuration.
-
-
Method Details
-
checkValues
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
Returns the enabled flag which indicates if this synchronize settings are enabled or not.- Returns:
- the enabled flag
-
isSyncEnabled
Returnstrue
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
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
Sets the enabled flag which indicates if this synchronize settings are enabled or not.- Parameters:
enabled
- the enabled flag to set
-
setSourceListInVfs
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
-
optimizeSourceList
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
-