Application Packaging Standard

Last updated 18-Mar-2019

Meta Declaration

The application must declare new UI components to manage users.

../../../../_images/user-step-model.png ../../../../_images/user-step-meta-b.png ../../../../_images/user-step-provision.png ../../../../_images/user-step-presentation.png ../../../../_images/user-step-deploy.png ../../../../_images/user-step-provisioning.png

Plugging to Wizard

To participate in the user creation process, the application must declare a view plugged into the User Creation wizard following these specifics:

  • Use a separate navigation tree to plug into the wizard placeholder http://www.aps-standard.org/ui/service/suwizard.new/2.
  • The view must use the APS Biz API to get a list of new users from the wizard. This requires the view to declare the http://www.aps-standard.org/core/package#biz placeholder to plug the Biz API module to it.

Plugging to User Manager

The user manager can present users in two modes, grid or tiles. Respectively, the application should declare two view-plugins, one for each mode. Keynotes:

  • Use a separate navigation tree.
  • Both view-plugins must be in the ui/plugins/ folder.
  • Plug each of the view-plugins into its respective placeholder:
    • http://www.parallels.com/ccp-users#usersview - to present the application service in the grid
    • http://www.parallels.com/ccp-users#userInfo - to present the application service in a user profile
  • When calling the VPS creation wizard through the gotoView method to create a VPS for a particular user, the view-plugin should send the user APS ID to the wizard. The parameter to be sent must be declared in the VPS wizard declaration section. This allows the VPS wizard to get the input from the aps.context.params object as explained in the Data Components table.

UI for Service Users

To enable service users to see and manage the services assigned to them, the application must declare a navigation tree for the MyCP UI:

  • The navigation tree must plug into the http://www.aps-standard.org/ui/user/2 placeholder.
  • The tree must contain at least one view.

Continue Your Demo Project

Continue the demo project started in the previous step.

In the project workspace, update the APP-META.xml file in a text editor or in APS IDE as described here. Create two navigation trees for integration with the User Management system tools and one tree for MyCP.

  1. To make the User Creation wizard add an application view into its process, declare the suwizard navigation tree and inside it add a view add-user-service with the following attributes and elements:

    • Declare a navigation variable context that allows the view to link new VPSes with the management context.
    • Plug the view to the wizard place-holder http://www.aps-standard.org/ui/service/suwizard.new/2.
    • Add the plugin placeholder to plug the aps.biz module supporting the high level busines API - http://www.aps-standard.org/core/package#biz.

    After completion of the above modifications the navigation section must look as follows:

    <navigation id="suwizard">
       <view id="add-user-service" label="Add VPS" src="ui/add-user-service.js">
          <var name="context" type-id="http://aps-standard.org/samples/suwizard1p/context/1.0"/>
          <plugs-to id="http://www.aps-standard.org/ui/service/suwizard.new/2" />
          <plugin-placeholder id="http://www.aps-standard.org/core/package#biz"/>
       </view>
    </navigation>
    
  2. Create a navigation tree with two view-plugins, one to present application resources in the list of users and the other one to manage application resources in a user profile:

    <navigation id="plugins">
       <view-plugin id="vps-user-list-plugin" src="ui/plugins/vps-user-list-plugin.js">
          <plugs-to id="http://www.parallels.com/ccp-users#usersview" />
       </view-plugin>
       <view-plugin id="vps-user-plugin" src="ui/plugins/vps-user-plugin.js">
          <plugs-to id="http://www.parallels.com/ccp-users#userInfo" />
       </view-plugin>
    </navigation>
    

    Note

    Keep source files of the view-plugins in the ui/plugins/ folder.

  3. In the vps-wizard section, declare the user ID as a parameter accepted by the wizard. After that, the section will look as follows:

    <wizard id="vps-wizard" label="New VPS Step-by-Step"
          src="/ui/vps-wizard.js" step-label="VPS Creation">
       <placeholder id="vps-wizard"/>
       <params spec="version=ge=2.1">
          <param name="userId" type="string"/>
       </params>
    </wizard>
    
  4. Create a navigation tree plugged into the service user control panel. It must have one view that allows users to manage VPSes assigned to them.

    <navigation id="mycp" label="My Virtual Servers">
       <plugs-to id="http://www.aps-standard.org/ui/user/2" />
       <view id="ownservers" label="My own servers" src="ui/myservers.js"></view>
    </navigation>
    

Conclusion

The project file APP-META.xml you have created is similar to the respective file in the sample package.

You will develop the views included into the navigation trees in the Presentation Logic section.