-
Notifications
You must be signed in to change notification settings - Fork 0
/
AuditClassStorage.xml
executable file
·127 lines (113 loc) · 3.66 KB
/
AuditClassStorage.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?xml version="1.0" encoding="UTF-8"?>
<Export generator="Cache" version="24" zv="Cache for UNIX (IBM AIX for System P5-64) 2010.1.4 (Build 803U)" ts="2011-06-28 08:58:47">
<Class name="Spectrum.Util.AuditClassStorage">
<Super>%Persistent,%XML.Adaptor</Super>
<TimeChanged>62270,32163.812916</TimeChanged>
<TimeCreated>62181,56689.707995</TimeCreated>
<UDLText name="T">
<Content><![CDATA[
/*
Author: Dan McCracken
Date: 4/14/2011 Moved to Prod: 5/4/2011
Version: 1.0
Persistent storage class for Util.AuditClass entries.
*/
]]></Content>
</UDLText>
<Property name="OrefId">
<Description><![CDATA[
OREF %Id() value of the object being audited.
With a ClassName & %Id() pair, we will be able to run a query on ONE specific audited item per class.]]></Description>
<Type>%String</Type>
</Property>
<Property name="ClassName">
<Description>
Name of the class being audited.</Description>
<Type>%String</Type>
<Parameter name="MAXLEN" value="500"/>
</Property>
<Property name="TimeStamp">
<Description>
Stamped in the %OnBeforeSave method of the class. No need to explicitly set when creating an object.</Description>
<Type>%String</Type>
</Property>
<Property name="UserName">
<Type>%String</Type>
<Parameter name="MAXLEN" value="100"/>
</Property>
<Property name="AuditType">
<Description>
Type of change that occured.</Description>
<Type>%String</Type>
<Parameter name="DISPLAYLIST" value=",INSERT,UPDATE,DELETE,SNAPSHOT"/>
</Property>
<Property name="Dump">
<Description><![CDATA[
Semicolon delimited key=>value pair hash of the object's properties being audited.
eg. ID=>1;DepAlias=>PDCL;IsLiveOnEpicCare=>1;]]></Description>
<Type>%String</Type>
<Parameter name="MAXLEN" value="5000"/>
</Property>
<Method name="%OnBeforeSave">
<Description><![CDATA[
This callback method is invoked by the <METHOD>%Save</METHOD> method to
provide notification that the object is being saved. It is called before
any data is written to disk.
<P><VAR>insert</VAR> will be set to 1 if this object is being saved for the first time.
<P>If this method returns an error then the call to <METHOD>%Save</METHOD> will fail.]]></Description>
<FormalSpec>insert:%Boolean</FormalSpec>
<Private>1</Private>
<ReturnType>%Status</ReturnType>
<ServerOnly>1</ServerOnly>
<Implementation><![CDATA[
Set ..TimeStamp = ##class(Ens.Util.Time).FormatDateTime("%Y%m%d%H%M%S")
Quit $$$OK
]]></Implementation>
</Method>
<Method name="AppendHashPair">
<Description><![CDATA[
Helper method to build a key=>value; pair with semicolon delimeter.
Feed the method a property name and ..Property value, get back a string you can add to the ..Dump value.]]></Description>
<FormalSpec>pKey:%String,pValue:%String</FormalSpec>
<ReturnType>%Status</ReturnType>
<Implementation><![CDATA[
// Append another key/value pair to the ..Dump value.
Set ..Dump = ..Dump _ pKey_"=>"_pValue_";"
Quit $$$OK
]]></Implementation>
</Method>
<Storage name="Default">
<Type>%Library.CacheStorage</Type>
<DataLocation>^Spectrum.Util.AuditClassS1287D</DataLocation>
<DefaultData>AuditClassStorageDefaultData</DefaultData>
<IdLocation>^Spectrum.Util.AuditClassS1287D</IdLocation>
<IndexLocation>^Spectrum.Util.AuditClassS1287I</IndexLocation>
<StreamLocation>^Spectrum.Util.AuditClassS1287S</StreamLocation>
<Data name="AuditClassStorageDefaultData">
<Structure>listnode</Structure>
<Subscript/>
<Value name="1">
<Value>%%CLASSNAME</Value>
</Value>
<Value name="2">
<Value>OrefId</Value>
</Value>
<Value name="3">
<Value>ClassName</Value>
</Value>
<Value name="4">
<Value>TimeStamp</Value>
</Value>
<Value name="5">
<Value>UserName</Value>
</Value>
<Value name="6">
<Value>AuditType</Value>
</Value>
<Value name="7">
<Value>Dump</Value>
</Value>
</Data>
</Storage>
</Class>
</Export>