|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IVersionEdit
Provides access to members that return information about versions and posting of versions.
The IVersionEdit interface is used to reconcile a version with a target version. Once reconciled, the object provides the ability to work with representations of the version prior to start editing, the pre-reconcile version, the reconcile version, and the common ancestor version for conflict resolution.
Method Summary | |
---|---|
boolean |
canPost()
Returns a boolean if the version can be posted to the reconcile version. |
IVersion |
getCommonAncestorVersion()
The common ancestor of this version and the reconcile version. |
IEnumConflictClass |
getConflictClasses()
All objects which contain conflicts between the current and reconciled versions. |
IEnumBSTR |
getModifiedClasses()
All objects modified by the current and reconciled versions. |
IVersion |
getPreReconcileVersion()
The version prior to reconciliation. |
IVersion |
getReconcileVersion()
The version that the current version is reconciling against. |
IVersion |
getStartEditingVersion()
The version prior to any edits. |
void |
post(String versionName)
Posts the current version to the reconcilled version. |
boolean |
reconcile(String versionName)
Reconciles the current version with a target version. |
Method Detail |
---|
IEnumBSTR getModifiedClasses() throws IOException, AutomationException
The read-only property ModifiedClasses returns an IEnumBSTR that can be used to iterate over the names of the tables that have been modified by the current version being edited and the target reconciled version.
This property should only be called after a Reconcile or the enumeration will be empty.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IEnumConflictClass getConflictClasses() throws IOException, AutomationException
The read-only property ConflictClasses returns an IEnumConflictClass that can be used to iterate over the Classes that have conflicts between the current version and the target reconciled version.
This property should only be called after a Reconcile or the enumeration will be empty.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IVersion getReconcileVersion() throws IOException, AutomationException
The ReconcileVersion method returns an IVersion of the version that the current edit version is reconciling against. The reconcile version represents the state of the database for the target reconcile version when the reconcile operation started. This provides a representation of the target reconcile version which can be used to compare features or rows after the reconciliation.
This property should only be called after a Reconcile or the IVersion object will be nothing.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IVersion getStartEditingVersion() throws IOException, AutomationException
The StartEditingVersion method returns an IVersion of the version that the current edit version is reconciling against. The start editing version represents the state of the database when start editing was initiated. This provides a representation of the version which can be used to compare features or rows after the reconciliation.
The IVersion returned is not available as a workspace for editing.
This property should only be called after a Reconcile or the IVersion object will be nothing.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IVersion getPreReconcileVersion() throws IOException, AutomationException
The PreReconcileVersion method returns an IVersion of the version that the current edit version is reconciling against. The pre-reconcile version represents the state of the database prior to the reconcile operation. This provides a representation of the version which can be used to compare features or rows after the reconciliation.
The IVersion returned is not available as a workspace for editing.
This property should only be called after a Reconcile or the IVersion object will be nothing.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IVersion getCommonAncestorVersion() throws IOException, AutomationException
The CommonAncestorVersion method returns an IVersion of the version that the current edit version is reconciling against. The common ancestor version represents the state of the database at the time the version was created from the target version (i.e. when the two versions were identical). This provides a representation of the version which can be used to compare features or rows after the reconciliation.
The IVersion returned is not available as a workspace for editing.
This property should only be called after a Reconcile or the IVersion object will be nothing.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean reconcile(String versionName) throws IOException, AutomationException
The Reconcile function reconciles the current edit version with the specified target version. The target version must be an ancestor of the current version or an error will be returned. The target version name passed in is case-sensitive and should take the form {owner}.{version_name} for example, SDE.DEFAULT.
If the returned boolean value from Reconcile is TRUE, then conflicts were detected. Otherwise no conflicts were detected.
A reconcile can only be performed if no other users are currently editing the version. As well, the target version cannot concurrently be reconciling by a second application. See IVersion::IVersionLocks for additional information on detecting version locks.
Calling Reconcile will abort the current edit operation therefore any edits made within an open edit operation when reconcile is called will be lost. If there is an open edit operation it is good practice to call StopEditOperation prior to calling Reconcile
versionName
- The versionName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.boolean canPost() throws IOException, AutomationException
The CanPost method is only true if IVersionEdit.Reconcile has been performed and the reconcile operation has not been undone. CanPost does not check if the target version has been redefined since the reconcile operation.
The Post method requires that the current edit version has been reconciled with any ancestor versions prior to being called. The implicit locking during a reconcile should greatly increase the chances of the source and target versions being ready to post. There is a possibility that these two versions could be out of sync, possibly do to the target version changing after a reconcile operation, and in this case an error will be returned to the application on the post call. It is the application developer’s responsibility to check the CanPost method prior to calling post and handling the post errors mentioned above thrown during the Post operation.
Post first performs a save and then synchronizes the target version with the current edit version. The Post operation cannot be undone.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.void post(String versionName) throws IOException, AutomationException
The Post method requires that the current edit version has been reconciled with any ancestor versions prior to being called. The implicit locking during a reconcile should greatly increase the chances of the source and target versions being ready to post. There is a possibility that these two versions could be out of sync, possible do to the target version changing after a reconcile operation, and in this case an error will be returned to the application on the post call. It is the application developer’s responsibility to check the CanPost method prior to calling post and handling the post errors mentioned above thrown during the Post operation.
Post first performs a save and then synchronizes the target version with the current edit version. This results in an explicit commit of any open transactions in the database. The Post operation can not be undone.
versionName
- The versionName (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |