Security Groups
- The GetSecurityGroupNames Function returns a list of the Security Groups.
- Returns Empty String Array if service is not reachable.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string ErrorString = "";
string[] Groups = null;
Groups = oasc.GetSecurityGroupNames(networknode, ref ErrorString);
if (ErrorString == "Success")
{
foreach (string Group in Groups)
{
Console.WriteLine(Group);
}
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim ErrorString As String = ""
Dim Groups As String() = Nothing
Groups = oasc.GetSecurityGroupNames(networknode, ErrorString)
If ErrorString = "Success" Then
For Each Group As String In Groups
Console.WriteLine(Group)
Next
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The AddSecurityGroup Function adds a Security Group to the existing Security configuration.
- Returns -1 if service is not reachable.
- Returns 1 if successful.
- Returns 0 if the Group already exists or adding the Group failed.
- Group is the name of the Group to add.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
Int32 ResultInt32 = 0;
string ErrorString = "";
string group = "";
ResultInt32 = oasc.AddSecurityGroup(group, networknode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("Group successfully added.");
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim ResultInt32 As Int32 = 0
Dim ErrorString As String = ""
Dim group As String = ""
ResultInt32 = oasc.AddSecurityGroup(group, networknode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("Group successfully added.")
End If
End Sub
End Class
End Namespace
- The RemoveSecurityGroup Function removes a Security Group from the existing Security configuration.
- Returns -1 if service is not reachable.
- Returns 1 if successful.
- Returns 0 if the Group does not exist or removing the Group failed.
- Group is the name of the Group to remove.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string[] Parameters = null;
Parameters = oasc.GetSecurityParameterStrings(networknode);
foreach (string Parameter in Parameters)
{
Console.WriteLine(Parameter);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim Parameters As String() = Nothing
Parameters = oasc.GetSecurityParameterStrings(networknode)
For Each Parameter As String In Parameters
Console.WriteLine(Parameter)
Next
End Sub
End Class
End Namespace
- The GetSecurity_Parameter_Value Function returns an object value for the Security Group and Parameter specified.
- Returns nothing if service is not reachable.
- Parameter is a String of the Parameter Type desired of the Security Group.
- Group is a String of the Security Group desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string parameter = "";
string group = "";
object ResultObject = null;
string ErrorString = "";
ResultObject = oasc.GetSecurity_Parameter_Value(parameter, group, networknode, ref ErrorString);
if (ErrorString == "Success")
{
try
{
Console.WriteLine(ResultObject.ToString());
}
catch
{
Console.WriteLine("Error converting value to string.");
}
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim parameter As String = ""
Dim group As String = ""
Dim ResultObject As Object = Nothing
Dim ErrorString As String = ""
ResultObject = oasc.GetSecurity_Parameter_Value(parameter, group, networknode, ErrorString)
If ErrorString = "Success" Then
Try
Console.WriteLine(ResultObject.ToString())
Catch
Console.WriteLine("Error converting value to string.")
End Try
End If
End Sub
End Class
End Namespace
- The GetSecurity_Parameter_Values Function returns an array of object values for the Security Group specified.
- The order of the array corresponds with the GetSecurityParameterStrings Function order.
- Returns empty array if service is not reachable.
- Group is a String of the Security Group desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string group = "";
object[] ResultObjects = null;
string ResultString = null;
string ErrorString = "";
ResultObjects = oasc.GetSecurity_Parameter_Values(group, networknode, ref ErrorString);
if (ErrorString == "Success")
{
foreach (object ResultObject in ResultObjects)
{
try
{
if (ResultObject == null)
{
ResultString = "";
}
else
{
ResultString = ResultObject.ToString();
}
Console.WriteLine(ResultString);
}
catch
{
Console.WriteLine("Error Converting Object");
}
}
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim group As String = ""
Dim ResultObjects As Object() = Nothing
Dim ResultString As String = Nothing
Dim ErrorString As String = ""
ResultObjects = oasc.GetSecurity_Parameter_Values(group, networknode, ErrorString)
If ErrorString = "Success" Then
For Each ResultObject As Object In ResultObjects
Try
If ResultObject Is Nothing Then
ResultString = ""
Else
ResultString = ResultObject.ToString()
End If
Console.WriteLine(ResultString)
Catch
Console.WriteLine("Error Converting Object")
End Try
Next
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The SetSecurity_Parameter_Value Function sets an object value for the Security Group and Parameter specified.
- Returns -1 if service is not reachable.
- Returns 0 if the Group does not exist or the value did not get set correctly.
- Returns 1 if the function was successful.
- Parameter is a String of the Parameter Type desired of the Security Group.
- Value is the desired value to set.
- Group is a String of the Security Group desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string parameter = "";
string group = "";
string value = "";
Int32 ResultInt32 = 0;
string ErrorString = "";
ResultInt32 = oasc.SetSecurity_Parameter_Value(parameter, value, group, networknode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("Parameter Successfully Updated.");
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim parameter As String = ""
Dim group As String = ""
Dim value As String = ""
Dim ResultInt32 As Int32 = 0
Dim ErrorString As String = ""
ResultInt32 = oasc.SetSecurity_Parameter_Value(parameter, value, group, networknode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("Parameter Successfully Updated.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The AddSecurityUser Function adds a Security User to the existing Security configuration.
- Returns -1 if service is not reachable.
- Returns 1 if successful.
- Returns 0 if the User already exists or adding the User failed.
- UserName is the name of the User to add.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
Int32 ResultInt32 = 0;
string ErrorString = "";
string username = "";
ResultInt32 = oasc.AddSecurityUser(username, networknode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("User Successfully Added.");
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim ResultInt32 As Int32 = 0
Dim ErrorString As String = ""
Dim username As String = ""
ResultInt32 = oasc.AddSecurityUser(username, networknode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("User Successfully Added.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The RemoveSecurityUser Function removes a Security User from the existing Security configuration.
- Returns -1 if service is not reachable.
- Returns 1 if successful.
- Returns 0 if the User does not exist or removing the User failed.
- UserName is the name of the User to remove.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
Int32 ResultInt32 = 0;
string ErrorString = "";
string username = "";
ResultInt32 = oasc.RemoveSecurityUser(username, networknode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("User Successfully Removed.");
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim ResultInt32 As Int32 = 0
Dim ErrorString As String = ""
Dim username As String = ""
ResultInt32 = oasc.RemoveSecurityUser(username, networknode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("User Successfully Removed.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The GetSecurityUserParameterStrings Function returns an array of Strings containing all property types available for each Security User.
- Returns Empty String Array if service is not reachable.
- Returns a String Array of property types for all possible Parameters for a Security User.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string networknode = "";
string[] Parameters = null;
Parameters = oasc.GetSecurityUserParameterStrings(networknode);
foreach (string Parameter in Parameters)
{
Console.WriteLine(Parameter);
}
}
}
}
VB
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim networknode As String = ""
Dim Parameters As String() = Nothing
Parameters = oasc.GetSecurityUserParameterStrings(networknode)
For Each Parameter As String In Parameters
Console.WriteLine(Parameter)
Next
End Sub
End Class
- The GetSecurityUser_Parameter_Value Function returns an object value for the Security User and Parameter specified.
- Returns nothing if service is not reachable.
- Parameter is a String of the Parameter Type desired of the Security User.
- UserName is a String of the Security User desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string ErrorString = "";
string networknode = "";
object ResultObject = null;
string userparam = "";
string username = "";
ResultObject = oasc.GetSecurityUser_Parameter_Value(userparam, username, networknode, ref ErrorString);
if (ErrorString == "Success")
{
try
{
Console.WriteLine(ResultObject.ToString());
}
catch
{
Console.WriteLine("Error converting value to string.");
}
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim ErrorString As String = ""
Dim networknode As String = ""
Dim ResultObject As Object = Nothing
Dim userparam As String = ""
Dim username As String = ""
ResultObject = oasc.GetSecurityUser_Parameter_Value(userparam, username, networknode, ErrorString)
If ErrorString = "Success" Then
Try
Console.WriteLine(ResultObject.ToString())
Catch
Console.WriteLine("Error converting value to string.")
End Try
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The GetSecurityUser_Parameter_Values Function returns an array of object values for the Security User specified.
- The order of the array corresponds with the GetSecurityUserParameterStrings Function order.
- Returns empty array if service is not reachable.
- UserName is a String of the Security User desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string ErrorString = "";
string networknode = "";
object[] ResultObjects = null;
string username = "";
string ResultString = "";
ResultObjects = oasc.GetSecurityUser_Parameter_Values(username, networknode, ref ErrorString);
if (ErrorString == "Success")
{
foreach (object ResultObject in ResultObjects)
{
try
{
if (ResultObject == null)
{
ResultString = "";
}
else
{
ResultString = ResultObject.ToString();
}
Console.WriteLine(ResultString);
}
catch
{
Console.WriteLine("Error Converting Object");
}
}
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim ErrorString As String = ""
Dim networknode As String = ""
Dim ResultObjects As Object() = Nothing
Dim username As String = ""
Dim ResultString As String = ""
ResultObjects = oasc.GetSecurityUser_Parameter_Values(username, networknode, ErrorString)
If ErrorString = "Success" Then
For Each ResultObject As Object In ResultObjects
Try
If ResultObject Is Nothing Then
ResultString = ""
Else
ResultString = ResultObject.ToString()
End If
Console.WriteLine(ResultString)
Catch
Console.WriteLine("Error Converting Object")
End Try
Next
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The SetSecurityUser_Parameter_Value Function sets an object value for the Security User and Parameter specified.
- Returns -1 if service is not reachable.
- Returns 0 if the User does not exist or the value did not get set correctly.
- Returns 1 if the function was successful.
- Parameter is a String of the Parameter Type desired of the Security User.
- Value is the desired value to set.
- UserName is a String of the Security User desired.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string ErrorString = "";
string networknode = "";
Int32 ResultInt32 = 0;
string username = "";
string param = "";
string paramvalue = "";
ResultInt32 = oasc.SetSecurityUser_Parameter_Value(param, paramvalue, username, networknode, ref ErrorString);
if (ResultInt32 == -1)
{
Console.WriteLine("OAS Service not reached.");
}
else if (ResultInt32 == 1)
{
Console.WriteLine("Parameter Successfully Updated.");
}
else
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim ErrorString As String = ""
Dim networknode As String = ""
Dim ResultInt32 As Int32 = 0
Dim username As String = ""
Dim param As String = ""
Dim paramvalue As String = ""
ResultInt32 = oasc.SetSecurityUser_Parameter_Value(param, paramvalue, username, networknode, ErrorString)
If ResultInt32 = -1 Then
Console.WriteLine("OAS Service not reached.")
ElseIf ResultInt32 = 1 Then
Console.WriteLine("Parameter Successfully Updated.")
Else
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The SaveSecurityConfiguration Subroutine saves the current Security configuration to the specified file path.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string ErrorString = "";
string networknode = "";
string filepath = "";
oasc.SaveSecurityConfiguration(filepath, networknode, ref ErrorString);
if (ErrorString != "Success")
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim ErrorString As String = ""
Dim networknode As String = ""
Dim filepath As String = ""
oasc.SaveSecurityConfiguration(filepath, networknode, ErrorString)
If ErrorString <> "Success" Then
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace
- The LoadSecurityConfiguration Subroutine saves the current Security configuration to the specified file path.
- NetworkNode is the name of the network node of the OAS Service to connect to. Leave blank for localhost connection.
- Optional ErrorString will be set to Success when function is successful and an error message when in error.
C#
using System;
namespace OASDataSample
{
class Program
{
static OASConfig.Config oasc = new OASConfig.Config();
static void Main(string[] args)
{
string ErrorString = "";
string networknode = "";
string filepath = "";
oasc.LoadSecurityConfiguration(filepath, networknode, ref ErrorString);
if (ErrorString != "Success")
{
Console.WriteLine(ErrorString);
}
}
}
}
VB
Imports System
Namespace OASDataSample
Class Program
Shared oasc As OASConfig.Config = New OASConfig.Config()
Public Shared Sub Main(ByVal args As String())
Dim ErrorString As String = ""
Dim networknode As String = ""
Dim filepath As String = ""
oasc.LoadSecurityConfiguration(filepath, networknode, ErrorString)
If ErrorString <> "Success" Then
Console.WriteLine(ErrorString)
End If
End Sub
End Class
End Namespace