Click or drag to resize

CTObjectDataHandlerE, O, S Class

This is a generic abstraction that simplifies custom data sourcing CT core objects needing both ObjectEditGuard and EventExtension. It handles caching and basic interractions with CT's core. This class is designed to be specialized further within CT Core into handlers such as LookupListHandlerE, S and SearchGroupHandlerE, S.
Inheritance Hierarchy

Namespace: CTExtensions.ExportCore.CTObjectData
Assembly: CTInterface (in CTInterface.dll) Version: 25.0
Syntax
public abstract class CTObjectDataHandler<E, O, S> : EventExtension<E>, 
	ICTObjectOwner<E, O, S>, ICTObjectOwner
where E : CTExtension
where O : 
where S : new(), CTObjectTaggedSettings<O>

Type Parameters

E
Extension type
O
CT Core object type
S
Settings object that inherits CTObjectTaggedSettingsO.

The CTObjectDataHandlerE, O, S type exposes the following members.

Constructors
 NameDescription
Protected methodCTObjectDataHandlerE, O, SInitializes a new instance of the CTObjectDataHandlerE, O, S class
Top
Properties
 NameDescription
Public propertyParent Parent Extension
Protected propertyType Type of the guarded object must be provided by the inheritant. Must not change once provided.
Top
Methods
 NameDescription
Public methodApplyEdit Occurs when user applies changes to Owned CT Core object at Options. If you cancel the apply by returning false, you should also display a message for user.
Public methodClearCaches Clears the cache. Should be called e.g. when user exists the Options. ExportBase2MAIN, EXPORTHANDLER, FIELDSETTINGSTYPE, EXPORTSETTINGSTYPE, PROFILESETTINGSTYPE, USERSETTINGSTYPE, LOOKUPLISTHANDLER, LOOKUPLISTSETTINGS, SEARCHGROUPHANDLER, SEARCHGROUPSETTINGS calls this automatically.
Protected methodCreateEditGuard This function create new instance of CTObjectGuardE, O, S. Can be overridden to provide specialized version.
Protected methodCreateNewCTObject Use CT API to create new core object of type O. Name is already ensured to be unique.
Public methodCreateNewSettings Creates and initialises new settings object of type S. This object is not owned after created.
To create new owned object, call this first and then call CreateOwnedObject(S, String). If you want to add new settings object to existing core object, then after calling this, set the existing object to CTObject of S and call StoreSettingsAndSaveObject(S) for it.
Public methodCreateOwnedObject Creates new lookuplist for the settings if it doesn't have. Given baseName is used as basis but unique name is obtained with number in parenthesis if it's in use.
Public methodDeleteObject Delete the object
Public methodEnterEdit Occurs when user attempts to edit Owned CT Core object at Options. If you prevent access by returning false, you should also display a message for user.
Public methodGetAll Retuns all objects of type O from CT API.

Uses cache. If you want to refresh the cache, call ClearCaches first.
Protected methodGetAllFromCTAPI Use CT API to retrieve ALL Core Objects of type O.
Public methodGetEditGuard Gets the Edit Guard. Initializes and cached it, if not initialized already.
Public methodGetEventExtension This calls is the event extension.
Protected methodGetExtenionData Get the extension data from the core object.
Public methodGetOwned Returns settings for all existing objects that are owned. An object is considered to be owned if it has stored data. To remove ownership, use RemoveOwnership(O). Settings has the object in question tagged to CTObject.

Uses cache. If you want to refresh the cache, call ClearCaches first.
Public methodGetUniqueName Gets unique lookuplist name for the base name, by adding a number to parenthesis until unique name is found.
Public methodInit EventExtension Init, called by the system. Can be overridden but inheritant must first call:
C#
base.Init(parent);

(Overrides EventExtensionEXTTYPEInit(EXTTYPE))
Public methodPreDelete Occurs when user attempts to delete Owned CT Core object at Options. If you prevent deletion by returning false, you should also display a message for user.
Public methodRemoveOwnership Removes ownership of the given list.
Public methodRenameObject Rename the object.
Protected methodSetExtensionData Set the extension data for the core object.
Public methodStoreSettingsAndSaveObject Saves the lookuplist and serializes the settings into it.
Top
Fields
 NameDescription
Protected fieldmoEditGuard The object edit guard that handles core GUI interactions.
Top
Revision History
DateVersionDescription
-2025 SP1First Release
See Also