public interface IVersionControlledResource
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
Modifier and Type | Field and Description |
---|---|
static IName |
AUTOVERSIONING_MODE_CHECKOUT |
static IName |
AUTOVERSIONING_MODE_CHECKOUT_CHECKIN
|
static IName |
AUTOVERSIONING_MODE_CHECKOUT_UNLOCKED_CHECKIN |
static IName |
AUTOVERSIONING_MODE_LOCKED_CHECKOUT |
static IName |
AUTOVERSIONING_MODE_NONE |
Modifier and Type | Method and Description |
---|---|
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.
|
static final IName AUTOVERSIONING_MODE_CHECKOUT_CHECKIN
static final IName AUTOVERSIONING_MODE_CHECKOUT_UNLOCKED_CHECKIN
static final IName AUTOVERSIONING_MODE_CHECKOUT
static final IName AUTOVERSIONING_MODE_LOCKED_CHECKOUT
static final IName AUTOVERSIONING_MODE_NONE
ICheckInInfo2 checkIn(IContent newContent, IPropertyMap properties, boolean ignorePropertyFailures, RID expectedCheckInRID, boolean forkOk, boolean keepCheckedOut) throws ResourceException
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/removedexpectedCheckInRID
- 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 outResourceException
- Exception raised in failure situationcheckOut(boolean, boolean)
ICheckOutInfo2 checkOut(boolean applyToVersion, boolean forkOk) throws ResourceException
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).ResourceException
- Exception raised in failure situationIName getAutoVersioningMode() throws ResourceException
null
when no
autoversioning present)ResourceException
IResource getCheckedInResource() throws ResourceException
null
)ResourceException
RID getCheckedInRID() throws ResourceException
null
)ResourceException
IResource getCheckedOutResource() throws ResourceException
null
)ResourceException
RID getCheckedOutRID() throws ResourceException
null
)ResourceException
Set getCheckInForkBehaviour() throws ResourceException
ResourceException
- Exception raised in failure situationIVersionResource.getCheckInForkBehaviour()
Set getCheckOutForkBehaviour() throws ResourceException
ResourceException
- Exception raised in failure situationIVersionResource.getCheckOutForkBehaviour()
Set getEclipsedSet() throws ResourceException
ResourceException
- Exception raised in failure situationIResourceList getPredecessorResources() throws ResourceException
ResourceException
IRidSet getPredecessorRIDs() throws ResourceException
ResourceException
IResource getVersionHistoryResource() throws ResourceException
null
if
version history resources are not supported).ResourceException
RID getVersionHistoryRID() throws ResourceException
null
if version
history resources are not supported).ResourceException
IRidSet updateFromVersion(IResource version) throws ResourceException
version
- from where to copy contents and propertiesResourceException
IRidSet updateFromVersion(RID version) throws ResourceException
version
- from where to copy contents and propertiesResourceException
Access Rights |
---|
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 2018 SAP AG Complete Copyright Notice