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
FieldsModifier and TypeFieldDescriptionstatic final StringIndicates "copy resources" should be copied with typeCmsResource.COPY_AS_NEW.static final StringIndicates "copy resources" should be copied with typeCmsResource.COPY_PRESERVE_SIBLING.static final StringIndicates "copy resources" should be copied with typeCmsResource.COPY_AS_SIBLING. -
Constructor Summary
ConstructorsConstructorDescriptionCmsConfigurationCopyResource(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.booleanReturnstrueif the original target configuration wasnull.booleanReturnstrueif 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_PATHis used as default. If type isnull, the copy typeCmsResource.COPY_AS_NEWis 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_SIBLINGandCmsResource.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
Returnstrueif the original target configuration wasnull.- Returns:
trueif the original target configuration wasnull
-
isTypeWasNull
Returnstrueif the original type configuration wasnull.- Returns:
trueif the original type configuration wasnull
-
toString
-