generated from intersystems-community/intersystems-iris-dev-template
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Line.cls
39 lines (29 loc) · 1.04 KB
/
Line.cls
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/// contains useful one-liners for ObjectScript development
Class dc.one.Line
{
ClassMethod CreateSSL()
{
n $namespace
set $namespace="%SYS", name="DefaultSSL" do:'##class(Security.SSLConfigs).Exists(name) ##class(Security.SSLConfigs).Create(name)
}
/// install ZPM. You can call this, or copy the line, but don't forget to return to the initial namespace
ClassMethod InstallZPM()
{
n $namespace
set $namespace="%SYS" do ##class(Security.SSLConfigs).Create("ssl") set r=##class(%Net.HttpRequest).%New(),r.Server="pm.community.intersystems.com",r.SSLConfiguration="ssl" do r.Get("/packages/zpm/latest/installer"),$system.OBJ.LoadStream(r.HttpResponse.Data,"c")
}
/// Enable IRIS BI in an Namespace
/// Create %All Namespace
ClassMethod CreatePersentAll() As %Status
{
Set sc = $$$OK
n $namespace
set $namespace="%SYS",P("Globals")="%DEFAULTDB",sc=##class(Config.Namespaces).Create("%All",.P)
Return sc
}
/// enable IRIS BI in a namespace
ClassMethod EnableIRISBI()
{
do EnableDeepSee^%SYS.cspServer("/csp/namespace/")
}
}