Content Manager 10.0
Content Manager SDK assembly and namespace renamed
The Content Manager .NET SDK assembly has been renamed from HP.HPTRIM.SDK.dll
to TRIM.SDK.dll
, and the SDK namespace has been renamed from HP.HPTRIM.SDK
to TRIM.SDK
.
To preserve compatibility with existing applications, the HP.HPTRIM.SDK.dll
assembly will continue to be updated and shipped with Content Manager, however customers should prioritize migrating to using TRIM.SDK.dll
, as usage of HP.HPTRIM.SDK.dll
is now deprecated and HP.HPTRIM.SDK.dll
will be removed from the product in a future release.
To migrate existing SDK applications, the following changes need to be made:
- Change existing assembly references to
HP.HPTRIM.SDK.dll
, to instead refer to TRIM.SDK.dll
.
- Change namespace references in your code, from
HP.HPTRIM.SDK
to TRIM.SDK
.
Please note that it is not supported for a process to load both the TRIM.SDK.dll
and HP.HPTRIM.SDK.dll
assemblies. As a consequence, if you have a record addin configured, which references a particular SDK assembly, then any SDK code you write must be compiled against the same SDK assembly as the record addin.
Deleted methods and properties:
- Consignment.PrepareForTransfer() (see new functions WaitForTransferReceipt() and AcknowledgeTransferReceipt())
- Consignment.CompleteTransfer() (see new functions WaitForTransferReceipt() and AcknowledgeTransferReceipt())
- Database.GetNotifications
- Database.GetLocationNotifications
- Record.ElasticMetadataJSON
- StartupUserOptions.WebClientPane1
- StartupUserOptions.WebClientPane2
- StartupUserOptions.WebClientPane3
Get the field definition for this word
If the word is sourced from a field the relevant FieldDefinition:
Create External Link from SDK
New ExternalLink object to allow for creation of External Links.
Monitor event processor
New properties:
Get a string listing all the record types to which this classification is allowed to be attached
Get the Location object which is the assignee of the first activity in this workflow
New property:
A boolean property indicating whether the current user can view all the details of this location
Gets a number indicating how many times the electronic document attached to this record has been viewed
Get a string which represents the global default for user preferences for the nominated application
New method:
Support aggregated search results
New class TrimAggregateResultIterator returned by new method GetAggregateResultIterator. Use these to get an aggregation of your search results.
Suppress document extract logging
New database property:
New search clause to do a raw elastic query
New member of SearchClauseIds:
New search clauses to find all ancestors recursively
New clauses in SearchClauseIds:
- LookupItemAllParentsOf
- SpaceAllParentsOf
- ClassificationAllParentsOf
- ScheduleAllParentsOf
- UserLabelAllParentsOf
UserLabel Owner now a modifiable property
Allows you to create User Labels for other users.
Copy security annotations to email headers
New database property:
Enhancements to Record recycle and restore
New method:
Custom Icons
A new interface to allow custom Icons to be added to the Content Manager user interface.
The Interface ITrimCustomIcon has been added to:
The new class ExternalIcon supports creation and management of customer icons.
Add saved search as a filter to Search Form
New search form property:
Superseded by information in Schedule
New properties:
Option to set how to deal with the situation when new contents get added to this container and it has a different scheduled disposal type
New property
Manually delete a single Record from the recycle bin
New method:
Attach 'Workflow' template or 'Action Tracking' Procedure to Classification as default to be applied to record when attaching Classification to record
New properties:
Link non Record objects to a ToDo item
New overload on the New method to specify which object to link to the TodoItem.
New properties for the linked object type and Uri.
New search method for Location Job Title
New Search Clause LocationJobTitle
Make Icon files available in the SDK
The icon files used in the CM client are now available as part of the SDK for use in applications that connect to CM.
New methods:
Find Saved Searches that have not been recently used
Added the ability to find Saved Searches that have not beed used since a specified date.
New property
New Search Clause SavedSearchLastUsedOn
System option to update Record Number on change of Classification
New property:
Improve display of decimal field values
Specify whether a field should allow negative numbers and how many decimal places to round to on display.
New properties:
Search by Edit Status
New Search Clause SearchClauseIds.RecordEditState, new enumeration DocumentEditStatus
Workflow Templates provide ability to activate Additional fields per template
Adds the ability to activate or deactivate 'additional fields' on individual Workflow templates.
New methods:
New property:
Control whether clauses are added to recent search methods
When using TrimMainObjectSearch choose whether the search clauses should be added to Recent Search Methods:
New method:
Get blocked file extensions
A new property listing the file extensions blocked by the administrator:
Additions to FormDefinition
New properties have been added to FormDefinition related classes to support enhancements to the Record property page.
New properties:
Include Tags in the metadata options of electronic records
A new property to specify an Additional Field to be used to store tags from Office documents, these tags will be extracted as part of the auto-profiling process.
Introduce a UDF that can be updated once disposition is Destroyed
Some systems, for example those using manage in place, require the ability to update a field after the Record has been destroyed. Set this property to true to enable that.
Ability to suppress legal hold designation
Holds now support access control which allows the information that a Record is on hold to be suppressed.
New property:
New ACL enum HoldAccess with values:
- Can Use
- Can Update
- Can Modify Access
- Can Delete
- Can View Details
Light weight Records
New lightweight Record Types allow for Records that faster disposal, see the help file more details.
New Record Behaviours:
- BasicDocument
- BasicContainer
New property:
Example
RecordBehaviour
Behaviours
Definition: RecordBehaviour.cs:16
@ RecordType
For Records that have a Record Type of
Indicator on a record when Notes have been added
New property:
Provide a version of TransferStorage just for older revisions
New method on Record:
New DocumentStoreIncrementalCheckTask
The DocumentStoreIncrementalCheckTask allows you to run an incremental document store integrity check, with settings to limit the number of documents scanned to only those added since a certain date.
Changes to Consignment processing
With the changes made to providing a command line option for consignment processing, it has been necessary to fix up an anomaly in the SDK Design.
New methods:
Removed methods:
- Consignment.CompleteTransfer
- Consignment.PrepareForTransfer
Unknown Location type validation
Gets or sets a GeneralExceptionHandling enum value indicating how to deal with unknown location types when verifying new record data entry forms that contain auto profiled contacts
Display Child lists in the .Net SDK
The COM SDK included a UI component to display and modify a child list (for example Record Revisions), this is now also available in the .Net SDK.
Sample Code
private IntPtr windowHandle = IntPtr.Zero;
private IntPtr getWindowHandle()
{
if (windowHandle == IntPtr.Zero)
{
windowHandle = new WindowInteropHelper(this).Handle;
}
return windowHandle;
}
private void Button_Click(object sender, RoutedEventArgs e)
{
PropertyEditor.EditChildList(getWindowHandle(), record,
BaseObjectTypes.RecordRevision);
}
BaseObjectTypes
The BaseObjectTypes enum
Definition: BaseObjectTypes.cs:16
Provide a way of limiting users from extracting and printing sensitive documents
A new permission 'Extract Document' is now available. This permission is required to extract/print a document from Content Manager. In addition, to allow selected records to be locked, a further permission has been added, called 'Extract sensitive documents'. This would be allocated to higher level users such as records coordinators. Sensitive documents are defined as finalized records that are flagged as requiring restricted access to extract/print operations in the record's record type (see Electronic tab properties).
New property:
New Permissions in UserPermissions
- UserPermissions.DocumentExtract
- UserPermissions.DocumentExtractSensitive
Make Notes user stamp mandatory
New database property to allow the addition of a user stamp adding notes to be mandatory:
Detect whether a search is using the user's default sort and filters
Two new properties to indicate whether default sort and filters are in use on a search:
Improve performance and stability of document integrity check
The performance and reliability of the document store integrity has been improved and may be managed with these new properties:
InputDocument.SetAsAlreadyStoredItem SDK function sets record Date Modified to current date rather than Date Modified from document profile
InputDocument.SetAsAlreadyStoredItem() (and the corresponding InputDocument constructor) have been modified to accept an additional date parameter - alreadyInStoreDateModified. If this parameter is not blank, it will be used as the dateModified of the electronic document.
New property:
Allow content index updates of missing Records using the SDK so that users can automate the process
Previously the only way to update the content index for an object was via the desktop client. The TrimMainObject.Reindex() method allows reindex to be called from an SDK application. This has parameters to specify whether to generate a notification to reindex words, user-defined fields and/or the content engine.
More user-friendly style of displaying record types for selection
A new constructor on the TrimMainObjectSearch which both simplifies the return of Record Types for a particular purpose and also returns the current users favorite Record Types at the top of the list in order. The favorite Record Types are set using the method below.
New method:
New UserOptionSet SelectRecordType with properties:
- SelectRecordTypeUserOptionsFavoritesFirst = SelectRecordTypeUserOptionsUseSavedSearch
Sample Code
var search =
new TrimMainObjectSearch(db,
RecordTypeFilter.ElectronicForCreateNoManual);
foreach (RecordType recordType in search)
{
Console.WriteLine(recordType.Name);
}
RecordTypeFilter
Record Type Filters
Definition: RecordTypeFilter.cs:16
More control on copying a record using Record.CreateNewCopy() method
- New overloads for the methods below accept a parameter of type CopyRecordOptions to allow for more fine grained control of the copy process.
- New method
Content Manager 9.4
BREAKING CHANGE - History.EventType changed enum type
- In previous versions the property History.EventType was of type
HistoryType
. It is now of type Events which does not map directly to HistoryType
. Any code that relies on this property will need to be reviewed.
Unrestricted file upload vulnerability
Refine a search to returned the current or latest version of documents
Include more functionality to handle deleted and cancelled record requests and audit all actions
Record Title as column in historical event search
No email notifications for requested records located in Space Management
Online Audit log - The audit history does not include all changes when a person location is associated to a position
Provide a default for the author property for a Document Queue
Automatic Sub folders sort order for Record Types
Search for records has no Hold returns records has Hold
Expose RestartDocumentReview to the SDK
Searching Browse Via Classification - ability to select a sort method for listed records under Classifications
HasMore property on TrimMainObjectSearch
- Improved way to determine whether there are more objects in the search. Typically of use in a web application where results are returned page by page.
- New property
Expose ChangeMatter and ChangeClient functionality in SDK
Knowledge workers can't request Pickup Requests
- New permission to give knowledge workers the ability to make pickup requests.
- New enum value
Implement a generic origin type for third party applications to use for bulk loading
- Existing origin types are targeted to specific uses. The new Origin type is appropriate for SDK bulk loader applications.
- New enum value
SDK available as NuGet package
- The SDK NuGet package is intended for developers, and contains a basic set of Content Manager DLL's needed for developing applications using the Content Manager SDK. It does not contain KeyView components, or other third party components.
- For developers requiring the full set of Content Manager DLL's, it is recommended to run the Content Manager server or client installation packages.
- To use the NuGet package from Visual Studio, please follow these directions:
- In Visual Studio, select Tools -> Options.
- Select NuGet Package Manager -> Package Sources.
- Click the green Add button, and add the location of this folder.
- In the Solution Explorer, right click on your C# project, and press "Manage NuGet Packages".
- In the "Package source" drop down box, select the package source you configured in (3).
- Click on Browse.
- Click on the "TRIM.SDK" package.
- Press Install, to add it to your project.
Provide a way of doing server side updates in a custom event processor and preserving the lastUpdatedBy (and dateLastUpdated) fields
Expose SDK connection pool configuration
Auto Profiling - provide a per-record option to choose the record title from the document properties or the document file name
- ER KM03140523
- Properties removed
Database.MailRecipientMustExist
Database.MailRecipientsAsContacts
Database.SuppressAutoProfile
- New properties
Add access control to User Labels
Resolve ambiguities as to who can see a classification
Issues with "Due Date for completion of review process" and "Due Date for the reviewer to complete their work" fields.
Allocate a custom title to an alert.
Unable to send more than 100 Records at a time to External Link
- ER KM02904803
- An executable external link passes the selected Record URI's as a command line parameter, Windows restrictions means there is a limit to the size of the command line parameter. The new option 'send tagged URI's as a temporary file' causes the list of selected URI's to be written to a file and the name of the file is passed to the executable as demonstrated in this sample.
Specify which record type is allowed to be placed into closed containers
Add Notes to User Labels
- New properties
- New methods
Check-in Styles and Document Queues to include additional options
Send to Recycle Bin - Soft delete for Records
Hide custom record types from search response
- Ensure that TrimMainObjectSearch operates in the same way as the native CM application to hide RecordTypes marked with an ExternalId.
- ER KM03300730
- New property
Folder Synchronization - provide a way of detecting when content is removed from a folder for offline synchronization purposes
- To sync the contents of a large folder, without re-fetching the entire contents, you need to get:
- newly added Records, which can be done using a search, and
- records removed (via deletion or movement), which can be done with this new method.
- New method
Provide a data stream capability to avoid delays caused by object cache instantiation
- See the documentation for sample code using stream search.
- New classes
- New method
Implement new Record methods for closing (and reopening) containers
Searches to be able to filter / clause based on enum
- Rather than having to use the string representation of an enum item you can now set the actual enum value on the TrimSearchClause, as seen here.
- New method
Need a way to inform SDK applications of object change notifications and other system messages
- The CM client uses a subscriber service provided by the workgroup to keep caches up to date with changes that happen on other machines in the network. This enhancement allow SDK applications to be notified when an object in CM has changed. A use case for this might be to refresh a client side cache.
- See the documentation for more information and sample code.
Content Manager 9.3
SDK no longer installed in GAC
- In previous versions the .NET SDK has been installed in the GAC. This is no longer the case. To support dynamic loading of
TRIM.SDK.dll
, follow the pattern demonstrated in this sample.
Removed properties
- The following properties are no longer required and have been removed from the SDK:
- CommunicationDetail.AddressUri
- Database.AutomaticallyOCR
- Database.IdolSearchStyle
- GisDataUserOptions.SeachPreference
Audits - Unable to see the Audit log for the records placed on hold as a group
- You can now specify whether you want audit log entries when using the Bulk Add/Remove to hold feature.
- CR 64234
- New methods
Record import not working when lookup item additional field is on a record
Property on Offline Record object to tell us whether auto checkin has is enabled
- CR 65921
- New methods / properties
Consignments
- You can flag transfer or archive consignments to have all documents in the consignment converted to the long-term preservation format.
- CR 64782
- New methods / properties
History
- Content Manager now supports keeping a log of all searches undertaken. If stored to the online audit log, these searches can now be selected to be executed again at a later date.
- CRs 66129, 58614
- New properties
RecordAction
- CR 65586
- New methods / properties
Retention Schedules - provide support for event based scheduling
- Some preliminary work has been done to support event-based retention scheduling. This has not yet been implemented fully in Content Manager and the work will be completed in the next major release. Events can be created however they cannot be associated with a retention schedule or used for disposal scheduling of records. Consider these objects “reserved for future use”.
- CR 57424
- New objects
View Panel - Add the To Do items in record View Panel
- CR 62404
- New methods / properties
Record Type
Database
Request
- CR 65586
- New methods / properties
UserLabel
- CR 65044
- New methods / properties
DroppedFileUserOptions
- CR 62258
- New methods / properties
Ability to manage favourite and recent search clauses in user profile
Providing a custom sort order specifically for Tray searches
Content Manager 9.2
Checking for duplicate documents by hash
- CR 62066
- New methods / properties
- Comments
- While it was possible to enable duplicate checking in the system options, there was no programmatic way to check for uniqueness of a document using its hash. Two new SDK methods support this. Database.CalculateDocumentHash() will calculate the hash for a local file and Database.FindRecordsByHash() will find any Records with documents that match the hash.
- For systems that have previously used hashing for de-duplication, existing hashes will be stored against Records on upgrade, otherwise after hashing is enabled only newly created Records will have a hash stored against them. Record.CalculateHash() may be used to retrospectively calculate hashes.
- Sample Code
- The following code:
- generates a hash for a local file,
- finds any Records that match this, and
- notifies the user whether (or not) there are matching Records.
try
{
string hash = db.CalculateDocumentHash("c:\\temp\\temp.doc");
TrimMainObjectSearch recordSearch = db.FindRecordsByHash(hash);
List<string> numbers = new List<string>();
foreach (Record rec in recordSearch)
{
numbers.Add(rec.Number);
}
if (numbers.Count > 0)
{
Console.WriteLine(string.Format("This document '\\temp\\abc.doc' is already registered, Record(s) = {0}", string.Join(", ", numbers)));
} else
{
Console.WriteLine("The document '\\temp\\temp.doc' is not registered in TRIM");
}
}
catch (TrimException ex)
{
Console.WriteLine(ex.Message);
}
Searching for Record types: 'can contain' and 'can be contained in'
- CR 61825
- New Search Clauses
- Two new search clauses make it simpler to find the correct RecordType when creating a contained (or container) Record.
Updates to Lookupsets
- CR 61030
- New LookupSet methods and properties are:
- New LookupItem methods and properties are:
- New search clauses
- Comments
- Lookup Sets have changed significantly and the properties (and methods) reflect this. Changes include:
- hierarchical lookup sets: find child items via the search clause SearchClauseIds.LookupItemParent
- LookupSet type additional fields: use these fields to store a reference to the exact LookupItem rather than relying on the string value of the LookupItem
Issues with constructors
- CR 61030
- Comments
- Some TrimMainObject-derived classes had issues with their constructors which have been fixed. These include:
- Alert object would construct successfully but no alert appeared in the client.
- RecordAction and Word had constructors for creating new instances. These have been removed.
- Sample Code
- The following example creates a new Alert.
alert.EventType =
Events.ObjectModified;
alert.Criteria = "electronic";
alert.ChildSubscribers.NewSubscriber(
new Location(db, 9000000049));
alert.Save();
Events
Events
Definition: Events.cs:16
IsValidFor throws an exception rather than returning false with information
- CR 60946
- Comments
- Rather than returning false when a particular purpose was not valid, TrimObject.IsValidFor() was throwing an exception.
- Sample Code
- The code below calls
IsValidFor()
on a Location.
LocationPurpose
Location Usage Purposes
Definition: LocationPurpose.cs:16
Promote Revision function that works like the functions inside trim.exe
- CR 60986
- Comments
- Ability to promote a revision to be the main document as could already be done through the native client.
- Sample Code
- Choose a particular record revision then promote it.
Database pool built into SDK
- CR 61192
- Comments
- Calling Database.Connect() can take several hundred milliseconds to complete. This is not a problem in a client application where the connection is preserved for the life of the application, but for a web service application it adds significant overhead to each request. The database pool optimises this connection process by storing each instance of the database in a cache, and then on subsequent requests retrieving the cached instance instead of connecting a new instance.
- Database pooling operated transparently as long as the database is connected in the appropriate way, as seen in the sample below.
- New methods
- Sample Code
- The database instance will be cached if a workgroup server name, trusted user and dataset ID are specified. The instance will remain in the cache for 5 minutes.
db.TrustedUser = "fred";
db.WorkgroupServerName = "local";
db.Connect();
The Database object is the first object that must be created when using the TRIM SDK....
Definition: Database.cs:16
string Id
Gets or sets a string containing the Database id for this Database. Setting this property will make a...
Definition: Database.cs:1966
Provide a HasPermission function for the TRIM main object
- CR 61398
- New methods
- Comments
- New methods to determine whether a user has the ability to perform certain actions in general and on specific objects and properties.
Prevent invalid extensions from interfering with the checkout process
- CR 62054
- Comments
- Putting invalid characters in InputDocument.CheckInAs would cause an error when checking the document out. These characters are now stripped from the file name on check out.
SDK methods to support field sorting
- CR 62763
- New methods / properties
- Comments
- User defined fields are now sortable and the
FieldDefinition.CanSort()
function allows a developer to determine whether a particular field is sortable.
SDK methods to support blocking of search methods
- CR 63439
- New methods / properties
- Comments
- A system administrator can choose to "block" certain searching methods from normal users. When this happens, it is expected that these methods will not be presented in user interfaces for the currently logged in user. To assist in implementing such user interfaces, the extra methods above have been provided to allow SDK developers to filter out such blocked search methods.
Exposing the Initiating Workflow template concept in the SDK
- CR 64493
- New methods / properties
- Comments
- This new property has been added in order that SDK applications can specify that a workflow be generated as part of the process of creating a new record. To do that you need to specify a valid workflow template in this property - the new workflow will be created based on that template. Note that this property is a little special in that it cannot be set for an existing record - if you try to do that you will get an error. It really is only applicable for new records. The value of the property is also "forgotten" once the record has been created.
Provide a way of "crawling" the repository without tripping the LastUpdatedOn date
- CR 64506
- New methods / properties
- Comments
- This ExtractDocument boolean property has been provided so that you can write an application that extracts a copy of a record's document without setting the Record.DateLastAction property. Typically the act of extracting a document can be seen as an "action" on a record and thus the
DateLastAction
is set, together with a consequential update to the Record.LastUpdatedOn property. If you turn it on, this property overrides the RecordType setting for "Set Last Action Date On View". It is useful for writing an app that must periodically check and extract any new content, and is relying on the LastUpdatedOn
property to find recently updated records.