ILionApplication
This section details the functions and properties of the AMT-COBOL Repository Module Application interface
Properties
| Name | Type | Access | Description | 
| Name | String | Read only | Returns the name of the application. | 
Functions
| Function name | Return type | Parameters | Description | |
| Name | Type | |||
| AddGenSet | ILionGenSet Object | GenSetName | String | Add's a new Generation Set to this application and returns the Generation Set object. | 
| AddLabel | ILionLabel Object | LabelName | String | Adds a new label to this application in the repository, returns an Object of type ILionLabel for the newly added label. | 
| GetGenerate | ILionGenerate Object | GenSet | ILionGenSet | Returns an ILionGenerate Object to request generation. | 
| GetGenSet | ILionGenSet Object | GenSetName | String | Returns the specified Generation Set in this application as ILionGenSet Object. | 
| GetGenSets | List of ILionGenSet Objects | Returns a list of Generation Sets in this application as ILionGenSet Objects. | ||
| GetGenSets2 | Array of ILionGenSet Objects | Returns an array of Generation Sets in this application as ILionGenSet Objects. | ||
| GetLabel | ILionLabel Object | LabelName | String | Returns the specified label in this application as an ILionLabel Object. | 
| GetLabels | List of ILionLabel Objects | Returns a list of labels in this application as ILionLabel Objects. | ||
| GetLabels2 | Array of ILionLabel Objects | Returns an array of labels in this application as ILionLabel Objects. | ||
| GetLionObject | ILionObject Object | Name | String | Locates the specified object in the repository and returns the found object as an ILionObject Object. Returns null when the object is not found inside the repository. | 
| ObjectType | LionObjectType | |||
| GetLionObjects | List of ILionObject Objects | ObjectType | LionObjectType | Returns a list of all the objects inside this application of the specified ObjectType as ILionObject Objects. | 
| GetLionObjects2 | Array of ILionObject Objects | ObjectType | LionObjectType | Returns an array of all the objects inside this application of the specified ObjectType as ILionObject Objects. | 
| GetRootLabel | ILionLabel Object | Returns the root label in this application as ILionLabel Object. | ||
Example
C#
ILionApplication app2 = repos.GetApplication("DEMO2");
if (app2 != null) {
    Log("Single app: " + app2.Name);
}
foreach (ILionLabel label in app2.GetLabels()) {
    Log("Label: " + label.Name);
}
ILionLabel label2 = app.GetLabel("labelb");
if (label2 != null) {
    Log("Single label: " + label2.Name);
}
ILionLabel label3 = app.AddLabel("DummyLabel");
foreach (ILionGenSet genSet in app.GetGenSets()) {
    Log("GenSet: " + genSet.Name);
}
ILionGenSet genSet2 = app.GetGenSet("Default from loading source");
if (genSet2 != null) {
    Log("Single genset: " + genSet2.Name);
}
ILionObject objReport = app.GetLionObject("KOREP", LionObjectType.ReportUser);
if (objReport != null) {
    Log("Report found " + objReport.Name);
}
PowerShell
$O_App2 = $O_Repos.GetApplication("DEMO2")
if ($O_App2) {
    Write-Host("Single app: " + $O_App2.Name)
    }
foreach ($O_Label in $O_App.GetLabels()) {
    Write-Host("Label: " + $O_Label.Name)
    }
$O_Label2 = $O_App.GetLabel("labelb")
if ($O_Label2) {
    Write-Host("Single label: " + $O_Label2.Name)
    }
$O_Label3 = $O_App.AddLabel("DummyLabel")
foreach ($O_Genset in $O_App.GetGenSets()) {
    Write-Host("GenSet: " + $O_Genset.Name)
    }
$O_Genset2 = $O_App.GetGenSet("Default from loading source")
if ($O_Genset2) {
    Write-Host("Single genset: " + $O_Genset2.Name)
    }
$O_ObjReport = $O_App.GetLionObject("KOREP", 208)
if ($O_ObjReport) {
    Write-Host("Report found " + $O_ObjReport.Name)
    }
