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

public static final IName AUTOVERSIONING_MODE_CHECKOUT_CHECKIN
See RFC3253, section 3.2.2


AUTOVERSIONING_MODE_CHECKOUT_UNLOCKED_CHECKIN

public static final IName AUTOVERSIONING_MODE_CHECKOUT_UNLOCKED_CHECKIN

AUTOVERSIONING_MODE_CHECKOUT

public static final IName AUTOVERSIONING_MODE_CHECKOUT

AUTOVERSIONING_MODE_LOCKED_CHECKOUT

public static final IName AUTOVERSIONING_MODE_LOCKED_CHECKOUT

AUTOVERSIONING_MODE_NONE

public static final IName AUTOVERSIONING_MODE_NONE
Method Detail

checkIn

public 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

public 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

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

getCheckedInResource

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

getCheckedInRID

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

getCheckedOutResource

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

getCheckedOutRID

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

getCheckInForkBehaviour

public 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

public 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

public 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

public 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

public 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

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

getVersionHistoryRID

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

updateFromVersion

public 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

public 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


Copyright 2006 SAP AG. All rights reserved. No part of this publication may be reproduced or transmitted in any form or for any purpose without the express permission of SAP AG. The information contained herein may be changed without prior notice. Microsoft, Windows, Outlook, and PowerPoint are registered trademarks of Microsoft Corporation. Oracle is a registered trademark of Oracle Corporation. UNIX, X/Open, OSF/1, and Motif are registered trademarks of the Open Group. Citrix, ICA, Program Neighborhood, MetaFrame, WinFrame, VideoFrame, and MultiWin are trademarks or registered trademarks of Citrix Systems, Inc. HTML, XML, XHTML and W3C are trademarks or registered trademarks of W3C, World Wide Web Consortium, Massachusetts Institute of Technology. Java is a registered trademark of Sun Microsystems, Inc. JavaScript is a registered trademark of Sun Microsystems, Inc., used under license for technology invented and implemented by Netscape. MaxDB is a trademark of MySQL AB, Sweden. SAP, R/3, mySAP, mySAP.com, xApps, xApp, SAP NetWeaver, and other SAP products and services mentioned herein as well as their respective logos are trademarks or registered trademarks of SAP AG in Germany and in several other countries all over the world. All other product and service names mentioned are the trademarks of their respective companies. Data contained in this document serves informational purposes only. National product specifications may vary. These materials are subject to change without notice. These materials are provided by SAP AG and its affiliated companies ("SAP Group") for informational purposes only, without representation or warranty of any kind, and SAP Group shall not be liable for errors or omissions with respect to the materials. The only warranties for SAP Group products and services are those that are set forth in the express warranty statements accompanying such products and services, if any. Nothing herein should be construed as constituting an additional warranty.