Interface AssetVersion

  • All Superinterfaces:
    Adaptable

    @ProviderType
    public interface AssetVersion
    extends Adaptable
    AssetVersion represents a particular version of an Asset.

    AssetVersion is created by AssetVersionManager and retrieved via AssetVersionManager.getVersion(String).

         eg:
         // to create a version
         AssetVersionManager versionManager = resolver.adaptTo(AssetVersionManager.class);
         AssetVersion version = versionManager.createVersion("/path/to/asset/document.pdf", "Some label");
    
         // to get existing versions
         Iterator<AssetVersion> versions = versionManager.listVersions("/path/to/asset/document.pdf");
         ...
     

    Implementor's Note: Implementations are required to provide an adapter to a read only ValueMap

    See Also:
    AssetVersionManager, ValueMap
    • Method Detail

      • getLabels

        String[] getLabels()
        Returns all labels of this version.
        Returns:
        version labels or an empty array if there are none.
      • getId

        String getId()
        Return the unique version id.
        Returns:
        version id
      • getPath

        String getPath()
        Get path of this version
        Returns:
        Version path
      • getAssetPath

        String getAssetPath()
        Get path of the parent asset.
        Returns:
        Asset path
      • getName

        String getName()
        Get name of this version.
        Returns:
        name
      • getCreated

        Calendar getCreated()
        Get the creation date of this version.
        Returns:
        creation date
      • getRendition

        Rendition getRendition​(String name)
        Returns a named Rendition if available.
        Parameters:
        name - Rendition name to search
        Returns:
        rendition or null if not found
        Throws:
        AssetException - If an error occurs trying to load the Rendition object
      • listRenditions

        Iterator<? extends Rendition> listRenditions()
        Returns an iterator for all Renditions of this asset version.
        Returns:
        The Iterator of renditions or an empty iterator if no renditions has been created.
      • listRelated

        Iterator<Asset> listRelated​(String name)
        Get all related Asset with the given name.
        Parameters:
        name - of the relation
        Returns:
        Iterator of related Assets or an empty iterator if relations cannot be found with the given name.
      • listRelations

        Iterator<AssetRelation> listRelations​(String name)
        Get asset relations for a given relation name.
        Parameters:
        name - Name of the relation
        Returns:
        Iterator of AssetRelation or an empty iterator if relations cannot be found with the given name.