use of org.pentaho.ui.xul.XulOverlay in project pentaho-platform by pentaho.
the class PluginManagerResource method getPluginPerpectives.
/**
* Retrieve the list of plugin perspective in the platform
*
* @return list of <code> PluginPerspective </code>
*/
@GET
@Path("/perspectives")
@Produces({ APPLICATION_JSON })
@Facet(name = "Unsupported")
public ArrayList<PluginPerspective> getPluginPerpectives() {
IPluginPerspectiveManager manager = // $NON-NLS-1$
PentahoSystem.get(IPluginPerspectiveManager.class, PentahoSessionHolder.getSession());
ArrayList<PluginPerspective> perspectives = new ArrayList<PluginPerspective>();
for (IPluginPerspective perspective : manager.getPluginPerspectives()) {
PluginPerspective pp = new PluginPerspective();
pp.setId(perspective.getId());
pp.setTitle(perspective.getTitle());
pp.setContentUrl(perspective.getContentUrl());
pp.setLayoutPriority(perspective.getLayoutPriority());
pp.setRequiredSecurityActions(perspective.getRequiredSecurityActions());
pp.setResourceBundleUri(perspective.getResourceBundleUri());
if (perspective.getOverlays() != null) {
ArrayList<Overlay> safeOverlays = new ArrayList<Overlay>();
for (XulOverlay orig : perspective.getOverlays()) {
Overlay tempOverlay = new Overlay(orig.getId(), orig.getOverlayUri(), orig.getSource(), orig.getResourceBundleUri(), orig.getPriority());
safeOverlays.add(tempOverlay);
}
pp.setOverlays(safeOverlays);
}
perspectives.add(pp);
}
return perspectives;
}
Aggregations