Package org.opencms.configuration
Class CmsConfigurationCopyResource
- java.lang.Object
-
- org.opencms.configuration.CmsConfigurationCopyResource
-
- All Implemented Interfaces:
java.io.Serializable
public class CmsConfigurationCopyResource extends java.lang.Object implements java.io.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:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCOPY_AS_NEWIndicates "copy resources" should be copied with typeCmsResource.COPY_AS_NEW.static java.lang.StringCOPY_AS_PRESERVEIndicates "copy resources" should be copied with typeCmsResource.COPY_PRESERVE_SIBLING.static java.lang.StringCOPY_AS_SIBLINGIndicates "copy resources" should be copied with typeCmsResource.COPY_AS_SIBLING.
-
Constructor Summary
Constructors Constructor Description CmsConfigurationCopyResource(java.lang.String source, java.lang.String target, java.lang.String type)Creates a new copy resource info container.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.StringgetSource()Returns the source resource.java.lang.StringgetTarget()Returns the target resource (may contain macros).CmsResource.CmsResourceCopyModegetType()Returns the type of the copy, for example "as new", "as sibling" etc.java.lang.StringgetTypeString()Returns the copy type as String.booleanisTargetWasNull()Returnstrueif the original target configuration wasnull.booleanisTypeWasNull()Returnstrueif the original type configuration wasnull.java.lang.StringtoString()
-
-
-
Field Detail
-
COPY_AS_NEW
public static final java.lang.String COPY_AS_NEW
Indicates "copy resources" should be copied with typeCmsResource.COPY_AS_NEW.- See Also:
- Constant Field Values
-
COPY_AS_PRESERVE
public static final java.lang.String COPY_AS_PRESERVE
Indicates "copy resources" should be copied with typeCmsResource.COPY_PRESERVE_SIBLING.- See Also:
- Constant Field Values
-
COPY_AS_SIBLING
public static final java.lang.String COPY_AS_SIBLING
Indicates "copy resources" should be copied with typeCmsResource.COPY_AS_SIBLING.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CmsConfigurationCopyResource
public CmsConfigurationCopyResource(java.lang.String source, java.lang.String target, java.lang.String type)
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 Detail
-
getSource
public java.lang.String getSource()
Returns the source resource.- Returns:
- the source resource
-
getTarget
public java.lang.String getTarget()
Returns the target resource (may contain macros).- Returns:
- the target resource (may contain macros)
-
getType
public CmsResource.CmsResourceCopyMode 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
public java.lang.String getTypeString()
Returns the copy type as String.- Returns:
- the copy type as String
- See Also:
getType()
-
isTargetWasNull
public boolean isTargetWasNull()
Returnstrueif the original target configuration wasnull.- Returns:
trueif the original target configuration wasnull
-
isTypeWasNull
public boolean isTypeWasNull()
Returnstrueif the original type configuration wasnull.- Returns:
trueif the original type configuration wasnull
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
-