HS.Util.DataModel.Adaptor
class HS.Util.DataModel.Adaptor extends %ZEN.DataModel.Adaptor, HS.REST.Model.ISerializable
Extends %ZEN.DataModel.Adaptor and adds security resource checking capabilitiesProperty Inventory
Method Inventory
- %CreateModelInstance()
- %OnDeleteSource()
- %OnOpenSource()
- %OnSaveSource()
- CheckPermission()
- OnCheckPermission()
Parameters
parameter %JSONENABLED = 0;
For backwards compatability, mark subclasses as non-JSON enabled
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.
Properties
property %id as %ZEN.Datatype.string (%JSONINCLUDE = "NONE", XMLPROJECTION = "NONE") [ Transient ];
Overridden from %ZEN.DataModel.DataModel to give it no
JSON projection.
Property methods: %idDisplayToLogical(), %idGet(), %idIsValid(), %idLogicalToDisplay(), %idLogicalToOdbc(), %idNormalize(), %idSet()
property %seriesCount as %ZEN.Datatype.integer (%JSONINCLUDE = "NONE", XMLPROJECTION = "NONE") [ InitialExpression = 1 , Transient ];
Overridden from %ZEN.DataModel.DataModel to give it no
JSON projection.
Property methods: %seriesCountDisplayToLogical(), %seriesCountGet(), %seriesCountIsValid(), %seriesCountLogicalToDisplay(), %seriesCountLogicalToOdbc(), %seriesCountNormalize(), %seriesCountSet()
property %source as %RegisteredObject (%JSONINCLUDE = "NONE", POPORDER = -1, XMLPROJECTION = "NONE") [ Transient ];
Overridden from %ZEN.DataModel.ObjectDataModel to give it no
JSON projection.
Property methods: %sourceGet(), %sourceGetSwizzled(), %sourceIsValid(), %sourceNewObject(), %sourceSet()
Methods
classmethod %CreateModelInstance(pID As %String, pConcurrency As %Integer = -1, Output pSC As %Status = $$$OK) as %RegisteredObject
Create an instance of this DataModel object.
Subclasses may override this for special behavior.
Subclasses may override this for special behavior.
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
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
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
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
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
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
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
- %AddToSaveSet()
- %ClassIsLatestVersion()
- %ClassName()
- %ConstructClone()
- %DeleteModel()
- %DispatchClassMethod()
- %DispatchGetModified()
- %DispatchMethod()
- %DispatchSetModified()
- %DispatchSetMultidimProperty()
- %Extends()
- %GetJSValidationCode()
- %GetParameter()
- %GetPropertyInfo()
- %InvokeAction()
- %IsA()
- %IsModified()
- %IsReadOnly()
- %JSONExport()
- %JSONExportToStream()
- %JSONExportToString()
- %JSONImport()
- %JSONMappingInfo()
- %JSONNew()
- %New()
- %NormalizeObject()
- %ObjectModified()
- %OnCopyDataFromModel()
- %OnCopyDataToModel()
- %OnDeleteModel()
- %OnGetPropertyInfo()
- %OnInvokeAction()
- %OnLoadModel()
- %OnNewSource()
- %OnStoreModel()
- %OnSubmit()
- %OpenModel()
- %OriginalNamespace()
- %PackageName()
- %RemoveFromSaveSet()
- %SaveModel()
- %SerializeObject()
- %SetModified()
- %SubmitHandler()
- %ValidateObject()
- JSONExport()
- JSONExportToStream()
- JSONExportToString()
- JSONImport()