Package org.opencms.configuration
Class CmsConfigurationCopyResource
java.lang.Object
org.opencms.configuration.CmsConfigurationCopyResource
- All Implemented Interfaces:
Serializable
Describes a resource to copy during the creation of a new resource.
Usually used in folder types to copy some default resources to the folder, but also usable for file resources.
- Since:
- 6.0.0
- See Also:
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
Indicates "copy resources" should be copied with typeCmsResource.COPY_AS_NEW
.static final String
Indicates "copy resources" should be copied with typeCmsResource.COPY_PRESERVE_SIBLING
.static final String
Indicates "copy resources" should be copied with typeCmsResource.COPY_AS_SIBLING
. -
Constructor Summary
ConstructorDescriptionCmsConfigurationCopyResource
(String source, String target, String type) Creates a new copy resource info container. -
Method Summary
Modifier and TypeMethodDescriptionReturns the source resource.Returns the target resource (may contain macros).getType()
Returns the type of the copy, for example "as new", "as sibling" etc.Returns the copy type as String.boolean
Returnstrue
if the original target configuration wasnull
.boolean
Returnstrue
if the original type configuration wasnull
.toString()
-
Field Details
-
COPY_AS_NEW
Indicates "copy resources" should be copied with typeCmsResource.COPY_AS_NEW
.- See Also:
-
COPY_AS_PRESERVE
Indicates "copy resources" should be copied with typeCmsResource.COPY_PRESERVE_SIBLING
.- See Also:
-
COPY_AS_SIBLING
Indicates "copy resources" should be copied with typeCmsResource.COPY_AS_SIBLING
.- See Also:
-
-
Constructor Details
-
CmsConfigurationCopyResource
Creates a new copy resource info container.If target is
null
, the macroA_CmsResourceType.MACRO_RESOURCE_FOLDER_PATH
is used as default. If type isnull
, the copy typeCmsResource.COPY_AS_NEW
is used as default.- Parameters:
source
- the source resourcetarget
- the target resource (may contain macros)type
- the type of the copy, for example "as new", "as sibling" etc
-
-
Method Details
-
getSource
Returns the source resource.- Returns:
- the source resource
-
getTarget
Returns the target resource (may contain macros).- Returns:
- the target resource (may contain macros)
-
getType
Returns the type of the copy, for example "as new", "as sibling" etc.Possible types are
CmsResource.COPY_AS_NEW
,CmsResource.COPY_AS_SIBLING
andCmsResource.COPY_PRESERVE_SIBLING
.- Returns:
- the type of the copy, for example "as new", "as sibling" etc
-
getTypeString
Returns the copy type as String.- Returns:
- the copy type as String
- See Also:
-
isTargetWasNull
Returnstrue
if the original target configuration wasnull
.- Returns:
true
if the original target configuration wasnull
-
isTypeWasNull
Returnstrue
if the original type configuration wasnull
.- Returns:
true
if the original type configuration wasnull
-
toString
-