1
1
<?xml version =" 1.0" encoding =" UTF-8" ?>
2
2
<Export generator =" Cache" version =" 25" zv =" Cache for Windows (x86-64) 2015.2 (Build 540)" ts =" 2015-04-28 19:50:48" >
3
- <Class name =" UMLExplorer .ClassView" >
3
+ <Class name =" ClassExplorer .ClassView" >
4
4
<Description >
5
- Cache UML Explorer vX.X.X/*build.replace:pkg.version*/
5
+ Cache Class Explorer vX.X.X/*build.replace:pkg.version*/
6
6
Class contains methods that return structured classes/packages data.</Description >
7
- <TimeChanged >63830,81286.756889 </TimeChanged >
7
+ <TimeChanged >63844,1327.122337 </TimeChanged >
8
8
<TimeCreated >63653,67019.989197</TimeCreated >
9
9
10
10
<Method name =" getAllNamespacesList" >
@@ -45,33 +45,34 @@ Returns structured class tree with all classes available in current namespace</D
45
45
set level = 1
46
46
do objects.SetAt(resp, level)
47
47
48
-
49
48
do classes.Execute()
50
49
while (classes.Next()) {
51
50
set name = classes.Data("Name")
52
51
if ($EXTRACT(name, 1, 1) = "%") && ($NAMESPACE '= "%SYS") { continue }
53
52
set parts = $LISTFROMSTRING(name, ".")
54
- set i = 0
55
- while (i < $LISTLENGTH(parts)) && ($LISTGET(lastParts, i + 1 ) = $LISTGET(parts, i + 1 )) {
56
- set i = i + 1
53
+ set level = 1
54
+ while ((level < $LISTLENGTH(parts)) && ($LISTGET(lastParts, level ) = ("/"_ $LISTGET(parts, level)) )) {
55
+ set level = level + 1
57
56
}
58
- set level = i + 1
59
57
set resp = objects.GetAt(level)
60
58
if (resp="") {
61
59
set resp = ##class(%ZEN.proxyObject).%New()
62
- do objects.GetAt(level - 1).%DispatchSetProperty($LISTGET(parts, level - 1), resp)
60
+ do objects.GetAt(level - 1).%DispatchSetProperty("/" _ $LISTGET(parts, level - 1), resp)
63
61
do objects.SetAt(resp, level)
64
62
}
65
63
while ($LISTLENGTH(parts) > level) {
66
64
set level = level + 1
67
65
set resp = ##class(%ZEN.proxyObject).%New()
68
- do objects.GetAt(level - 1).%DispatchSetProperty($LISTGET(parts, level - 1), resp)
66
+ do objects.GetAt(level - 1).%DispatchSetProperty("/" _ $LISTGET(parts, level - 1), resp)
69
67
do objects.SetAt(resp, level)
70
68
}
71
69
if ($LISTLENGTH(parts) = level) {
72
70
do resp.%DispatchSetProperty($LISTGET(parts, level), classes.Data("Hidden"))
73
71
}
74
72
set lastParts = parts
73
+ for i=1:1:$LISTLENGTH(lastParts)-1 {
74
+ set $LIST(lastParts, i) = "/"_$LISTGET(lastParts, i)
75
+ }
75
76
}
76
77
77
78
quit objects.GetAt(1)
@@ -87,26 +88,38 @@ Return structured data about class.</Description>
87
88
<ReturnType >%ZEN.proxyObject</ReturnType >
88
89
<Implementation ><![CDATA[
89
90
set classDefinition = ##class(%Dictionary.ClassDefinition).%OpenId(className)
91
+ set compiledClassDefinition = ##class(%Dictionary.CompiledClass).%OpenId(className)
90
92
if (classDefinition = "") || (oData.classes.%DispatchGetProperty(classDefinition.Name) '= "") quit ""
91
93
92
94
set oClass = ##class(%ZEN.proxyObject).%New()
93
95
do oData.classes.%DispatchSetProperty(classDefinition.Name, oClass) // prevent from recursive setup
94
96
set package = $LISTTOSTRING($LIST($LISTFROMSTRING(classDefinition.Name, "."), 1, *-1),".")
95
97
set oProperties = ##class(%ZEN.proxyObject).%New()
96
98
set oQueries = ##class(%ZEN.proxyObject).%New()
99
+ set oIndices = ##class(%ZEN.proxyObject).%New()
97
100
98
- set oClass.NAMESPACE = $NAMESPACE
99
- set oClass.SYSTEM = classDefinition.System
100
- set oClass.PROCEDUREBLOCK = classDefinition.ProcedureBlock
101
- set oClass.ABSTRACT = classDefinition.Abstract
102
- set oClass.FINAL = classDefinition.Final
103
- set oClass.HIDDEN = classDefinition.Hidden
104
- set oClass.classType = classDefinition.ClassType
105
- set oClass.serverOnly = classDefinition.ServerOnly // -
106
101
set oClass.isDataType = classDefinition.ClientDataTypeIsDefined()
102
+ set oClass.isOdbcType = classDefinition.OdbcTypeIsDefined()
103
+ set oClass.isSoapBindingStyle = classDefinition.SoapBindingStyleIsDefined()
104
+ set oClass.isSoapBodyUse = classDefinition.SoapBodyUseIsDefined()
105
+ set oClass.isSqlCategory = classDefinition.SqlCategoryIsDefined()
106
+
107
+ set props = ##class(%Dictionary.ClassDefinition).%OpenId("%Dictionary.ClassDefinition")
108
+ for j=1:1:props.Properties.Count() {
109
+ set pname = props.Properties.GetAt(j).Name
110
+ set:((pname '= "parent")
111
+ && ('props.Properties.GetAt(j).Private)
112
+ && ('$IsObject($PROPERTY(classDefinition, pname)))) $PROPERTY(oClass, pname) = $PROPERTY(classDefinition, pname)
113
+ }
114
+ if (oClass.TimeChanged) { set oClass.TimeChanged = $zdatetime(oClass.TimeChanged) }
115
+ if (oClass.TimeCreated) { set oClass.TimeCreated = $zdatetime(oClass.TimeCreated) }
116
+ if ((compiledClassDefinition '= "") && (compiledClassDefinition.ClassType '= "")) {
117
+ set oClass.ClassType = compiledClassDefinition.ClassType // set class type from all inherited classes
118
+ }
107
119
120
+ set oClass.Super = "" // do not quit with super at this moment
108
121
if (oData.restrictPackage) && ('..inPackage(oData.basePackageName, package)) quit oClass
109
- set oClass.super = ..correctInheritance(oData, classDefinition, package)
122
+ set oClass.Super = ..correctInheritance(oData, classDefinition, package) // now expand super names
110
123
111
124
set oClass.properties = oProperties
112
125
set count = classDefinition.Properties.Count()
@@ -171,7 +184,20 @@ Return structured data about class.</Description>
171
184
do oQueries.%DispatchSetProperty(q.Name, oProp)
172
185
}
173
186
174
- do ..collectInheritance(oData, oClass.super)
187
+ #dim ind as %Dictionary.IndexDefinition
188
+ set oClass.indices = oIndices
189
+ set props = ##class(%Dictionary.ClassDefinition).%OpenId("%Dictionary.IndexDefinition")
190
+ for i=1:1:classDefinition.Indices.Count() {
191
+ set oProp = ##class(%ZEN.proxyObject).%New()
192
+ set ind = classDefinition.Indices.GetAt(i)
193
+ for j=1:1:props.Properties.Count() {
194
+ set pname = props.Properties.GetAt(j).Name
195
+ set:(pname '= "parent") $PROPERTY(oProp, pname) = $PROPERTY(ind, pname)
196
+ }
197
+ do oIndices.%DispatchSetProperty(ind.Name, oProp)
198
+ }
199
+
200
+ do ..collectInheritance(oData, oClass.Super)
175
201
176
202
quit oClass
177
203
]]> </Implementation >
@@ -343,19 +369,19 @@ Returns structured package data</Description>
343
369
</Class >
344
370
345
371
346
- <Project name =" UMLExplorer " LastModified =" 2015-05-24 18:14:48.579613" >
372
+ <Project name =" ClassExplorer " LastModified =" 2015-05-24 18:14:48.579613" >
347
373
<Items >
348
- <ProjectItem name =" UMLExplorer .ClassView" type =" CLS" ></ProjectItem >
349
- <ProjectItem name =" UMLExplorer .Router" type =" CLS" ></ProjectItem >
350
- <ProjectItem name =" UMLExplorer .StaticContent" type =" CLS" ></ProjectItem >
351
- <ProjectItem name =" UMLExplorer .WebAppInstaller" type =" CLS" ></ProjectItem >
374
+ <ProjectItem name =" ClassExplorer .ClassView" type =" CLS" ></ProjectItem >
375
+ <ProjectItem name =" ClassExplorer .Router" type =" CLS" ></ProjectItem >
376
+ <ProjectItem name =" ClassExplorer .StaticContent" type =" CLS" ></ProjectItem >
377
+ <ProjectItem name =" ClassExplorer .WebAppInstaller" type =" CLS" ></ProjectItem >
352
378
</Items >
353
379
</Project >
354
380
355
381
356
- <Class name =" UMLExplorer .Router" >
382
+ <Class name =" ClassExplorer .Router" >
357
383
<Description >
358
- REST interface for UMLExplorer </Description >
384
+ REST interface for ClassExplorer </Description >
359
385
<Super >%CSP.REST</Super >
360
386
<TimeChanged >63697,73073.878177</TimeChanged >
361
387
<TimeCreated >63648,30450.187229</TimeCreated >
@@ -365,8 +391,8 @@ REST interface for UMLExplorer</Description>
365
391
<Routes>
366
392
<Route Url="/" Method="GET" Call="Index"/>
367
393
<Route Url="/index" Method="GET" Call="Index"/>
368
- <Route Url="/css/CacheUMLExplorer .css" Method="GET" Call="GetCss"/>
369
- <Route Url="/js/CacheUMLExplorer .js" Method="GET" Call="GetJs"/>
394
+ <Route Url="/css/CacheClassExplorer .css" Method="GET" Call="GetCss"/>
395
+ <Route Url="/js/CacheClassExplorer .js" Method="GET" Call="GetJs"/>
370
396
<Route Url="/Test" Method="GET" Call="Test"/>
371
397
<Route Url="/GetClassTree" Method="GET" Call="GetClassTree"/>
372
398
<Route Url="/GetClassView" Method="GET" Call="GetClassView"/>
@@ -383,7 +409,7 @@ Method returns whole class tree visible in the current namespace.</Description>
383
409
<ClassMethod >1</ClassMethod >
384
410
<ReturnType >%Status</ReturnType >
385
411
<Implementation ><![CDATA[
386
- do ##class(UMLExplorer .ClassView).getClassTree(%request.Get("namespace")).%ToJSON(, "o")
412
+ do ##class(ClassExplorer .ClassView).getClassTree(%request.Get("namespace")).%ToJSON(, "o")
387
413
return $$$OK
388
414
]]> </Implementation >
389
415
</Method >
@@ -420,7 +446,7 @@ Return the list of all namespaces</Description>
420
446
<ClassMethod >1</ClassMethod >
421
447
<ReturnType >%Status</ReturnType >
422
448
<Implementation ><![CDATA[
423
- do ##class(UMLExplorer .ClassView).getAllNamespacesList().%ToJSON(, "o")
449
+ do ##class(ClassExplorer .ClassView).getAllNamespacesList().%ToJSON(, "o")
424
450
return $$$OK
425
451
]]> </Implementation >
426
452
</Method >
@@ -513,7 +539,7 @@ Issue an "304 Not Modified" status</Description>
513
539
</Class >
514
540
515
541
516
- <Class name =" UMLExplorer .StaticContent" >
542
+ <Class name =" ClassExplorer .StaticContent" >
517
543
<Description >
518
544
Cache UML Explorer vX.X.X/*build.replace:pkg.version*/ static content generator.
519
545
Class contains methods that return JS/CSS/HTML data for single page application.</Description >
@@ -527,7 +553,7 @@ Write the contents of xData tag</Description>
527
553
<FormalSpec >Const:%String</FormalSpec >
528
554
<ReturnType >%Status</ReturnType >
529
555
<Implementation ><![CDATA[
530
- Set xdata = ##class(%Dictionary.CompiledXData).%OpenId("UMLExplorer .StaticContent||"_Const).Data
556
+ Set xdata = ##class(%Dictionary.CompiledXData).%OpenId("ClassExplorer .StaticContent||"_Const).Data
531
557
set status=##class(%XML.TextReader).ParseStream(xdata, .textreader)
532
558
while textreader.Read() { if (textreader.NodeType="chars") { w textreader.Value } }
533
559
return $$$OK
@@ -560,7 +586,7 @@ Write the contents of xData tag</Description>
560
586
</Class >
561
587
562
588
563
- <Class name =" UMLExplorer .WebAppInstaller" >
589
+ <Class name =" ClassExplorer .WebAppInstaller" >
564
590
<Super >%Projection.AbstractProjection</Super >
565
591
<TimeChanged >63696,65168.289869</TimeChanged >
566
592
<TimeCreated >63696,64041.85537</TimeCreated >
@@ -587,14 +613,14 @@ This method is invoked when a class is compiled.</Description>
587
613
set cspProperties("NameSpace") = ns
588
614
set cspProperties("Description") = "A WEB application for Cache UML Explorer."
589
615
set cspProperties("IsNameSpaceDefault") = 1
590
- set cspProperties("DispatchClass") = "UMLExplorer .Router"
591
- if ('##class(Security.Applications).Exists("/UMLExplorer ")) {
592
- w !, "Creating WEB application ""/UMLExplorer ""..."
593
- set tSC = ##class(Security.Applications).Create("/UMLExplorer ", .cspProperties)
616
+ set cspProperties("DispatchClass") = "ClassExplorer .Router"
617
+ if ('##class(Security.Applications).Exists("/ClassExplorer ")) {
618
+ w !, "Creating WEB application ""/ClassExplorer ""..."
619
+ set tSC = ##class(Security.Applications).Create("/ClassExplorer ", .cspProperties)
594
620
if $$$ISERR(tSC) throw ##class(%Installer.Exception).CreateFromStatus(tSC)
595
- w !, "WEB application ""/UMLExplorer "" created."
621
+ w !, "WEB application ""/ClassExplorer "" created."
596
622
} else {
597
- w !, "WEB application ""/UMLExplorer "" already exists, so it is ready to use."
623
+ w !, "WEB application ""/ClassExplorer "" already exists, so it is ready to use."
598
624
}
599
625
zn:ns'="%SYS" ns
600
626
quit $$$OK
@@ -610,10 +636,10 @@ This method is invoked when a class is 'uncompiled'.</Description>
610
636
<Implementation ><![CDATA[
611
637
set ns = $NAMESPACE
612
638
zn:ns'="%SYS" "%SYS"
613
- if (##class(Security.Applications).Exists("/UMLExplorer ")) {
614
- w !, "Deleting WEB application ""/UMLExplorer ""..."
615
- do ##class(Security.Applications).Delete("/UMLExplorer ")
616
- w !, "WEB application ""/UMLExplorer "" was successfully removed."
639
+ if (##class(Security.Applications).Exists("/ClassExplorer ")) {
640
+ w !, "Deleting WEB application ""/ClassExplorer ""..."
641
+ do ##class(Security.Applications).Delete("/ClassExplorer ")
642
+ w !, "WEB application ""/ClassExplorer "" was successfully removed."
617
643
}
618
644
zn:ns'="%SYS" ns
619
645
QUIT $$$OK
0 commit comments