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