UI Contributions

CPBM can allow the user to have a seamless experience moving from its UI in the resource management UI of the cloud service. To support this capability, the connector needs to provide some metadata and implement a ViewResolver. The role of the ViewResolver is to resolve URLs in the target cloud service's UI to allow a user to navigate to a given context. Connector implementer can contribute to four types of UI views and they are:
  1. Resource View: There can be one or more resource views. Within the context of a service instance, each resource view can be presented by CPBM as a sub navigational element. Alternatively, a cloud service can use just one view and handle sub navigation internally.
  2. Subscriptions Details View: A view that provides information on a resource associated with a subscription.
  3. Account Settings View: A view that provides account level settings for this cloud service.

User Settings View: A view that provides user level settings for this service.


A Connector can define multiple resource views, each of which will be presented as a sub-tab or window with the navigation provided by CPBM. This allows for UIs built with navigation menus that are incompatible to fit their leaf pages directly into CPBM. In the serviceDefinition.xml file, a connector can list codes that represent each resource view they wish to present to CPBM.


The View object represents a UI view contributed by the cloud service connector into CPBM. It is defined as follows:
/*  * Used to represent a UI contribution to CPBM   *    */  public class View{    public enum ViewMode { WINDOW, IFRAME };    /* Unique name for the View */    String getName();      /* Url of the View */    public String getURL();       /* The view mode (ie should it be embedded as an iFrame or shown as a window */    public ViewMode getMode();     /* Path to the image used to represent it in the UI */    private String getIcon();  }

ViewResolver Interface

The ViewResolver interface allows CPBM to resolve URLs for specific contexts from the underlying cloud service. This allows the connector to produce URLs in any style (query string, REST style etc). Each of these methods essentially returns a View object that includes a URL and additional metadata. The ViewResolver is defined as follows:
public interface ViewResolver {      /** Returns list of resource view */    public List<View> listResourceViews(User user);      /* Returns the Subscription detail view */    public View resolveSubscriptionDetailView(Subscription subscription);      /* Returns the Account setting view */    public View resolveAccountSettingsView(Tenant tenant);      /* Returns the User setting view */    public View resolveUserSettingsView(User user);  	  	 /*Returns the Administrative view of the cloud service*/    public View getConsoleView(User user);    }

The URLs to the Subscription Details, Account Settings and User Setting are resolved using resolveSubscriptionDetailsView(), resolveAccountSettingsView(), resolveUserSettingsView() respectively. Depending on the number of resources that the underlying cloud service offers, listResourceViews() should return the list of Views.

Note: If there is only one section defined, it is assumed that a tabbed UI structure is not required.


Adding comment, please wait....

Provide Feedback on Article:

Powered by Zendesk