File tree Expand file tree Collapse file tree 1 file changed +48
-0
lines changed
Expand file tree Collapse file tree 1 file changed +48
-0
lines changed Original file line number Diff line number Diff line change 1+ Class IOP .Projection Extends %Projection .AbstractProjection
2+ {
3+
4+ /// Projection to make install on compile
5+ Projection Reference As Projection ;
6+
7+ /// Call of the projection
8+ ClassMethod CreateProjection (
9+ cls As %String ,
10+ ByRef params ) As %Status
11+ {
12+ set tSC = $$$OK
13+ set tCurrentNamespace = $Namespace
14+
15+ Try {
16+ set $NAMESPACE = " %SYS"
17+ // Create a new Web App for IOP Remote Handler
18+ set webName = " /api/iop"
19+ set webProperties (" NameSpace" ) = tCurrentNamespace
20+ set webProperties (" Enabled" ) = 1
21+ set webProperties (" AutheEnabled" ) = 32
22+ set webProperties (" ServeFiles" )=2
23+ set webProperties (" Recurse" )=1
24+ if ##class (Security.Applications ).Exists (webName ) {
25+ // If the web application already exists, delete it first
26+ $$$ThrowOnError(##class (Security.Applications ).Delete (webName ))
27+ }
28+ $$$ThrowOnError(##class (Security.Applications ).Create (webName , .webProperties ))
29+ }
30+ Catch ex {
31+ Set tSC =ex .AsStatus ()
32+ Write " Error creating web application: " , ex .DisplayString (), !
33+ Set tSC = $$$OK
34+ }
35+
36+ znspace tCurrentNamespace
37+ Return tSC
38+ }
39+
40+ ClassMethod RemoveProjection (
41+ cls As %String ,
42+ ByRef params ,
43+ recompile As %Boolean ) As %Status
44+ {
45+ Quit $$$OK
46+ }
47+
48+ }
You can’t perform that action at this time.
0 commit comments