33<Class name =" UMLExplorer.ClassView" >
44<Description >
55Class contains methods that return structured classes/packages data.</Description >
6- <TimeChanged >63684,52343.305666 </TimeChanged >
6+ <TimeChanged >63686,4398.893381 </TimeChanged >
77<TimeCreated >63653,67019.989197</TimeCreated >
88
99<Method name =" getClassTree" >
@@ -70,38 +70,49 @@ Return structured data about class.</Description>
7070 set oClass.FINAL = classDefinition.Final
7171 set oClass.HIDDEN = classDefinition.Hidden
7272 set oClass.classType = classDefinition.ClassType
73+ set oClass.serverOnly = classDefinition.ServerOnly // -
7374
7475 if (oData.restrictPackage) && ('..inPackage(oData.basePackageName, package)) quit oClass
7576
7677 set oClass.properties = oProperties
7778 set count = classDefinition.Properties.Count()
78- for i = 1:1:count {
79+ for i= 1:1:count {
7980 set oProp = ##class(%ZEN.proxyObject).%New()
8081 set p = classDefinition.Properties.GetAt(i)
8182 do oProperties.%DispatchSetProperty(p.Name, oProp)
82- do oProp.%DispatchSetProperty(" private", p.Private)
83- do oProp.%DispatchSetProperty(" readOnly", p.ReadOnly)
84- do oProp.%DispatchSetProperty(" type", p.Type)
83+ set oProp.private = p.Private
84+ set oProp.readOnly = p.ReadOnly
85+ set oProp.type = p.Type
8586 do ..collectAggregation(oData, classDefinition, p.Type, p.Private)
8687 do ..collectAggregation(oData, classDefinition, package _ "." _ p.Type, p.Private)
8788 }
8889
8990 set oMethods = ##class(%ZEN.proxyObject).%New()
9091 set oClass.methods = oMethods
9192 set count = classDefinition.Methods.Count()
92- for i = 1:1:count {
93+ for i= 1:1:count {
9394 set oMeth = ##class(%ZEN.proxyObject).%New()
9495 set met = classDefinition.Methods.GetAt(i)
9596 do oMethods.%DispatchSetProperty(met.Name, oMeth)
96- do oMeth.%DispatchSetProperty("private", met.Private)
97- do oMeth.%DispatchSetProperty("returns", met.ReturnType)
98- do oMeth.%DispatchSetProperty("classMethod", met.ClassMethod)
97+ set oMeth.private = met.Private
98+ set oMeth.returns = met.ReturnType
99+ set oMeth.classMethod = met.ClassMethod
100+ set oMeth.clientMethod = met.ClientMethod
101+ set oMeth.final = met.Final
102+ set oMeth.abstract = met.Abstract
103+ set oMeth.language = met.Language
104+ set oMeth.notInheritable = met.NotInheritable
105+ set oMeth.serverOnly = met.ServerOnly
106+ set oMeth.sqlProc = met.SqlProc
107+ set oMeth.sqlName = met.SqlName
108+ set oMeth.webMethod = met.WebMethod
109+ set oMeth.zenMethod = met.ZenMethod
99110 }
100111
101112 set oParameters = ##class(%ZEN.proxyObject).%New()
102113 set oClass.parameters = oParameters
103114 set count = classDefinition.Parameters.Count()
104- for i = 1:1:count {
115+ for i= 1:1:count {
105116 set oPar = ##class(%ZEN.proxyObject).%New()
106117 set p = classDefinition.Parameters.GetAt(i)
107118 do oParameters.%DispatchSetProperty(p.Name, oPar)
@@ -114,6 +125,30 @@ Return structured data about class.</Description>
114125]]> </Implementation >
115126</Method >
116127
128+ <Method name =" getMethod" >
129+ <Description >
130+ Return method data.</Description >
131+ <ClassMethod >1</ClassMethod >
132+ <FormalSpec >className:%String,methodName:%String</FormalSpec >
133+ <ReturnType >%ZEN.proxyObject</ReturnType >
134+ <Implementation ><![CDATA[
135+ set oMeth = ##class(%ZEN.proxyObject).%New()
136+ set met = ##class(%Dictionary.MethodDefinition).%OpenId(className _ "||" _ methodName)
137+ if (met = "") { set oMeth.error = 1 quit oMeth }
138+
139+ set oMeth.description = met.Description
140+ set oMeth.arguments = met.FormalSpec
141+ set oMeth.returns = met.ReturnType
142+ set oMeth.code = ""
143+ do {
144+ set chars = met.Implementation.Read()
145+ set oMeth.code = oMeth.code _ chars
146+ } while (chars)
147+
148+ quit oMeth
149+ ]]> </Implementation >
150+ </Method >
151+
117152<Method name =" inPackage" >
118153<Description ><![CDATA[
119154Returns if <var>packageName</var> is in <var>basePackageName</var>.]]> </Description >
@@ -280,7 +315,7 @@ Returns structured package data</Description>
280315<Description >
281316REST interface for UMLExplorer</Description >
282317<Super >%CSP.REST</Super >
283- <TimeChanged >63679,81701.423669 </TimeChanged >
318+ <TimeChanged >63685,85586.177035 </TimeChanged >
284319<TimeCreated >63648,30450.187229</TimeCreated >
285320
286321<XData name =" UrlMap" >
@@ -294,6 +329,7 @@ REST interface for UMLExplorer</Description>
294329 <Route Url="/GetClassTree" Method="GET" Call="GetClassTree"/>
295330 <Route Url="/GetClassView/:ClassName" Method="GET" Call="GetClassView"/>
296331 <Route Url="/GetPackageView/:PackageName" Method="GET" Call="GetPackageView"/>
332+ <Route Url="/GetMethod/:ClassName/:MethodName" Method="GET" Call="GetMethod"/>
297333</Routes>
298334]]> </Data >
299335</XData >
@@ -335,6 +371,19 @@ Returns all package class trees by given package name</Description>
335371]]> </Implementation >
336372</Method >
337373
374+ <Method name =" GetMethod" >
375+ <Description >
376+ Returns method description and code</Description >
377+ <ClassMethod >1</ClassMethod >
378+ <FormalSpec >className:%String,methodName:%String</FormalSpec >
379+ <ReturnType >%Status</ReturnType >
380+ <Implementation ><![CDATA[
381+ set methodData = ##class(ClassView).getMethod(className, methodName)
382+ do methodData.%ToJSON(, "ou")
383+ return $$$OK
384+ ]]> </Implementation >
385+ </Method >
386+
338387<Method name =" GetCss" >
339388<Description >
340389Method returns user application CSS.</Description >
0 commit comments