Package org.opencms.staticexport
Class CmsStaticExportRfsRule
java.lang.Object
org.opencms.staticexport.CmsStaticExportRfsRule
Help class for storing of rfs-rules.
- Since:
- 6.0.0
-
Field Summary
-
Constructor Summary
ConstructorDescriptionCmsStaticExportRfsRule
(String name, String description, String source, String rfsPrefix, String exportPath, String exportWorkPath, Integer exportBackups, Boolean useRelativeLinks) Default constructor.CmsStaticExportRfsRule
(String name, String description, String source, String rfsPrefix, String exportPath, String exportWorkPath, Integer exportBackups, Boolean useRelativeLinks, List<Pattern> relatedSystemRes) Full constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
addRelatedSystemRes
(String regex) Adds a regular expression of related system resources.Returns the description.Returns the number of backups.Returns the rfs export Path.Returns the configured rfs export Path with unsubstituted context values.Returns the rfs export Work Path.Returns the configured rfs export Work Path with unsubstituted context values.getLocalizedRfsName
(String rfsName, String fileSeparator) Returns the rfs name for the given locale, only used for multi-language export.getName()
Returns the name.Returns the related system resources list as list of
.Pattern
Returns the url Prefix with macro replacement.Returns the configured url Prefix with unsubstituted context values.Returns the source regular expression pattern.Returns true if the links in the static export should be relative.boolean
Checks if a vfsName matches the given related system resource patterns.void
setExportPath
(String exportPath) Sets the rfs export Path after normalizing.void
setExportWorkPath
(String exportWorkPath) Sets the rfs export work Path after normalizing.void
setRfsPrefix
(String rfsPrefix) Sets the url Prefix after normalizing.toString()
-
Field Details
-
EXPORT_DEFAULT_BACKUPS
Name for the default work path.
-
-
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 ruledescription
- the description for the rulesource
- the source regular expressionrfsPrefix
- the url prefixexportPath
- the rfs export pathexportWorkPath
- the rfs export work pathexportBackups
- the number of backupsuseRelativeLinks
- 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 ruledescription
- the description for the rulesource
- the source regular expressionrfsPrefix
- the url prefixexportPath
- the rfs export pathexportWorkPath
- the rfs export work pathexportBackups
- the number of backupsuseRelativeLinks
- Relative links valuerelatedSystemRes
- list of
sPattern
-
-
Method Details
-
addRelatedSystemRes
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
Returns the rfs name for the given locale, only used for multi-language export.- Parameters:
rfsName
- the original rfs namefileSeparator
- the file separator to use- Returns:
- the rfs name for the given locale
-
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
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
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
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
Sets the rfs export Path after normalizing.- Parameters:
exportPath
- the rfs export Path to set
-
setExportWorkPath
Sets the rfs export work Path after normalizing.- Parameters:
exportWorkPath
- the rfs export Work Path to set
-
setRfsPrefix
Sets the url Prefix after normalizing.- Parameters:
rfsPrefix
- the url Prefix to set
-
toString
-