com.businessobjects.sdk.biar
Interface ICommitOptions


public interface ICommitOptions

This interface describes the set of options that can be set to control the behaviour of a commit when using the applicable commit methods of IObjectManager.


Method Summary
 CommitLevel getGlobalCommitLevel()
          Gets the global commit level, if one is set.
 CommitMode getMode()
          Gets the mode of the commit.
 java.lang.String getRenamePattern()
          Gets the rename pattern, if one is set.
 CommitType getType()
          Gets the type of the commit.
 boolean isAtomic()
          Gets the commit atomicity.
 ICommitOptions setAtomicity(boolean atomic)
          Sets the commit's atomicity.
 ICommitOptions setGlobalCommitLevel(CommitLevel level)
          Sets the global commit level.
 ICommitOptions setMode(CommitMode mode)
          Sets the commit mode.
 ICommitOptions setRenamePattern(java.lang.String renamePattern)
           Sets the rename pattern used when a committed info object's name collides with another's.
 ICommitOptions setType(CommitType type)
          Sets the commit type.
 

Method Detail

getType

CommitType getType()
Gets the type of the commit.

Returns:
the commit type.
See Also:
com.businessobjects.sdk.biar.CommitType

getMode

CommitMode getMode()
Gets the mode of the commit.

Returns:
the commit mode.
See Also:
com.businessobjects.sdk.biar.CommitMode

isAtomic

boolean isAtomic()
Gets the commit atomicity.

Returns:
true if the commit is atomic, and false otherwise.
See Also:
ICommitOptions.setAtomicity(boolean)

getGlobalCommitLevel

CommitLevel getGlobalCommitLevel()
Gets the global commit level, if one is set.

Returns:
the global commit level, or null if none is set.
See Also:
com.businessobjects.sdk.biar.CommitLevel, ICommitOptions.setGlobalCommitLevel(CommitLevel)

getRenamePattern

java.lang.String getRenamePattern()
Gets the rename pattern, if one is set.

Returns:
the rename pattern.
See Also:
ICommitOptions.setRenamePattern(String)

setType

ICommitOptions setType(CommitType type)
Sets the commit type.

Parameters:
type - the new commit type.
Returns:
this ICommitOptions.

setMode

ICommitOptions setMode(CommitMode mode)
Sets the commit mode.

Parameters:
mode - the new commit mode.
Returns:
this ICommitOptions

setAtomicity

ICommitOptions setAtomicity(boolean atomic)
Sets the commit's atomicity. When the commit is atomic then the first error will roll back the entire commit; otherwise commit proceeds until all info objects have been attempted.

Parameters:
atomic - the new commit atomicity.
Returns:
this ICommitOptions.

setGlobalCommitLevel

ICommitOptions setGlobalCommitLevel(CommitLevel level)
Sets the global commit level. If level is non-null then that commit level will be applied to every info object that is committed.

Parameters:
level - the new global commit level, or null to clear it.
Returns:
this ICommitOptions.

setRenamePattern

ICommitOptions setRenamePattern(java.lang.String renamePattern)

Sets the rename pattern used when a committed info object's name collides with another's. A collision occurs when two objects of the same type and under the same parent folder have identical names. If the rename pattern is null then name collisions result in an error.

The rename pattern is a string that describes how to calculate a new name in the event of a collision. To derive the new name, all occurrences of "%1" are replaced by the original name and all occurrences of "%2" are replaced by a number to make the name unique. For all patterns at least one "%1" and one "%2" must be present, or an error will result at the time of commit.

An example pattern is "%1 (Copy Number %2)" which would produce names such as "Foo (Copy Number 1)" for the collision of two objects named Foo.

Parameters:
renamePattern - the new rename pattern, or null to clear it.
Returns:
this ICommitOptions.