Interface Version

All Superinterfaces:
DeltaVItem, HierarchyItem

public interface Version extends DeltaVItem
Represents single item version.

Defines the properties and methods that item version must implement. In addition to methods and properties provided by DeltaVItem this interface also provides methods for getting version name, next version and previous version.

Usually you will implement Version interface for your resource version objects together with File interface. While Resource interface is optional for resource versions it may be useful if your DeltaV client application will request content of the resource version. In this case File.read(java.io.OutputStream, long, long), File.getContentLength() and File.getContentType() members of the File interface will be requested by the engine. Copying, moving, updating properties and content are not allowed for a version, your HierarchyItem.copyTo(com.ithit.webdav.server.Folder, java.lang.String, boolean), HierarchyItem.moveTo(com.ithit.webdav.server.Folder, java.lang.String), HierarchyItem.updateProperties(com.ithit.webdav.server.Property[], com.ithit.webdav.server.Property[]) and File.write(java.io.InputStream, java.lang.String, long, long) implementations must throw ServerException with status WebDavStatus.NOT_ALLOWED

  • Method Details

    • getSuccessor

      Version getSuccessor() throws ServerException
      Next version or null if no next version exists.
      Returns:
      Version item representing next version in the list of versions or null if no next version exists.
      Throws:
      ServerException - in case of an error.
    • getPredecessor

      Version getPredecessor() throws ServerException
      Previous version or null if no previous version exists.
      Returns:
      Version item representing previous version in the list of versions or null if no previous version exists.
      Throws:
      ServerException - in case of an error.
    • getVersionableItem

      VersionableItem getVersionableItem() throws ServerException
      Hierarchy item for this version.
      Returns:
      Hierarchy item for this version.
      Throws:
      ServerException - in case of an error.
    • getVersionName

      String getVersionName() throws ServerException
      Name of the version.

      Must be unique among version items for a given hierarchy item. This string is intended for display for a user.

      Returns:
      Name of the version.
      Throws:
      ServerException - in case of an error.