11<?xml version =" 1.0" encoding =" UTF-8" ?>
22<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" >
44<Description >
5- Cache UML Explorer vX.X.X/*build.replace:pkg.version*/
5+ Cache Class Explorer vX.X.X/*build.replace:pkg.version*/
66Class contains methods that return structured classes/packages data.</Description >
7- <TimeChanged >63830,81286.756889 </TimeChanged >
7+ <TimeChanged >63844,1327.122337 </TimeChanged >
88<TimeCreated >63653,67019.989197</TimeCreated >
99
1010<Method name =" getAllNamespacesList" >
@@ -45,33 +45,34 @@ Returns structured class tree with all classes available in current namespace</D
4545 set level = 1
4646 do objects.SetAt(resp, level)
4747
48-
4948 do classes.Execute()
5049 while (classes.Next()) {
5150 set name = classes.Data("Name")
5251 if ($EXTRACT(name, 1, 1) = "%") && ($NAMESPACE '= "%SYS") { continue }
5352 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
5756 }
58- set level = i + 1
5957 set resp = objects.GetAt(level)
6058 if (resp="") {
6159 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)
6361 do objects.SetAt(resp, level)
6462 }
6563 while ($LISTLENGTH(parts) > level) {
6664 set level = level + 1
6765 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)
6967 do objects.SetAt(resp, level)
7068 }
7169 if ($LISTLENGTH(parts) = level) {
7270 do resp.%DispatchSetProperty($LISTGET(parts, level), classes.Data("Hidden"))
7371 }
7472 set lastParts = parts
73+ for i=1:1:$LISTLENGTH(lastParts)-1 {
74+ set $LIST(lastParts, i) = "/"_$LISTGET(lastParts, i)
75+ }
7576 }
7677
7778 quit objects.GetAt(1)
@@ -87,26 +88,38 @@ Return structured data about class.</Description>
8788<ReturnType >%ZEN.proxyObject</ReturnType >
8889<Implementation ><![CDATA[
8990 set classDefinition = ##class(%Dictionary.ClassDefinition).%OpenId(className)
91+ set compiledClassDefinition = ##class(%Dictionary.CompiledClass).%OpenId(className)
9092 if (classDefinition = "") || (oData.classes.%DispatchGetProperty(classDefinition.Name) '= "") quit ""
9193
9294 set oClass = ##class(%ZEN.proxyObject).%New()
9395 do oData.classes.%DispatchSetProperty(classDefinition.Name, oClass) // prevent from recursive setup
9496 set package = $LISTTOSTRING($LIST($LISTFROMSTRING(classDefinition.Name, "."), 1, *-1),".")
9597 set oProperties = ##class(%ZEN.proxyObject).%New()
9698 set oQueries = ##class(%ZEN.proxyObject).%New()
99+ set oIndices = ##class(%ZEN.proxyObject).%New()
97100
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 // -
106101 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+ }
107119
120+ set oClass.Super = "" // do not quit with super at this moment
108121 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
110123
111124 set oClass.properties = oProperties
112125 set count = classDefinition.Properties.Count()
@@ -171,7 +184,20 @@ Return structured data about class.</Description>
171184 do oQueries.%DispatchSetProperty(q.Name, oProp)
172185 }
173186
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)
175201
176202 quit oClass
177203]]> </Implementation >
@@ -343,19 +369,19 @@ Returns structured package data</Description>
343369</Class >
344370
345371
346- <Project name =" UMLExplorer " LastModified =" 2015-05-24 18:14:48.579613" >
372+ <Project name =" ClassExplorer " LastModified =" 2015-05-24 18:14:48.579613" >
347373 <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 >
352378 </Items >
353379</Project >
354380
355381
356- <Class name =" UMLExplorer .Router" >
382+ <Class name =" ClassExplorer .Router" >
357383<Description >
358- REST interface for UMLExplorer </Description >
384+ REST interface for ClassExplorer </Description >
359385<Super >%CSP.REST</Super >
360386<TimeChanged >63697,73073.878177</TimeChanged >
361387<TimeCreated >63648,30450.187229</TimeCreated >
@@ -365,8 +391,8 @@ REST interface for UMLExplorer</Description>
365391<Routes>
366392 <Route Url="/" Method="GET" Call="Index"/>
367393 <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"/>
370396 <Route Url="/Test" Method="GET" Call="Test"/>
371397 <Route Url="/GetClassTree" Method="GET" Call="GetClassTree"/>
372398 <Route Url="/GetClassView" Method="GET" Call="GetClassView"/>
@@ -383,7 +409,7 @@ Method returns whole class tree visible in the current namespace.</Description>
383409<ClassMethod >1</ClassMethod >
384410<ReturnType >%Status</ReturnType >
385411<Implementation ><![CDATA[
386- do ##class(UMLExplorer .ClassView).getClassTree(%request.Get("namespace")).%ToJSON(, "o")
412+ do ##class(ClassExplorer .ClassView).getClassTree(%request.Get("namespace")).%ToJSON(, "o")
387413 return $$$OK
388414]]> </Implementation >
389415</Method >
@@ -420,7 +446,7 @@ Return the list of all namespaces</Description>
420446<ClassMethod >1</ClassMethod >
421447<ReturnType >%Status</ReturnType >
422448<Implementation ><![CDATA[
423- do ##class(UMLExplorer .ClassView).getAllNamespacesList().%ToJSON(, "o")
449+ do ##class(ClassExplorer .ClassView).getAllNamespacesList().%ToJSON(, "o")
424450 return $$$OK
425451]]> </Implementation >
426452</Method >
@@ -513,7 +539,7 @@ Issue an "304 Not Modified" status</Description>
513539</Class >
514540
515541
516- <Class name =" UMLExplorer .StaticContent" >
542+ <Class name =" ClassExplorer .StaticContent" >
517543<Description >
518544Cache UML Explorer vX.X.X/*build.replace:pkg.version*/ static content generator.
519545Class contains methods that return JS/CSS/HTML data for single page application.</Description >
@@ -527,7 +553,7 @@ Write the contents of xData tag</Description>
527553<FormalSpec >Const:%String</FormalSpec >
528554<ReturnType >%Status</ReturnType >
529555<Implementation ><![CDATA[
530- Set xdata = ##class(%Dictionary.CompiledXData).%OpenId("UMLExplorer .StaticContent||"_Const).Data
556+ Set xdata = ##class(%Dictionary.CompiledXData).%OpenId("ClassExplorer .StaticContent||"_Const).Data
531557 set status=##class(%XML.TextReader).ParseStream(xdata, .textreader)
532558 while textreader.Read() { if (textreader.NodeType="chars") { w textreader.Value } }
533559 return $$$OK
@@ -560,7 +586,7 @@ Write the contents of xData tag</Description>
560586</Class >
561587
562588
563- <Class name =" UMLExplorer .WebAppInstaller" >
589+ <Class name =" ClassExplorer .WebAppInstaller" >
564590<Super >%Projection.AbstractProjection</Super >
565591<TimeChanged >63696,65168.289869</TimeChanged >
566592<TimeCreated >63696,64041.85537</TimeCreated >
@@ -587,14 +613,14 @@ This method is invoked when a class is compiled.</Description>
587613 set cspProperties("NameSpace") = ns
588614 set cspProperties("Description") = "A WEB application for Cache UML Explorer."
589615 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)
594620 if $$$ISERR(tSC) throw ##class(%Installer.Exception).CreateFromStatus(tSC)
595- w !, "WEB application ""/UMLExplorer "" created."
621+ w !, "WEB application ""/ClassExplorer "" created."
596622 } 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."
598624 }
599625 zn:ns'="%SYS" ns
600626 quit $$$OK
@@ -610,10 +636,10 @@ This method is invoked when a class is 'uncompiled'.</Description>
610636<Implementation ><![CDATA[
611637 set ns = $NAMESPACE
612638 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."
617643 }
618644 zn:ns'="%SYS" ns
619645 QUIT $$$OK
0 commit comments