Interface IContentManager
Defines the common CMS Content Manager interface
Namespace: Quark.CMSAdapters.Core.Specializations
Assembly: Quark.CMSAdapters.Core.dll
Syntax
public interface IContentManager
Properties
PublishingManager
Gets the publishing manager.
Declaration
IPublishingManager PublishingManager { get; }
Property Value
Type | Description |
---|---|
IPublishingManager | The publishing manager. |
ReferenceManager
Gets the reference manager.
Declaration
IReferenceManager ReferenceManager { get; }
Property Value
Type | Description |
---|---|
IReferenceManager | The reference manager. |
Methods
Browse(String, String, Boolean, Boolean, String)
Browse available assets in the server.
Declaration
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
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
void CancelCheckout(string urn)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
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
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. |
DownloadFile(String, Boolean)
Downloads the asset specified by given urn.
Declaration
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
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. |
GetApplicableRules(List<RuleElement>, String, SaveOptions)
Gets the applicable rules as per the specified rule conditions.
Declaration
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. |
GetAttributeValues(String, List<AttributeInfo>)
Gets the attribute values.
Declaration
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
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
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
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. |
InvalidateSession(Boolean)
Invalidates the current session.
Declaration
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
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. |
MarkAsCheckedOut(ref String, String)
Marks the document as checked out. This API can also update the urn if required.
Declaration
void MarkAsCheckedOut(ref string urn, string filePath)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
System.String | filePath | The file path. |
SaveDraft(String, String)
Saves the draft.
Declaration
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. |
SwitchBranch(String, Boolean)
Switches the document version branch.
Declaration
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
string Upload(UploadFileInfo uploadFileInfo)
Parameters
Type | Name | Description |
---|---|---|
UploadFileInfo | uploadFileInfo | The upload file info. |
Returns
Type | Description |
---|---|
System.String | The urn of the asset. |
ValidateDocument(String)
Checks for any environment conflicts when document is opened.
Declaration
void ValidateDocument(string urn)
Parameters
Type | Name | Description |
---|---|---|
System.String | urn | The urn. |
ValidateSession(Boolean, Boolean)
Validates the current session. If user is not logged on, initiates log on routine. API never throws any exception.
Declaration
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. |