Home > Class Reference > HSLIB namespace > HS.Util.DataModel.Adaptor

HS.Util.DataModel.Adaptor

class HS.Util.DataModel.Adaptor extends %ZEN.DataModel.Adaptor

Extends %ZEN.DataModel.Adaptor and adds security resource checking capabilities

Method Inventory

Parameters

parameter CREATERESOURCE;
If specified, this RESOURCE:PERMISSION is checked before creating a new record via Zen MVC. This overrides RESOURCE.
parameter DELETERESOURCE;
If specified, this RESOURCE:PERMISSION is checked before deleting a record via Zen MVC. This overrides RESOURCE.
parameter READRESOURCE;
If specified, this RESOURCE:PERMISSION is checked before returning loaded data to the client via Zen MVC. This overrides RESOURCE.
parameter RESOURCE;
If specified, this RESOURCE:PERMISSION is checked before any operation on this class via Zen MVC. (Create, Read, Update, or Delete.)
parameter UPDATERESOURCE;
If specified, this RESOURCE:PERMISSION is checked before updating an existing record. via Zen MVC This overrides RESOURCE.

Methods

classmethod %CreateModelInstance(pID As %String, pConcurrency As %Integer = -1, Output pSC As %Status = $$$OK) as %RegisteredObject [ Language = objectscript ]
Create an instance of this DataModel object.
Subclasses may override this for special behavior.
classmethod %OnDeleteSource(pID As %String) as %Status [ Language = objectscript ]
This callback method is called when the DataModel is deleted.
method %OnOpenSource(pID As %String, pConcurrency As %Integer = -1, Output pSC As %Status = $$$OK) as %RegisteredObject [ Language = objectscript ]
This callback method is invoked when a DataModel is opened. If implemented, it opens an instance of the data source object used by the DataModel.
method %OnSaveSource(pSource As %RegisteredObject) as %Status [ Language = objectscript ]
This callback method is called when the DataModel is saved. If implemented, it is responsible for saving changes to the data source.
classmethod CheckPermission(pOperation As %String, pID As %Integer, pObject As %RegisteredObject) as %Status [ Language = objectscript ]
Checks permissions (parameter-based) on a particular operation + object.
pOperation is "C" (create), "R" (read), "U" (update), or "D" (delete)
pID is the ID of the object being operated on (empty for new objects)
pObject is the object being operated on (for create/read/update; empty for delete)
Returns $$$ERROR($$$AccessDenied) if the user does not have the requisite permission.
classmethod OnCheckPermission(Output pHandled As %Boolean = 0, pOperation As %String, pID As %Integer, pObject As %RegisteredObject) as %Status [ Language = objectscript ]
Checks permissions (parameter-based) on a particular operation + object.
If pHandled is set to true, CheckPermission() will be bypassed.
pOperation is "C" (create), "R" (read), "U" (update), or "D" (delete)
pID is the ID of the object being operated on (empty for new objects)
pObject is the object being operated on (for create/read/update; empty for delete)
Returns $$$ERROR($$$AccessDenied) if the user does not have the requisite permission.

Inherited Members

Inherited Properties

Inherited Methods

Subclasses

FeedbackOpens in a new window