Class CmsStaticExportRfsRule


  • public class CmsStaticExportRfsRule
    extends java.lang.Object
    Help class for storing of rfs-rules.

    Since:
    6.0.0
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.Integer EXPORT_DEFAULT_BACKUPS
      Name for the default work path.
    • Constructor Summary

      Constructors 
      Constructor Description
      CmsStaticExportRfsRule​(java.lang.String name, java.lang.String description, java.lang.String source, java.lang.String rfsPrefix, java.lang.String exportPath, java.lang.String exportWorkPath, java.lang.Integer exportBackups, java.lang.Boolean useRelativeLinks)
      Default constructor.
      CmsStaticExportRfsRule​(java.lang.String name, java.lang.String description, java.lang.String source, java.lang.String rfsPrefix, java.lang.String exportPath, java.lang.String exportWorkPath, java.lang.Integer exportBackups, java.lang.Boolean useRelativeLinks, java.util.List<java.util.regex.Pattern> relatedSystemRes)
      Full constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addRelatedSystemRes​(java.lang.String regex)
      Adds a regular expression of related system resources.
      java.lang.String getDescription()
      Returns the description.
      java.lang.Integer getExportBackups()
      Returns the number of backups.
      java.lang.String getExportPath()
      Returns the rfs export Path.
      java.lang.String getExportPathConfigured()
      Returns the configured rfs export Path with unsubstituted context values.
      java.lang.String getExportWorkPath()
      Returns the rfs export Work Path.
      java.lang.String getExportWorkPathConfigured()
      Returns the configured rfs export Work Path with unsubstituted context values.
      java.lang.String getLocalizedRfsName​(java.lang.String rfsName, java.lang.String fileSeparator)
      Returns the rfs name for the given locale, only used for multi-language export.
      java.lang.String getName()
      Returns the name.
      java.util.List<java.util.regex.Pattern> getRelatedSystemResources()
      Returns the related system resources list as list of Pattern.
      java.lang.String getRfsPrefix()
      Returns the url Prefix with macro replacement.
      java.lang.String getRfsPrefixConfigured()
      Returns the configured url Prefix with unsubstituted context values.
      java.util.regex.Pattern getSource()
      Returns the source regular expression pattern.
      java.lang.Boolean getUseRelativeLinks()
      Returns true if the links in the static export should be relative.
      boolean match​(java.lang.String vfsName)
      Checks if a vfsName matches the given related system resource patterns.
      void setExportPath​(java.lang.String exportPath)
      Sets the rfs export Path after normalizing.
      void setExportWorkPath​(java.lang.String exportWorkPath)
      Sets the rfs export work Path after normalizing.
      void setRfsPrefix​(java.lang.String rfsPrefix)
      Sets the url Prefix after normalizing.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • EXPORT_DEFAULT_BACKUPS

        public static final java.lang.Integer EXPORT_DEFAULT_BACKUPS
        Name for the default work path.
    • Constructor Detail

      • CmsStaticExportRfsRule

        public CmsStaticExportRfsRule​(java.lang.String name,
                                      java.lang.String description,
                                      java.lang.String source,
                                      java.lang.String rfsPrefix,
                                      java.lang.String exportPath,
                                      java.lang.String exportWorkPath,
                                      java.lang.Integer exportBackups,
                                      java.lang.Boolean useRelativeLinks)
        Default constructor.

        Parameters:
        name - the name of the rule
        description - the description for the rule
        source - the source regular expression
        rfsPrefix - the url prefix
        exportPath - the rfs export path
        exportWorkPath - the rfs export work path
        exportBackups - the number of backups
        useRelativeLinks - Relative links value
      • CmsStaticExportRfsRule

        public CmsStaticExportRfsRule​(java.lang.String name,
                                      java.lang.String description,
                                      java.lang.String source,
                                      java.lang.String rfsPrefix,
                                      java.lang.String exportPath,
                                      java.lang.String exportWorkPath,
                                      java.lang.Integer exportBackups,
                                      java.lang.Boolean useRelativeLinks,
                                      java.util.List<java.util.regex.Pattern> relatedSystemRes)
        Full constructor.

        Parameters:
        name - the name of the rule
        description - the description for the rule
        source - the source regular expression
        rfsPrefix - the url prefix
        exportPath - the rfs export path
        exportWorkPath - the rfs export work path
        exportBackups - the number of backups
        useRelativeLinks - Relative links value
        relatedSystemRes - list of Patterns
    • Method Detail

      • addRelatedSystemRes

        public void addRelatedSystemRes​(java.lang.String regex)
        Adds a regular expression of related system resources.

        Parameters:
        regex - the regular expression to add
      • getDescription

        public java.lang.String getDescription()
        Returns the description.

        Returns:
        the description
      • getExportBackups

        public java.lang.Integer getExportBackups()
        Returns the number of backups.

        Returns:
        the number of backups
      • getExportPath

        public java.lang.String getExportPath()
        Returns the rfs export Path.

        Returns:
        the rfs export Path
      • getExportPathConfigured

        public java.lang.String getExportPathConfigured()
        Returns the configured rfs export Path with unsubstituted context values.

        Returns:
        the configured rfs export Path
      • getExportWorkPath

        public java.lang.String getExportWorkPath()
        Returns the rfs export Work Path.

        Returns:
        the rfs export Work Path
      • getExportWorkPathConfigured

        public java.lang.String getExportWorkPathConfigured()
        Returns the configured rfs export Work Path with unsubstituted context values.

        Returns:
        the configured rfs export Work Path
      • getLocalizedRfsName

        public java.lang.String getLocalizedRfsName​(java.lang.String rfsName,
                                                    java.lang.String fileSeparator)
        Returns the rfs name for the given locale, only used for multi-language export.

        Parameters:
        rfsName - the original rfs name
        fileSeparator - the file separator to use
        Returns:
        the rfs name for the given locale
      • getName

        public java.lang.String getName()
        Returns the name.

        Returns:
        the name
      • getRelatedSystemResources

        public java.util.List<java.util.regex.Pattern> getRelatedSystemResources()
        Returns the related system resources list as list of Pattern.

        Returns:
        the related resources list as list of Pattern
      • getRfsPrefix

        public java.lang.String getRfsPrefix()
        Returns the url Prefix with macro replacement.

        Returns:
        the url Prefix
      • getRfsPrefixConfigured

        public java.lang.String getRfsPrefixConfigured()
        Returns the configured url Prefix with unsubstituted context values.

        Returns:
        the configured url Prefix
      • getSource

        public java.util.regex.Pattern getSource()
        Returns the source regular expression pattern.

        Returns:
        the source regular expression pattern
      • getUseRelativeLinks

        public java.lang.Boolean getUseRelativeLinks()
        Returns true if the links in the static export should be relative.

        Returns:
        true if the links in the static export should be relative
      • match

        public boolean match​(java.lang.String vfsName)
        Checks if a vfsName matches the given related system resource patterns.

        Parameters:
        vfsName - the vfs name of a resource to check
        Returns:
        true if the name matches one of the given related system resource patterns
      • setExportPath

        public void setExportPath​(java.lang.String exportPath)
        Sets the rfs export Path after normalizing.

        Parameters:
        exportPath - the rfs export Path to set
      • setExportWorkPath

        public void setExportWorkPath​(java.lang.String exportWorkPath)
        Sets the rfs export work Path after normalizing.

        Parameters:
        exportWorkPath - the rfs export Work Path to set
      • setRfsPrefix

        public void setRfsPrefix​(java.lang.String rfsPrefix)
        Sets the url Prefix after normalizing.

        Parameters:
        rfsPrefix - the url Prefix to set
      • toString

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