Micro Focus Content Manager SDK 9.3
HP.HPTRIM.SDK.ITrimAddIn Class Referenceabstract

The TrimAddIn interface is defined so that SDK developers can develop a class that implements this interface. The class can then be registered with TRIM to support customising a number of elements of TRIM behavior. Note that your class must not require any constructor parameters. More...

Inheritance diagram for HP.HPTRIM.SDK.ITrimAddIn:
HP.HPTRIM.SDK.ITrimAddInBase

Public Member Functions

abstract void Initialise (Database db)
 The Initialise function is called immediately after the class is constructed. It is provided so that developers can execute any data initialisation steps that may be considered necessary. More...
 
abstract TrimMenuLink[] GetMenuLinks ()
 This function returns an array of TrimMenuLink items that are used by TRIM to provide a customised Context menu for TRIM objects. More...
 
abstract bool IsMenuItemEnabled (int cmdId, TrimMainObject forObject)
 This function provides a menu enabler for an addIn menu link. It passes in the id of the menu item previously returned by the GetMenuLinks call. If you return false, it is useful to also set the ErrorMessage property, as TRIM will inspect this if a user prompt is required. More...
 
abstract void ExecuteLink (int cmdId, TrimMainObject forObject, ref bool itemWasChanged)
 This function will be called when the user has chosen to execute one on the links provided by GetMenuLinks. The user has chosen to execute the link with the specified trim object being selected. You should set the itemWasChanged property to true if you make any modifications to the provided TRIM object. More...
 
abstract void ExecuteLink (int cmdId, TrimMainObjectSearch forTaggedObjects)
 This function will be called when the user has chosen to execute one on the links provided by GetMenuLinks. The user has chosen to execute the link with the specified list of tagged trim objects. You should work through the provided list, as is appropriate to your link. More...
 
abstract void Setup (TrimMainObject newObject)
 This function is called when a new object is about to be created. It is called after the new object has been constructed, but before any properties have been set by users or developers. Currently, it is only called for record objects, after the record type defaults bave been set. More...
 
abstract bool PreSave (TrimMainObject modifiedObject)
 This function is called immediately before changes to an object are committed to the TRIM database. Return false to prevent the update from continuing (and set the ErrorMessage property). Inspect the Uri property of the modifiedObject to determine if a new object is about to be created (Uri = 0) or an existing object is being modified. More...
 
abstract void PostSave (TrimMainObject savedObject, bool itemWasJustCreated)
 This function is called immediately after changes to an object have been committed to the TRIM database. The boolean parameter indicates whether the save was done to create a new object or whether it was a modification to an existing object. More...
 
abstract bool PreDelete (TrimMainObject modifiedObject)
 This function is called immediately before an object is deleted from the TRIM database. Return false to prevent the delete from continuing (and set the ErrorMessage property). More...
 
abstract void PostDelete (TrimMainObject deletedObject)
 This function is called immediately after an object has been deleted from the TRIM database. More...
 
abstract bool SupportsField (FieldDefinition field)
 Return true if this add-in supports selecting and verifying values for the specified Field Definition More...
 
abstract bool SelectFieldValue (FieldDefinition field, TrimMainObject trimObject, string previousValue)
 Provide a user interface to allow a user to select an appropriate value for the specified Field Definition and then set that value on the supplied Trim object. Return true if a value was selected (and set) otherwise false to indicated that the user cancelled. More...
 
abstract bool VerifyFieldValue (FieldDefinition field, TrimMainObject trimObject, string newValue)
 Verify the new string value for a Field Definition to be set on the nominated object. If the method returns false, it should set the ErrorMessage property for TRIM to issue an appropriate error message. More...
 
- Public Member Functions inherited from HP.HPTRIM.SDK.ITrimAddInBase
 ITrimAddInBase ()
 
delegate void SwigDelegateITrimAddInBase_0 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_1 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_2 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_3 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_4 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_5 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_6 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_7 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_8 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_9 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_10 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_11 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_12 (global::System.IntPtr args)
 
delegate void SwigDelegateITrimAddInBase_13 (global::System.IntPtr args)
 

Properties

abstract string ErrorMessage [get]
 The error message is used to report any details of errors that occur in certain functions that return false. The error message property should be initialised to blank on every function call More...
 

Additional Inherited Members

- Protected Attributes inherited from HP.HPTRIM.SDK.ITrimAddInBase
bool swigCMemOwn
 

Detailed Description

The TrimAddIn interface is defined so that SDK developers can develop a class that implements this interface. The class can then be registered with TRIM to support customising a number of elements of TRIM behavior. Note that your class must not require any constructor parameters.

Member Function Documentation

abstract void HP.HPTRIM.SDK.ITrimAddIn.ExecuteLink ( int  cmdId,
TrimMainObject  forObject,
ref bool  itemWasChanged 
)
pure virtual

This function will be called when the user has chosen to execute one on the links provided by GetMenuLinks. The user has chosen to execute the link with the specified trim object being selected. You should set the itemWasChanged property to true if you make any modifications to the provided TRIM object.

abstract void HP.HPTRIM.SDK.ITrimAddIn.ExecuteLink ( int  cmdId,
TrimMainObjectSearch  forTaggedObjects 
)
pure virtual

This function will be called when the user has chosen to execute one on the links provided by GetMenuLinks. The user has chosen to execute the link with the specified list of tagged trim objects. You should work through the provided list, as is appropriate to your link.

abstract TrimMenuLink [] HP.HPTRIM.SDK.ITrimAddIn.GetMenuLinks ( )
pure virtual

This function returns an array of TrimMenuLink items that are used by TRIM to provide a customised Context menu for TRIM objects.

abstract void HP.HPTRIM.SDK.ITrimAddIn.Initialise ( Database  db)
pure virtual

The Initialise function is called immediately after the class is constructed. It is provided so that developers can execute any data initialisation steps that may be considered necessary.

abstract bool HP.HPTRIM.SDK.ITrimAddIn.IsMenuItemEnabled ( int  cmdId,
TrimMainObject  forObject 
)
pure virtual

This function provides a menu enabler for an addIn menu link. It passes in the id of the menu item previously returned by the GetMenuLinks call. If you return false, it is useful to also set the ErrorMessage property, as TRIM will inspect this if a user prompt is required.

abstract void HP.HPTRIM.SDK.ITrimAddIn.PostDelete ( TrimMainObject  deletedObject)
pure virtual

This function is called immediately after an object has been deleted from the TRIM database.

abstract void HP.HPTRIM.SDK.ITrimAddIn.PostSave ( TrimMainObject  savedObject,
bool  itemWasJustCreated 
)
pure virtual

This function is called immediately after changes to an object have been committed to the TRIM database. The boolean parameter indicates whether the save was done to create a new object or whether it was a modification to an existing object.

abstract bool HP.HPTRIM.SDK.ITrimAddIn.PreDelete ( TrimMainObject  modifiedObject)
pure virtual

This function is called immediately before an object is deleted from the TRIM database. Return false to prevent the delete from continuing (and set the ErrorMessage property).

abstract bool HP.HPTRIM.SDK.ITrimAddIn.PreSave ( TrimMainObject  modifiedObject)
pure virtual

This function is called immediately before changes to an object are committed to the TRIM database. Return false to prevent the update from continuing (and set the ErrorMessage property). Inspect the Uri property of the modifiedObject to determine if a new object is about to be created (Uri = 0) or an existing object is being modified.

abstract bool HP.HPTRIM.SDK.ITrimAddIn.SelectFieldValue ( FieldDefinition  field,
TrimMainObject  trimObject,
string  previousValue 
)
pure virtual

Provide a user interface to allow a user to select an appropriate value for the specified Field Definition and then set that value on the supplied Trim object. Return true if a value was selected (and set) otherwise false to indicated that the user cancelled.

abstract void HP.HPTRIM.SDK.ITrimAddIn.Setup ( TrimMainObject  newObject)
pure virtual

This function is called when a new object is about to be created. It is called after the new object has been constructed, but before any properties have been set by users or developers. Currently, it is only called for record objects, after the record type defaults bave been set.

abstract bool HP.HPTRIM.SDK.ITrimAddIn.SupportsField ( FieldDefinition  field)
pure virtual

Return true if this add-in supports selecting and verifying values for the specified Field Definition

abstract bool HP.HPTRIM.SDK.ITrimAddIn.VerifyFieldValue ( FieldDefinition  field,
TrimMainObject  trimObject,
string  newValue 
)
pure virtual

Verify the new string value for a Field Definition to be set on the nominated object. If the method returns false, it should set the ErrorMessage property for TRIM to issue an appropriate error message.

Property Documentation

abstract string HP.HPTRIM.SDK.ITrimAddIn.ErrorMessage
get

The error message is used to report any details of errors that occur in certain functions that return false. The error message property should be initialised to blank on every function call