UI Contributions
- 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.
- Subscriptions Details View: A view that provides information on a resource associated with a subscription.
- Account Settings View: A view that provides account level settings for this cloud service.
ResourceView
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.
View
/* * 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
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.
Comments