Class SoArc2CheckoutHelper
Class for helping with locking/checkout functionality
Inheritance
SoArc2CheckoutHelper
Assembly: SoDataBase.dll
Syntax
public class SoArc2CheckoutHelper
Constructors
SoArc2CheckoutHelper(ICheckinFileOperations)
Class for helping with locking/checkout functionality
Declaration
public SoArc2CheckoutHelper(ICheckinFileOperations fileOps)
Parameters
Fields
LockedFolderName
Class for helping with locking/checkout functionality
Declaration
public const string LockedFolderName = "locked"
Field Value
Methods
CheckinDocument(IDocumentInfo)
Check-in the document. This will copy the locked\document to the original folder and remove the checkoutdata.
Declaration
public void CheckinDocument(IDocumentInfo documentInfo)
Parameters
CheckoutDocument(IDocumentInfo, int)
Check-out the document. This will copy the current document to the locked folder.
Declaration
public string CheckoutDocument(IDocumentInfo documentInfo, int associateId)
Parameters
Returns
Type |
Description |
string |
The path to the locked document.
|
GetCheckedOutDocumentPath(IDocumentInfo)
Get the path to the checked-out document.
Assumes that the document is checked-out.
Declaration
public string GetCheckedOutDocumentPath(IDocumentInfo incomingInfo)
Parameters
Returns
GetCheckoutData(IDocumentInfo)
Get the internal representation of the checkout meta-data.
Declaration
public CheckoutData GetCheckoutData(IDocumentInfo documentInfo)
Parameters
Returns
GetDocumentLockedPath(IDocumentInfo, bool)
Get the path to the locked folder for the supplied document.
Declaration
protected string GetDocumentLockedPath(IDocumentInfo documentInfo, bool createIfNeccessary = false)
Parameters
Returns
Type |
Description |
string |
The path to the locked folder for the document - excluding the document name
|
GetDocumentPath(IDocumentInfo, CheckoutData, int)
Get the path to the document which this associate has access to. If the document is checked-out to the user, he will receive the path to the document in the locked
folder. If the document is not checked out, or the current associate is not the checked-out-associate, he will receive the path to the original document.
Declaration
public string GetDocumentPath(IDocumentInfo documentInfo, CheckoutData checkoutData, int associateId)
Parameters
Returns
GetDocumentPath(IDocumentInfo, int)
Get the path to the document which this associate has access to. If the document is checked-out to the user, he will receive the path to the document in the locked
folder. If the document is not checked out, or the current associate is not the checked-out-associate, he will receive the path to the original document.
Declaration
public string GetDocumentPath(IDocumentInfo documentInfo, int associateId)
Parameters
Returns
IsDocumentLockedByOffice(IDocumentInfo, out string)
Check if the document is locked by Office. If the file is locked, displayName will be populated with the name of the editor.
Declaration
public bool IsDocumentLockedByOffice(IDocumentInfo documentInfo, out string displayName)
Parameters
Returns
IsWriteableForAssociate(IDocumentInfo, CheckoutData, int)
Class for helping with locking/checkout functionality
Declaration
public bool IsWriteableForAssociate(IDocumentInfo documentInfo, CheckoutData checkoutData, int associateId)
Parameters
Returns
IsWriteableForAssociate(IDocumentInfo, int)
Class for helping with locking/checkout functionality
Declaration
public bool IsWriteableForAssociate(IDocumentInfo documentInfo, int associateId)
Parameters
Returns
RenameDocument(IDocumentInfo, string)
Rename the checkout data when the document is renamed.
Should only be called when the document has actually changed file name.
Declaration
public void RenameDocument(IDocumentInfo documentInfo, string newFileName)
Parameters
SaveCheckoutData(IDocumentInfo, CheckoutData)
Save the checkout data as JSON in the archivepath. The checkoutdata is removed if the checkoutData is null.
Declaration
public void SaveCheckoutData(IDocumentInfo documentInfo, CheckoutData checkoutData)
Parameters
UndoCheckout(IDocumentInfo)
Class for helping with locking/checkout functionality
Declaration
public void UndoCheckout(IDocumentInfo documentInfo)
Parameters
Extension Methods