Class CmsResourceImportData

    • 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 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 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
      • 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,​CmsPropertygetProperties()
        Gets the map of properties, with property names as keys.

        Returns:
        the map of properties
      • 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