Class ContentManager
IContentManager interface implementation.
Inheritance
Implements
Inherited Members
Namespace: Quark.CMSAdapters.QPP
Assembly: Quark.CMSAdapters.QPP.dll
Syntax
public class ContentManager : IContentManager
Constructors
ContentManager()
Initializes a new instance of the ContentManager class.
Declaration
public ContentManager()
Properties
CurrentTimeZone
Gets the current time zone as per tz database.
Declaration
public string CurrentTimeZone { get; }
Property Value
Type | Description |
---|---|
System.String | The current time zone. |
PublishingManager
Gets the publishing manager.
Declaration
public IPublishingManager PublishingManager { get; }
Property Value
Type | Description |
---|---|
IPublishingManager | The publishing manager. |
ReferenceManager
Gets the UI manager.
Declaration
public IReferenceManager ReferenceManager { get; }
Property Value
Type | Description |
---|---|
IReferenceManager | The UI manager. |
Methods
AddToWorkflow(Int64, Int64, String, Int64, Boolean)
Shows options to change Workflow and other applicable attributes.
Declaration
public void AddToWorkflow(long assetId, long collectionId = 0L, string title = null, long branchId = 0L, bool useWorkflowDefaults = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | assetId | The asset identifier. |
System.Int64 | collectionId | The collection identifier. |
System.String | title | The window title. |
System.Int64 | branchId | The branch identifier. |
System.Boolean | useWorkflowDefaults | The option to use workflow defaults. |
Browse(String, String, Boolean, Boolean, String)
Browse available assets in the server.
Declaration
public List<string> Browse(string type, string title, bool allowMultiSelect = false, bool allowViewRevision = false, string defaultBrowseLocation = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | The type of documents |
System.String | title | The dialog title |
System.Boolean | allowMultiSelect | if set to |
System.Boolean | allowViewRevision | if set to |
System.String | defaultBrowseLocation | The default browse location. |
Returns
Type | Description |
---|---|
System.Collections.Generic.List<System.String> | The urn of the selected assets. |
Browse(String, String, Boolean, out Boolean, Boolean, String)
Browse available assets in the server.
Declaration
public string Browse(string type, string title, bool allowCheckOut, out bool checkOutReadOnly, bool allowViewRevision = false, string defaultBrowseLocation = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | type | The type of documents |
System.String | title | The dialog title |
System.Boolean | allowCheckOut | if set to |
System.Boolean | checkOutReadOnly | is checkout read only |
System.Boolean | allowViewRevision | if set to |
System.String | defaultBrowseLocation | The default browse location. |
Returns
Type | Description |
---|---|
System.String | The urn of the selected asset. |
CancelCheckout(String)
Cancels the asset checkout.
Declaration
public void CancelCheckout(string urn)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
Exceptions
Type | Condition |
---|---|
CmsAdapterException |
CheckOut(ref String, Boolean, Boolean)
Downloads and marks the asset, specified by given urn, as checked out. This API can also update the urn if required.
Declaration
public string CheckOut(ref string urn, bool checkOutReadOnly, bool isSilent = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
System.Boolean | checkOutReadOnly | if set to |
System.Boolean | isSilent | if set to |
Returns
Type | Description |
---|---|
System.String | The file name of the downloaded asset. |
Exceptions
Type | Condition |
---|---|
CmsAdapterException |
DownloadFile(String, Boolean)
Downloads the asset specified by given urn.
Declaration
public string DownloadFile(string urn, bool isLowRes)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
System.Boolean | isLowRes | if set to |
Returns
Type | Description |
---|---|
System.String | The file name of the downloaded asset. |
DownloadFile(String, Nullable<RenditionTypes>, String)
Downloads the asset specified by given urn.
Declaration
public string DownloadFile(string urn, RenditionTypes? renditionType = default(RenditionTypes? ), string destinationFilePath = null)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
System.Nullable<RenditionTypes> | renditionType | Type of the rendition. |
System.String | destinationFilePath | Destination file path. |
Returns
Type | Description |
---|---|
System.String | The file name of the downloaded asset. |
GetAccessToken()
Returns the session cookie.
Declaration
public string GetAccessToken()
Returns
Type | Description |
---|---|
System.String | Session Cookie |
GetApplicableRules(List<RuleElement>, String, SaveOptions)
Gets the applicable rules as per the specified rule conditions.
Declaration
public HashSet<string> GetApplicableRules(List<RuleElement> ruleList, string urn, SaveOptions saveOptions)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.List<RuleElement> | ruleList | The rule list. |
System.String | urn | The urn. |
SaveOptions | saveOptions | The save options. |
Returns
Type | Description |
---|---|
System.Collections.Generic.HashSet<System.String> | The applicable rules. |
Exceptions
Type | Condition |
---|---|
System.Exception | Invalid status value. or Invalid condition syntax |
CmsAdapterException |
GetAttributeValues(String, List<AttributeInfo>)
Gets the attribute values.
Declaration
public Dictionary<string, string> GetAttributeValues(string urn, List<AttributeInfo> attributes)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
System.Collections.Generic.List<AttributeInfo> | attributes | The attributes. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.String, System.String> | The attributes values. |
GetDraft(String)
Gets the draft.
Declaration
public IDocumentDraft GetDraft(string urn)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
Returns
Type | Description |
---|---|
IDocumentDraft | The draft information. |
GetReviewOptions(String)
Gets the review options.
Declaration
public ReviewOptions GetReviewOptions(string urn)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
Returns
Type | Description |
---|---|
ReviewOptions | The review options. |
GetSaveOptions(String, String, Dictionary<String, AttributeInfo>, Boolean, String, Boolean, Nullable<Boolean>, String, Nullable<NameConflictResolveOptions>, Nullable<Boolean>, Nullable<Boolean>)
Gets the save options.
Declaration
public SaveOptions GetSaveOptions(string urn, string filePath, Dictionary<string, AttributeInfo> attributes, bool isSaveAndCloseMode, string title, bool isSilent = false, bool? createMinorVersion = default(bool? ), string defaultBrowseLocation = null, NameConflictResolveOptions? nameConflictResolveOptions = default(NameConflictResolveOptions? ), bool? workflowMandatory = default(bool? ), bool? saveAsTemplate = default(bool? ))
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
System.String | filePath | The file path. |
System.Collections.Generic.Dictionary<System.String, AttributeInfo> | attributes | The attributes. |
System.Boolean | isSaveAndCloseMode | If set to |
System.String | title | The title of the open save dialog |
System.Boolean | isSilent | If set to |
System.Nullable<System.Boolean> | createMinorVersion | If set to |
System.String | defaultBrowseLocation | The default browse location. |
System.Nullable<NameConflictResolveOptions> | nameConflictResolveOptions | The name conflict resolve options. |
System.Nullable<System.Boolean> | workflowMandatory | Show workflow options while creating new asset. |
System.Nullable<System.Boolean> | saveAsTemplate | If set to |
Returns
Type | Description |
---|---|
SaveOptions | The save options. |
Exceptions
Type | Condition |
---|---|
System.Exception |
InvalidateSession(Boolean)
Invalidates the current session.
Declaration
public void InvalidateSession(bool isShuttingDown = false)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isShuttingDown | if set to |
LocateBasedOnFileSize(String, List<String>, Int64)
Locates asset by comparing its file name and file size with the assets present in the specified folder path.
Declaration
public string LocateBasedOnFileSize(string fileName, List<string> folderPath, long fileSize)
Parameters
Type | Name | Description |
---|---|---|
System.String | fileName | Name of the file. |
System.Collections.Generic.List<System.String> | folderPath | The folder path. |
System.Int64 | fileSize | Size of the file. |
Returns
Type | Description |
---|---|
System.String | The urn of the asset. |
MapAttributeValues(Dictionary<String, AttributeInfo>)
Maps the attribute values.
Declaration
public Dictionary<long, AttributeValue> MapAttributeValues(Dictionary<string, AttributeInfo> attributeMap)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.Dictionary<System.String, AttributeInfo> | attributeMap | The attribute map. |
Returns
Type | Description |
---|---|
System.Collections.Generic.Dictionary<System.Int64, AttributeValue> | Dictionary{System.Int64AttributeValue}. |
MarkAsCheckedOut(ref String, String)
Marks the document as checked out. This API can also update the urn if required.
Declaration
public void MarkAsCheckedOut(ref string urn, string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
System.String | filePath | The file path. |
Exceptions
Type | Condition |
---|---|
CmsAdapterException |
PromoteToAsset(Int64, String, QPPSaveOptions)
Promotes to asset.
Declaration
public string PromoteToAsset(long clipboardDataId, string fileName, QPPSaveOptions qppSaveOptions)
Parameters
Type | Name | Description |
---|---|---|
System.Int64 | clipboardDataId | The clipboard data identifier. |
System.String | fileName | Name of the file. |
QPPSaveOptions | qppSaveOptions | The QPP save options. |
Returns
Type | Description |
---|---|
System.String |
SaveDraft(String, String)
Saves the draft.
Declaration
public IDocumentDraft SaveDraft(string urn, string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
System.String | filePath | The file path. |
Returns
Type | Description |
---|---|
IDocumentDraft | The draft information. |
Exceptions
Type | Condition |
---|---|
CmsAdapterException |
ShowRevisionComments(String)
Show revision comment dialog based on preference for a checked-out asset.
Declaration
public void ShowRevisionComments(string urn)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn |
SwitchBranch(String, Boolean)
Switches the branch.
Declaration
public string SwitchBranch(string urn, bool createNew = false)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
System.Boolean | createNew | if set to |
Returns
Type | Description |
---|---|
System.String | The updated URN |
Upload(UploadFileInfo)
Uploads the specified file to server.
Declaration
public string Upload(UploadFileInfo uploadFileInfo)
Parameters
Type | Name | Description |
---|---|---|
UploadFileInfo | uploadFileInfo | The upload file info. |
Returns
Type | Description |
---|---|
System.String | The urn of the asset. |
Exceptions
Type | Condition |
---|---|
System.Exception | Rendition Upload failed (" + rendition.FilePath + "). |
ValidateDocument(String)
Checks for any environment conflicts when document is opened.
Declaration
public void ValidateDocument(string urn)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
Exceptions
Type | Condition |
---|---|
System.Exception |
ValidateSession(Boolean, Boolean)
Validates the current session. If user is not logged on, initiates log on routine. API never throws any exception.
Declaration
public bool ValidateSession(bool isSilent = false, bool doLogon = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | isSilent | Shows error dialog if false else silently logs exceptions |
System.Boolean | doLogon | Shows logon dialog if not logged on |
Returns
Type | Description |
---|---|
System.Boolean | The session validation status. |
Exceptions
Type | Condition |
---|---|
CmsAdapterException |
Events
AfterCancelCheckOut
Occurs after cancel checkout.
Declaration
public event Action<EventArgs> AfterCancelCheckOut
Event Type
Type | Description |
---|---|
System.Action<System.EventArgs> |
AfterCheckOut
Occurs after check out.
Declaration
public event Action<EventArgs> AfterCheckOut
Event Type
Type | Description |
---|---|
System.Action<System.EventArgs> |
AfterSave
Occurs after document save is complete.
Declaration
public event Action<EventArgs> AfterSave
Event Type
Type | Description |
---|---|
System.Action<System.EventArgs> |
BeforeCancelCheckOut
Occurs before cancel checkout.
Declaration
public event Action<EventArgs> BeforeCancelCheckOut
Event Type
Type | Description |
---|---|
System.Action<System.EventArgs> |
BeforeCheckOut
Occurs before checkout.
Declaration
public event Action<EventArgs> BeforeCheckOut
Event Type
Type | Description |
---|---|
System.Action<System.EventArgs> |
BeforeSave
Occurs before document save starts.
Declaration
public event Action<EventArgs> BeforeSave
Event Type
Type | Description |
---|---|
System.Action<System.EventArgs> |
FileUpload
Occurs before file upload.
Declaration
public event Action<EventArgs> FileUpload
Event Type
Type | Description |
---|---|
System.Action<System.EventArgs> |
SaveOptionsUpdate
Occurs when user submits save options.
Declaration
public event Action<EventArgs> SaveOptionsUpdate
Event Type
Type | Description |
---|---|
System.Action<System.EventArgs> |