Package org.opencms.module
Class CmsResourceImportData
java.lang.Object
org.opencms.module.CmsResourceImportData
Import data for a single resource.
-
Constructor Summary
ConstructorDescriptionCmsResourceImportData
(CmsResource resource, String path, byte[] content, List<CmsProperty> properties, List<CmsAccessControlEntry> aces, List<CmsImportVersion10.RelationData> relationData, boolean hasStructureId, boolean hasDateLastModified, String typeName) Creats a new instance. -
Method Summary
Modifier and TypeMethodDescriptionvoid
cleanUp()
Cleans up temp files.computeRootPath
(CmsObject cms) Computes the root path.Gets the access control entries.byte[]
Gets the content.Gets the import resource.getPath()
Gets the path.Gets the map of properties, with property names as keys.Gets the relations.Gets the resource.Gets the original type name from the manifest.boolean
Checks if there is content.boolean
Returns true if this had a modification date in the import.boolean
Returns true if this had a structure id in the import.boolean
Returns true if resource id checks should be disabled for this import resource.void
setImportResource
(CmsResource importRes) Sets the import resource.void
setSkipResourceIdCheck
(boolean skipResourceIdCheck) Sets the 'skip resource id check' flag.
-
Constructor Details
-
CmsResourceImportData
public CmsResourceImportData(CmsResource resource, String path, byte[] content, List<CmsProperty> properties, List<CmsAccessControlEntry> aces, List<CmsImportVersion10.RelationData> relationData, boolean hasStructureId, boolean hasDateLastModified, String typeName) Creats a new instance.- Parameters:
resource
- the resourcepath
- the pathcontent
- the contentproperties
- the propertiesaces
- the acccess control entriesrelationData
- the relation datahasStructureId
- true if has a structure idhasDateLastModified
- true if has a modification datetypeName
- the type name from the manifest
-
-
Method Details
-
cleanUp
Cleans up temp files. -
computeRootPath
Computes the root path.- Parameters:
cms
- the CMS context- Returns:
- the root path
-
getAccessControlEntries
Gets the access control entries.- Returns:
- the access control entries
-
getContent
Gets the content.- Returns:
- the content, or null if there is no content
-
getImportResource
Gets the import resource.This is set by the module updater if the resource has actually been imported.
- Returns:
- the import resource
-
getPath
Gets the path.- Returns:
- the path
-
getProperties
Gets the map of properties, with property names as keys.- Returns:
- the map of properties
-
getRelations
Gets the relations.- Returns:
- the relations
-
getResource
Gets the resource.- Returns:
- the resource
-
getTypeName
Gets the original type name from the manifest.- Returns:
- the type name
-
hasContent
Checks if there is content.- Returns:
- true if there is content
-
hasDateLastModified
Returns true if this had a modification date in the import.- Returns:
- true if this had a modification date in the import
-
hasStructureId
Returns true if this had a structure id in the import.- Returns:
- true if this had a structure id in the import
-
isSkipResourceIdCheck
Returns true if resource id checks should be disabled for this import resource.- Returns:
- true if resource id checks should be disabled
-
setImportResource
Sets the import resource.- Parameters:
importRes
- the import resource
-
setSkipResourceIdCheck
Sets the 'skip resource id check' flag.- Parameters:
skipResourceIdCheck
- the new value
-