IMobileApplicationPublicator.Users

Fore Syntax

Users: Object;

Fore.NET Syntax

Users: System.Object;

Description

The Users property sets a list of repository users, whose rights cover object of the published mobile application container.

Comments

Available values:ISecuritySubjects, IMetabaseUsers, IDictionary<ISecuritySubject>, Null.

NOTE. The property is outdated.

Fore Example

Executing the example requires that the repository contains a mobile application container with the MOBILE_APP identifier.

Add links to the Metabase, Mobile, Xml system assemblies.

Sub UserProc;
 Var
     mb: IMetabase;
     Mobile: IMobileApplication;
     Publicator: IMobileApplicationPublicator;
     res: MobilePublishResult;
     XmlDoc: IXmlDomDocument3;
     el: IXmlDomElement;
     mbUsers: IMetabaseUsers;
 Begin
     mb := MetabaseClass.Active;
     // Get the published mobile application (MA)
     Mobile := mb.ItemById("MOBILE_APP").Bind As IMobileApplication;
     // Create a mobile application publicator 
     Publicator := Mobile.CreatePublicator;
     // Specify a web server and a virtual directory for publishing the mobile application
     Publicator.WebApplication := "http://prognoz/PPMobile_App";
     mbUsers := mb.Security.Users;
     //List of repository users for loading of rights for mobile application objects
     Publicator.Users := mbUsers;
     // Publish the mobile application
     Publicator.Execute(Null);
     // Handle the result of  publishing the mobile application
     If res = MobilePublishResult.Ok Then
         Debug.WriteLine("Publishing was successful");
     Else
         Debug.WriteLine("Error occurred on publishing");
     End If;
     // Save parameters of mobile application publishing to the XML file
     XmlDoc := New DOMDocument60.Create;
     el := XmlDoc.createElement("Root");
     XmlDoc.appendChild(el);
     Publicator.SaveToXml(el);
     XmlDoc.save("C:\Publicator.xml");
End Sub UserProc;

After executing the example the mobile application is published. The console window shows a message about publication result. Publication results are loaded to the C:\Publicator.xml file. The list of repository users is set, whose rights cover mobile application container objects.

Fore.NET Example

The requirements and result of Fore.NET Example execution match with those in the Fore Example.

Imports Prognoz.Platform.Interop.Mobile;
Imports Prognoz.Platform.Interop.MsXml2;

Public Shared Sub Main(Params: StartParams);
 Var
     mb: IMetabase;
     Mobile: IMobileApplication;
     Publicator: IMobileApplicationPublicator;
     res: MobilePublishResult;
     XmlDoc: IXmlDomDocument3;
    el: IXmlDomElement;
    mbUsers: IMetabaseUsers;
 Begin
     mb := Params.Metabase;
     // Get the published mobile application (MA)
     Mobile := mb.ItemById["MOBILE_APP"].Bind() As IMobileApplication;
     // Create a mobile application publicator 
     Publicator := Mobile.CreatePublicator();
     // Specify a web server and a virtual directory for publishing the mobile application
     Publicator.WebApplication := "http://prognoz/PPMobile_App";
     mbUsers := mb.Security.Users;
     //List of repository users for loading of rights for mobile application objects
     Publicator.Users := mbUsers;
     // Publish the mobile application
     Publicator.Execute(Null);
     // Handle the result of  publishing the mobile application
     If res = MobilePublishResult.mprOk Then
         System.Diagnostics.Debug.WriteLine("Publishing was successful");
     Else
         System.Diagnostics.Debug.WriteLine("Error occurred on publishing");
     End If;
     // Save parameters of mobile application publishing to the XML file
     XmlDoc := New DOMDocument60.Create();
     el := XmlDoc.createElement("Root");
     XmlDoc.appendChild(el);
     Publicator.SaveToXml(el);
     XmlDoc.save("C:\Publicator.xml");
End Sub;

See also:

IMobileApplicationPublicator