Class PhysicalDocument
Facade for the Document Plugin system, and one-stop-shop for physical-document operations
Implements
Inherited Members
Namespace: SuperOffice.CRM.Documents
Assembly: SoDataBase.dll
Syntax
public sealed class PhysicalDocument : IStreamProvider
Remarks
An instance of this class represents a physical document in a document archive, and can be used to manipulate (Load, Save) that document and its metadata. Instances are constructed using a static factory function, always based on an already existing information in the database.
Static methods also provide access to document template functions and other non-document specific functions.
Properties
ArchiveProvider
The numeric plugin ID of the plugin responsible for this physical document
Declaration
public int ArchiveProvider { get; }
Property Value
Type | Description |
---|---|
Int32 |
DocumentId
ID of document row this physical document is related to
Declaration
public int DocumentId { get; }
Property Value
Type | Description |
---|---|
Int32 |
DocumentInfo
Document Info object - created by this class from documentId if needed
Declaration
public IDocumentInfo DocumentInfo { get; }
Property Value
Type | Description |
---|---|
IDocumentInfo |
ExternalReference
External reference for this document
Declaration
public string ExternalReference { get; }
Property Value
Type | Description |
---|---|
String |
Length
Declaration
public long Length { get; }
Property Value
Type | Description |
---|---|
Int64 |
Methods
AssociateRename(String, String)
Invokes document plugins that implements the IAssociateRename interface.
Declaration
public static void AssociateRename(string oldName, string newName)
Parameters
Type | Name | Description |
---|---|---|
String | oldName | |
String | newName |
BeginRead()
Declaration
public void BeginRead()
BeginWrite()
Declaration
public void BeginWrite()
CheckinDocument(String[], String, String[])
Declaration
public ReturnInfo CheckinDocument(string[] allowedReturnTypes, string versionDescription, string[] versionExtraFields)
Parameters
Type | Name | Description |
---|---|---|
String[] | allowedReturnTypes | |
String | versionDescription | |
String[] | versionExtraFields |
Returns
Type | Description |
---|---|
ReturnInfo |
CheckoutDocument(String[])
Declaration
public ReturnInfo CheckoutDocument(params string[] allowedReturnTypes)
Parameters
Type | Name | Description |
---|---|---|
String[] | allowedReturnTypes |
Returns
Type | Description |
---|---|
ReturnInfo |
CreateDefaultDocumentTemplate(Int32, Int32)
Create a blank default document based on the given documentTypeId. Called when creating a new template.
Declaration
public static string CreateDefaultDocumentTemplate(int documentTypeKey, int documentTemplateId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | documentTypeKey | Id for a document type. Ignored if document plugin does not use document types. |
Int32 | documentTemplateId | Document template id |
Returns
Type | Description |
---|---|
String | Extref/Filename for new template. This value is written to the template's Filename property in the database. |
CreateDefaultDocumentTemplateLanguage(IDocumentTemplateInfo, String)
Create a new template language alternative based on the existing template
Declaration
public static void CreateDefaultDocumentTemplateLanguage(IDocumentTemplateInfo docInfo, string languageCode)
Parameters
Type | Name | Description |
---|---|---|
IDocumentTemplateInfo | docInfo | |
String | languageCode |
CreateFilenameForNewTemplate(IDocumentTemplateInfo, String)
Calculates a new name for a template based on the properties from an existing template. Should only be used when copying existing templates.
Declaration
public static string CreateFilenameForNewTemplate(IDocumentTemplateInfo sourceTemplateInfo, string newTemplateName)
Parameters
Type | Name | Description |
---|---|---|
IDocumentTemplateInfo | sourceTemplateInfo | |
String | newTemplateName |
Returns
Type | Description |
---|---|
String | newer null |
CreateNewEmpty(IDocumentInfo, ref String, String[], String, String[])
Declaration
public static string CreateNewEmpty(IDocumentInfo incomingInfo, ref string fileName, string[] extraFields, string versionDecription, string[] versionExtraFields)
Parameters
Type | Name | Description |
---|---|---|
IDocumentInfo | incomingInfo | |
String | fileName | |
String[] | extraFields | |
String | versionDecription | |
String[] | versionExtraFields |
Returns
Type | Description |
---|---|
String |
CreateNewEmptyByRef(ref IDocumentInfo, ref String, String[], String, String[])
Declaration
public static string CreateNewEmptyByRef(ref IDocumentInfo incomingInfo, ref string fileName, string[] extraFields, string versionDecription, string[] versionExtraFields)
Parameters
Type | Name | Description |
---|---|---|
IDocumentInfo | incomingInfo | |
String | fileName | |
String[] | extraFields | |
String | versionDecription | |
String[] | versionExtraFields |
Returns
Type | Description |
---|---|
String |
CreateNewFromTemplate(IDocumentInfo, ref String, String[], String, String[], String)
Create a new document in the document archive without replacing template tags
Declaration
public static string CreateNewFromTemplate(IDocumentInfo incomingInfo, ref string fileName, string[] extraFields, string versionDecription, string[] versionExtraFields, string uiCulture)
Parameters
Type | Name | Description |
---|---|---|
IDocumentInfo | incomingInfo | |
String | fileName | |
String[] | extraFields | |
String | versionDecription | |
String[] | versionExtraFields | |
String | uiCulture |
Returns
Type | Description |
---|---|
String | Reference to the newly created document in the document archive. |
Remarks
This method will create a new physical document, using the physical template unchanged. No template tag substitution will be attempted, no document conversions, nothing.
The method is generally used for creating mailmerge template documents
CreateNewFromTemplateWithTags(IDocumentInfo, ref String, String[], String, String[], TagContainer, String)
Create a new document in the document archive, replacing template tags
Declaration
public static string CreateNewFromTemplateWithTags(IDocumentInfo incomingInfo, ref string fileName, string[] extraFields, string versionDecription, string[] versionExtraFields, TagContainer templateTags, string uiCulture)
Parameters
Type | Name | Description |
---|---|---|
IDocumentInfo | incomingInfo | |
String | fileName | |
String[] | extraFields | |
String | versionDecription | |
String[] | versionExtraFields | |
TagContainer | templateTags | |
String | uiCulture | UI Language (en-US or nb-NO) - used to select appropriate doc template |
Returns
Type | Description |
---|---|
String | Reference to the newly created document in the document archive. |
Remarks
This method will create a new physical document, using the physical template and replacing all tags passed in through the TagContainer parameter.
CreateNewFromTemplateWithTagsAsStream(Int32, String, TagContainer)
Declaration
public static Stream CreateNewFromTemplateWithTagsAsStream(int templateId, string uiCulture, TagContainer templateTags)
Parameters
Type | Name | Description |
---|---|---|
Int32 | templateId | |
String | uiCulture | |
TagContainer | templateTags |
Returns
Type | Description |
---|---|
Stream |
DeleteDocument(String[])
Declaration
public ReturnInfo DeleteDocument(params string[] allowedReturnTypes)
Parameters
Type | Name | Description |
---|---|---|
String[] | allowedReturnTypes |
Returns
Type | Description |
---|---|
ReturnInfo |
DeleteDocumentTemplateLanguage(IDocumentTemplateInfo, String)
Deletes the document template language.
Declaration
public static void DeleteDocumentTemplateLanguage(IDocumentTemplateInfo templateInfo, string languageCode)
Parameters
Type | Name | Description |
---|---|---|
IDocumentTemplateInfo | templateInfo | Information about the template. The fields id and external reference must be filled out |
String | languageCode | The language code ('en-US, 'nb-NO', etc). Field cannot be empty. |
EndRead()
Declaration
public void EndRead()
EndWrite()
Declaration
public void EndWrite()
ExecuteDocumentCommand(String, String[], String, String[])
Execute a custom command on a specified document and version
Declaration
public ReturnInfo ExecuteDocumentCommand(string versionId, string[] allowedReturnTypes, string command, params string[] additionalData)
Parameters
Type | Name | Description |
---|---|---|
String | versionId | Version identifier, blank implies 'latest' version |
String[] | allowedReturnTypes | Array of names of allowed return types; if this array is empty then no limits are placed on return type. |
String | command | Command name, taken from an earlier call to GetDocumentCommands(String[])
|
String[] | additionalData | Array of strings containing whatever additional data the command
may need. This parameter is intended for authors of more complex custom GUI's and works as
a tunnel between the ultimate client and the document plugin. Standard GUI made by SuperOffice,
such as a context menu connected to a document item in an archive, will not populate this
member. |
Returns
Type | Description |
---|---|
ReturnInfo | Return value object, specifying failure or success plus any optional, additional processing to be triggered |
Remarks
This command is called when the user chooses an action item from a dropdown/context menu. It is also reflected in the DocumentAgent service interface, so that custom GUI’s and external code can directly execute document plugin commands; this is useful if a plugin also has some corresponding custom GUI that needs to execute commands depending on user interaction.
The parameter allowedReturnTypes
can be used by clients to hint to the plugin
what kind of return value processing is available. For instance, a mobile client might
only offer None and Message, and this information can be used by the document plugin to adapt
the processing of a command, if it wants to (for instance, use default values instead of
triggering some more advanced workflow).
The command is obtained from the GetDocumentCommands(String[]) method.
Exists()
Declaration
public bool Exists()
Returns
Type | Description |
---|---|
Boolean |
GetAllDocPlugins()
Declaration
public static Dictionary<int, string> GetAllDocPlugins()
Returns
Type | Description |
---|---|
Dictionary<Int32, String> |
GetCheckoutState()
Declaration
public CheckoutInfo GetCheckoutState()
Returns
Type | Description |
---|---|
CheckoutInfo |
GetDefaultDocumentPluginId()
Get the default document plugin id
Declaration
public static int GetDefaultDocumentPluginId()
Returns
Type | Description |
---|---|
Int32 |
GetDocument(IDocumentInfo)
Declaration
public static PhysicalDocument GetDocument(IDocumentInfo incomingInfo)
Parameters
Type | Name | Description |
---|---|---|
IDocumentInfo | incomingInfo |
Returns
Type | Description |
---|---|
PhysicalDocument |
GetDocument(Int32)
Declaration
public static PhysicalDocument GetDocument(int documentId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | documentId |
Returns
Type | Description |
---|---|
PhysicalDocument |
GetDocumentCommands(String[])
Get a list of custom commands, applicable to a specific document. Note that commands related to standard locking and versioning operations have their own API calls and are not 'custom commands' in this sense.
Declaration
public CommandInfo[] GetDocumentCommands(params string[] allowedReturnTypes)
Parameters
Type | Name | Description |
---|---|---|
String[] | allowedReturnTypes | Array of names of allowed return types; if this array is empty then no limits are placed on return type. |
Returns
Type | Description |
---|---|
CommandInfo[] | Array of command descriptions. If there are no custom commands available, an empty array should be returned. |
Remarks
This API is called before a menu, task button or other GUI item that gives access to document-specific commands is shown. It is used to populate the GUI with available commands for a particular document, the results are not cached by the GUI.
Depending on the return type indicated in the command, the command might be filtered by GUI. More information can be found in the CommandInfo topic.
GetDocumentIdFromPath(String)
Declaration
public static int GetDocumentIdFromPath(string documentNameAndPath)
Parameters
Type | Name | Description |
---|---|---|
String | documentNameAndPath |
Returns
Type | Description |
---|---|
Int32 |
GetDocumentProperties(String[])
Get the values of certain properties, for a given document
Declaration
public Dictionary<string, string> GetDocumentProperties(params string[] requestedProperties)
Parameters
Type | Name | Description |
---|---|---|
String[] | requestedProperties |
Returns
Type | Description |
---|---|
Dictionary<String, String> | Dictionary of key=value pairs, where the key is one of the requested property strings, and the value is the value of that property for the given document. |
Remarks
Each document can have a number of properties associated with it. A set of standard properties is defined in the Constants.Properties class. Ideally, retrieving properties should be a lightweight operation.
Note that 'properties' are a one-way mechanism where the document plugin provides information about the document or certain aspects of it. This is not the same as document-specific metadata, which is handled by the LoadMetaData() and SaveMetaData(String[]) methods.
GetDocumentTemplateProperties(Int32, String[])
Declaration
public static Dictionary<string, string> GetDocumentTemplateProperties(int documentTemplateId, params string[] requestedProperties)
Parameters
Type | Name | Description |
---|---|---|
Int32 | documentTemplateId | |
String[] | requestedProperties |
Returns
Type | Description |
---|---|
Dictionary<String, String> |
GetDocumentTemplateUrl(Int32, Boolean, String)
Get a WebDAV-compliant URL referring to the given document template
Declaration
public static string GetDocumentTemplateUrl(int documentTemplateId, bool writableUrl, string languageCode)
Parameters
Type | Name | Description |
---|---|---|
Int32 | documentTemplateId | The id of the document template |
Boolean | writableUrl | |
String | languageCode | Language variation on the template. May be ignored by the plugin, or used to keep language specific versions of the template. |
Returns
Type | Description |
---|---|
String | URL that gives access to the document. If the document plugin does not support URL access, then a blank string should be returned. |
Remarks
Document plugins may support document access via WebDAV. This call is used to retrieve a WebDAV url that will give the specified access to the document. This URL will be passed to the ultimate client (most probably a text editor application), and control will not return to NetServer.
The string returned here should be a fully resolved URL that can be given directly to the editor application.
GetDocumentTypesForDocumentTemplates(Int32)
Get a list of supported document template types.
Declaration
public static Dictionary<int, string> GetDocumentTypesForDocumentTemplates(int pluginId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | pluginId |
Returns
Type | Description |
---|---|
Dictionary<Int32, String> | An dictionary of key=display-name for supported document types for template. Empty dictionary if no document types supported. |
GetDocumentUrl()
Declaration
public string GetDocumentUrl()
Returns
Type | Description |
---|---|
String |
GetDocumentUrl(IDocumentInfo, String, Boolean)
Declaration
public static string GetDocumentUrl(IDocumentInfo incomingInfo, string versionId, bool writeableUrl)
Parameters
Type | Name | Description |
---|---|---|
IDocumentInfo | incomingInfo | |
String | versionId | |
Boolean | writeableUrl |
Returns
Type | Description |
---|---|
String |
GetDocumentUrl(String, Boolean)
Declaration
public string GetDocumentUrl(string versionId, bool writeableUrl)
Parameters
Type | Name | Description |
---|---|---|
String | versionId | |
Boolean | writeableUrl |
Returns
Type | Description |
---|---|
String |
GetLength(String)
Declaration
public long GetLength(string versionId)
Parameters
Type | Name | Description |
---|---|---|
String | versionId |
Returns
Type | Description |
---|---|
Int64 |
GetPlugin(Int32)
Return the plugin specified by its plugin-id
Declaration
public static IDocumentPlugin2 GetPlugin(int pluginId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | pluginId |
Returns
Type | Description |
---|---|
IDocumentPlugin2 |
GetPluginCapabilities(Int32)
Declaration
public static Dictionary<string, string> GetPluginCapabilities(int pluginId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | pluginId |
Returns
Type | Description |
---|---|
Dictionary<String, String> |
GetTemplateExtension(Int32)
Get the "extension" for the template, i.e., what the file extension would have been - to help identify the stream content format.
Declaration
public static string GetTemplateExtension(int documentTemplateId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | documentTemplateId | Document template primary key id |
Returns
Type | Description |
---|---|
String | String equivalent to a file extension, for instance ".docx" |
Remarks
Template documents are generally created in text editors and stored as files of some kind. The file extension indicates the kind of document - doc, docx, xls, txt, and so on. While the template may be stored inside the document repository as any kind of data byte collection, a concept akin to the file extension is still needed to help identify the document format, ahead of actually reading the template content.
GetTemplateId(String)
Declaration
public static int GetTemplateId(string templateName)
Parameters
Type | Name | Description |
---|---|---|
String | templateName |
Returns
Type | Description |
---|---|
Int32 |
GetTemplateLanguages(IDocumentTemplateInfo)
Declaration
public static string[] GetTemplateLanguages(IDocumentTemplateInfo templateInfo)
Parameters
Type | Name | Description |
---|---|---|
IDocumentTemplateInfo | templateInfo |
Returns
Type | Description |
---|---|
String[] |
GetVersionList()
Declaration
public VersionInfo[] GetVersionList()
Returns
Type | Description |
---|---|
VersionInfo[] |
GoTravel(Int32, String, ProgressEstimateCallback, ProgressStepCallback)
Go on travel, calling all available plugins to do so (need to implement
Declaration
public static void GoTravel(int associateId, string localArchivePath, ProgressEstimateCallback estimate, ProgressStepCallback step)
Parameters
Type | Name | Description |
---|---|---|
Int32 | associateId | ID of associate who is the document owner |
String | localArchivePath | |
ProgressEstimateCallback | estimate | Callback to set the expected number of items to copy, to scale the progress bar |
ProgressStepCallback | step | Callback to advance the progress bar by one step |
HomeComing(Int32, String, ProgressEstimateCallback, ProgressStepCallback)
Return from travel, calling all available plugins to do so (need to implement
Declaration
public static void HomeComing(int associateId, string localArchivePath, ProgressEstimateCallback estimate, ProgressStepCallback step)
Parameters
Type | Name | Description |
---|---|---|
Int32 | associateId | ID of associate who is the document owner |
String | localArchivePath | |
ProgressEstimateCallback | estimate | Callback to set the expected number of items to copy, to scale the progress bar |
ProgressStepCallback | step | Callback to advance the progress bar by one step |
IsNameValid(String)
Declaration
public static bool IsNameValid(string name)
Parameters
Type | Name | Description |
---|---|---|
String | name |
Returns
Type | Description |
---|---|
Boolean |
LoadDocumentStream()
Declaration
public Stream LoadDocumentStream()
Returns
Type | Description |
---|---|
Stream |
LoadDocumentStream(IDocumentInfo, String)
Declaration
public static Stream LoadDocumentStream(IDocumentInfo incomingInfo, string versionId)
Parameters
Type | Name | Description |
---|---|---|
IDocumentInfo | incomingInfo | |
String | versionId |
Returns
Type | Description |
---|---|
Stream |
LoadDocumentStream(String)
Declaration
public Stream LoadDocumentStream(string versionId)
Parameters
Type | Name | Description |
---|---|---|
String | versionId |
Returns
Type | Description |
---|---|
Stream |
LoadDocumentTemplateStream(Int32, String)
Get data stream for document template
Declaration
public static Stream LoadDocumentTemplateStream(int documentTemplateId, string uiCulture)
Parameters
Type | Name | Description |
---|---|---|
Int32 | documentTemplateId | Identity of document template |
String | uiCulture |
Returns
Type | Description |
---|---|
Stream | Opens stream with data for document template |
LoadDocumentTemplateStream(Int32, String, out String)
Get data stream for document template
Declaration
public static Stream LoadDocumentTemplateStream(int documentTemplateId, string uiCulture, out string templateExtension)
Parameters
Type | Name | Description |
---|---|---|
Int32 | documentTemplateId | Identity of document template |
String | uiCulture | |
String | templateExtension |
Returns
Type | Description |
---|---|
Stream | Opens stream with data for document template |
LoadDocumentTemplateStream(String, Boolean, String)
Retrieve data stream for a document template based on an identifier(Ex: the filename). All available document plugins are searched. The first available template is returned.
Declaration
public static Stream LoadDocumentTemplateStream(string templateIdentifier, bool allowPersonalTemplate, string uiCulture)
Parameters
Type | Name | Description |
---|---|---|
String | templateIdentifier | Identifier for a template. Ex: "myTemplate.txt" |
Boolean | allowPersonalTemplate | Should we search for personal templates before central |
String | uiCulture |
Returns
Type | Description |
---|---|
Stream | Data stream for template or null if not found |
LoadMetaData()
Retrieve metadata owned by the plugin/repository, related to one document (excluding version-dependent metadata)
Declaration
public string[] LoadMetaData()
Returns
Type | Description |
---|---|
String[] | Array of name=value strings, each representing one key and one value. |
Remarks
A document plugin may consume and provide an arbitrary number of metadata fields. These are placed in a string, string dictionary, representing name/value pairs. This call should not retrieve metadata related to any particular version, only data related to the document as a whole.
The NetServer service call DocumentAgent.GetDocumentEntity will (among other things) result in a call to this API to populate the ExtraFields property of the document entity carrier. Note, however, that the carrier handed over to the client may contain other fields in addition to those supplied by the document plugin, since the extrafields mechanism is generic and there may be other metadata providers along the line.
Attribute names should be prefixed with the name of the document plugin, to maintain global uniqueness.
It is strongly suggested that non-string data be formatted according to the rules followed by the CultureDataFormatter class, to avoid problems when parsing dates and floating-point types between different cultures and platforms.
LoadVersionInfo(String)
Retrieve metadata owned by the plugin/repository, related to one particular version of one document
Declaration
public VersionInfo LoadVersionInfo(string versionId)
Parameters
Type | Name | Description |
---|---|---|
String | versionId | Version identifier, blank implies 'latest' version |
Returns
Type | Description |
---|---|
VersionInfo | Fully populated version info structure |
Remarks
A document plugin may consume and provide an arbitrary number of metadata fields. These are placed in a string, string dictionary, representing name/value pairs. This call should only retrieve metadata related to a version.
The NetServer service call DocumentAgent.GetDocumentEntity will (among other things) result in a call to this API to populate the VersionInfo property of the document entity carrier.
Attribute names should be prefixed with the name of the document plugin, to maintain global uniqueness.
It is strongly suggested that non-string data be formatted according to the rules followed by the CultureDataFormatter class, to avoid problems when parsing dates and floating-point types between different cultures and platforms.
To efficiently retrieve information about all versions, use the GetVersionList(IDocumentInfo) method, instead of iterating over this method.
MailMergeDocumentToFile(Int32, Int32, Int32)
Perform a document MailMerge: A merge-with-tags, using a document (not template!) as a source, and writing the output to a temp file
Declaration
public string MailMergeDocumentToFile(int contactId, int personId, int selectionId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | contactId | Recipient contact id |
Int32 | personId | Recipient person id |
Int32 | selectionId | Current selection id (cannot be deduced from document, or other known parameters) |
Returns
Type | Description |
---|---|
String | Full path of temp file that contains the result; the caller is responsible for deleting this file |
Read(Int64, Byte[], Int32, Int32)
Declaration
public int Read(long filePosition, byte[] buffer, int bufferStartPosition, int length)
Parameters
Type | Name | Description |
---|---|---|
Int64 | filePosition | |
Byte[] | buffer | |
Int32 | bufferStartPosition | |
Int32 | length |
Returns
Type | Description |
---|---|
Int32 |
RenameDocument(String)
Declaration
public string RenameDocument(string suggestedNewName)
Parameters
Type | Name | Description |
---|---|---|
String | suggestedNewName |
Returns
Type | Description |
---|---|
String |
SaveDocumentFromStream(IDocumentInfo, String[], Stream)
Declaration
public static ReturnInfo SaveDocumentFromStream(IDocumentInfo incomingInfo, string[] allowedReturnTypes, Stream content)
Parameters
Type | Name | Description |
---|---|---|
IDocumentInfo | incomingInfo | |
String[] | allowedReturnTypes | |
Stream | content |
Returns
Type | Description |
---|---|
ReturnInfo |
SaveDocumentFromStream(String[], Stream)
Declaration
public ReturnInfo SaveDocumentFromStream(string[] allowedReturnTypes, Stream content)
Parameters
Type | Name | Description |
---|---|---|
String[] | allowedReturnTypes | |
Stream | content |
Returns
Type | Description |
---|---|
ReturnInfo |
SaveDocumentTemplateStream(Int32, Stream, String, Int32)
Create or update the document template contents. Usually used when uploading a file to a new document template.
Declaration
public static TemplateInfo SaveDocumentTemplateStream(int documentTemplateId, Stream content, string uiCulture, int pluginId)
Parameters
Type | Name | Description |
---|---|---|
Int32 | documentTemplateId | Document template record id the database. |
Stream | content | Stream containing file content |
String | uiCulture | Language variation on the template. May be ignored by the plugin, or used to keep language specific versions of the template. |
Int32 | pluginId | If negative, use the plugin specified in the document template's load-from-plugin-id field |
Returns
Type | Description |
---|---|
TemplateInfo | Template information with ExtRef/Filename and MimeType filled in. These values are saved in the DocTmpl record. |
SaveMetaData(String[])
Store/update plugin-dependent document metadata in the repository
Declaration
public void SaveMetaData(string[] pluginData)
Parameters
Type | Name | Description |
---|---|---|
String[] | pluginData | Name=value array containing metadata |
Remarks
This call is made when the document metadata should be stored, and is the complement of the LoadMetaData(IDocumentInfo) method. The document plugin should extract whatever elements it recognizes from the pluginData name/value dictionary. Failure to recognize an element should not cause an exception, as there may be other plugins along the line (not document plugins, but service-level field providers) that own the data. Likewise, absence of a value should be taken to imply “no change” to that value - not "delete".
It is strongly suggested that non-string data be formatted according to the rules followed by the CultureDataFormatter class, to avoid problems when parsing dates and floating-point types between different cultures and platforms.
SetDocumentTemplateFromDocumentTemplate(IDocumentTemplateInfo, IDocumentTemplateInfo)
Declaration
public static TemplateInfo SetDocumentTemplateFromDocumentTemplate(IDocumentTemplateInfo sourceTemplateInfo, IDocumentTemplateInfo destTemplateInfo)
Parameters
Type | Name | Description |
---|---|---|
IDocumentTemplateInfo | sourceTemplateInfo | |
IDocumentTemplateInfo | destTemplateInfo |
Returns
Type | Description |
---|---|
TemplateInfo |
SuggestFilename()
Declaration
public string SuggestFilename()
Returns
Type | Description |
---|---|
String |
UndoCheckoutDocument(String[])
Declaration
public ReturnInfo UndoCheckoutDocument(params string[] allowedReturnTypes)
Parameters
Type | Name | Description |
---|---|---|
String[] | allowedReturnTypes |
Returns
Type | Description |
---|---|
ReturnInfo |
Write(Int64, Byte[], Int32, Int32)
Declaration
public void Write(long filePosition, byte[] buffer, int bufferStartPosition, int length)
Parameters
Type | Name | Description |
---|---|---|
Int64 | filePosition | |
Byte[] | buffer | |
Int32 | bufferStartPosition | |
Int32 | length |