4
4
<Description >
5
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 >63919,67431.456639 </TimeChanged >
7
+ <TimeChanged >63928,63957.580821 </TimeChanged >
8
8
<TimeCreated >63653,67019.989197</TimeCreated >
9
9
10
10
<Method name =" getAllNamespacesList" >
@@ -193,7 +193,7 @@ Return structured data about class.</Description>
193
193
set xd = classDefinition.XDatas.GetAt(i)
194
194
for j=1:1:props.Properties.Count() {
195
195
set pname = props.Properties.GetAt(j).Name
196
- set:(pname '= "parent") $PROPERTY(oProp, pname) = $PROPERTY(xd, pname)
196
+ set:(( pname '= "parent") && (pname '= "Object") ) $PROPERTY(oProp, pname) = $PROPERTY(xd, pname)
197
197
}
198
198
do oXDatas.%DispatchSetProperty(xd.Name, oProp)
199
199
}
@@ -319,14 +319,22 @@ Returns new (correct) super</Description>
319
319
<Description >
320
320
Setup basic output data object</Description >
321
321
<ClassMethod >1</ClassMethod >
322
- <FormalSpec >packageName:%String</FormalSpec >
322
+ <FormalSpec >packageName:%String,baseNamespace:%String,savedName:%String </FormalSpec >
323
323
<Private >1</Private >
324
324
<ReturnType >%ZEN.proxyObject</ReturnType >
325
325
<Implementation ><![CDATA[
326
326
set oData = ##class(%ZEN.proxyObject).%New()
327
327
set oData.basePackageName = packageName
328
328
set oData.restrictPackage = 1 // expand classes only in base package
329
329
set oData.classes = ##class(%ZEN.proxyObject).%New()
330
+
331
+ set ns = $namespace
332
+ zn baseNamespace
333
+ if $get(^ClassExplorer("savedView", ns_":"_savedName)) '= "" {
334
+ set oData.savedView = $get(^ClassExplorer("savedView", ns_":"_savedName))
335
+ }
336
+ zn ns
337
+
330
338
quit oData
331
339
]]> </Implementation >
332
340
</Method >
@@ -348,9 +356,10 @@ Returns structured class data</Description>
348
356
<FormalSpec >className:%String,namespace:%String</FormalSpec >
349
357
<ReturnType >%ZEN.proxyObject</ReturnType >
350
358
<Implementation ><![CDATA[
359
+ set baseNamespace = $namespace
351
360
zn:$GET(namespace)'="" namespace
352
361
set package = $LISTTOSTRING($LIST($LISTFROMSTRING(className, "."), 1, *-1), ".")
353
- set oData = ..getBaseOData(package)
362
+ set oData = ..getBaseOData(package, baseNamespace, "CLASS:"_className )
354
363
do ..fillClassData(oData, className)
355
364
quit oData
356
365
]]> </Implementation >
@@ -363,8 +372,9 @@ Returns structured package data</Description>
363
372
<FormalSpec >rootPackageName:%String,namespace:%String</FormalSpec >
364
373
<ReturnType >%ZEN.proxyObject</ReturnType >
365
374
<Implementation ><![CDATA[
375
+ set baseNamespace = $namespace
366
376
zn:$GET(namespace)'="" namespace
367
- set oData = ..getBaseOData(rootPackageName)
377
+ set oData = ..getBaseOData(rootPackageName, baseNamespace, "PACKAGE:"_rootPackageName )
368
378
set classes = ##class(%ResultSet).%New("%Dictionary.ClassDefinition:Summary")
369
379
do classes.Execute()
370
380
set listLen = $LISTLENGTH($LISTFROMSTRING(rootPackageName, ".")) // bottom level of package to extract
@@ -397,7 +407,7 @@ Returns structured package data</Description>
397
407
<Description >
398
408
REST interface for ClassExplorer</Description >
399
409
<Super >%CSP.REST</Super >
400
- <TimeChanged >63697,73073.878177 </TimeChanged >
410
+ <TimeChanged >63928,63486.89174 </TimeChanged >
401
411
<TimeCreated >63648,30450.187229</TimeCreated >
402
412
403
413
<XData name =" UrlMap" >
@@ -413,6 +423,8 @@ REST interface for ClassExplorer</Description>
413
423
<Route Url="/GetAllNamespacesList" Method="GET" Call="GetAllNamespacesList"/>
414
424
<Route Url="/GetPackageView" Method="GET" Call="GetPackageView"/>
415
425
<Route Url="/GetMethod" Method="GET" Call="GetMethod"/>
426
+ <Route Url="/SaveView" Method="POST" Call="SaveView"/>
427
+ <Route Url="/ResetView" Method="GET" Call="ResetView"/>
416
428
</Routes>
417
429
]]> </Data >
418
430
</XData >
@@ -441,6 +453,34 @@ Returns classTree by given class name</Description>
441
453
]]> </Implementation >
442
454
</Method >
443
455
456
+ <Method name =" SaveView" >
457
+ <Description >
458
+ Saves the view preferences</Description >
459
+ <ClassMethod >1</ClassMethod >
460
+ <ReturnType >%Status</ReturnType >
461
+ <Implementation ><![CDATA[
462
+ set name = %request.Get("name")
463
+ set content = %request.Content.Read($$$MaxStringLength) // ~ 7mb
464
+ set ^test = name
465
+ set ^ClassExplorer("savedView", name) = content
466
+ write "{""OK"":true}"
467
+ return $$$OK
468
+ ]]> </Implementation >
469
+ </Method >
470
+
471
+ <Method name =" ResetView" >
472
+ <Description >
473
+ Saves the view preferences</Description >
474
+ <ClassMethod >1</ClassMethod >
475
+ <ReturnType >%Status</ReturnType >
476
+ <Implementation ><![CDATA[
477
+ set name = %request.Get("name")
478
+ kill ^ClassExplorer("savedView", name)
479
+ write "{""OK"":true}"
480
+ return $$$OK
481
+ ]]> </Implementation >
482
+ </Method >
483
+
444
484
<Method name =" GetPackageView" >
445
485
<Description >
446
486
Returns all package class trees by given package name</Description >
0 commit comments