com.sapportals.wcm.repository

Interface IVersionControlledResource


public interface IVersionControlledResource

Interface for version controlled resources (see RFC3253).

Coding example for obtaining the interface from an IResource:

 IResource resource = ...;
 ICheckOutInfo2 coi = null;
 IVersionControlledResource vcr = (IVersionControlledResource)resource.as(IVersionControlledResource.class);
 if (vcr != null) {
   coi = vcr.checkOut(true, true);
 }
 

Copyright (c) SAP AG 2002-2004


Field Summary
static IName AUTOVERSIONING_MODE_CHECKOUT
           
static IName AUTOVERSIONING_MODE_CHECKOUT_CHECKIN
          See RFC3253, section 3.2.2
static IName AUTOVERSIONING_MODE_CHECKOUT_UNLOCKED_CHECKIN
           
static IName AUTOVERSIONING_MODE_LOCKED_CHECKOUT
           
static IName AUTOVERSIONING_MODE_NONE
           
 
Method Summary
 ICheckInInfo2 checkIn(IContent newContent, IPropertyMap properties, boolean ignorePropertyFailures, RID expectedCheckInRID, boolean forkOk, boolean keepCheckedOut)
          Check in a new version of the resource with new content and/or properties.
 ICheckOutInfo2 checkOut(boolean applyToVersion, boolean forkOk)
          Checkout the version controlled resource or it's checked-in version.
 IName getAutoVersioningMode()
           
 IResource getCheckedInResource()
           
 RID getCheckedInRID()
           
 IResource getCheckedOutResource()
           
 RID getCheckedOutRID()
           
 Set getCheckInForkBehaviour()
           
 Set getCheckOutForkBehaviour()
           
 Set getEclipsedSet()
          (version controlled collection only)
 IResourceList getPredecessorResources()
           
 IRidSet getPredecessorRIDs()
           
 IResource getVersionHistoryResource()
           
 RID getVersionHistoryRID()
           
 IRidSet updateFromVersion(IResource version)
          update content and dead properties from a specific version.
 IRidSet updateFromVersion(RID version)
          update content and dead properties from a specific version.
 

Field Detail

AUTOVERSIONING_MODE_CHECKOUT_CHECKIN

static final IName AUTOVERSIONING_MODE_CHECKOUT_CHECKIN
See RFC3253, section 3.2.2


AUTOVERSIONING_MODE_CHECKOUT_UNLOCKED_CHECKIN

static final IName AUTOVERSIONING_MODE_CHECKOUT_UNLOCKED_CHECKIN

AUTOVERSIONING_MODE_CHECKOUT

static final IName AUTOVERSIONING_MODE_CHECKOUT

AUTOVERSIONING_MODE_LOCKED_CHECKOUT

static final IName AUTOVERSIONING_MODE_LOCKED_CHECKOUT

AUTOVERSIONING_MODE_NONE

static final IName AUTOVERSIONING_MODE_NONE
Method Detail

checkIn

ICheckInInfo2 checkIn(IContent newContent,
                      IPropertyMap properties,
                      boolean ignorePropertyFailures,
                      RID expectedCheckInRID,
                      boolean forkOk,
                      boolean keepCheckedOut)
                      throws ResourceException
Check in a new version of the resource with new content and/or properties.

Parameters:
newContent - The new content, can be null
properties - The new properties, can be null
ignorePropertyFailures - Ignore exceptions if some or all properties could not be set/removed
expectedCheckInRID - Create the new version with this RID. The check-in may fail if the new version RID would be different. In this case an ExpectedCheckInRID exception will be thrown which will contain a new "expected check-in RID". To make sure that the expectedCheckInRID actually was used, it needs to be compared to the RID returned by ICheckInInfo.getRevisionRID() (this is because a repository may check-in the resource although it couldn't use the expectedCheckInRID).
forkOk - set to true if it's ok to cause a fork in the version history (may be rejected nevertheless if the checkin fork behaviour dictates this).
keepCheckedOut - keep the resource checked out
Returns:
checkin status information
Throws:
ResourceException - Exception raised in failure situation
See Also:
checkOut(boolean, boolean)

checkOut

ICheckOutInfo2 checkOut(boolean applyToVersion,
                        boolean forkOk)
                        throws ResourceException
Checkout the version controlled resource or it's checked-in version.

Parameters:
applyToVersion - checkout the checked-in version of the version controlled resource (resource must be checked-in!).
forkOk - set to true if it's ok to cause a fork in the version history (may be rejected nevertheless if the checkout fork behaviour dictates this).
Returns:
information about checkout result
Throws:
ResourceException - Exception raised in failure situation

getAutoVersioningMode

IName getAutoVersioningMode()
                            throws ResourceException
Returns:
IName of current autoversioning mode (or null when no autoversioning present)
Throws:
ResourceException

getCheckedInResource

IResource getCheckedInResource()
                               throws ResourceException
Returns:
IResource for currently checked-in version (or null )
Throws:
ResourceException

getCheckedInRID

RID getCheckedInRID()
                    throws ResourceException
Returns:
RID of currently checked-in version (or null )
Throws:
ResourceException

getCheckedOutResource

IResource getCheckedOutResource()
                                throws ResourceException
Returns:
IResource for currently checked-out version (or null )
Throws:
ResourceException

getCheckedOutRID

RID getCheckedOutRID()
                     throws ResourceException
Returns:
RID of currently checked-out version (or null )
Throws:
ResourceException

getCheckInForkBehaviour

Set getCheckInForkBehaviour()
                            throws ResourceException
Returns:
a set of INames describing the checkout-in behaviour for this resource (when checked-out).
Throws:
ResourceException - Exception raised in failure situation
See Also:
IVersionResource.getCheckInForkBehaviour()

getCheckOutForkBehaviour

Set getCheckOutForkBehaviour()
                             throws ResourceException
Returns:
a set of INames describing the checkout-fork behaviour for this resource (when checked-out).
Throws:
ResourceException - Exception raised in failure situation
See Also:
IVersionResource.getCheckOutForkBehaviour()

getEclipsedSet

Set getEclipsedSet()
                   throws ResourceException
(version controlled collection only)

Returns:
list of the internal member names of all version-controlled resources that are currently eclipsed by a non-version-controlled internal member of the collection (see RFC3253, section 14.1.1 ).
Throws:
ResourceException - Exception raised in failure situation

getPredecessorResources

IResourceList getPredecessorResources()
                                      throws ResourceException
Returns:
for checked-out resources, the set of immediate predecessors of the version that would be created upon checkin (empty otherwise)
Throws:
ResourceException

getPredecessorRIDs

IRidSet getPredecessorRIDs()
                           throws ResourceException
Returns:
for checked-out resources, the set of immediate predecessors of the version that would be created upon checkin (empty otherwise)
Throws:
ResourceException

getVersionHistoryResource

IResource getVersionHistoryResource()
                                    throws ResourceException
Returns:
IResource for version history resource (or null if version history resources are not supported).
Throws:
ResourceException

getVersionHistoryRID

RID getVersionHistoryRID()
                         throws ResourceException
Returns:
RID of version history resource (or null if version history resources are not supported).
Throws:
ResourceException

updateFromVersion

IRidSet updateFromVersion(IResource version)
                          throws ResourceException
update content and dead properties from a specific version.

Parameters:
version - from where to copy contents and properties
Returns:
RIDs of all modified resources
Throws:
ResourceException

updateFromVersion

IRidSet updateFromVersion(RID version)
                          throws ResourceException
update content and dead properties from a specific version.

Parameters:
version - from where to copy contents and properties
Returns:
RIDs of all modified resources
Throws:
ResourceException
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] KMC-CM [sap.com] tc/km/frwk api EP-KM-CM
[sap.com] KMC-WPC [sap.com] tc/kmc/wpc/wpcfacade api EP-PIN-WPC-WCM


Copyright 2014 SAP AG Complete Copyright Notice