Class CmsStaticExportRfsRule

java.lang.Object
org.opencms.staticexport.CmsStaticExportRfsRule

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

Since:
6.0.0
  • Field Details

  • Constructor Details

    • CmsStaticExportRfsRule

      public CmsStaticExportRfsRule(String name, String description, String source, String rfsPrefix, String exportPath, String exportWorkPath, Integer exportBackups, 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(String name, String description, String source, String rfsPrefix, String exportPath, String exportWorkPath, Integer exportBackups, Boolean useRelativeLinks, List<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 Details

    • addRelatedSystemRes

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

      Parameters:
      regex - the regular expression to add
    • getDescription

      Returns the description.

      Returns:
      the description
    • getExportBackups

      Returns the number of backups.

      Returns:
      the number of backups
    • getExportPath

      Returns the rfs export Path.

      Returns:
      the rfs export Path
    • getExportPathConfigured

      Returns the configured rfs export Path with unsubstituted context values.

      Returns:
      the configured rfs export Path
    • getExportWorkPath

      Returns the rfs export Work Path.

      Returns:
      the rfs export Work Path
    • getExportWorkPathConfigured

      Returns the configured rfs export Work Path with unsubstituted context values.

      Returns:
      the configured rfs export Work Path
    • getLocalizedRfsName

      public String getLocalizedRfsName(String rfsName, 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 String getName()
      Returns the name.

      Returns:
      the name
    • getRelatedSystemResources

      Returns the related system resources list as list of Pattern.

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

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

      Returns:
      the url Prefix
    • getRfsPrefixConfigured

      Returns the configured url Prefix with unsubstituted context values.

      Returns:
      the configured url Prefix
    • getSource

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

      Returns:
      the source regular expression pattern
    • 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(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(String exportPath)
      Sets the rfs export Path after normalizing.

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

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

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

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

      Parameters:
      rfsPrefix - the url Prefix to set
    • toString

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