org.apache.jackrabbit.webdav.version
Interface VersionResource

All Superinterfaces:
DavResource, DeltaVResource

public interface VersionResource
extends DeltaVResource

VersionResource is a resource that contains a copy of a particular state of a version-controlled resource. A new version resource is created whenever a checked-out version-controlled resource is checked-in. The server allocates a distinct new URL for each new version, and this URL will never be used to identify any resource other than that version. The content and dead properties of a version never change.

RFC 3253 defines the following required properties for a version resource:

In addition a version resource must support the following METHODS:

See Also:
DeltaVResource

Field Summary
static DavPropertyName CHECKIN_FORK
          This property controls the behavior of CHECKIN when a version already has a successor.
static DavPropertyName CHECKOUT_FORK
          This property controls the behavior of CHECKOUT when a version already is checked out or has a successor.
static DavPropertyName CHECKOUT_SET
          The computed property DAV:checkout-set identifies each checked-out resource whose DAV:checked-out property identifies this version.
The property is defined to have the following format:
static DavPropertyName LABEL_NAME_SET
          Required protected property 'DAV:label-name-set' for a version of a webdav resource introduced with the 'LabelInfo' feature.
static String METHODS
          The version resource defines one additional method LABEL.
static DavPropertyName PREDECESSOR_SET
          The protected DAV:predecessor property identifies each predecessor of this version.
static DavPropertyName SUCCESSOR_SET
          The computed property DAV:successor-set identifies each version whose DAV:predecessor-set identifies this version.
The property is defined to have the following format:
static DavPropertyName VERSION_HISTORY
          The computed property DAV:version-history identifies the version history that contains this version.
The property is defined to have the following format:
static DavPropertyName VERSION_NAME
          The protected property DAV:version-name defines a human readable id for this version.
 
Fields inherited from interface org.apache.jackrabbit.webdav.version.DeltaVResource
COMPLIANCE_CLASS, METHODS_INCL_MKWORKSPACE
 
Method Summary
 VersionHistoryResource getVersionHistory()
          Returns the VersionHistoryResource, that is referenced in the DAV:version-history property.
 void label(LabelInfo labelInfo)
          Modify the labels of this version resource.
 
Methods inherited from interface org.apache.jackrabbit.webdav.version.DeltaVResource
addWorkspace, getOptionResponse, getReferenceResources, getReport
 
Methods inherited from interface org.apache.jackrabbit.webdav.DavResource
addLockManager, addMember, alterProperties, copy, exists, getCollection, getComplianceClass, getDisplayName, getFactory, getHref, getLocator, getLock, getLocks, getMembers, getModificationTime, getProperties, getProperty, getPropertyNames, getResourcePath, getSession, getSupportedMethods, hasLock, isCollection, isLockable, lock, move, refreshLock, removeMember, removeProperty, setProperty, spool, unlock
 

Field Detail

METHODS

public static final String METHODS
The version resource defines one additional method LABEL.

See Also:
DeltaVResource.METHODS, DavResource.METHODS, Constant Field Values

LABEL_NAME_SET

public static final DavPropertyName LABEL_NAME_SET
Required protected property 'DAV:label-name-set' for a version of a webdav resource introduced with the 'LabelInfo' feature. This property contains the labels that currently select this version.
Property structure is defined as follows:
 <!ELEMENT label-name-set (label-name*)>
 <!ELEMENT label-name (#PCDATA)>
 PCDATA value: string
 


PREDECESSOR_SET

public static final DavPropertyName PREDECESSOR_SET
The protected DAV:predecessor property identifies each predecessor of this version. Except for the root version, which has no predecessors, each version has at least one predecessor.
The property is defined to have the following format:
 <!ELEMENT predecessor-set (href*)>
 


SUCCESSOR_SET

public static final DavPropertyName SUCCESSOR_SET
The computed property DAV:successor-set identifies each version whose DAV:predecessor-set identifies this version.
The property is defined to have the following format:
 <!ELEMENT successor-set (href*)>
 


CHECKOUT_SET

public static final DavPropertyName CHECKOUT_SET
The computed property DAV:checkout-set identifies each checked-out resource whose DAV:checked-out property identifies this version.
The property is defined to have the following format:
 <!ELEMENT checkout-set (href*)>
 

See Also:
VersionControlledResource.CHECKED_OUT

VERSION_NAME

public static final DavPropertyName VERSION_NAME
The protected property DAV:version-name defines a human readable id for this version. The id defined to be unique within the version-history this version belongs to.
The property is defined to have the following format:
 <!ELEMENT version-name (#PCDATA)>
 PCDATA value: string
 


VERSION_HISTORY

public static final DavPropertyName VERSION_HISTORY
The computed property DAV:version-history identifies the version history that contains this version.
The property is defined to have the following format:
 <!ELEMENT version-history (href)>
 


CHECKOUT_FORK

public static final DavPropertyName CHECKOUT_FORK
This property controls the behavior of CHECKOUT when a version already is checked out or has a successor.


CHECKIN_FORK

public static final DavPropertyName CHECKIN_FORK
This property controls the behavior of CHECKIN when a version already has a successor.

Method Detail

label

public void label(LabelInfo labelInfo)
           throws DavException
Modify the labels of this version resource. The modifications (SET, ADD or REMOVE) are listed in the specified LabelInfo object.
The case of a label name must be preserved when it is stored and retrieved.
If the type of modification is ADD, then the label must not yet occur on any other version within the same version history. In contrast a SET modification will move the indicated label to this version, if it existed with another version before. After a successful LABEL request the label must not appear with any other version in the same version history.

Parameters:
labelInfo -
Throws:
DavException
See Also:
LabelInfo

getVersionHistory

public VersionHistoryResource getVersionHistory()
                                         throws DavException
Returns the VersionHistoryResource, that is referenced in the DAV:version-history property.

Returns:
Throws:
DavException


Copyright © 2005-2006 . All Rights Reserved.