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 published mobile application (MA)
     Mobile := mb.ItemById("MOBILE_APP").Bind As IMobileApplication;
     // Create a mobile application publisher 
     Publicator := Mobile.CreatePublicator;
     // Specify web server and virtual directory for publishing mobile application
     Publicator.WebApplication := "http://prognoz/PPMobile_App";
     mbUsers := mb.Security.Users;
     //List of repository users for loading of permissions for mobile application objects
     Publicator.Users := mbUsers;
     // Publish mobile application
     Publicator.Execute(Null);
     // Handle results of mobile application publication
     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 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 permissions cover mobile application container objects.

Fore.NET Example

The requirements and result of the 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 published mobile application (MA)
     Mobile := mb.ItemById["MOBILE_APP"].Bind() As IMobileApplication;
     // Create a mobile application publisher 
     Publicator := Mobile.CreatePublicator();
     // Specify web server and virtual directory for publishing mobile application
     Publicator.WebApplication := "http://prognoz/PPMobile_App";
     mbUsers := mb.Security.Users;
     //List of repository users for loading of permissions for mobile application objects
     Publicator.Users := mbUsers;
     // Publish mobile application
     Publicator.Execute(Null);
     // Handle results of mobile application publication
     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 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