SAP NetWeaver '04

com.sap.netweaver.bc.rf.mi.version
Interface IMutableBasicVersioningManager

[contained in: com.sap.netweaver.bc.rf.par - bc.rf.mi_api.jar]
All Superinterfaces:
IBasicVersioningManager

public interface IMutableBasicVersioningManager
extends IBasicVersioningManager

Interface describing the write methods of a repository sub manager for basic versioning features. For an explanation of terminological conventions, please see IBasicVersioningMananger.

Copyright (c) SAP AG 2003


Method Summary
 ICheckInInfo checkIn(IResourceHandle resourceHandle, IRid expectedCheckInRID, boolean forkOk, boolean keepCheckedOut)
          Check in a checked-out vcr to create a new version describing the current version controlled state of the vcr.
 ICheckOutInfo checkOutInPlace(IResourceHandle vcrHandle, boolean forkOk)
          Check out a checked-in vcr to prepare subsequent changes of it's version controlled state.
 java.util.Set setAutoChildVersionControlEnabled(IResourceHandle collectionHandle, boolean modifyPlainChildren, boolean returnModified, boolean enable)
          Enables or disables auto child version controlling for the collection referred by the given collection handle.
 void setVersionControlEnabled(IResourceHandle resourceHandle, boolean enabled)
          Enables or disables version control for the resource referred by the given resource handle.
 java.util.Set undoCheckOut(IResourceHandle vcrHandle)
          Roll back a previous checkout operation.
 java.util.Set updateFromVersion(IResourceHandle vcrHandle, IResourceHandle versionHandle)
          The version controlled state of the checked-in vcr referred by the given vcrHandle parameter will be updated from the state of the version refered by the given versionHandle, and this version will become the new checked-in version of the vcr.
 
Methods inherited from interface com.sap.netweaver.bc.rf.mi.version.IBasicVersioningManager
getAutoVersioningMode, getCheckedInVersion, getCheckedOutVersion, getPredecessorVersions, getSuccessorVersions, getVersionHistory, isAutoChildVersionControlEnabled, isCheckedOut, isVersionControlEnabled
 

Method Detail

setVersionControlEnabled

public void setVersionControlEnabled(IResourceHandle resourceHandle,
                                     boolean enabled)
                              throws ResourceException
Enables or disables version control for the resource referred by the given resource handle. Depending on the implementation and configuration of the repository, the version history of a vcr may be lost when version control is disabled on the vcr.
Parameters:
resourceHandle - a resource handle
enabled - true if versioning is to be enabled
Throws:
ResourceException - if the resource handle is invalid or the operation failed

checkOutInPlace

public ICheckOutInfo checkOutInPlace(IResourceHandle vcrHandle,
                                     boolean forkOk)
                              throws ResourceException
Check out a checked-in vcr to prepare subsequent changes of it's version controlled state. These changes may be persisted in a newly created version by a subsequent call to checkIn(), or they may be rolled back by a subsequent call to undoCheckOut().

The forkOk parameter must be ignored if the server does not support the interface IAdvancedVersioningManager , in which case forks are disallowed anyway. Otherwise, the semantics of this parameter depends on the fork behaviour of the checked-in version of the given vcr (see IAdvancedVersioningManager.getCheckOutForkBehaviour ): If forks are strictly allowed or forbidden (as stated by getCheckOutForkBehaviour()), the parameter must be ignored. Otherwise, if forkOk is false and the server expects a subsequent checkin to create a branched version history, the method must fail.

Parameters:
vcrHandle - the resource handle of a checked-in vcr
forkOk - allow forks in version history upon check in
Returns:
ICheckOutInfo object containing the expected resource handle of the next version
Throws:
ResourceException - if the resource handle is invalid or the operation failed

undoCheckOut

public java.util.Set undoCheckOut(IResourceHandle vcrHandle)
                           throws ResourceException
Roll back a previous checkout operation. The version controlled state of the given checked-out vcr is updated from it's checked-out version.

The method returns a set of handles of the resources modified by the operation, which is not trivial in the case of a more advanced versioning manager supporting version controlled collections.

Parameters:
vcrHandle - the resource handle of a checked-out vcr
Returns:
a Set of IResourceHandles of all resources modified by the operation
Throws:
ResourceException - if the resource handle is invalid or the operation failed

checkIn

public ICheckInInfo checkIn(IResourceHandle resourceHandle,
                            IRid expectedCheckInRID,
                            boolean forkOk,
                            boolean keepCheckedOut)
                     throws ResourceException
Check in a checked-out vcr to create a new version describing the current version controlled state of the vcr.

The state of the new version will be initialized from the current state of the given resource, where 'state' is defined to consist of content, dead properties and - in the case of a version controlled collection - the set of version controlled bindings of the collection together with ordering information.

If an expected checkin RID is provided, the method may fail if the server cannot assign this RID to the new version.

The forkOk parameter must be ignored if the server does not support the interface IAdvancedVersioningManager , in which case forks are disallowed anyway. Otherwise, the semantics of this parameter depends on the fork behaviour of the checked-out version of the given vcr (see IAdvancedVersioningManager.getCheckInForkBehaviour ): If forks are strictly allowed or forbidden (as stated by getCheckInForkBehaviour()), the parameter must be ignored. Otherwise, if forkOk is false and the checkin created a branched version history, the method must fail.

Parameters:
expectedCheckInRID - the expected RID of the new version (may be null)
forkOk - allow a new fork in the version history
keepCheckedOut - if true, the given vcr will be checked out immediatly after the checkin succeded
resourceHandle -  
Returns:
an ICheckInInfo object describing the newly created version
Throws:
ResourceException - if the resource handle is invalid or the operation failed

updateFromVersion

public java.util.Set updateFromVersion(IResourceHandle vcrHandle,
                                       IResourceHandle versionHandle)
                                throws ResourceException
The version controlled state of the checked-in vcr referred by the given vcrHandle parameter will be updated from the state of the version refered by the given versionHandle, and this version will become the new checked-in version of the vcr.

The method returns a set of handles of the resources modified by the operation, is be not trivial in the case of a more advanced versioning manager supporting version controlled collections.

Parameters:
vcrHandle - the resource handle of a checked-out vcr
versionHandle - the resource handle of a version of the vcr refered by vcrHandle
Returns:
a Set of IResourceHandles of all resources modified by the operation
Throws:
ResourceException - if the resource handle is invalid or the operation failed

setAutoChildVersionControlEnabled

public java.util.Set setAutoChildVersionControlEnabled(IResourceHandle collectionHandle,
                                                       boolean modifyPlainChildren,
                                                       boolean returnModified,
                                                       boolean enable)
                                                throws ResourceException
Enables or disables auto child version controlling for the collection referred by the given collection handle. Enabling auto child version controlling means that newly created direct non-collection children will automatically put under version control.

For performance reasons, the caller should set the parameter returnModified to false, if possible.

Parameters:
collectionHandle - a resource handle referring to a collection
modifyPlainChildren - if true all direct plain children will be put under version control
returnModified - if false, an empty Set may be returned
enable - true if auto child versioning is to be enabled
Returns:
a Set of IResourceHandles of all resources modified by the operation (if returnModified is true)
Throws:
ResourceException - if the resource handle is invalid or the operation failed

SAP NetWeaver '04

Copyright © 2004 by SAP AG. All Rights Reserved.
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.