Class CmsResourceImportData

java.lang.Object
org.opencms.module.CmsResourceImportData

public class CmsResourceImportData extends Object
Import data for a single resource.

  • 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 resource
      path - the path
      content - the content
      properties - the properties
      aces - the acccess control entries
      relationData - the relation data
      hasStructureId - true if has a structure id
      hasDateLastModified - true if has a modification date
      typeName - the type name from the manifest
  • Method Details

    • cleanUp

      public void 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

      public byte[] 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

      public String 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

      public 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