.classpath | 4 dev/null |binary etc/samples/perspectives/sample-perspective/app/pom.xml | 90 etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/BrowseResources2UIBean.java | 13 etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/BrowseResourcesUIBean.java | 201 - etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/CurrentResourceUIBean.java | 43 etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/RandomResourceUIBean.java | 65 etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/WizardBean.java | 681 ------ etc/samples/perspectives/sample-perspective/app/src/main/resources/seam.properties | 3 etc/samples/perspectives/sample-perspective/app/src/main/webapp/WEB-INF/components.xml | 16 etc/samples/perspectives/sample-perspective/app/src/main/webapp/browseResources.xhtml | 160 - etc/samples/perspectives/sample-perspective/app/src/main/webapp/createContentProviderJBossASPatch.xhtml | 77 etc/samples/perspectives/sample-perspective/app/src/main/webapp/createContentProviderRHN.xhtml | 77 etc/samples/perspectives/sample-perspective/app/src/main/webapp/currentResource.xhtml | 53 etc/samples/perspectives/sample-perspective/app/src/main/webapp/index.html | 14 etc/samples/perspectives/sample-perspective/app/src/main/webapp/mainpage.html | 17 etc/samples/perspectives/sample-perspective/app/src/main/webapp/randomResource.xhtml | 37 etc/samples/perspectives/sample-perspective/app/src/main/webapp/subtabpage.html | 17 etc/samples/perspectives/sample-perspective/app/src/main/webapp/tabpage.html | 26 etc/samples/perspectives/sample-perspective/app/src/main/webapp/wizard.xhtml | 543 ----- etc/samples/perspectives/sample-perspective/perspective/pom.xml | 159 - etc/samples/perspectives/sample-perspective/perspective/src/main/resources/META-INF/rhq-serverplugin.xml | 277 -- etc/samples/perspectives/sample-perspective/pom.xml | 37 modules/enterprise/gui/base-perspective-jar/pom.xml | 142 - modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectivePagedDataUIBean.java | 39 modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveResourceUIBean.java | 49 modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveUIBean.java | 36 modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveClientUIBean.java | 161 - modules/enterprise/gui/base-perspective-jar/src/main/resources/seam.properties | 3 modules/enterprise/gui/base-perspective-war/pom.xml | 63 modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/faces-config.xml | 28 modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/includes/pageControls.xhtml | 103 modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/jboss-web.xml | 20 modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/templates/mainTemplate.xhtml | 70 modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/web.xml | 72 modules/enterprise/gui/base-perspective-war/src/main/webapp/index.xhtml | 36 modules/enterprise/gui/pom.xml | 4 modules/enterprise/server/ear/pom.xml | 7 modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml | 100 modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml | 897 -------- modules/enterprise/server/plugins/perspectives/core/pom.xml | 32 modules/enterprise/server/plugins/perspectives/policy/app/pom.xml | 90 modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundleDetailsUIBean.java | 157 - modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundleVersionDetailsUIBean.java | 159 - modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundlesUIBean.java | 119 - modules/enterprise/server/plugins/perspectives/policy/app/src/main/resources/seam.properties | 3 modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundleDetails.xhtml | 108 - modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundleVersionDetails.xhtml | 120 - modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundles.xhtml | 87 modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml | 132 - modules/enterprise/server/plugins/perspectives/policy/perspective/src/main/resources/META-INF/rhq-serverplugin.xml | 31 modules/enterprise/server/plugins/perspectives/policy/pom.xml | 24 modules/enterprise/server/plugins/pom.xml | 1 modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml | 1 modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtil.java | 2 modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/XmlSchemas.java | 8 modules/enterprise/server/xml-schemas/src/main/resources/rhq-serverplugin-entitlement.xsd | 47 modules/enterprise/server/xml-schemas/src/main/resources/rhq-serverplugin-perspective.xsd | 1060 ---------- modules/enterprise/server/xml-schemas/src/test/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtilTest.java | 39 modules/enterprise/server/xml-schemas/src/test/resources/test-serverplugin-entitlement.xml | 22 modules/enterprise/server/xml-schemas/src/test/resources/test-serverplugin-perspective.xml | 14 61 files changed, 1 insertion(+), 6695 deletions(-)
New commits: commit 9aee7ae7f158efd85fe7cc0a1f3e3dc17fa50dec Author: John Mazzitelli mazz@redhat.com Date: Wed Sep 5 17:41:26 2012 -0400
remove the rest for the vestiges of perspectives this also removes the rest of entitlement server plugin
Conflicts:
.classpath etc/samples/perspectives/sample-perspective/perspective/pom.xml modules/enterprise/gui/pom.xml modules/enterprise/server/ear/pom.xml modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml
diff --git a/.classpath b/.classpath index 5a1b13d..0ab311c 100644 --- a/.classpath +++ b/.classpath @@ -49,10 +49,6 @@ <classpathentry kind="src" path="modules/enterprise/gui/portal-war/src/main/java"/> <classpathentry kind="src" path="modules/enterprise/gui/portal-war/src/test/java"/> <classpathentry kind="src" path="modules/enterprise/gui/installer-war/src/main/java"/> - <classpathentry kind="src" path="modules/enterprise/gui/installer/src/main/java"/> - <classpathentry kind="src" path="modules/enterprise/gui/installer/src/test/java"/> - <classpathentry kind="src" path="modules/enterprise/gui/installer/target/generated-sources/gwt"/> - <classpathentry kind="src" path="modules/enterprise/gui/base-perspective-jar/src/main/java"/> <classpathentry kind="src" path="modules/enterprise/gui/content_http-war/src/main/java"/> <classpathentry kind="src" path="modules/enterprise/server/client-api/src/main/java"/> <classpathentry kind="src" path="modules/enterprise/remoting/client-api/src/main/java"/> diff --git a/etc/samples/perspectives/sample-perspective/app/pom.xml b/etc/samples/perspectives/sample-perspective/app/pom.xml deleted file mode 100644 index 04c7ec6..0000000 --- a/etc/samples/perspectives/sample-perspective/app/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.3.0-SNAPSHOT</version> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-sample-perspective-war</artifactId> - <version>1.0.0-SNAPSHOT</version> - <packaging>war</packaging> - - <name>RHQ Sample Perspective War</name> - - <dependencyManagement> - - <dependencies> - - <!-- This will pull in the managed dependencies from the base-perspective-war pom. --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-war</artifactId> - <version>${project.parent.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - - </dependencies> - - </dependencyManagement> - - <dependencies> - - <!-- This is needed by the war plugin for the overlay functionality. --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-war</artifactId> - <version>${project.parent.version}</version> - <type>war</type> - </dependency> - - <!-- This is used to pull the base war's classes and dependencies into our - compile classpath, since they are not pulled in by the above war dependency - (see http://jira.codehaus.org/browse/MNG-1991). --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-jar</artifactId> - <version>${project.parent.version}</version> - </dependency> - - <!-- Deps with provided scope are not transitive, so we need to specify - jsf-api.jar explicitly. --> - <dependency> - <groupId>javax.faces</groupId> - <artifactId>jsf-api</artifactId> - <scope>provided</scope> - </dependency> - - </dependencies> - - <build> - <finalName>rhq-sample-perspective</finalName> - - <plugins> - - <plugin> - <artifactId>maven-war-plugin</artifactId> - <configuration> - <overlays> - <overlay> - <!-- empty groupId/artifactId detected as the current build. - earlier overlays win over later overlays, so put ourselves first. --> - </overlay> - <overlay> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-war</artifactId> - </overlay> - </overlays> - </configuration> - </plugin> - - </plugins> - - </build> - -</project> - diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/BrowseResources2UIBean.java b/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/BrowseResources2UIBean.java deleted file mode 100644 index 86cc318..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/BrowseResources2UIBean.java +++ /dev/null @@ -1,13 +0,0 @@ -package org.rhq.sample.perspective; - -import org.jboss.seam.ScopeType; -import org.jboss.seam.annotations.Name; -import org.jboss.seam.annotations.Scope; - -/** - * - */ -@Name("BrowseResources2UIBean") -@Scope(ScopeType.CONVERSATION) -public class BrowseResources2UIBean extends BrowseResourcesUIBean { -} diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/BrowseResourcesUIBean.java b/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/BrowseResourcesUIBean.java deleted file mode 100644 index 6d92dc4..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/BrowseResourcesUIBean.java +++ /dev/null @@ -1,201 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2009-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.sample.perspective; - -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import org.ajax4jsf.event.AjaxEvent; -import org.ajax4jsf.event.AjaxListener; -import org.jboss.seam.ScopeType; -import org.jboss.seam.annotations.Name; -import org.jboss.seam.annotations.Scope; - -import org.jboss.seam.international.StatusMessage; -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.criteria.ResourceCriteria; -import org.rhq.core.domain.resource.Resource; -import org.rhq.core.domain.util.PageControl; -import org.rhq.core.domain.util.PageList; -import org.rhq.core.gui.model.PagedDataProvider; -import org.rhq.core.gui.table.component.SortableColumnHeaderComponent; -import org.rhq.core.gui.table.model.PagedListDataModel; -import org.rhq.core.gui.util.FacesComponentUtility; -import org.rhq.enterprise.client.RemoteClient; -import org.rhq.enterprise.server.perspective.AbstractPerspectivePagedDataUIBean; -import org.rhq.enterprise.server.perspective.PerspectiveManagerRemote; -import org.rhq.enterprise.server.perspective.PerspectiveTarget; -import org.rhq.enterprise.server.resource.ResourceManagerRemote; - -import javax.faces.component.UIData; - -/** - * A Seam component that utilizes the RHQ remote API to obtain a paged list of all inventoried Resources. - * - * @author Ian Springer - */ -@Name("BrowseResourcesUIBean") -@Scope(ScopeType.CONVERSATION) -public class BrowseResourcesUIBean extends AbstractPerspectivePagedDataUIBean implements AjaxListener { - private List<Resource> selectedResources; - private Map<Integer, String> resourceUrlMap = new HashMap<Integer, String>(); - - public List<Resource> getSelectedResources() { - return this.selectedResources; - } - - public void setSelectedResources(List<Resource> selectedResources) { - this.selectedResources = selectedResources; - } - - public void uninventorySelectedResources() throws Exception { - RemoteClient remoteClient; - Subject subject; - try { - remoteClient = this.perspectiveClient.getRemoteClient(); - subject = this.perspectiveClient.getSubject(); - } catch (Exception e) { - this.facesMessages.add(StatusMessage.Severity.FATAL, "Failed to connect to RHQ Server - cause: " + e); - return; - } - - // ***NOTE***: The javassist.NotFoundException stack traces that are logged by this call can be ignored. - ResourceManagerRemote resourceManager = remoteClient.getResourceManagerRemote(); - - int[] selectedResourceIds = new int[this.selectedResources.size()]; - for (int i = 0, selectedResourcesSize = this.selectedResources.size(); i < selectedResourcesSize; i++) { - Resource selectedResource = this.selectedResources.get(i); - selectedResourceIds[i] = selectedResource.getId(); - } - - resourceManager.uninventoryResources(subject, selectedResourceIds); - - // Add message to tell the user the uninventory was a success. - String pluralizer = (this.selectedResources.size() == 1) ? "" : "s"; - this.facesMessages.add("Uninventoried " + this.selectedResources.size() + " Resource" + pluralizer + "."); - - // Reset the data model, so the current page will get refreshed to reflect the Resources we just uninventoried. - // This is essential, since we are CONVERSATION-scoped and will live on beyond this request. - setDataModel(null); - } - - @Override - protected PageControl getDefaultPageControl() { - PageControl defaultPageControl = super.getDefaultPageControl(); - defaultPageControl.addDefaultOrderingField("r.id"); - return defaultPageControl; - } - - public DataModel createDataModel() { - RemoteClient remoteClient; - Subject subject; - try { - remoteClient = this.perspectiveClient.getRemoteClient(); - subject = this.perspectiveClient.getSubject(); - } catch (Exception e) { - throw new RuntimeException("Failed to connect to RHQ Server.", e); - } - - // ***NOTE***: The javassist.NotFoundException stack traces that are logged by this call can be ignored. - ResourceManagerRemote resourceManager = remoteClient.getResourceManagerRemote(); - - //ResourcesDataProvider dataProvider = new ResourcesDataProvider(subject, resourceManager); - //return new PagedDataModel<Resource>(dataProvider); - return new DataModel(subject, resourceManager); - - } - - private void setLinkBackUrls(List<Resource> resources) { - int[] ids = new int[resources.size()]; - for (int i = 0, size = resources.size(); (i < size); ++i) { - ids[i] = resources.get(i).getId(); - } - - try { - RemoteClient remoteClient = this.perspectiveClient.getRemoteClient(); - Subject subject = this.perspectiveClient.getSubject(); - PerspectiveManagerRemote perspectiveManager = remoteClient.getPerspectiveManagerRemote(); - this.resourceUrlMap = perspectiveManager.getTargetUrls(subject, PerspectiveTarget.RESOURCE, ids, false, - false); - } catch (Exception e) { - throw new RuntimeException("Failed to retrieve Resource URLs.", e); - } - } - - public Map<Integer, String> getResourceUrlMap() { - return this.resourceUrlMap; - } - - public AjaxListener getAjaxSortListener() { - return this; - } - - public void processAjax(AjaxEvent ajaxEvent) { - SortableColumnHeaderComponent sortableColumnHeader = (SortableColumnHeaderComponent)ajaxEvent.getComponent(); - String sortBy = sortableColumnHeader.getSortBy(); - - UIData data = FacesComponentUtility.getAncestorOfType(sortableColumnHeader, UIData.class); - PagedListDataModel<?> model = (PagedListDataModel<?>) data.getValue(); - - PageControl pageControl = model.getPageControl(); - pageControl.sortBy(sortBy); - // Even though its the same PageControl instance, call setPageControl() so the updated version gets - // persisted. - model.setPageControl(pageControl); - } - - private class ResourcesDataProvider implements PagedDataProvider<Resource> { - private Subject subject; - private ResourceManagerRemote resourceManager; - - public ResourcesDataProvider(Subject subject, ResourceManagerRemote resourceManager) { - this.subject = subject; - this.resourceManager = resourceManager; - } - - public PageList<Resource> getDataPage(PageControl pageControl) { - ResourceCriteria resourceCriteria = new ResourceCriteria(); - resourceCriteria.setPageControl(pageControl); - PageList<Resource> resources = this.resourceManager.findResourcesByCriteria(this.subject, resourceCriteria); - setLinkBackUrls(resources); - return resources; - } - } - - private class DataModel extends PagedListDataModel<Resource> { - private Subject subject; - private ResourceManagerRemote resourceManager; - - private DataModel(Subject subject, ResourceManagerRemote resourceManager) { - super(BrowseResourcesUIBean.this); - this.subject = subject; - this.resourceManager = resourceManager; - } - - @Override - public PageList<Resource> fetchPage(PageControl pageControl) { - ResourceCriteria resourceCriteria = new ResourceCriteria(); - resourceCriteria.setPageControl(pageControl); - PageList<Resource> resources = this.resourceManager.findResourcesByCriteria(this.subject, resourceCriteria); - setLinkBackUrls(resources); - return resources; - } - } -} \ No newline at end of file diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/CurrentResourceUIBean.java b/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/CurrentResourceUIBean.java deleted file mode 100644 index 2560be2..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/CurrentResourceUIBean.java +++ /dev/null @@ -1,43 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2009-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.sample.perspective; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.criteria.ResourceCriteria; -import org.rhq.core.domain.resource.Resource; -import org.rhq.core.domain.util.PageList; -import org.rhq.enterprise.client.RemoteClient; -import org.rhq.enterprise.server.perspective.AbstractPerspectiveResourceUIBean; -import org.rhq.enterprise.server.resource.ResourceManagerRemote; -import org.rhq.enterprise.server.perspective.AbstractPerspectiveUIBean; - -import org.jboss.seam.annotations.Name; -import org.jboss.seam.annotations.web.RequestParameter; - -/** - * A Seam component that utilizes the RHQ remote API to obtain the current Resource as specified via the 'rhqResourceId' - * HTTP request parameter. - * - * @author Ian Springer - */ -@Name("CurrentResourceUIBean") -public class CurrentResourceUIBean extends AbstractPerspectiveResourceUIBean { -} \ No newline at end of file diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/RandomResourceUIBean.java b/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/RandomResourceUIBean.java deleted file mode 100644 index 6701b46..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/RandomResourceUIBean.java +++ /dev/null @@ -1,65 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2009-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.sample.perspective; - -import java.util.Random; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.criteria.ResourceCriteria; -import org.rhq.core.domain.resource.Resource; -import org.rhq.core.domain.util.PageList; -import org.rhq.enterprise.client.RemoteClient; -import org.rhq.enterprise.server.perspective.AbstractPerspectiveUIBean; -import org.rhq.enterprise.server.resource.ResourceManagerRemote; - -import org.jboss.seam.annotations.Name; - -/** - * A Seam component that utilizes the RHQ remote API. - * - * @author Ian Springer - */ -@Name("RandomResourceUIBean") -public class RandomResourceUIBean extends AbstractPerspectiveUIBean { - private final Log log = LogFactory.getLog(this.getClass()); - - private Resource randomResource; - - public Resource getRandomResource() throws Exception { - if (this.randomResource == null) { - this.randomResource = createRandomResource(); - log.debug("Retrieved random Resource " + this.randomResource); - } - return this.randomResource; - } - - private Resource createRandomResource() throws Exception { - RemoteClient remoteClient = this.perspectiveClient.getRemoteClient(); - Subject subject = this.perspectiveClient.getSubject(); - // ***NOTE***: The javassist.NotFoundException stack traces that are logged by this call can be ignored. - ResourceManagerRemote resourceManager = remoteClient.getResourceManagerRemote(); - ResourceCriteria resourceCriteria = new ResourceCriteria(); - PageList<Resource> allResources = resourceManager.findResourcesByCriteria(subject, resourceCriteria); - Random randomGenerator = new Random(); - int randomIndex = randomGenerator.nextInt(allResources.size()); - return allResources.get(randomIndex); - } -} \ No newline at end of file diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/WizardBean.java b/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/WizardBean.java deleted file mode 100644 index c8fe2c7..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/java/org/rhq/sample/perspective/WizardBean.java +++ /dev/null @@ -1,681 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2009-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.sample.perspective; - -import java.util.HashMap; -import java.util.Map; - -import org.jboss.seam.ScopeType; -import org.jboss.seam.annotations.Name; -import org.jboss.seam.annotations.Scope; -import org.jboss.seam.international.StatusMessage; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.authz.Permission; -import org.rhq.core.domain.authz.Role; -import org.rhq.core.domain.criteria.ResourceCriteria; -import org.rhq.core.domain.resource.Resource; -import org.rhq.core.domain.resource.group.ResourceGroup; -import org.rhq.core.domain.util.PageList; -import org.rhq.enterprise.client.RemoteClient; -import org.rhq.enterprise.server.auth.SubjectManagerRemote; -import org.rhq.enterprise.server.authz.RoleManagerRemote; -import org.rhq.enterprise.server.perspective.AbstractPerspectiveUIBean; -import org.rhq.enterprise.server.perspective.PerspectiveManagerRemote; -import org.rhq.enterprise.server.perspective.PerspectiveTarget; -import org.rhq.enterprise.server.resource.ResourceManagerRemote; -import org.rhq.enterprise.server.resource.group.ResourceGroupManagerRemote; - -/** - * When creating Groups, Roles and the Users controlled by them, the following order seems to work with the least pain - * and redirection. - * <p/> - * 1) Create the 'Everything' Group. a) Go to Resources -> Platforms and click on 'New Group' link. Name the group, go - * 'Mixed Resources' and go recursive. - * <p/> - * Rinse and repeat as many times as necessary ... 2) Create [desired role] with appropriate permissions and at the end - * add the 'Everything' Group to the role 3) Go to Administration -> Security -> Users and create the 'New User' and - * select the previously defined 'Role' to assign to the current user. - * <p/> - * Once you get this motion down it's less disjoint to do typical authorization. - * - * @author Simeon Pinder - */ -@Name("WizardBean") -@Scope(ScopeType.PAGE) -public class WizardBean extends AbstractPerspectiveUIBean { - - // Fields - private static String NOT_YET_SET = ""; - private String title = "Creating a New EJB3 Administrator account..."; - private String titleNote = ""; - - //----------------- Defines Wizard Steps ---------------------------------// - - enum Step { - One("Enter New Group Info"), Two("Enter New Role Info"), Three("Enter New User Info"), Confirm( - "Create Group+Role+User"), Complete("Done"); - - private String displayName; - - Step(String displayName) { - this.displayName = displayName; - } - - public String getName() { - return this.name(); - } - - public String getDisplayName() { - return displayName; - } - } - - //Session variables to cache initialized components for final transaction. - private Step currentStep = Step.One; - private String start = null; - private String end = null; - private ResourceGroup resourceGroup = null; - private Role role = null; - private Subject newSubject = null; - - //-------------------- Variable Definition by STEP ----------------------------- - //// STEP 1: Create the group to see all values.(See ) - private String groupName = NOT_YET_SET; //REQUIRED - private String groupDescription = ""; - private String groupLocation = ""; - private boolean isRecursive = false; - - //define enumeration to enforce type restriction. - - enum Group {//Compatible == homogeneous AND mixed != homogeneous - Compatible, Mixed - } - - private String groupType = Group.Mixed.name(); //REQUIRED: defaults to mixed to all resources show up - private String step1Note = "By choosing 'Next' a new group will be created and persisted to the database."; - - //// STEP 2: Create appropriate Role - private String roleName = NOT_YET_SET; //REQUIRED - private String roleDescription = ""; - - /////GLOBAL Permissions - private boolean manageSecurityEnabled = false; - private String manageSecurityNote = "**(users/roles) --This permission " - + "implicitly grants (and explicitly forces selection of) all other permissions"; - private boolean manageInventoryEnabled = false; - private String manageInventoryNote = "(resources/groups)"; - private boolean administerRhqServerSettingsEnabled = false; - - /////RESOURCE Permissions - private boolean modifyEnabled = true; - private boolean deleteEnabled = true; - private boolean createChildrenEnabled = true; - private boolean alertEnabled = true; - private boolean measureEnabled = true; - private boolean contentEnabled = true; - private boolean controlEnabled = true; - private boolean configureEnabled = true; - private String step2Note = "By choosing 'Next' a new Role will be created and persisted to the database."; - - //// STEP 3: Create appropriate user - private String firstName = NOT_YET_SET; //REQUIRED - private String lastName = ""; - private String newUserName = NOT_YET_SET;//REQUIRED - private String step3Note = "By choosing 'Complete', the 'Create Jon Administrator' user will be completed."; - private String phone; - private String email; - private String department; - private String password; //REQUIRED - private String password2; //REQUIRED - private boolean enableLogin = true; - - private PageList<Resource> resources; - private Map<Integer, String> resourceUrlMap = new HashMap<Integer, String>(); - - //// STEP N: - - //// STEP N+1: - - // Methods - - public WizardBean() { - return; - } - - //---------------------------- The JSF event processor for all steps.--------------------- - - public String processActions() throws Exception { - - String stepCompleted = "(incomplete)"; - - RemoteClient remoteClient; - Subject subject; - try { - remoteClient = this.perspectiveClient.getRemoteClient(); - subject = this.perspectiveClient.getSubject(); - } catch (Exception e) { - this.facesMessages.add(StatusMessage.Severity.FATAL, "Failed to connect to RHQ Server - cause: " + e); - return null; - } - - switch (this.currentStep) { - case One: //create Group for visibility - - ResourceGroup rg = new ResourceGroup(groupName); - rg.setDescription(groupDescription); - rg.setLocation(groupLocation); - rg.setRecursive(isRecursive); - //TODO: figure out how to make these calls correctly. - String groupDefinition = "Compatible"; - // rg.getGroupCategory() - // rg. - // groupManager.createResourceGroup(subject, rg); - resourceGroup = rg; - stepCompleted = this.currentStep.name(); - setCurrentStep(Step.Two); - break; - case Two: //create Role for permissions - Role role = new Role(roleName); - role.setDescription(roleDescription); - if (manageSecurityEnabled) { - role.addPermission(Permission.MANAGE_SECURITY); - } - if (manageInventoryEnabled) { - role.addPermission(Permission.MANAGE_INVENTORY); - } - if (administerRhqServerSettingsEnabled) { - role.addPermission(Permission.MANAGE_SETTINGS); - } - if (modifyEnabled) { - role.addPermission(Permission.MODIFY_RESOURCE); - } - if (deleteEnabled) { - role.addPermission(Permission.DELETE_RESOURCE); - } - if (createChildrenEnabled) { - role.addPermission(Permission.CREATE_CHILD_RESOURCES); - } - if (alertEnabled) { - role.addPermission(Permission.MANAGE_ALERTS); - } - if (measureEnabled) { - role.addPermission(Permission.MANAGE_MEASUREMENTS); - } - if (contentEnabled) { - role.addPermission(Permission.MANAGE_CONTENT); - } - if (controlEnabled) { - role.addPermission(Permission.CONTROL); - } - if (configureEnabled) { - role.addPermission(Permission.CONFIGURE); - } - this.role = role; - - stepCompleted = this.currentStep.name(); - setCurrentStep(Step.Three); - break; - case Three: //create User and attach previous two - newSubject = new Subject(); - newSubject.setDepartment(department); - newSubject.setEmailAddress(email); - newSubject.setFirstName(firstName); - newSubject.setFirstName(lastName); - newSubject.setName(newUserName); - newSubject.setPhoneNumber(phone); - - stepCompleted = this.currentStep.name(); - setCurrentStep(Step.Confirm); - break; - case Confirm: //create User and attach previous two - //do check for no null values - //commit group created - - ResourceGroupManagerRemote groupManager = remoteClient.getResourceGroupManagerRemote(); - this.resourceGroup = groupManager.createResourceGroup(subject, this.resourceGroup); - //commit Role created - - ResourceManagerRemote resourceManager = remoteClient.getResourceManagerRemote(); - ResourceCriteria criteria = new ResourceCriteria(); - criteria.addFilterResourceTypeName("EJB3 Session Bean"); - - this.resources = resourceManager.findResourcesByCriteria(subject, criteria); - int[] resourceIds = new int[resources.size()]; - - for (int i = 0; i < resources.size(); i++) { - int id = resources.get(i).getId(); - resourceIds[i] = id; - } - groupManager.addResourcesToGroup(subject, this.resourceGroup.getId(), resourceIds); - - PerspectiveManagerRemote perspectiveManager = remoteClient.getPerspectiveManagerRemote(); - this.resourceUrlMap = perspectiveManager.getTargetUrls(subject, PerspectiveTarget.RESOURCE, resourceIds, - false, false); - - RoleManagerRemote roleManager = remoteClient.getRoleManagerRemote(); - this.role = roleManager.createRole(subject, this.role); - - //commit User previously created - SubjectManagerRemote subjectManager = remoteClient.getSubjectManagerRemote(); - this.newSubject = subjectManager.createSubject(subject, this.newSubject); - - roleManager.addRolesToSubject(subject, this.newSubject.getId(), new int[] { this.role.getId() }); - - roleManager.addRolesToResourceGroup(subject, this.resourceGroup.getId(), new int[] { this.role.getId() }); - - //null out all reference and reset Screens all to !completed - remoteClient.disconnect(); - stepCompleted = this.currentStep.name(); - setCurrentStep(Step.Complete); - break; - default: - System.out.println("Unrecognized screen condition. No processing is being done."); - break; - } - - return stepCompleted; - } - - //----- a few methods for navigation ---------------------- - - /** - * Backs up the wizard process to previous or to the initial screen. - */ - public String processReverse() { - Step prev = null; - for (int i = 0; i < Step.values().length; i++) { - Step screen = Step.values()[i]; - if (prev == null) { - prev = screen; - } - if (screen == this.currentStep) { - this.currentStep = prev; - break; - } - } - return this.currentStep.name(); - } - - /** Reinitializes the process and resets all variables.*/ - public void cancel() { - //null out variables and reset - currentStep = Step.One; - resourceGroup = null; - role = null; - newSubject = null; - } - - public Step[] getAllSteps() { - return Step.values(); - } - - public String getStart() { - if (start == null) { - if (Step.values().length > 0) { - start = Step.values()[0].getName(); - } - } - return start; - } - - public String getEnd() { - if (end == null) { - if (Step.values().length > 0) { - end = Step.values()[Step.values().length - 1].getName(); - } - } - return end; - } - - /** - * @param args - */ - public static void main(String[] args) throws Exception { - WizardBean b = new WizardBean(); - System.out.println("CURRENT STEP:" + b.getCurrentStep() + ":" + b.getCurrentStep().getName() + ":"); - b.processActions();//move to step 2 - b.processActions();//move to step 3 - b.processReverse();//move back to step 2 - b.processActions();//move to step 3 - b.processActions();//move to step Finish - } - - ////################## Generic Getter/Setter logic. ############################################ - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getTITLENote() { - return titleNote; - } - - public void setTitleNote(String titleNote) { - this.titleNote = titleNote; - } - - public String getGroupName() { - return groupName; - } - - public void setGroupName(String groupName) { - this.groupName = groupName; - } - - public String getGroupDescription() { - return groupDescription; - } - - public void setGroupDescription(String groupDescription) { - this.groupDescription = groupDescription; - } - - public String getGroupLocation() { - return groupLocation; - } - - public void setGroupLocation(String groupLocation) { - this.groupLocation = groupLocation; - } - - public boolean isRecursive() { - return isRecursive; - } - - public void setRecursive(boolean isRecursive) { - this.isRecursive = isRecursive; - } - - public String getGroupType() { - return groupType; - } - - public void setGroupType(String groupType) { - this.groupType = groupType; - } - - public String getStep1Note() { - return step1Note; - } - - public void setStep1Note(String step1Note) { - this.step1Note = step1Note; - } - - public String getRoleName() { - return roleName; - } - - public void setRoleName(String roleName) { - this.roleName = roleName; - } - - public String getRoleDescription() { - return roleDescription; - } - - public void setRoleDescription(String roleDescription) { - this.roleDescription = roleDescription; - } - - public boolean isManageSecurityEnabled() { - return manageSecurityEnabled; - } - - public void setManageSecurityEnabled(boolean manageSecurityEnabled) { - this.manageSecurityEnabled = manageSecurityEnabled; - if (this.manageInventoryEnabled) { - //TODO: have to go through and enable/disable all depending upon boolean value. - } - } - - public String getManageSecurityNote() { - return manageSecurityNote; - } - - public void setManageSecurityNote(String manageSecurityNote) { - this.manageSecurityNote = manageSecurityNote; - } - - public boolean isManageInventoryEnabled() { - return manageInventoryEnabled; - } - - public void setManageInventoryEnabled(boolean manageInventoryEnabled) { - this.manageInventoryEnabled = manageInventoryEnabled; - } - - public String getManageInventoryNote() { - return manageInventoryNote; - } - - public void setManageInventoryNote(String manageInventoryNote) { - this.manageInventoryNote = manageInventoryNote; - } - - public boolean isAdministerRhqServerSettingsEnabled() { - return administerRhqServerSettingsEnabled; - } - - public void setAdministerRhqServerSettingsEnabled(boolean administerRhqServerSettingsEnabled) { - this.administerRhqServerSettingsEnabled = administerRhqServerSettingsEnabled; - } - - public boolean isModifyEnabled() { - return modifyEnabled; - } - - public void setModifyEnabled(boolean modifyEnabled) { - this.modifyEnabled = modifyEnabled; - } - - public boolean isDeleteEnabled() { - return deleteEnabled; - } - - public void setDeleteEnabled(boolean deleteEnabled) { - this.deleteEnabled = deleteEnabled; - } - - public boolean isCreateChildrenEnabled() { - return createChildrenEnabled; - } - - public void setCreateChildrenEnabled(boolean createChildrenEnabled) { - this.createChildrenEnabled = createChildrenEnabled; - } - - public boolean isAlertEnabled() { - return alertEnabled; - } - - public void setAlertEnabled(boolean alertEnabled) { - this.alertEnabled = alertEnabled; - } - - public boolean isMeasureEnabled() { - return measureEnabled; - } - - public void setMeasureEnabled(boolean measureEnabled) { - this.measureEnabled = measureEnabled; - } - - public boolean isContentEnabled() { - return contentEnabled; - } - - public void setContentEnabled(boolean contentEnabled) { - this.contentEnabled = contentEnabled; - } - - public boolean isControlEnabled() { - return controlEnabled; - } - - public void setControlEnabled(boolean controlEnabled) { - this.controlEnabled = controlEnabled; - } - - public boolean isConfigureEnabled() { - return configureEnabled; - } - - public void setConfigureEnabled(boolean configureEnabled) { - this.configureEnabled = configureEnabled; - } - - public String getStep2Note() { - return step2Note; - } - - public void setStep2Note(String step2Note) { - this.step2Note = step2Note; - } - - public String getFirstName() { - return firstName; - } - - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - public String getLastName() { - return lastName; - } - - public void setLastName(String lastName) { - this.lastName = lastName; - } - - public String getNewUserName() { - return newUserName; - } - - public void setNewUserName(String username) { - this.newUserName = username; - } - - public String getStep3Note() { - return step3Note; - } - - public void setStep3Note(String step3Note) { - this.step3Note = step3Note; - } - - public String getPhone() { - return phone; - } - - public void setPhone(String phone) { - this.phone = phone; - } - - public String getEmail() { - return email; - } - - public void setEmail(String email) { - this.email = email; - } - - public String getDepartment() { - return department; - } - - public void setDepartment(String department) { - this.department = department; - } - - public String getPassword() { - return password; - } - - public void setPassword(String password) { - this.password = password; - } - - public String getPassword2() { - return password2; - } - - public void setPassword2(String password2) { - this.password2 = password2; - } - - public boolean isEnableLogin() { - return enableLogin; - } - - public void setEnableLogin(boolean enableLogin) { - this.enableLogin = enableLogin; - } - - public Step getCurrentStep() { - return currentStep; - } - - public void setCurrentStep(Step currentStep) { - this.currentStep = currentStep; - } - - public ResourceGroup getResourceGroup() { - return resourceGroup; - } - - public PageList<Resource> getResources() { - return resources; - } - - public Map<Integer, String> getResourceUrlMap() { - return this.resourceUrlMap; - } - - public String getGroupsUrl() throws Exception { - PerspectiveManagerRemote perspectiveManager = this.perspectiveClient.getRemoteClient() - .getPerspectiveManagerRemote(); - String url = perspectiveManager.getMenuItemUrl(this.perspectiveClient.getSubject(), ((Group - .valueOf(this.groupType) == Group.Mixed) ? "groups.mixedGroups" : "groups.compatibleGroups"), false, false); - return url; - } - - public String getRolesUrl() throws Exception { - PerspectiveManagerRemote perspectiveManager = this.perspectiveClient.getRemoteClient() - .getPerspectiveManagerRemote(); - String url = perspectiveManager.getMenuItemUrl(this.perspectiveClient.getSubject(), - "administration.security.roles", false, false); - return url; - } - - public String getUsersUrl() throws Exception { - PerspectiveManagerRemote perspectiveManager = this.perspectiveClient.getRemoteClient() - .getPerspectiveManagerRemote(); - String url = perspectiveManager.getMenuItemUrl(this.perspectiveClient.getSubject(), - "administration.security.users", false, false); - return url; - } - -} diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/resources/seam.properties b/etc/samples/perspectives/sample-perspective/app/src/main/resources/seam.properties deleted file mode 100644 index b97c770..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/resources/seam.properties +++ /dev/null @@ -1,3 +0,0 @@ -# NOTE: The presence of this file tells Seam to scan this WAR for Seam -# components (i.e. classes with Name annotations) and to deploy -# any that it finds. diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/WEB-INF/components.xml b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/WEB-INF/components.xml deleted file mode 100644 index 4631d2e..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/WEB-INF/components.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<components xmlns="http://jboss.com/products/seam/components" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xmlns:security="http://jboss.com/products/seam/security" - xsi:schemaLocation= - "http://jboss.com/products/seam/components http://jboss.com/products/seam/components-2.0.xsd - http://jboss.com/products/seam/security http://jboss.com/products/seam/security-2.0.xsd%22%3E - - <component name="org.jboss.seam.core.init"> - <property name="debug">false</property> - <!-- enable only when needed --> - <property name="transactionManagementEnabled">false</property> - </component> - -</components> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/browseResources.xhtml b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/browseResources.xhtml deleted file mode 100644 index b425a61..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/browseResources.xhtml +++ /dev/null @@ -1,160 +0,0 @@ -<?xml version="1.0"?> - -<ui:composition - template="/WEB-INF/templates/mainTemplate.xhtml" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich" - xmlns:rhq="http://rhq-project.org/rhq" - xmlns:onc="http://jboss.org/on/component%22%3E - - <ui:param name="pageTitle" value="Browse Resources"/> - - <ui:define name="body"> - - ui:remove<!-- NOTE: The table needs to be surrounded by a form for paging and sorting to work! --></ui:remove> - <a4j:form ajaxSubmit="false" reRender="resourcesDataTable"> - - <rich:dataTable id="resourcesDataTable" - value="#{BrowseResourcesUIBean.dataModel}" var="resource" - first="#{BrowseResourcesUIBean.pageControl.pageNumber}" - rows="#{BrowseResourcesUIBean.pageControl.pageSize}" - sortMode="multi" - width="100%"> - - <rich:column width="20"> - <f:facet name="header"> - rhq:allRowsSelector/ - </f:facet> - <rhq:rowSelector value="#{BrowseResourcesUIBean.selectedResources}"/> - </rich:column> - - <rich:column width="55" sortBy="r.id"> - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="r.id"> - <a4j:support event="onclick" - actionListener="#{BrowseResourcesUIBean.ajaxSortListener}"/> - <h:outputText value="Id"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputLink value="#{BrowseResourcesUIBean.resourceUrlMap[resource.id]}" target="_top"> - <h:outputText value="#{resource.id}"/> - </h:outputLink> - </rich:column> - - <rich:column sortBy="r.name" width="235"> - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="r.name"> - <a4j:support event="onclick" - actionListener="#{BrowseResourcesUIBean.ajaxSortListener}"/> - <h:outputText value="Name"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputText value="#{resource.name}"/> - </rich:column> - - <rich:column sortBy="r.description"> - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="r.description"> - <a4j:support event="onclick" - actionListener="#{BrowseResourcesUIBean.ajaxSortListener}"/> - <h:outputText value="Description"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputText value="#{resource.description}"/> - </rich:column> - - <f:facet name="footer"> - rich:columnGroup - <rich:column colspan="4"> - <rhq:selectedRowsCommandButton - value="UNINVENTORY" - action="#{BrowseResourcesUIBean.uninventorySelectedResources}"/> - - <ui:include src="/WEB-INF/includes/pageControls.xhtml"> - <ui:param name="pagedDataUIBean" value="#{BrowseResourcesUIBean}"/> - <ui:param name="dataTableName" value="resourcesDataTable"/> - </ui:include> - </rich:column> - </rich:columnGroup> - </f:facet> - </rich:dataTable> - </a4j:form> - - <a4j:form ajaxSubmit="true" reRender="resources2DataTable" rendered="#{not empty param['t2']}"> - <rich:dataTable id="resources2DataTable" - value="#{BrowseResources2UIBean.dataModel}" var="resource" - first="#{BrowseResources2UIBean.pageControl.pageNumber}" - rows="#{BrowseResources2UIBean.pageControl.pageSize}" - sortMode="multi" - width="100%"> - - <rich:column width="20"> - <f:facet name="header"> - rhq:allRowsSelector/ - </f:facet> - <rhq:rowSelector value="#{BrowseResources2UIBean.selectedResources}"/> - </rich:column> - - <rich:column width="55" sortBy="r.id"> - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="r.id"> - <h:outputText value="Id"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputLink value="#{BrowseResources2UIBean.resourceUrlMap[resource.id]}" target="_top"> - <h:outputText value="#{resource.id}"/> - </h:outputLink> - </rich:column> - - <rich:column sortBy="r.name" width="235"> - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="r.name"> - <h:outputText value="Name"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputText value="#{resource.name}"/> - </rich:column> - - <rich:column sortBy="r.description"> - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="r.description"> - <h:outputText value="Description"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputText value="#{resource.description}"/> - </rich:column> - - <f:facet name="footer"> - rich:columnGroup - <rich:column colspan="4"> - <rhq:selectedRowsCommandButton - value="UNINVENTORY" - action="#{BrowseResources2UIBean.uninventorySelectedResources}"> - <a4j:support event="onclick" reRender="resources2DataTable"/> - </rhq:selectedRowsCommandButton> - - <ui:include src="/WEB-INF/includes/pageControls.xhtml"> - <ui:param name="pagedDataUIBean" value="#{BrowseResources2UIBean}"/> - <ui:param name="dataTableName" value="resources2DataTable"/> - </ui:include> - </rich:column> - </rich:columnGroup> - </f:facet> - </rich:dataTable> - </a4j:form> - - </ui:define> - -</ui:composition> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/createContentProviderJBossASPatch.xhtml b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/createContentProviderJBossASPatch.xhtml deleted file mode 100644 index a96a267..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/createContentProviderJBossASPatch.xhtml +++ /dev/null @@ -1,77 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:s="http://jboss.com/products/seam/taglib" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich%22%3E -ui:remove - <!-- Set the content type to "text/html" to ensure "application/xhtml+xml", which would put Firefox and - other Gecko-based browsers into XML mode (which requires pages to be well-formed XML), is not used. - We also specify the charset/encoding here, since we cannot specify it via the xml prolog, since - including an xml prolog causes IE6 to go into the undesirable "quirks mode". - (see https://jira.jboss.org/jira/browse/EMBJOPR-19) --> -</ui:remove> - - <head> - <title> - Create JBoss AS Patch Content Source - </title> - </head> - - <body style="background-color: #CCCC99"> - - <f:view contentType="text/html; charset=UTF-8"> - - <!-- Force the page to be taller than the height of the browser - to test that a vertical scrollbar is not added to the - enclosing iframe. --> - <div style="padding: 10px; height: 1000px;"> - <h4>It's always good to see something from another perspective.</h4> - - <p>You should have arrived at this page by choosing to create a new<br/> - <br/> - <b>JBoss AS Patch Content Source Type</b>.<br/> - <br/> - This page would typically start a workflow to create said source...<br/> - <br/> - It was invoked via a Perspective Page Extension defined in the Sample Perspective via: -<pre> - -<!-- Page extensions --> - -<page - name="createContentProvider"> - <page-link - name="RHNSource" - application="sample" - url="createContentProviderRHN.xhtml" /> - <page-link - name="JBossASPatchSource" - application="sample" - url="createContentProviderJBossASPatch.xhtml" /> -</page> - -</pre> -...and by enhancing the CreateContentProvider page to be an "Extension Point": -<pre> - -<h:outputLink value="#{CreateContentSourceUIBean.getCreateContentProviderPageLink(item.name)}"> - <!-- note, do not use f:param with perspectives --> - - <h:outputText value="#{item.displayName}" /> - <h:outputText value=" *" rendered="#{(not empty param.typeName) and (param.typeName eq item.name)}"/> -</h:outputLink> - -</pre> - </p> - - </div> - - </f:view> - - </body> - -</html> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/createContentProviderRHN.xhtml b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/createContentProviderRHN.xhtml deleted file mode 100644 index bf79392..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/createContentProviderRHN.xhtml +++ /dev/null @@ -1,77 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:s="http://jboss.com/products/seam/taglib" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich%22%3E -ui:remove - <!-- Set the content type to "text/html" to ensure "application/xhtml+xml", which would put Firefox and - other Gecko-based browsers into XML mode (which requires pages to be well-formed XML), is not used. - We also specify the charset/encoding here, since we cannot specify it via the xml prolog, since - including an xml prolog causes IE6 to go into the undesirable "quirks mode". - (see https://jira.jboss.org/jira/browse/EMBJOPR-19) --> -</ui:remove> - - <head> - <title> - Create JBoss AS Patch Content Source - </title> - </head> - - <body style="background-color: #CCCC99"> - - <f:view contentType="text/html; charset=UTF-8"> - - <!-- Force the page to be taller than the height of the browser - to test that a vertical scrollbar is not added to the - enclosing iframe. --> - <div style="padding: 10px; height: 1000px;"> - <h4>It's always good to see something from another perspective.</h4> - - <p>You should have arrived at this page by choosing to create a new<br/> - <br/> - <b>RHN Content Source Type</b>.<br/> - <br/> - This page would typically start a workflow to create said content source...<br/> - <br/> - It was invoked via a Perspective Page Extension defined in the Sample Perspective via: -<pre> - -<!-- Page extensions --> - -<page - name="createContentProvider"> - <page-link - name="RHNSource" - application="sample" - url="createContentProviderRHN.xhtml" /> - <page-link - name="JBossASPatchSource" - application="sample" - url="createContentProviderJBossASPatch.xhtml" /> -</page> - -</pre> -...and by enhancing the CreateContentProvider page to be an "Extension Point": -<pre> - -<h:outputLink value="#{CreateContentSourceUIBean.getCreateContentProviderPageLink(item.name)}"> - <!-- note, do not use f:param with perspectives --> - - <h:outputText value="#{item.displayName}" /> - <h:outputText value=" *" rendered="#{(not empty param.typeName) and (param.typeName eq item.name)}"/> -</h:outputLink> - -</pre> - </p> - - </div> - - </f:view> - - </body> - -</html> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/currentResource.xhtml b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/currentResource.xhtml deleted file mode 100644 index 1900ced..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/currentResource.xhtml +++ /dev/null @@ -1,53 +0,0 @@ -<?xml version="1.0"?> - -<ui:composition - template="/WEB-INF/templates/mainTemplate.xhtml" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich" - xmlns:rhq="http://rhq-project.org/rhq" - xmlns:onc="http://jboss.org/on/component%22%3E - - <ui:param name="pageTitle" value="Meet Your Soul-Resource!"/> - - <ui:define name="body"> - - <h1>Current Resource</h1> - - <!-- Force the page to be taller than the height of the browser - to test that a vertical scrollbar is not added to the - enclosing iframe. --> - <div style="padding: 10px; height: 1000px;"> - <h4>It's always good to see something from another perspective.</h4> - - <p>You should have arrived at this page by clicking on a Resource - tab defined by the sample perspective. - As evidenced by the URL in your browser's address bar, this - page was loaded from the core RHQ GUI. However, the - pink portion of this page is an IFRAME whose content was - loaded from rhq-sample-perspective.war, a WAR deployed to the - RHQ Server, as a sibling of rhq.ear.</p> - - <h3>Resource Info</h3> - - <h4>Here's some info about the current Resource:</h4> - - <h:panelGrid columns="2"> - <h:outputText value="Type" style="font-weight: bold"/> - <h:outputText value="#{CurrentResourceUIBean.resource.resourceType.name}"/> - <h:outputText value="Name" style="font-weight: bold"/> - <h:outputText value="#{CurrentResourceUIBean.resource.name}"/> - <h:outputText value="Id" style="font-weight: bold"/> - <h:outputText value="#{CurrentResourceUIBean.resource.id}"/> - </h:panelGrid> - - </div> - - </ui:define> - -</ui:composition> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/images/create.png b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/images/create.png deleted file mode 100644 index 5403358..0000000 Binary files a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/images/create.png and /dev/null differ diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/images/jboss.png b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/images/jboss.png deleted file mode 100644 index d0e1ef5..0000000 Binary files a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/images/jboss.png and /dev/null differ diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/index.html b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/index.html deleted file mode 100644 index 8bc586a..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/index.html +++ /dev/null @@ -1,14 +0,0 @@ -<script type="text/javascript"> - //document.domain = "redhat.com"; -</script> - -<!-- Force the page to be taller than the height of the browser - to test that a vertical scrollbar is not added to the - enclosing iframe. --> -<div style="padding: 10px; background-color: #DDF; height: 1000px;"> - <h4>It's always good to see something from another perspective.</h4> - - <p>The blue portion of this page is an IFRAME whose content was - loaded from rhq-sample-perspective.war, a WAR deployed to the - RHQ Server, as a sibling of rhq.ear.</p> -</div> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/mainpage.html b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/mainpage.html deleted file mode 100644 index 6d2fb54..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/mainpage.html +++ /dev/null @@ -1,17 +0,0 @@ -<script type="text/javascript"> - //document.domain = "redhat.com"; -</script> - -<!-- Force the page to be taller than the height of the browser - to test that a vertical scrollbar is not added to the - enclosing iframe. --> -<div style="padding: 10px; background-color: #FFFF66; height: 1000px;"> - <h4>It's always good to see something from another perspective.</h4> - - <p>This should be in the main page of the RHQ GUI. The Core Menu - should still be displayed. This would have been invoked from a - menu item. - The blue portion of this page is an IFRAME whose content was - loaded from rhq-sample-perspective.war, a WAR deployed to the - RHQ Server, as a sibling of rhq.ear.</p> -</div> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/randomResource.xhtml b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/randomResource.xhtml deleted file mode 100644 index 984a9cc..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/randomResource.xhtml +++ /dev/null @@ -1,37 +0,0 @@ -<?xml version="1.0"?> - -<ui:composition - template="/WEB-INF/templates/mainTemplate.xhtml" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich" - xmlns:rhq="http://rhq-project.org/rhq" - xmlns:onc="http://jboss.org/on/component%22%3E - - <ui:param name="pageTitle" value="Meet Your Soul-Resource!"/> - - <ui:define name="body"> - - <h:panelGroup layout="block"> - This page uses a Seam component which connects to the RHQ Server running on 127.0.0.1:7080 and - utilizes the RHQ remote API to obtain a Resource from that Server's inventory that has been - matched to you based on 29 dimensions of compatibility for lasting and fulfilling relationships. - </h:panelGroup> - - <h3>And the lucky Resource is...</h3> - - <h2>a #{RandomResourceUIBean.randomResource.resourceType.name} named '#{RandomResourceUIBean.randomResource.name}' - with id #{RandomResourceUIBean.randomResource.id}</h2> - - <a href="javascript:location.reload(true)"> - #{RandomResourceUIBean.randomResource.resourceType.name}s are just not my ResourceType - find me another one. - </a> - - </ui:define> - -</ui:composition> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/subtabpage.html b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/subtabpage.html deleted file mode 100644 index 91cb0f6..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/subtabpage.html +++ /dev/null @@ -1,17 +0,0 @@ -<script type="text/javascript"> - //document.domain = "redhat.com"; -</script> - -<!-- Force the page to be taller than the height of the browser - to test that a vertical scrollbar is not added to the - enclosing iframe. --> -<div style="padding: 10px; background-color: #33FF33; height: 1000px;"> - <h4>It's always good to see something from another perspective.</h4> - - <p>This should be in the resource subtab page of the RHQ GUI. The - tabs, subtabs and rest of the GUI should still be displayed. - This would have been invoked from a subtab. - The green< portion of this page is an IFRAME whose content was - loaded from rhq-sample-perspective.war, a WAR deployed to the - RHQ Server, as a sibling of rhq.ear.</p> -</div> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/tabpage.html b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/tabpage.html deleted file mode 100644 index 7f7ba6d..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/tabpage.html +++ /dev/null @@ -1,26 +0,0 @@ -<script type="text/javascript"> - //document.domain = "redhat.com"; -</script> - -<!-- Force the page to be taller than the height of the browser - to test that a vertical scrollbar is not added to the - enclosing iframe. --> -<div style="padding: 10px; background-color: #FF66CC; height: 1000px;"> - <h4>It's always good to see something from another perspective.</h4> - - <p>You should have arrived at this page by clicking on a Resource - tab defined by the sample perspective. - The pink portion of this page is an IFRAME whose content was - loaded from rhq-sample-perspective.war, a WAR deployed to the - RHQ Server, as a sibling of rhq.ear. The main page is still - loaded </p> - - <h3>Resource Info</h3> - - <p>Here's some info about the current Resource:</p> - - <h:pan - <b>Type: #{SampleUIBean.randomResource.resourceType.name} - Name: #{SampleUIBean.randomResource.name} - Id: #{SampleUIBean.randomResource.id} -</div> diff --git a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/wizard.xhtml b/etc/samples/perspectives/sample-perspective/app/src/main/webapp/wizard.xhtml deleted file mode 100644 index 41065f2..0000000 --- a/etc/samples/perspectives/sample-perspective/app/src/main/webapp/wizard.xhtml +++ /dev/null @@ -1,543 +0,0 @@ -<?xml version="1.0"?> - -<ui:composition - template="/WEB-INF/templates/mainTemplate.xhtml" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich" - xmlns:rhq="http://rhq-project.org/rhq" - xmlns:onc="http://jboss.org/on/component%22%3E - -<ui:param name="pageTitle" value="EJB Admin Wizard"/> - -<ui:define name="body"> - -<table cellpadding="2"> -<tr> -<td - width="200" - height="650" - style="vertical-align: top;"> - <rich:panel style="width:200px;background-color:#FAFFCC;height:650px"> - <f:facet name="header">Steps:</f:facet> - <table style="border-style: solid;"> - <!-- <table border="1" style="border-top-style: solid; border-top-width:1px;">--> - <tr> - <td> - <rich:spacer height="50"/> - </td> - </tr> - <c:forEach - var="step" - items="#{WizardBean.allSteps}"> - <tr> - <td> - <rich:spacer height="1"/> - </td> - </tr> - <c:choose> - <c:when test="#{WizardBean.currentStep eq step}"> - <tr bgcolor="#D5DBBD"> - <td style="border-style: solid;"><b style="font-size: 20px">Step: #{step}</b></td> - </tr> - </c:when> - <c:otherwise> - <tr> - <td style="border-style: solid;"><b style="font-size: 20px">Step: #{step}</b></td> - </tr> - </c:otherwise> - </c:choose> - </c:forEach> - <tr> - <td> - <rich:spacer height="50"/> - </td> - </tr> - </table> - </rich:panel> -</td> -<td - style="overflow-y: auto; vertical-align: top;" - width="600" - height="650"> -<h:form - id="submit" - action="null"> - -<h:outputText - id="title" - valueRef="#{WizardBean.title}"></h:outputText> - -ui:removeDisplay welcome to wizard and ask first questions.</ui:remove> -ui:removeIn c:choose, define c:when statements for each step.</ui:remove> - -<rich:panel style="width:600px;background-color:#FAFFCC;height:650px"> -<f:facet name="header">The EJB Administrator Account Wizard:</f:facet> - -<c:choose> -ui:remove------------------------------------------------------------------</ui:remove> -<c:when test="${WizardBean.currentStep == 'One'}"> - <h:outputText id="message2">The wizard will walk you through creation - of a EJB Administrator user account with associated groups and roles.<br/> - </h:outputText> - <rich:spacer height="100"/> - (to group RHQ EJB resources) <br/> - <table> - <tr> - <th>New Group</th> - <th>Values</th> - </tr> - <tr> - <td>* Name:</td> - <td> - <h:inputText - id="groupName" - value="#{WizardBean.groupName}" - required="true"> - <f:validateLength - minimum="1" - maximum="100"/> - </h:inputText> - </td> - </tr> - <tr> - <td>Description:</td> - <td> - <h:inputText - id="groupDescription" - value="#{WizardBean.groupDescription}"></h:inputText> - </td> - </tr> - <tr> - <td>Location:</td> - <td> - <h:inputText - id="location" - value="#{WizardBean.groupLocation}"></h:inputText> - </td> - </tr> - <tr> - <td>Type:</td> - <td> - <h:selectOneMenu - id="groupType" - value="#{WizardBean.groupType}"> - <f:selectItem - id="Mixed" - itemLabel="Mixed" - itemValue="Mixed"/> - <f:selectItem - id="Compatible" - itemLabel="Compatible" - itemValue="Compatible"/> - </h:selectOneMenu> - </td> - </tr> - <tr> - <td>Make group recursive:</td> - <td> - <h:selectBooleanCheckbox - id="isRecursive" - value="#{WizardBean.recursive}"/> - </td> - </tr> - </table> - <br/> - <h:message - for="groupName" - errorStyle="color:blue"/> -</c:when> - -ui:remove------------------------------------------------------------------</ui:remove> -<c:when test="${WizardBean.currentStep == 'Two'}"> - <h:outputText id="message">Role Configuration:<br/> - </h:outputText> - <rich:spacer height="100"/> - (Role defines permissions for RHQ EJB3 resources) - <table> - <tr> - <th>New Role</th> - <th>Values</th> - </tr> - <tr> - <td>* Name:</td> - <td> - <h:inputText - id="roleName" - value="#{WizardBean.roleName}" - required="true"> - <f:validateLength maximum="100"/> - </h:inputText> - </td> - </tr> - <tr> - <td>Description:</td> - <td> - <h:inputText - id="roleDescription" - value="#{WizardBean.roleDescription}"> - <f:validateLength maximum="100"/> - </h:inputText> - </td> - </tr> - <tr> - <td><b>Manage Security:</b></td> - <td> - <h:selectBooleanCheckbox - id="manageSecurity" - value="#{WizardBean.manageSecurityEnabled}"/> - </td> - </tr> - <tr> - <td><b>Manage Inventory:</b></td> - <td> - <h:selectBooleanCheckbox - id="manageInventory" - value="#{WizardBean.manageInventoryEnabled}"/> - </td> - </tr> - <tr> - <td><b>Manage RHQ Settings:</b></td> - <td> - <h:selectBooleanCheckbox - id="manageRhqServerSettings" - value="#{WizardBean.administerRhqServerSettingsEnabled}"/> - </td> - </tr> - <tr> - <td><b>Modify :</b></td> - <td> - <h:selectBooleanCheckbox - id="modifyEnabled" - value="#{WizardBean.modifyEnabled}"/> - </td> - </tr> - <tr> - <td><b>Delete :</b></td> - <td> - <h:selectBooleanCheckbox - id="deleteEnabled" - value="#{WizardBean.deleteEnabled}"/> - </td> - </tr> - <tr> - <td><b>Create Children:</b></td> - <td> - <h:selectBooleanCheckbox - id="createChildEnabled" - value="#{WizardBean.createChildrenEnabled}"/> - </td> - </tr> - <tr> - <td><b>Alert:</b></td> - <td> - <h:selectBooleanCheckbox - id="alertEnabled" - value="#{WizardBean.alertEnabled}"/> - </td> - </tr> - <tr> - <td><b>Measure:</b></td> - <td> - <h:selectBooleanCheckbox - id="measureEnabled" - value="#{WizardBean.measureEnabled}"/> - </td> - </tr> - <tr> - <td><b>Content:</b></td> - <td> - <h:selectBooleanCheckbox - id="contentEnabled" - value="#{WizardBean.contentEnabled}"/> - </td> - </tr> - <tr> - <td><b>Control:</b></td> - <td> - <h:selectBooleanCheckbox - id="controlEnabled" - value="#{WizardBean.controlEnabled}"/> - </td> - </tr> - <tr> - <td><b>Configure:</b></td> - <td> - <h:selectBooleanCheckbox - id="configureEnabled" - value="#{WizardBean.configureEnabled}"/> - </td> - </tr> - - </table> - <br/> - <h:message - for="roleName" - errorStyle="color:blue"/> -</c:when> - -ui:remove------------------------------------------------------------------</ui:remove> -<c:when test="${WizardBean.currentStep == 'Three'}"> - <h:outputText id="message"> - <b>New User Account Details</b> - <br/> - </h:outputText> - <h:outputText id="message2">The following actions will occur:<br/> - </h:outputText> - <rich:spacer height="100"/> - (new User account details) <br/> - <table> - <tr> - <th>New User</th> - <th>Values</th> - </tr> - <tr> - <td>* First Name:</td> - <td> - <h:inputText - id="firstName" - value="#{WizardBean.firstName}" - required="true"> - <f:validateLength minimum="1"/> - </h:inputText> - </td> - </tr> - <tr> - <td>Last Name:</td> - <td> - <h:inputText - id="lastName" - value="#{WizardBean.lastName}"></h:inputText> - </td> - </tr> - <tr> - <td>* User Name:</td> - <td> - <h:inputText - id="newUserName" - value="#{WizardBean.newUserName}"> - <f:validateLength minimum="6"/> - </h:inputText> - </td> - </tr> - <tr> - <td>* Enter New Password:</td> - <td> - <h:inputSecret - id="password" - value="#{WizardBean.password}" - required="true"> - <f:validateLength - minimum="3" - maximum="16"/> - </h:inputSecret> - </td> - </tr> - <tr> - <td>* Confirm New Password:</td> - <td> - <h:inputSecret - id="password2" - value="#{WizardBean.password2}" - required="true"> - <f:validateLength - minimum="3" - maximum="16"/> - </h:inputSecret> - </td> - </tr> - <tr> - <td>Phone:</td> - <td> - <h:inputText - id="phone" - value="#{WizardBean.phone}"></h:inputText> - </td> - </tr> - <tr> - <td>Email:</td> - <td> - <h:inputText - id="email" - value="#{WizardBean.email}"></h:inputText> - </td> - </tr> - <tr> - <td>Department:</td> - <td> - <h:inputText - id="department" - value="#{WizardBean.department}"></h:inputText> - </td> - </tr> - - <tr> - <td>Enable this account:</td> - <td> - <h:selectBooleanCheckbox - id="isEnableLogin" - value="#{WizardBean.enableLogin}"/> - </td> - </tr> - </table> - - <br/> - <h:message - for="firstName" - errorStyle="color:blue"/> - <br/> - <h:message - for="newUserName" - errorStyle="color:blue"/> - <br/> - <h:message - for="password" - errorStyle="color:blue"/> - <br/> - <h:message - for="password2" - errorStyle="color:blue"/> - <br/> - <br/> -</c:when> - -ui:remove------------------------------------------------------------------</ui:remove> -<c:when test="${WizardBean.currentStep == 'Confirm'}"> - <h:outputText id="message">You're almost done.<br/> - </h:outputText> - <h:outputText id="message2">The following will occur when click 'Next':<br/> - </h:outputText> - <rich:spacer height="50"/> - <h:outputText>1) A new Group, '<b>#{WizardBean.groupName}</b>' will be created to group RHQ EJB3 - resources.<br/> - </h:outputText> - <h:outputText>2) A new Role, '<b>#{WizardBean.roleName}</b>' will be created defining resource - access rights.<br/> - </h:outputText> - <h:outputText>3) The user '<b>#{WizardBean.newUserName}</b>' will be created with attached role and - group from steps 1 and 2.<br/> - </h:outputText> - <br/> - <h:outputText>Hit the 'Cancel' button below if you would like to abort this operation. - </h:outputText> - <br/> -</c:when> - -<c:when test="${WizardBean.currentStep == 'Complete'}"> - <rich:panel style="width:500px"> - <f:facet name="header">Success</f:facet> - The user '<b>#{WizardBean.newUserName}</b>' has been successfully - created, activated and associated with new role '<b>#{WizardBean.roleName}'</b> and new group - '<b>#{WizardBean.groupName}</b>'. This user has permissions for all EJB3 - Session beans in inventory, displayed below. - <br/> - <h:outputLink value="#{WizardBean.usersUrl}" target="_top"> - <h:outputText value="Go To Users"/> - </h:outputLink> - <br/> - <h:outputLink value="#{WizardBean.rolesUrl}" target="_top"> - <h:outputText value="Go To Roles"/> - </h:outputLink> - <br/> - <h:outputLink value="#{WizardBean.groupsUrl}" target="_top"> - <h:outputText value="Go To Groups"/> - </h:outputLink> - </rich:panel> - - <rich:spacer height="50"/> - - <rich:dataTable - onRowMouseOver="this.style.backgroundColor='#F1F1F1'" - onRowMouseOut="this.style.backgroundColor='#{a4jSkin.tableBackgroundColor}'" - cellpadding="0" - cellspacing="0" - rows="15" - width="500" - border="0" - var="resource" - value="#{WizardBean.resources}"> - - <rich:column sortBy="#{resource.id}"> - <f:facet name="header"> - <h:outputText value="Id"/> - </f:facet> - - <h:outputLink value="#{WizardBean.resourceUrlMap[resource.id]}" target="_top"> - <h:outputText value="#{resource.id}"/> - </h:outputLink> - </rich:column> - - <rich:column sortBy="#{resource.name}"> - <f:facet name="header"> - <h:outputText value="Name"/> - </f:facet> - <h:outputText value="#{resource.name}"/> - </rich:column> - - <rich:column sortBy="#{resource.description}"> - <f:facet name="header"> - <h:outputText value="Description"/> - </f:facet> - <h:outputText value="#{resource.description}"/> - </rich:column> - - <f:facet name="footer"> - <rich:datascroller selectedStyle="font-weight:bold"/> - </f:facet> - </rich:dataTable> -</c:when> - -ui:remove------------------------------------------------------------------</ui:remove> -<c:otherwise> - <b>NO CONDITIONS MATCHED: Contact system administrator.</b> -</c:otherwise> -</c:choose> - -ui:remove------------------------------------------------------------------</ui:remove> -<br/> -<br/> -<h:commandButton - id="cancel" - value="Cancel" - rendered="#{WizardBean.currentStep != 'Complete'}" - disabled="#{WizardBean.currentStep eq WizardBean.end}" - immediate="true" - action="#{WizardBean.cancel}"> -</h:commandButton> -<rich:spacer width="100"/> - -<h:commandButton - id="previous" - value="Back" - disabled="#{WizardBean.currentStep eq WizardBean.start or WizardBean.currentStep == 'Complete'}" - rendered="#{WizardBean.currentStep != 'Complete'}" - immediate="true" - action="#{WizardBean.processReverse}"> -</h:commandButton> -<h:commandButton - id="next" - value="Next" - rendered="#{WizardBean.currentStep != 'Complete'}" - disabled="#{WizardBean.currentStep eq WizardBean.end}" - action="#{WizardBean.processActions}"> -</h:commandButton> - -<br/> -<br/> -<h:outputText rendered="#{WizardBean.currentStep != 'Confirm' and WizardBean.currentStep != 'Complete' }"> - * Required field -</h:outputText> -</rich:panel> -</h:form> -</td> -</tr> -</table> - -</ui:define> - -</ui:composition> \ No newline at end of file diff --git a/etc/samples/perspectives/sample-perspective/perspective/pom.xml b/etc/samples/perspectives/sample-perspective/perspective/pom.xml deleted file mode 100644 index 9e7fb92..0000000 --- a/etc/samples/perspectives/sample-perspective/perspective/pom.xml +++ /dev/null @@ -1,159 +0,0 @@ -<?xml version="1.0"?> - -<project - xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd%22%3E - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.3.0-SNAPSHOT</version> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-sample-perspective</artifactId> - <version>1.0.0-SNAPSHOT</version> - <packaging>jar</packaging> - - <name>RHQ Sample Perspective</name> - <description>A Sample Perspective showing extension points and filters</description> - - <properties> - <rhq.version>${project.parent.version}</rhq.version> - </properties> - - <dependencies> - - <!-- Below are the apps packaged with this perspective plugin --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-sample-perspective-war</artifactId> - <version>1.0.0-SNAPSHOT</version> - <scope>provided</scope> - <type>war</type> - </dependency> - - <!-- Below are the core modules that are required dependencies of all server plugins --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server</artifactId> - <version>${rhq.version}</version> - <scope>provided</scope> <!-- provided by the server/plugin-container --> - </dependency> - - - <!-- uncomment the one of the three logging systems your plugin uses: log4j, commons-logging or i18nlog --> - <!-- all three are provided to your plugin by the server/plugin-container --> - <!-- - <dependency> <groupId>log4j</groupId> <artifactId>log4j</artifactId> - <scope>provided</scope> </dependency> - --> - - <!-- - <dependency> <groupId>commons-logging</groupId> <artifactId>commons-logging</artifactId> <version>1.1</version> - <scope>provided</scope> </dependency> - --> - - <!-- - <dependency> <groupId>i18nlog</groupId> <artifactId>i18nlog</artifactId> <version>1.0.9</version> </dependency> - --> - - <!-- Define any third-party dependencies your plugin has here. --> - <!-- - <dependency> <groupId>group-id-of-dependency-goes-here</groupId> - <artifactId>artifact-id-of-dependency-goes-here</artifactId> <version>version-of-dependency-goes-here</version> - </dependency> - --> - - </dependencies> - - <build> - <plugins> - - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - - <execution> - <id>add-war</id> - <phase>verify</phase> - <configuration> - <target> - <property - name="classes.dir" - location="${rhq.deploymentDir}/WEB-INF/classes" /> - <jar - update="yes" - destfile="${basedir}/target/${project.artifactId}-${project.version}.jar" - basedir="${basedir}/../app/target" - includes="*.war" /> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>dev</id> - - <properties> - <rhq.rootDir>../../../../..</rhq.rootDir> - <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir> - <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir> - </properties> - - <build> - <plugins> - - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - - <execution> - <id>deploy</id> - <phase>install</phase> - <configuration> - <target> - <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> - <echo>*** Updating ${deployment.file}...</echo> - <copy file="${basedir}/target/${project.build.finalName}.jar" toDir="${rhq.deploymentDir}" /> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - <execution> - <id>undeploy</id> - <phase>clean</phase> - <configuration> - <target> - <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> - <echo>*** Deleting ${deployment.file}...</echo> - <delete file="${deployment.file}" /> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - </executions> - </plugin> - - </plugins> - </build> - </profile> - </profiles> - -</project> diff --git a/etc/samples/perspectives/sample-perspective/perspective/src/main/resources/META-INF/rhq-serverplugin.xml b/etc/samples/perspectives/sample-perspective/perspective/src/main/resources/META-INF/rhq-serverplugin.xml deleted file mode 100644 index 8db3079..0000000 --- a/etc/samples/perspectives/sample-perspective/perspective/src/main/resources/META-INF/rhq-serverplugin.xml +++ /dev/null @@ -1,277 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> - -<perspective-plugin - apiVersion="1.0" - version="1.0" - description="A Sample Perspective Utilizing Every Extension Point and Filter" - displayName="Perspective:Sample" - name="SamplePerspective" - package="org.rhq.perspective.sample" - xmlns="urn:xmlns:rhq-serverplugin.perspective" - xmlns:serverplugin="urn:xmlns:rhq-serverplugin" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%22%3E - - - - <!-- Declare supporting applications for this perspective --> - <application - name="sample" - baseUrl="/rhq-sample-perspective/" /> - - <!-- replace the coreMenu logo with a new one --> - <menu-item - action="remove" - name="logo" - displayName="" - application="sample" - url="/" - iconUrl="images/jboss.png"> - <position - placement="firstChild" /> - </menu-item> - <menu-item - action="add" - name="logo" - displayName="" - application="sample" - url="/" - iconUrl="images/jboss.png"> - <position - placement="firstChild" /> - </menu-item> - - <!-- remove the 'new' menu items from the group menuGroup and move them to the custom menuGroup --> - <menu-item - action="remove" - name="groups.newGroup" - displayName="New Group"> - <position - name="groups.groupDefinitions" - placement="after" /> - </menu-item> - <menu-item - action="remove" - name="groups.newGroupDefinition" - displayName="New Group Definition"> - <position - name="groups.newGroup" - placement="after" /> - </menu-item> - - <!-- Add Sample Perspective menu-item to Core Menu --> - <menu-item - name="sample" - displayName="Sample Perspective"> - <position - name="help" - placement="after" /> - </menu-item> - <menu-item - name="sample.child1" - displayName="New Group"> - <position - name="sample" - placement="firstChild" /> - </menu-item> - <menu-item - name="sample.child2" - displayName="Sample Page" - application="sample" - url="mainpage.html"> - <position - name="sample.child1" - placement="after" /> - </menu-item> - <menu-item - name="sample.child3" - displayName="Random Resource" - application="sample" - url="randomResource.seam"> - <position - name="sample.child2" - placement="after" /> - </menu-item> - <menu-item - name="sample.child4" - displayName="Browse Resources" - application="sample" - url="browseResources.seam"> - <position - name="sample.child3" - placement="after" /> - </menu-item> - <menu-item - name="sample.child4" - displayName="EJB Admin Wizard" - application="sample" - url="wizard.seam"> - <position - name="sample.child3" - placement="after" /> - <activators> - <global-permission - name="MANAGE_INVENTORY" /> - <global-permission - name="MANAGE_SECURITY" /> - <inventory> - <resource - plugin="JBossAS" - type="JBossAS Server" /> - </inventory> - </activators> - </menu-item> - <menu-item - name="sample.child5" - displayName="Config and Restart AS" - application="sample" - url="mainpage.html"> - <position - name="sample.child4" - placement="after" /> - <activators> - <inventory> - <resource - plugin="JBossAS" - type="JBossAS Server"> - <resource-permission - name="CONTROL" /> - <resource-permission - name="CONFIGURE" /> - <trait - name="Version Name" - value="Trinity" /> - <trait - name="Build Date" - value="20\d\d" /> - </resource> - </inventory> - </activators> - </menu-item> - <menu-item - name="sample.child1.newGroup" - displayName="New Group" - application="sample" - url="/resource/group/Inventory.do?mode=new" - iconUrl="images/create.png"> - <position - name="sample.child1" - placement="firstChild" /> - <activators> - <global-permission - name="MANAGE_INVENTORY" /> - </activators> - </menu-item> - <menu-item - name="sample.child1.newGroupDefinition" - displayName="New Group Definition" - application="sample" - url="/rhq/definition/group/new.xhtml" - iconUrl="images/create.png"> - <position - name="sample.child1.newGroup" - placement="after" /> - <activators> - <global-permission - name="MANAGE_INVENTORY" /> - </activators> - </menu-item> - - <!-- A tab that is always displayed --> - <tab - name="Sample" - displayName="Sample" - iconUrl="/images/icons/Favorite_16.png" - application="sample" - url="currentResource.seam"> - <position - name="Content" - placement="after" /> - </tab> - - <!-- A tab that shows up whenever the RT implements the Support Facet and user can execute operations --> - <tab - name="SampleSupport" - displayName="Sample Support" - iconUrl="/images/icons/Favorite_16.png" - application="sample" - url="currentResource.seam"> - <position - name="Sample" - placement="after" /> - <activators> - <facet - name="support" /> - <resource-permission - name="CONTROL" /> - </activators> - </tab> - - <!-- a subtab that will only be displayed for Network Adapter Resources --> - <tab - name="Summary.SampleNetAdapt" - displayName="Sample-NetAdapt" - iconUrl="/images/icons/Favorite_16.png" - application="sample" - url="subtabpage.html"> - <position - name="Summary.Timeline" - placement="after" /> - <activators> - <resource-type> - <resource - plugin="Platforms" - type="Network Adapter" /> - </resource-type> - </activators> - </tab> - - <!-- a subtab that will only be displayed for AS Server (4 or 5) Resources --> - <tab - name="Summary.SampleAS" - displayName="Sample-AS4,5" - iconUrl="/images/icons/Favorite_16.png" - application="sample" - url="subtabpage.html"> - <position - name="Summary.Timeline" - placement="after" /> - <activators> - <resource-type> - <resource - plugin="JBossAS" - type="JBossAS Server"> - </resource> - <resource - plugin="JBossAS5" - type="JBossAS Server"> - </resource> - </resource-type> - </activators> - </tab> - - <tab - name="Monitor.Sample" - displayName="Sample" - application="sample" - url="subtabpage.html"> - <position - name="Monitor.Tables" - placement="after" /> - </tab> - - <!-- Page extensions --> - - <page - name="createContentProvider"> - <page-link - name="RHNSource" - application="sample" - url="createContentProviderRHN.xhtml" /> - <page-link - name="JBossASPatchSource" - application="sample" - url="createContentProviderJBossASPatch.xhtml" /> - </page> - - -</perspective-plugin> \ No newline at end of file diff --git a/etc/samples/perspectives/sample-perspective/pom.xml b/etc/samples/perspectives/sample-perspective/pom.xml deleted file mode 100644 index 1e15de3..0000000 --- a/etc/samples/perspectives/sample-perspective/pom.xml +++ /dev/null @@ -1,37 +0,0 @@ -<project - xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd%22%3E - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>3.0.0.B05</version> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-sample-perspective-parent</artifactId> - <version>1.0-SNAPSHOT</version> - <packaging>pom</packaging> - - <name>RHQ Sample Perspective Parent</name> - <description>parent POM for modules comprising the RHQ Sample Perspective</description> - - <modules> - <module>app</module> - <module>perspective</module> - </modules> - - <dependencies> - <dependency> - <groupId>javax.faces</groupId> - <artifactId>jsf-api</artifactId> - <version>1.2_13</version> - <scope>provided</scope> - </dependency> - </dependencies> - -</project> - diff --git a/modules/enterprise/gui/base-perspective-jar/pom.xml b/modules/enterprise/gui/base-perspective-jar/pom.xml deleted file mode 100644 index bfa8dda..0000000 --- a/modules/enterprise/gui/base-perspective-jar/pom.xml +++ /dev/null @@ -1,142 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> - <relativePath>../../../../pom.xml</relativePath> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-jar</artifactId> - <packaging>jar</packaging> - - <name>RHQ Base Perspective Jar</name> - <description>the base perspective classes and dependencies</description> - - <properties> - <jsf.version>1.2_14</jsf.version> - <facelets.version>1.1.15.B1</facelets.version> - <jboss-el.version>1.0_02.CR5</jboss-el.version> - <richfaces.version>3.3.3.Final</richfaces.version> - </properties> - - <dependencyManagement> - - <dependencies> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-remoting-client-api</artifactId> - <version>${project.parent.version}</version> - </dependency> - - <dependency> - <groupId>com.sun.facelets</groupId> - <artifactId>jsf-facelets</artifactId> - <version>${facelets.version}</version> - </dependency> - - <dependency> - <groupId>org.jboss.el</groupId> - <artifactId>jboss-el</artifactId> - <version>${jboss-el.version}</version> - <exclusions> - <exclusion> - <groupId>javax.el</groupId> - <artifactId>el-api</artifactId> - </exclusion> - </exclusions> - </dependency> - - <dependency> - <groupId>org.richfaces.framework</groupId> - <artifactId>richfaces-api</artifactId> - <version>${richfaces.version}</version> - </dependency> - - <dependency> - <groupId>org.richfaces.framework</groupId> - <artifactId>richfaces-impl</artifactId> - <version>${richfaces.version}</version> - </dependency> - - <dependency> - <groupId>org.richfaces.ui</groupId> - <artifactId>richfaces-ui</artifactId> - <version>${richfaces.version}</version> - </dependency> - - <dependency> - <groupId>javax.faces</groupId> - <artifactId>jsf-api</artifactId> - <version>${jsf.version}</version> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-core-gui</artifactId> - <version>${project.version}</version> - </dependency> - - </dependencies> - - </dependencyManagement> - - <dependencies> - - <!-- This will pull in all the jars we need for making remote calls to the RHQ Server. --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-remoting-client-api</artifactId> - </dependency> - - <dependency> - <groupId>com.sun.facelets</groupId> - <artifactId>jsf-facelets</artifactId> - </dependency> - - <dependency> - <groupId>org.jboss.el</groupId> - <artifactId>jboss-el</artifactId> - </dependency> - - <dependency> - <groupId>org.richfaces.framework</groupId> - <artifactId>richfaces-api</artifactId> - </dependency> - - <dependency> - <groupId>org.richfaces.framework</groupId> - <artifactId>richfaces-impl</artifactId> - </dependency> - - <dependency> - <groupId>org.richfaces.ui</groupId> - <artifactId>richfaces-ui</artifactId> - </dependency> - - <dependency> - <groupId>javax.faces</groupId> - <artifactId>jsf-api</artifactId> - <scope>provided</scope> - </dependency> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-core-gui</artifactId> - </dependency> - - <dependency> - <!-- TODO only load in for jdk5 builds --> - <groupId>sun-jaxws</groupId> - <artifactId>jsr181-api</artifactId> - <version>2.1.1</version> - </dependency> - - </dependencies> - -</project> - diff --git a/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectivePagedDataUIBean.java b/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectivePagedDataUIBean.java deleted file mode 100644 index 2f080a5..0000000 --- a/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectivePagedDataUIBean.java +++ /dev/null @@ -1,39 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2009-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.enterprise.server.perspective; - -import org.rhq.core.gui.table.bean.AbstractPagedDataUIBean; - -/** - * A base class for Seam components that utilize the RHQ remote API to retrieve a paged data set of objects, which are - * typically rendered using a dataTable component. - * - * @author Ian Springer - */ -public abstract class AbstractPerspectivePagedDataUIBean extends AbstractPagedDataUIBean { - protected PerspectiveClientUIBean perspectiveClient; - - // @Create - public void init() { - if (this.perspectiveClient == null) { - // this.perspectiveClient = (PerspectiveClientUIBean) Component.getInstance(PerspectiveClientUIBean.class, - // true); - } - } -} diff --git a/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveResourceUIBean.java b/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveResourceUIBean.java deleted file mode 100644 index 4ab63d5..0000000 --- a/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveResourceUIBean.java +++ /dev/null @@ -1,49 +0,0 @@ -package org.rhq.enterprise.server.perspective; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.criteria.ResourceCriteria; -import org.rhq.core.domain.resource.Resource; -import org.rhq.core.domain.util.PageList; -import org.rhq.enterprise.clientapi.RemoteClient; -import org.rhq.enterprise.server.resource.ResourceManagerRemote; - -/** - * A base class for Seam components that utilize the RHQ remote API in the context of a specific Resource. - */ -public class AbstractPerspectiveResourceUIBean extends AbstractPerspectiveUIBean { - private final Log log = LogFactory.getLog(this.getClass()); - - // @RequestParameter - private Integer rhqResourceId; - - private Resource resource; - - public Resource getResource() throws Exception { - if (this.resource == null) { - this.resource = loadResource(); - log.debug("Retrieved current Resource " + this.resource); - } - return this.resource; - } - - private Resource loadResource() throws Exception { - if (this.rhqResourceId == null) { - throw new IllegalStateException("The 'rhqResourceId' HTTP request parameter is required by this page."); - } - RemoteClient remoteClient = this.perspectiveClient.getRemoteClient(); - Subject subject = this.perspectiveClient.getSubject(); - - // ***NOTE***: The javassist.NotFoundException stack traces that are logged by this call can be ignored. - ResourceManagerRemote resourceManager = remoteClient.getProxy(ResourceManagerRemote.class); - ResourceCriteria resourceCriteria = new ResourceCriteria(); - resourceCriteria.addFilterId(this.rhqResourceId); - PageList<Resource> resources = resourceManager.findResourcesByCriteria(subject, resourceCriteria); - if (resources.isEmpty()) { - throw new IllegalStateException("No Resource exists with the id " + this.rhqResourceId + "."); - } - return resources.get(0); - } -} diff --git a/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveUIBean.java b/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveUIBean.java deleted file mode 100644 index 01f8dd8..0000000 --- a/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveUIBean.java +++ /dev/null @@ -1,36 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2009-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.enterprise.server.perspective; - -/** - * A base class for Seam components that utilize the RHQ remote API. - * - * @author Ian Springer - */ -public abstract class AbstractPerspectiveUIBean { - // @In - // protected FacesMessages facesMessages; - - protected PerspectiveClientUIBean perspectiveClient; - - // @Create - public void init() { - // this.perspectiveClient = (PerspectiveClientUIBean) Component.getInstance(PerspectiveClientUIBean.class, true); - } -} \ No newline at end of file diff --git a/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveClientUIBean.java b/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveClientUIBean.java deleted file mode 100644 index 2d8b043..0000000 --- a/modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveClientUIBean.java +++ /dev/null @@ -1,161 +0,0 @@ -package org.rhq.enterprise.server.perspective; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.jetbrains.annotations.NotNull; - -import org.rhq.core.domain.auth.Subject; -import org.rhq.enterprise.clientapi.RemoteClient; -import org.rhq.enterprise.server.auth.SubjectManagerRemote; - -/** - * @author Ian Springer - */ -//@Name(PerspectiveClientUIBean.NAME) -//@Scope(ScopeType.CONVERSATION) -//@AutoCreate -public class PerspectiveClientUIBean { - public static final String NAME = "PerspectiveClientUIBean"; - - private static final String DEFAULT_SERVER_HOST = "127.0.0.1"; - private static final int DEFAULT_SERVER_PORT = 7080; - private static final String DEFAULT_USERNAME = "rhqadmin"; - private static final String DEFAULT_PASSWORD = "rhqadmin"; - - private final Log log = LogFactory.getLog(this.getClass()); - - // @RequestParameter - private String rhqServerHost; - private String serverHost; - - // @RequestParameter - private Integer rhqServerPort; - private Integer serverPort; - - // @RequestParameter - private String rhqUsername; - private String username; - - // @RequestParameter - private String rhqPassword; - private String password; - - // @RequestParameter - private Integer rhqSessionId; - - private RemoteClient remoteClient; - private Subject subject; - private String coreGuiBaseUrl; - - @NotNull - public RemoteClient getRemoteClient() throws Exception { - if (this.remoteClient == null) { - this.remoteClient = new RemoteClient(null, getServerHost(), getServerPort()); - } - if (!this.remoteClient.isConnected()) { - try { - this.remoteClient.connect(); - } catch (Exception e) { - this.remoteClient = null; - // log.info("Ending perspective client Conversation with id " + Conversation.instance().getId() + "..."); - // Conversation.instance().end(); - throw e; - } - // Conversation.instance().begin(); - // log.info("Began perspective client Conversation with id " + Conversation.instance().getId() + "."); - } - return this.remoteClient; - } - - /** - * Returns the currently logged in RHQ user. - * - * @return the currently logged in RHQ user - * - * @throws Exception if we are unable to obtain the Subject - hopefully this will encourage callers to set a - * FacesMessage and return null to give the user a friendlier error - */ - @NotNull - public Subject getSubject() throws Exception { - if (subject == null) { - RemoteClient remoteClient = getRemoteClient(); - // ***NOTE***: The javassist.NotFoundException stack traces that are logged by this call can be ignored. - SubjectManagerRemote subjectManager = remoteClient.getProxy(SubjectManagerRemote.class); - if (this.rhqSessionId != null) { - log.info("Retrieving subject for user [" + getUsername() + "] and sessionId [" + this.rhqSessionId - + "]..."); - this.subject = subjectManager.getSubjectByNameAndSessionId(getUsername(), this.rhqSessionId); - } else { - log.info("Logging in as user [" + getUsername() + "] with password [" + getPassword() + "]..."); - this.subject = subjectManager.login(getUsername(), getPassword()); - } - } - return this.subject; - } - - // NOT Currently In Use as we've pulled out perspectives for the 3.0.0 release. Commenting out due to - // the use of the currently removed PerspectiveManagerRemote - /* - @NotNull - public String getCoreGuiBaseUrl() throws Exception { - if (this.coreGuiBaseUrl == null) { - RemoteClient remoteClient = getRemoteClient(); - Subject subject = getSubject(); - PerspectiveManagerRemote perspectiveManager = remoteClient.getPerspectiveManager(); - this.coreGuiBaseUrl = perspectiveManager.getRootUrl(subject, true, false); - } - return this.coreGuiBaseUrl; - } - */ - - @NotNull - private String getServerHost() { - if (this.serverHost == null) { - if (this.rhqServerHost != null) { - this.serverHost = this.rhqServerHost; - } else { - return DEFAULT_SERVER_HOST; - } - } else { - if (this.rhqServerHost != null && this.serverHost.equals(this.rhqServerHost)) { - - } - } - return this.serverHost; - } - - private int getServerPort() { - if (this.serverPort == null) { - if (this.rhqServerPort != null) { - this.serverPort = this.rhqServerPort; - } else { - return DEFAULT_SERVER_PORT; - } - } - return this.serverPort; - } - - @NotNull - private String getUsername() { - if (this.username == null) { - if (this.rhqUsername != null) { - this.username = this.rhqUsername; - } else { - return DEFAULT_USERNAME; - } - } - return this.username; - } - - @NotNull - private String getPassword() { - if (this.password == null) { - if (this.rhqPassword != null) { - this.password = this.rhqPassword; - } else { - return DEFAULT_PASSWORD; - } - } - return this.password; - } -} diff --git a/modules/enterprise/gui/base-perspective-jar/src/main/resources/seam.properties b/modules/enterprise/gui/base-perspective-jar/src/main/resources/seam.properties deleted file mode 100644 index b97c770..0000000 --- a/modules/enterprise/gui/base-perspective-jar/src/main/resources/seam.properties +++ /dev/null @@ -1,3 +0,0 @@ -# NOTE: The presence of this file tells Seam to scan this WAR for Seam -# components (i.e. classes with Name annotations) and to deploy -# any that it finds. diff --git a/modules/enterprise/gui/base-perspective-war/pom.xml b/modules/enterprise/gui/base-perspective-war/pom.xml deleted file mode 100644 index e4acd89..0000000 --- a/modules/enterprise/gui/base-perspective-war/pom.xml +++ /dev/null @@ -1,63 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> - <relativePath>../../../../pom.xml</relativePath> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-war</artifactId> - <packaging>war</packaging> - - <name>RHQ Base Perspective War</name> - <description>an abstract WAR that can be used by the maven war plugin as an overlay (i.e. base) for a perspective WAR</description> - - <dependencies> - - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-jar</artifactId> - <version>${project.version}</version> - <type>pom</type> - </dependency> - - </dependencies> - - <build> - <finalName>rhq-base-perspective</finalName> - - <plugins> - - <plugin> - <artifactId>maven-war-plugin</artifactId> - <configuration> - <archive> - <manifest> - <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries> - <addDefaultImplementationEntries>true</addDefaultImplementationEntries> - </manifest> - <manifestEntries> - <Build-Number>${buildNumber}</Build-Number> - </manifestEntries> - </archive> - <webResources> - <resource> - <filtering>true</filtering> - <directory>${basedir}/src/main/webapp</directory> - <includes> - <include>**/*.properties</include> - </includes> - </resource> - </webResources> - </configuration> - </plugin> - - </plugins> - - </build> - -</project> diff --git a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/faces-config.xml b/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/faces-config.xml deleted file mode 100644 index f584c01..0000000 --- a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/faces-config.xml +++ /dev/null @@ -1,28 +0,0 @@ -<?xml version="1.0"?> - -<faces-config version="1.2" xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_1_2.xsd%22%3E - - <!-- If your perspective application utilizes JSF managed beans then copy - this file to your application and add declarations as needed. - - <managed-bean> - <managed-bean-name>MyBeanName</managed-bean-name> - <managed-bean-class>my.package.MyBeanName</managed-bean-class> - <managed-bean-scope>session</managed-bean-scope> - </managed-bean> - - --> - - <!-- If youe perspective application utilizes JSF navigation rules then copy - this file to your application and add rules as needed. - - <navigation-rule> - <from-tree-id></from-tree-id> - <navigation-case></navigation-case> - </navigation-rule> - - --> - -</faces-config> diff --git a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/includes/pageControls.xhtml b/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/includes/pageControls.xhtml deleted file mode 100644 index 2faad02..0000000 --- a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/includes/pageControls.xhtml +++ /dev/null @@ -1,103 +0,0 @@ -<?xml version="1.0"?> - -<ui:composition - xmlns="http://www.w3.org/1999/xhtml" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich" - xmlns:rhq="http://rhq-project.org/rhq" - xmlns:onc="http://jboss.org/on/component%22%3E - - ui:remove - Usage: The following parameters must be set in the calling page: - - pagedDataUIBean - an instance of AbstractPagedDataUIBean, which provides access to a data model, a page - control, and page control settings (valid page sizes, etc.) - dataTableName - name of the data table to be controlled - </ui:remove> - - <h:panelGroup layout="block" style="float: right; margin-right: 30px"> - <ui:param name="dataScrollerName" value="#{dataTableName}Scroller"/> - <ui:param name="dataModel" value="#{pagedDataUIBean.dataModel}"/> - <ui:param name="pageControl" value="#{pagedDataUIBean.pageControl}"/> - - <table> - <tr> - <td nowrap="nowrap"> - - <h:outputText value="Total: #{dataModel.rowCount}" - style="margin-right: 2em; font-weight: bold; "/> - - <h:panelGroup layout="block" rendered="#{dataModel.rowCount gt pagedDataUIBean.minimumPageSize - and pageControl.pageSize gt 0}"> - <h:outputText value="Items Per Page: #{pageControl.pageSize}" - style="font-weight: bold; " - rendered="#{pagedDataUIBean.pageSizeCount le 1}"/> - <h:panelGroup layout="block" rendered="#{pagedDataUIBean.pageSizeCount gt 1}"> - <h:outputText value="Items Per Page:" - style="margin-right: 1em; font-weight: bold; "/> - <h:selectOneListbox id="currentPageSize" - size="1" - value="#{pageControl.pageSize}"> - <a4j:support event="onchange" - status="commonStatus" - reRender="#{dataTableName}, #{dataScrollerName}"/> - <f:selectItems value="#{pagedDataUIBean.pageSizeSelectItems}"/> - </h:selectOneListbox> - </h:panelGroup> - </h:panelGroup> - - </td> - - <td nowrap="nowrap"> - - <rich:datascroller id="#{dataScrollerName}" - for="#{dataTableName}" - status="commonStatus" - rendered="#{pageControl.pageSize gt 0}" - selectedStyle="font-weight: bold;" - inactiveStyle="font-weight: normal;" - stepControls="show" - fastControls="hide" - boundaryControls="hide" - maxPages="#{pagedDataUIBean.dataScrollerMaxPages}" - page="#{pagedDataUIBean.dataScrollerPage}"> - <f:facet name="next"> - <h:panelGroup> - <h:graphicImage value="http://127.0.0.1:7080/images/tbb_pageright.gif" - style="padding: 0px 5px 0px 7px;"/> - </h:panelGroup> - </f:facet> - <f:facet name="next_disabled"> - <h:panelGroup> - <h:graphicImage value="http://127.0.0.1:7080/images/tbb_pageright_gray.gif" - style="padding: 0px 5px 0px 7px;"/> - </h:panelGroup> - </f:facet> - <f:facet name="previous"> - <h:panelGroup> - <h:graphicImage value="http://127.0.0.1:7080/images/tbb_pageleft.gif" - style="padding: 0px 5px 0px 7px;"/> - </h:panelGroup> - </f:facet> - <f:facet name="previous_disabled"> - <h:panelGroup> - <h:graphicImage value="http://127.0.0.1:7080/images/tbb_pageleft_gray.gif" - style="padding: 0px 5px 0px 7px;"/> - </h:panelGroup> - </f:facet> - </rich:datascroller> - - </td> - </tr> - </table> - - </h:panelGroup> - - <div style="clear: both;"/> - -</ui:composition> diff --git a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/jboss-web.xml b/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/jboss-web.xml deleted file mode 100644 index d4b66f4..0000000 --- a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/jboss-web.xml +++ /dev/null @@ -1,20 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE jboss-web PUBLIC - "-//JBoss//DTD Web Application 4.2//EN" - "http://www.jboss.org/j2ee/dtd/jboss-web_4_2.dtd"> - -<!-- This is just a sample as needed by the Sample Perspective. Copy this file to your - application and modify the loader as needed. - --> - -<jboss-web> - - <class-loading> - <loader-repository> - org.rhq:loader=sample-perspective - <loader-repository-config>java2ParentDelegation=false</loader-repository-config> - </loader-repository> - </class-loading> - -</jboss-web> diff --git a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/templates/mainTemplate.xhtml b/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/templates/mainTemplate.xhtml deleted file mode 100644 index 21ec05f..0000000 --- a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/templates/mainTemplate.xhtml +++ /dev/null @@ -1,70 +0,0 @@ -<?xml version="1.0"?> - -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" - "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - - -<html xmlns="http://www.w3.org/1999/xhtml" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich" - xmlns:rhq="http://rhq-project.org/rhq" - xmlns:onc="http://jboss.org/on/component%22%3E - -ui:remove - <!-- Set the content type to "text/html" (overriding the default of "application/xhtml+xml") to force -Firefox and other Gecko-based browsers to render the page in "Almost Standards" (i.e. transitional) mode. --> -</ui:remove> -<f:view contentType="text/html; charset=UTF-8"> - -<head> - <title>${msg["product.shortName"]} - #{(!empty pageTitle) ? pageTitle : defaultPageTitle}</title> - - <ui:insert name="metaHeaders"/> - - <link rel="stylesheet" type="text/css" media="screen" href="#{PerspectiveClientUIBean.coreGuiBaseUrl}/css/win.css"/> - <link rel="stylesheet" type="text/css" media="screen" href="#{PerspectiveClientUIBean.coreGuiBaseUrl}/css/form-style.css"/> - <link rel="stylesheet" type="text/css" media="screen" href="#{PerspectiveClientUIBean.coreGuiBaseUrl}/css/menu.css"/> - - <!-- Trims up the headers of RF toggle panel headers --> - <style type="text/css"> - .BlockTitle { - padding-top: 3px; - padding-bottom: 3px; - } - - HTML, BODY { - overflow: hidden; - } - </style> - - <link rel="stylesheet" type="text/css" media="screen" href="#{PerspectiveClientUIBean.coreGuiBaseUrl}/css/tabular.css"/> - <link rel="stylesheet" type="text/css" media="screen" href="#{PerspectiveClientUIBean.coreGuiBaseUrl}/css/layout.css"/> - - <script type="text/javascript"> - var imagePath = "/images/"; - </script> - -</head> - -<body bgcolor="#FFFFFF" style="height: 100%;"> - -<h:panelGroup layout="block" style="font-weight: bold; margin-left: 15px; margin-bottom: 15px;"> - <ui:insert name="breadcrumbs"/> -</h:panelGroup> - -<rich:messages globalOnly="true" - infoClass="InfoBlock" - warnClass="WarnBlock" - errorClass="ErrorBlock" - fatalClass="FatalBlock" /> - -<ui:insert name="body"/> - -</body> -</f:view> -</html> diff --git a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/web.xml deleted file mode 100644 index 4b9e940..0000000 --- a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/web.xml +++ /dev/null @@ -1,72 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<web-app xmlns="http://java.sun.com/xml/ns/javaee" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" - version="2.5"> - - <display-name>RHQ Perspective Webapp</display-name> - - <!-- flags for debugging during development --> - <context-param> - <param-name>com.sun.faces.validateXml</param-name> - <param-value>false</param-value> - </context-param> - <context-param> - <param-name>com.sun.faces.verifyObjects</param-name> - <param-value>false</param-value> - </context-param> - - <!--=== JSF spec ===--> - - <servlet> - <servlet-name>Faces Servlet</servlet-name> - <servlet-class>javax.faces.webapp.FacesServlet</servlet-class> - <load-on-startup>1</load-on-startup> - </servlet> - <!-- serve Facelets pages (*.xhtml) via the JSF servlet --> - - <servlet-mapping> - <servlet-name>Faces Servlet</servlet-name> - <url-pattern>*.xhtml</url-pattern> - </servlet-mapping> - - <!-- the suffix for files containing JSF content (default is ".jsp") --> - <context-param> - <param-name>javax.faces.DEFAULT_SUFFIX</param-name> - <param-value>.xhtml</param-value> - </context-param> - - <!-- see http://www.jroller.com/page/mert?entry=state_saving_method_client_side for an explanation of the below param --> - <context-param> - <param-name>javax.faces.STATE_SAVING_METHOD</param-name> - <param-value>server</param-value> - </context-param> - - <!--=== Facelets ===--> - - <!-- enable special debug output for development --> - <context-param> - <param-name>facelets.DEVELOPMENT</param-name> - <param-value>true</param-value> - </context-param> - - <!--=== RichFaces ===--> - - <context-param> - <param-name>org.ajax4jsf.VIEW_HANDLERS</param-name> - <param-value>com.sun.facelets.FaceletViewHandler</param-value> - </context-param> - - <!-- Temporarily uncomment the below context-param to disable compression of JavaScript files associated with - RichFaces components in order to debug those script files. --> - <context-param> - <param-name>org.ajax4jsf.COMPRESS_SCRIPT</param-name> - <param-value>false</param-value> - </context-param> - - <welcome-file-list> - <welcome-file>index.xhtml</welcome-file> - </welcome-file-list> - -</web-app> diff --git a/modules/enterprise/gui/base-perspective-war/src/main/webapp/index.xhtml b/modules/enterprise/gui/base-perspective-war/src/main/webapp/index.xhtml deleted file mode 100644 index a461356..0000000 --- a/modules/enterprise/gui/base-perspective-war/src/main/webapp/index.xhtml +++ /dev/null @@ -1,36 +0,0 @@ -<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> - -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:s="http://jboss.com/products/seam/taglib" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich%22%3E - - <head> - <title> - Perspective Web Application - </title> - </head> - - <body style="background-color: #FF66CC"> - - ui:remove - <!-- Set the content type to "text/html" to ensure "application/xhtml+xml", which would put Firefox and - other Gecko-based browsers into XML mode (which requires pages to be well-formed XML), is not used. - We also specify the charset/encoding here, since we cannot specify it via the xml prolog, since - including an xml prolog causes IE6 to go into the undesirable "quirks mode". - (see https://jira.jboss.org/jira/browse/EMBJOPR-19) --> - </ui:remove> - - <f:view contentType="text/html; charset=UTF-8"> - - <h1>YOUR CONTENT GOES HERE.</h1> - - </f:view> - - </body> - -</html> - diff --git a/modules/enterprise/gui/pom.xml b/modules/enterprise/gui/pom.xml index 00a4222..c4432ac 100644 --- a/modules/enterprise/gui/pom.xml +++ b/modules/enterprise/gui/pom.xml @@ -28,9 +28,7 @@ </activation> <modules> <module>portal-war</module> - <module>installer</module> - <module>base-perspective-jar</module> - <module>base-perspective-war</module> + <module>installer-war</module> <module>content_http-war</module> <module>coregui</module> <module>rest-war</module> diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml index 4a05dd2..fed8a33 100644 --- a/modules/enterprise/server/ear/pom.xml +++ b/modules/enterprise/server/ear/pom.xml @@ -424,13 +424,6 @@ <version>${project.version}</version> </artifactItem>
- <!-- TODO: remove this once all JSF pages are gone --> - <artifactItem> - <groupId>${project.groupId}</groupId> - <artifactId>rhq-core-perspective</artifactId> - <version>${project.version}</version> - </artifactItem> - <artifactItem> <groupId>${project.groupId}.server</groupId> <artifactId>alert-email</artifactId> diff --git a/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml b/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml deleted file mode 100644 index 3014ee3..0000000 --- a/modules/enterprise/server/plugins/perspectives/core/perspective/pom.xml +++ /dev/null @@ -1,100 +0,0 @@ -<?xml version="1.0"?> - -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> - <relativePath>../../../../../../../pom.xml</relativePath> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-core-perspective</artifactId> - <packaging>jar</packaging> - - <name>RHQ Core Perspective</name> - <description>A Perspective defining Core UI Elements</description> - - <profiles> - - <profile> - <id>dev</id> - - <properties> - <rhq.rootDir>../../../../../../..</rhq.rootDir> - <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir> - <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir> - </properties> - - <build> - <plugins> - - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - - <execution> - <id>deploy</id> - <phase>compile</phase> - <configuration> - <target> - <mkdir dir="${rhq.deploymentDir}" /> - <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> - <echo>*** Updating ${deployment.file}...</echo> - <jar destfile="${deployment.file}" basedir="${project.build.outputDirectory}" /> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - <execution> - <id>undeploy</id> - <phase>clean</phase> - <configuration> - <target> - <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> - <echo>*** Deleting ${deployment.file}...</echo> - <delete file="${deployment.file}" /> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - <execution> - <id>deploy-jar-meta-inf</id> - <phase>package</phase> - <configuration> - <target> - <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> - <echo>*** Updating META-INF dir in ${deployment.file}...</echo> - <unjar src="${project.build.directory}/${project.build.finalName}.jar" dest="${project.build.outputDirectory}"> - <patternset> - <include name="META-INF/**" /> - </patternset> - </unjar> - <jar destfile="${deployment.file}" manifest="${project.build.outputDirectory}/META-INF/MANIFEST.MF" update="true"> - </jar> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - </executions> - </plugin> - - </plugins> - </build> - </profile> - - </profiles> - -</project> diff --git a/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml b/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml deleted file mode 100644 index 928717f..0000000 --- a/modules/enterprise/server/plugins/perspectives/core/perspective/src/main/resources/META-INF/rhq-serverplugin.xml +++ /dev/null @@ -1,897 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> - -<perspective-plugin - version="1.0" - apiVersion="2.0" - description="The Core Perspective defining Core UI Elements" - displayName="Perspective:Core" - name="CorePerspective" - package="org.rhq.perspective.core" - xmlns="urn:xmlns:rhq-serverplugin.perspective" - xmlns:serverplugin="urn:xmlns:rhq-serverplugin" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%22%3E - - <!-- Core Menu --> - <menu-item - name="logo" - displayName="" - url="/" - iconUrl="/images/JBossLogo_small.png"> - <position - placement="firstChild" /> - </menu-item> - <menu-item - name="overview" - displayName="Overview"> - <position - name="logo" - placement="after" /> - </menu-item> - <menu-item - name="resources" - displayName="Resources"> - <position - name="overview" - placement="after" /> - </menu-item> - <menu-item - name="groups" - displayName="Groups"> - <position - name="resources" - placement="after" /> - </menu-item> - <menu-item - name="administration" - displayName="Administration"> - <position - name="groups" - placement="after" /> - </menu-item> - <menu-item - name="debug" - displayName="Debug"> - <position - name="administration" - placement="after" /> - <activators> - <debug-mode /> - <superuser /> - </activators> - </menu-item> - <menu-item - name="help" - displayName="Help"> - <position - name="debug" - placement="after" /> - </menu-item> - - <!-- Core Menu: Overview --> - <menu-item - name="overview.subsystemViews" - displayName="Subsystem Views"> - <position - name="overview" - placement="firstChild" /> - </menu-item> - <menu-item - name="overview.autoDiscoveryQueue" - displayName="Auto Discovery Queue" - url="/rhq/discovery/queue.xhtml"> - <position - name="overview.subsystemViews" - placement="after" /> - </menu-item> - <menu-item - name="overview.dashboard" - displayName="Dashboard" - url="/Dashboard.do"> - <position - name="overview.autoDiscoveryQueue" - placement="after" /> - </menu-item> - - <menu-item - name="overview.gwtGui" - displayName="GWT GUI" - url="/coregui/CoreGUI.html#Inventory"> - <position - name="overview.dashboard" - placement="after" /> - </menu-item> - <menu-item - name="overview.gwtGuiDevMode" - displayName="GWT GUI - Dev Mode" - url="/coregui/CoreGUI.html?gwt.codesvr=127.0.0.1:9997#Inventory"> - <position - name="overview.gwtGui" - placement="after" /> - </menu-item> - - <!-- Core Menu: Resources --> - <menu-item - name="resources.all" - displayName="All Resources" - url="/rhq/inventory/browseResources.xhtml?subtab=all"> - <position - name="resources" - placement="firstChild" /> - </menu-item> - <menu-item - name="resources.platforms" - displayName="Platforms" - iconUrl="/images/icons/Platform_up_16.png" - url="/rhq/inventory/browseResources.xhtml?subtab=platform"> - <position - name="resources.all" - placement="after" /> - </menu-item> - <menu-item - name="resources.servers" - displayName="Servers" - iconUrl="/images/icons/Server_up_16.png" - url="/rhq/inventory/browseResources.xhtml?subtab=server"> - <position - name="resources.platforms" - placement="after" /> - </menu-item> - <menu-item - name="resources.services" - displayName="Services" - iconUrl="/images/icons/Service_up_16.png" - url="/rhq/inventory/browseResources.xhtml?subtab=service"> - <position - name="resources.servers" - placement="after" /> - </menu-item> - <menu-item - name="resources.favoriteResources" - displayName="Favorite Resources" - feature="resourceFavorites" - iconUrl="/images/icons/Favorite_16.png"> - <position - name="resources.services" - placement="after" /> - </menu-item> - <menu-item - name="resources.recentlyViewedResources" - displayName="Recently Viewed Resources" - feature="resourceRecentlyViewed" - iconUrl="/images/icons/History_16.png"> - <position - name="resources.favoriteResources" - placement="after" /> - </menu-item> - <menu-item - name="resources.search" - displayName="Search:" - feature="resourceSearch" - iconUrl="/images/icons/Search_16.png" - addBreak="true"> - <position - name="resources.recentlyViewedResources" - placement="after" /> - </menu-item> - - <!-- Core Menu: Groups --> - <menu-item - name="groups.all" - displayName="All Groups" - url="/rhq/inventory/browseGroups.xhtml?subtab=all"> - <position - name="groups" - placement="firstChild" /> - </menu-item> - <menu-item - name="groups.compatibleGroups" - displayName="Compatible Groups" - iconUrl="/images/icons/Cluster_up_16.png" - url="/rhq/inventory/browseGroups.xhtml?subtab=compatible"> - <position - name="groups.all" - placement="after" /> - </menu-item> - <menu-item - name="groups.mixedGroups" - displayName="Mixed Groups" - iconUrl="/images/icons/Group_up_16.png" - url="/rhq/inventory/browseGroups.xhtml?subtab=mixed"> - <position - name="groups.compatibleGroups" - placement="after" /> - </menu-item> - <menu-item - name="groups.groupDefinitions" - displayName="Group Definitions" - iconUrl="/images/GroupDefinition_16.png" - url="/rhq/definition/group/list.xhtml"> - <position - name="groups.mixedGroups" - placement="after" /> - </menu-item> - <menu-item - name="groups.newGroup" - displayName="New Group" - url="/resource/group/Inventory.do?mode=new" - addBreak="true"> - <position - name="groups.groupDefinitions" - placement="after" /> - <activators> - <global-permission - name="MANAGE_INVENTORY" /> - </activators> - </menu-item> - <menu-item - name="groups.newGroupDefinition" - displayName="New Group Definition" - url="/rhq/definition/group/new.xhtml"> - <position - name="groups.newGroup" - placement="after" /> - <activators> - <global-permission - name="MANAGE_INVENTORY" /> - </activators> - </menu-item> - <menu-item - name="groups.favoriteGroups" - displayName="Favorite Groups" - feature="groupFavorites" - iconUrl="/images/icons/Favorite_16.png" - addBreak="true"> - <position - name="groups.newGroupDefinition" - placement="after" /> - </menu-item> - <menu-item - name="groups.recentlyViewedGroups" - displayName="Recently Viewed Groups" - feature="groupRecentlyViewed" - iconUrl="/images/icons/History_16.png"> - <position - name="groups.favoriteGroups" - placement="after" /> - </menu-item> - <menu-item - name="groups.search" - displayName="Search:" - feature="groupSearch" - iconUrl="/images/icons/Search_16.png" - addBreak="true"> - <position - name="groups.recentlyViewedGroups" - placement="after" /> - </menu-item> - - <!-- Core Menu: Administration --> - <menu-item - name="administration.security" - displayName="Security"> - <position - name="administration" - placement="firstChild" /> - </menu-item> - <menu-item - name="administration.systemConfiguration" - displayName="System Configuration"> - <position - name="administration.security" - placement="after" /> - </menu-item> - <menu-item - name="administration.content" - displayName="Content"> - <position - name="administration.systemConfiguration" - placement="after" /> - <activators> - <global-permission - name="MANAGE_INVENTORY" /> - </activators> - </menu-item> - <menu-item - name="administration.highAvailability" - displayName="High Availability"> - <position - name="administration.content" - placement="after" /> - <activators> - <global-permission - name="MANAGE_INVENTORY" /> - </activators> - </menu-item> - <menu-item - name="administration.reports" - displayName="Reports"> - <position - name="administration.highAvailability" - placement="after" /> - </menu-item> - <menu-item - name="administration.downloads" - displayName="Downloads" - iconUrl="/images/icons/Save_16.png" - url="/rhq/admin/downloads.xhtml"> - <position - name="administration.reports" - placement="after" /> - </menu-item> - - <!-- Core Menu: Debug --> - <menu-item - name="debug.sqlInterface" - displayName="SQL Interface" - url="/admin/test/sql.jsp"> - <position - name="debug" - placement="firstChild" /> - </menu-item> - <menu-item - name="debug.jpqlHqlInterface" - displayName="JPQL/HQL Interface" - url="/admin/test/hibernate.jsp"> - <position - name="debug.sqlInterface" - placement="after" /> - </menu-item> - <menu-item - name="debug.hibernateEntityBrowser" - displayName="Hibernate Entity Browser" - url="/admin/test/browser.jsp"> - <position - name="debug.jpqlHqlInterface" - placement="after" /> - </menu-item> - <menu-item - name="debug.administrativeConsole" - displayName="Administrative Console" - url="/admin/test/control.jsp"> - <position - name="debug.hibernateEntityBrowser" - placement="after" /> - </menu-item> - <menu-item - name="debug.testEmailConfiguration" - displayName="Test Email Configuration" - url="/admin/test/email.jsp"> - <position - name="debug.administrativeConsole" - placement="after" /> - </menu-item> - <menu-item - name="debug.testAgentCommunications" - displayName="Test Agent Configurations" - url="/admin/test/agent.jsp"> - <position - name="debug.testEmailConfiguration" - placement="after" /> - </menu-item> - - <!-- Core Menu: Help --> - <menu-item - name="help.onlineDocumentation" - displayName="Online Documentation" - newWindow="true" - url="http://docs.redhat.com/docs/en-US/JBoss_Operations_Network/%22%3E - <position - name="help" - placement="firstChild" /> - </menu-item> - <menu-item - name="help.openASupportCase" - displayName="Open a Support Case" - newWindow="true" - url="https://support.redhat.com/jbossnetwork/restricted/addCase.html%22%3E - <position - name="help.onlineDocumentation" - placement="after" /> - </menu-item> - <menu-item - name="help.about" - displayName="About" - feature="aboutBox" - iconUrl="/images/icons/availability_grey_16.png" - addBreak="true"> - <position - name="help.openASupportCase" - placement="after" /> - </menu-item> - - <!-- Core Menu: Overview.Subsystem Views --> - <menu-item - name="overview.subsystemViews.configurationChanges" - displayName="Configuration Changes" - iconUrl="/images/icons/Configure_16.png" - url="/rhq/subsystem/configurationUpdate.xhtml"> - <position - name="overview.subsystemViews" - placement="firstChild" /> - </menu-item> - <menu-item - name="overview.subsystemViews.suspectMetrics" - displayName="Suspect Metrics" - iconUrl="/images/icons/Monitor_failed_16.png" - url="/rhq/subsystem/oobHistory.xhtml"> - <position - name="overview.subsystemViews.configurationChanges" - placement="after" /> - </menu-item> - <menu-item - name="overview.subsystemViews.operations" - displayName="Operations" - iconUrl="/images/icons/Operation_16.png" - url="/rhq/subsystem/operationHistory.xhtml"> - <position - name="overview.subsystemViews.suspectMetrics" - placement="after" /> - </menu-item> - <menu-item - name="overview.subsystemViews.alerts" - displayName="Alerts" - iconUrl="/images/icons/Flag_blue_16.png" - url="/rhq/subsystem/alertHistory.xhtml"> - <position - name="overview.subsystemViews.operations" - placement="after" /> - </menu-item> - <menu-item - name="overview.subsystemViews.alertDefinitions" - displayName="Alert Definitions" - iconUrl="/images/icons/Flag_blue_16.png" - url="/rhq/subsystem/alertDefinitions.xhtml"> - <position - name="overview.subsystemViews.alerts" - placement="after" /> - </menu-item> - - <!-- Core Menu: Administration.Security --> - <menu-item - name="administration.security.users" - displayName="Users" - url="/admin/user/UserAdmin.do?mode=list"> - <position - name="administration.security" - placement="firstChild" /> - </menu-item> - <menu-item - name="administration.security.roles" - displayName="Roles" - url="/admin/role/RoleAdmin.do?mode=list"> - <position - name="administration.security.users" - placement="after" /> - </menu-item> - - <!-- Core Menu: administration.systemConfiguration --> - <menu-item - name="administration.systemConfiguration.settings" - displayName="Settings" - url="/admin/config/Config.do?mode=edit"> - <position - name="administration.systemConfiguration" - placement="firstChild" /> - <activators> - <global-permission - name="MANAGE_SETTINGS" /> - </activators> - </menu-item> - <menu-item - name="administration.systemConfiguration.plugins" - displayName="Plugins" - url="/rhq/admin/plugin/plugin-list.xhtml"> - <position - name="administration.systemConfiguration.settings" - placement="after" /> - <activators> - <global-permission - name="MANAGE_SETTINGS" /> - </activators> - </menu-item> - <menu-item - name="administration.systemConfiguration.templates" - displayName="Templates" - url="/admin/config/EditDefaults.do?mode=monitor&viewMode=all"> - <position - name="administration.systemConfiguration.plugins" - placement="after" /> - <activators> - <global-permission - name="MANAGE_INVENTORY" /> - </activators> - </menu-item> - - <!-- - <menu-item - name="administration.systemConfiguration.notifcationTemplates" - displayName="Alert Notification Templates" - url="/rhq/admin/alert/template/notification/list.xhtml"> - <position name="administration.systemConfiguration.templates" - placement="after"/> - <activators> - <global-permission - name="MANAGE_SETTINGS"/> - </activators> - </menu-item> - --> - - <!-- Core Menu: administration.content --> - <menu-item - name="administration.content.contentSources" - displayName="Content Sources" - url="/rhq/content/listContentProviders.xhtml"> - <position - name="administration.content" - placement="firstChild" /> - </menu-item> - <menu-item - name="administration.content.repositories" - displayName="Repositories" - url="/rhq/content/listRepos.xhtml"> - <position - name="administration.content.contentSources" - placement="after" /> - </menu-item> - - <!-- Core Menu: administration.highAvailability --> - <menu-item - name="administration.highAvailability.servers" - displayName="Servers" - url="/rhq/ha/listServers.xhtml"> - <position - name="administration.highAvailability" - placement="firstChild" /> - </menu-item> - <menu-item - name="administration.highAvailability.agents" - displayName="Agents" - url="/rhq/ha/listAgents.xhtml"> - <position - name="administration.highAvailability.servers" - placement="after" /> - </menu-item> - <menu-item - name="administration.highAvailability.affinityGroups" - displayName="Affinity Groups" - url="/rhq/ha/listAffinityGroups.xhtml"> - <position - name="administration.highAvailability.agents" - placement="after" /> - </menu-item> - <menu-item - name="administration.highAvailability.paritionEvents" - displayName="Partition Events" - url="/rhq/ha/listPartitionEvents.xhtml"> - <position - name="administration.highAvailability.affinityGroups" - placement="after" /> - </menu-item> - - <!-- Core Menu: administration.reports --> - <menu-item - name="administration.reports.resourceVersionInventoryReport" - displayName="Servers" - url="/rhq/admin/report/resourceInstallReport.xhtml"> - <position - name="administration.reports" - placement="firstChild" /> - </menu-item> - - - <!-- Top-level Tabs --> - <tab - name="Summary" - displayName="Summary" - iconUrl="/images/icons/Service_up_16.png"> - <position - placement="firstChild" /> - </tab> - - <tab - name="Monitor" - displayName="Monitor" - iconUrl="/images/icons/Monitor_grey_16.png"> - <position - name="Summary" - placement="after" /> - <activators> - <license-feature - name="monitoring" /> - </activators> - </tab> - - <tab - name="Inventory" - displayName="Inventory" - iconUrl="/images/icons/Inventory_grey_16.png"> - <position - name="Monitor" - placement="after" /> - </tab> - - <tab - name="Alert" - displayName="Alert" - iconUrl="/images/icons/Alert_grey_16.png"> - <position - name="Inventory" - placement="after" /> - <activators> - <license-feature - name="monitoring" /> - </activators> - </tab> - - <tab - name="Configuration" - displayName="Configuration" - iconUrl="/images/icons/Configure_grey_16.png"> - <position - name="Alert" - placement="after" /> - <activators> - <facet - name="configuration" /> - </activators> - </tab> - - <tab - name="Operations" - displayName="Operations" - iconUrl="/images/icons/Operation_grey_16.png"> - <position - name="Configuration" - placement="after" /> - <activators> - <facet - name="operation" /> - </activators> - </tab> - - <tab - name="Events" - displayName="Events" - iconUrl="/images/icons/Events_grey_16.png"> - <position - name="Operations" - placement="after" /> - <activators> - <facet - name="event" /> - </activators> - </tab> - - <tab - name="Content" - displayName="Content" - iconUrl="/images/icons/Content_grey_16.png"> - <position - name="Events" - placement="after" /> - <activators> - <facet - name="content" /> - </activators> - </tab> - - <!-- Summary Subtabs --> - <tab - name="Summary.Overview" - displayName="Overview" - url="/rhq/resource/summary/overview.xhtml"> - <position - name="Summary" - placement="firstChild" /> - </tab> - - <tab - name="Summary.Timeline" - displayName="Timeline" - url="/rhq/resource/summary/timeline.xhtml"> - <position - name="Summary.Overview" - placement="after" /> - </tab> - - <!-- Monitor Subtabs --> - <tab - name="Monitor.Graphs" - displayName="Graphs" - url="/rhq/resource/monitor/graphs.xhtml"> - <position - name="Monitor" - placement="firstChild" /> - </tab> - - <tab - name="Monitor.Tables" - displayName="Tables" - url="/rhq/resource/monitor/tables.xhtml"> - <position - name="Monitor.Graphs" - placement="after" /> - </tab> - - <tab - name="Monitor.Traits" - displayName="Traits" - url="/rhq/resource/monitor/traits.xhtml"> - <position - name="Monitor.Tables" - placement="after" /> - </tab> - - <tab - name="Monitor.Availability" - displayName="Availability" - url="/rhq/resource/monitor/availabilityHistory.xhtml"> - <position - name="Monitor.Traits" - placement="after" /> - </tab> - - <tab - name="Monitor.Schedules" - displayName="Schedules" - url="/rhq/resource/monitor/schedules.xhtml"> - <position - name="Monitor.Availability" - placement="after" /> - </tab> - - <tab - name="Monitor.Response" - displayName="Response" - url="/rhq/resource/monitor/response.xhtml"> - <position - name="Monitor.Schedules" - placement="after" /> - </tab> - - <!-- Inventory Subtabs --> - <tab - name="Inventory.Overview" - displayName="Overview" - url="/rhq/resource/inventory/view.xhtml"> - <position - name="Inventory" - placement="firstChild" /> - </tab> - - <tab - name="Inventory.Connection" - displayName="Connection" - url="/rhq/resource/inventory/view-connection.xhtml"> - <position - name="Inventory.Overview" - placement="after" /> - <activators> - <facet - name="plugin_configuration" /> - </activators> - </tab> - - <tab - name="Inventory.Agent" - displayName="Agent" - url="/rhq/resource/inventory/view-agent.xhtml"> - <position - name="Inventory.Connection" - placement="after" /> - </tab> - - <!-- Alert Subtabs --> - <tab - name="Alert.Definitions" - displayName="Definitions" - url="/rhq/resource/alert/listAlertDefinitions.xhtml"> - <position - name="Alert" - placement="firstChild" /> - </tab> - - <tab - name="Alert.History" - displayName="History" - url="/rhq/resource/alert/listAlertHistory.xhtml"> - <position - name="Alert.Definitions" - placement="after" /> - </tab> - - <!-- Configuration Subtabs --> - <tab - name="Configuration.Current" - displayName="Current" - url="/rhq/resource/configuration/view.xhtml"> - <position - name="Configuration" - placement="firstChild" /> - </tab> - - <tab - name="Configuration.History" - displayName="History" - url="/rhq/resource/configuration/history.xhtml"> - <position - name="Configuration.Current" - placement="after" /> - </tab> - - <!-- Operations Subtabs --> - <tab - name="Operations.New" - displayName="New" - url="/rhq/resource/operation/resourceOperationScheduleNew.xhtml"> - <position - name="Operations" - placement="firstChild" /> - </tab> - - <tab - name="Operations.Schedules" - displayName="Schedules" - url="/rhq/resource/operation/resourceOperationSchedules.xhtml"> - <position - name="Operations.New" - placement="after" /> - </tab> - - <tab - name="Operations.History" - displayName="History" - url="/rhq/resource/operation/resourceOperationHistory.xhtml"> - <position - name="Operations.Schedules" - placement="after" /> - </tab> - - <!-- Events Subtabs --> - <tab - name="Events.History" - displayName="History" - url="/rhq/resource/events/history.xhtml"> - <position - name="Events" - placement="firstChild" /> - </tab> - - <!-- Content Subtabs --> - <tab - name="Content.Deployed" - displayName="Deployed" - url="/rhq/resource/content/view.xhtml"> - <position - name="Content" - placement="firstChild" /> - </tab> - - <tab - name="Content.New" - displayName="New" - url="/rhq/resource/content/deploy.xhtml"> - <position - name="Content.Deployed" - placement="after" /> - </tab> - - <tab - name="Content.Subscriptions" - displayName="Subscriptions" - url="/rhq/resource/content/subscription.xhtml"> - <position - name="Content.New" - placement="after" /> - </tab> - - <tab - name="Content.History" - displayName="History" - url="/rhq/resource/content/history.xhtml"> - <position - name="Content.Subscriptions" - placement="after" /> - </tab> - -</perspective-plugin> diff --git a/modules/enterprise/server/plugins/perspectives/core/pom.xml b/modules/enterprise/server/plugins/perspectives/core/pom.xml deleted file mode 100644 index ceb56d7..0000000 --- a/modules/enterprise/server/plugins/perspectives/core/pom.xml +++ /dev/null @@ -1,32 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.5.0-SNAPSHOT</version> - <relativePath>../../../../../../pom.xml</relativePath> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-core-perspective-parent</artifactId> - <packaging>pom</packaging> - - <name>RHQ Core Perspective Parent</name> - <description>parent POM for modules comprising the RHQ Core Perspective</description> - - <profiles> - <profile> - <id>default</id> - <activation> - <activeByDefault>true</activeByDefault> - </activation> - <modules> - <module>perspective</module> - </modules> - </profile> - - </profiles> - -</project> diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/pom.xml b/modules/enterprise/server/plugins/perspectives/policy/app/pom.xml deleted file mode 100644 index 9846566..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/app/pom.xml +++ /dev/null @@ -1,90 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.3.0-SNAPSHOT</version> - <relativePath>../../../../../../../pom.xml</relativePath> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-policy-perspective-war</artifactId> - <packaging>war</packaging> - - <name>RHQ Policy Perspective War</name> - - <dependencyManagement> - - <dependencies> - - <!-- This will pull in the managed dependencies from the base-perspective-war pom. --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-war</artifactId> - <version>${project.version}</version> - <type>pom</type> - <scope>import</scope> - </dependency> - - </dependencies> - - </dependencyManagement> - - <dependencies> - - <!-- This is needed by the war plugin for the overlay functionality. --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-war</artifactId> - <version>${project.version}</version> - <type>war</type> - </dependency> - - <!-- This is used to pull the base war's classes and dependencies into our - compile classpath, since they are not pulled in by the above war dependency - (see http://jira.codehaus.org/browse/MNG-1991). --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-jar</artifactId> - <version>${project.version}</version> - </dependency> - - <!-- Deps with provided scope are not transitive, so we need to specify - jsf-api.jar explicitly. --> - <dependency> - <groupId>javax.faces</groupId> - <artifactId>jsf-api</artifactId> - <scope>provided</scope> - </dependency> - - </dependencies> - - <build> - <finalName>rhq-policy-perspective</finalName> - - <plugins> - - <plugin> - <artifactId>maven-war-plugin</artifactId> - <configuration> - <overlays> - <overlay> - <!-- empty groupId/artifactId detected as the current build. - earlier overlays win over later overlays, so put ourselves first. --> - </overlay> - <overlay> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-base-perspective-war</artifactId> - </overlay> - </overlays> - </configuration> - </plugin> - - </plugins> - - </build> - -</project> - diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundleDetailsUIBean.java b/modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundleDetailsUIBean.java deleted file mode 100644 index 0dd1fb3..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundleDetailsUIBean.java +++ /dev/null @@ -1,157 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.enterprise.server.perspective.policy; - -import org.ajax4jsf.model.KeepAlive; -import org.jboss.seam.ScopeType; -import org.jboss.seam.annotations.Name; -import org.jboss.seam.annotations.Scope; -import org.jboss.seam.annotations.web.RequestParameter; -import org.jboss.seam.international.StatusMessage; -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.bundle.Bundle; -import org.rhq.core.domain.bundle.BundleVersion; -import org.rhq.core.domain.criteria.BundleCriteria; -import org.rhq.core.domain.criteria.BundleVersionCriteria; -import org.rhq.core.domain.util.PageControl; -import org.rhq.core.domain.util.PageList; -import org.rhq.core.gui.table.bean.AbstractPagedDataUIBean; -import org.rhq.core.gui.table.model.PagedListDataModel; -import org.rhq.enterprise.client.RemoteClient; -import org.rhq.enterprise.server.bundle.BundleManagerRemote; -import org.rhq.enterprise.server.perspective.AbstractPerspectivePagedDataUIBean; -import org.rhq.enterprise.server.perspective.PerspectiveClientUIBean; - -import java.util.List; - -/** - * Provides details about a particular provisioning {@link Bundle bundle}, including CRUD operations on - * the {@link org.rhq.core.domain.bundle.BundleVersion version}s defined for that bundle. The backing bean for - * bundleDetails.xhtml. - * - * @author Ian Springer - */ -@Name("BundleDetailsUIBean") -@Scope(ScopeType.EVENT) -@KeepAlive -public class BundleDetailsUIBean extends AbstractPerspectivePagedDataUIBean { - private List<BundleVersion> selectedBundleVersions; - - @RequestParameter - private int bundleId; - - private Bundle bundle; - - public Bundle getBundle() { - if (this.bundle == null) { - this.bundle = loadBundle(); - } - return this.bundle; - } - - @Override - public PagedListDataModel createDataModel() { - return new DataModel(this); - } - - public List<BundleVersion> getSelectedBundleVersions() { - return this.selectedBundleVersions; - } - - public void setSelectedBundleVersions(List<BundleVersion> selectedBundleVersions) { - this.selectedBundleVersions = selectedBundleVersions; - } - - public void deleteSelectedBundles() throws Exception { - RemoteClient remoteClient; - Subject subject; - try { - remoteClient = this.perspectiveClient.getRemoteClient(); - subject = this.perspectiveClient.getSubject(); - } catch (Exception e) { - this.facesMessages.add(StatusMessage.Severity.FATAL, "Failed to connect to RHQ Server - cause: " + e); - return; - } - - // ***NOTE***: The javassist.NotFoundException stack traces that are logged by this call can be ignored. - BundleManagerRemote bundleManager = remoteClient.getBundleManagerRemote(); - - int[] selectedBundleVersionIds = new int[this.selectedBundleVersions.size()]; - for (int i = 0, selectedBundlesSize = this.selectedBundleVersions.size(); i < selectedBundlesSize; i++) { - BundleVersion selectedBundleVersion = this.selectedBundleVersions.get(i); - selectedBundleVersionIds[i] = selectedBundleVersion.getId(); - } - - bundleManager.deleteBundleVersions(subject, selectedBundleVersionIds); - - // Add message to tell the user the uninventory was a success. - String pluralizer = (this.selectedBundleVersions.size() == 1) ? "" : "s"; - this.facesMessages.add("Deleted " + this.selectedBundleVersions.size() + " bundle version" + pluralizer + "."); - - // Reset the data model, so the current page will get refreshed to reflect the Resources we just uninventoried. - // This is essential, since we are CONVERSATION-scoped and will live on beyond this request. - setDataModel(null); - } - - private Bundle loadBundle() { - BundleManagerRemote bundleManager; - Subject subject; - try { - bundleManager = this.perspectiveClient.getRemoteClient().getBundleManagerRemote(); - subject = this.perspectiveClient.getSubject(); - } catch (Exception e) { - throw new RuntimeException(e); - } - BundleCriteria bundleCriteria = new BundleCriteria(); - bundleCriteria.addFilterId(this.bundleId); - PageList<Bundle> bundles = bundleManager.findBundlesByCriteria(subject, bundleCriteria); - if (bundles.isEmpty()) { - throw new IllegalStateException("Bundle with id " + this.bundleId + " not found."); - } - return bundles.get(0); - } - - private class DataModel extends PagedListDataModel<BundleVersion> { - private DataModel(AbstractPagedDataUIBean pagedDataBean) { - super(pagedDataBean); - } - - @Override - public PageList<BundleVersion> fetchPage(PageControl pageControl) { - PerspectiveClientUIBean perspectiveClient = BundleDetailsUIBean.this.perspectiveClient; - BundleManagerRemote bundleManager; - Subject subject; - try { - bundleManager = perspectiveClient.getRemoteClient().getBundleManagerRemote(); - subject = BundleDetailsUIBean.this.perspectiveClient.getSubject(); - } catch (Exception e) { - throw new RuntimeException(e); - } - - BundleVersionCriteria bundleVersionCriteria = new BundleVersionCriteria(); - bundleVersionCriteria.setPageControl(pageControl); - String bundleName = BundleDetailsUIBean.this.getBundle().getName(); - bundleVersionCriteria.addFilterBundleName(bundleName); - // TODO: Implement user-specified filters. - PageList<BundleVersion> bundleVersions = bundleManager.findBundleVersionsByCriteria(subject, - bundleVersionCriteria); - return bundleVersions; - } - } -} \ No newline at end of file diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundleVersionDetailsUIBean.java b/modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundleVersionDetailsUIBean.java deleted file mode 100644 index 33a7779..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundleVersionDetailsUIBean.java +++ /dev/null @@ -1,159 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.enterprise.server.perspective.policy; - -import org.ajax4jsf.model.KeepAlive; -import org.jboss.seam.ScopeType; -import org.jboss.seam.annotations.Name; -import org.jboss.seam.annotations.Scope; -import org.jboss.seam.annotations.web.RequestParameter; -import org.jboss.seam.international.StatusMessage; -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.bundle.Bundle; -import org.rhq.core.domain.bundle.BundleVersion; -import org.rhq.core.domain.criteria.BundleVersionCriteria; -import org.rhq.core.domain.util.PageControl; -import org.rhq.core.domain.util.PageList; -import org.rhq.core.gui.table.bean.AbstractPagedDataUIBean; -import org.rhq.core.gui.table.model.PagedListDataModel; -import org.rhq.enterprise.client.RemoteClient; -import org.rhq.enterprise.server.bundle.BundleManagerRemote; -import org.rhq.enterprise.server.perspective.AbstractPerspectivePagedDataUIBean; -import org.rhq.enterprise.server.perspective.PerspectiveClientUIBean; - -import java.util.List; - -/** - * Provides details about a particular {@link org.rhq.core.domain.bundle.BundleVersion version} of a provisioning - * bundle, including CRUD operations on the {@link org.rhq.core.domain.bundle.BundleDeployment deployment}s defined - * for that bundle version. The backing bean for bundleVersionDetails.xhtml. - * - * @author Ian Springer - */ -@Name("BundleVersionDetailsUIBean") -@Scope(ScopeType.EVENT) -@KeepAlive -public class BundleVersionDetailsUIBean extends AbstractPerspectivePagedDataUIBean { - private List<BundleDeployment> selectedBundleDeployments; - - @RequestParameter - private int bundleVersionId; - - private BundleVersion bundleVersion; - - public BundleVersion getBundleVersion() { - if (this.bundleVersion == null) { - this.bundleVersion = loadBundleVersion(); - } - return this.bundleVersion; - } - - public Bundle getBundle() { - return getBundleVersion().getBundle(); - } - - @Override - public PagedListDataModel createDataModel() { - return new DataModel(this); - } - - public List<BundleDeployment> getselectedBundleDeployments() { - return this.selectedBundleDeployments; - } - - public void setselectedBundleDeployments(List<BundleDeployment> selectedBundleDeployments) { - this.selectedBundleDeployments = selectedBundleDeployments; - } - - public void deleteselectedBundleDeployments() throws Exception { - RemoteClient remoteClient; - Subject subject; - try { - remoteClient = this.perspectiveClient.getRemoteClient(); - subject = this.perspectiveClient.getSubject(); - } catch (Exception e) { - this.facesMessages.add(StatusMessage.Severity.FATAL, "Failed to connect to RHQ Server - cause: " + e); - return; - } - - // ***NOTE***: The javassist.NotFoundException stack traces that are logged by this call can be ignored. - BundleManagerRemote bundleManager = remoteClient.getBundleManagerRemote(); - - int[] selectedBundleDeploymentIds = new int[this.selectedBundleDeployments.size()]; - for (int i = 0, selectedBundlesSize = this.selectedBundleDeployments.size(); i < selectedBundlesSize; i++) { - BundleDeployment selectedBundleDeployment = this.selectedBundleDeployments.get(i); - selectedBundleDeploymentIds[i] = selectedBundleDeployment.getId(); - } - - // Add message to tell the user the uninventory was a success. - String pluralizer = (this.selectedBundleDeployments.size() == 1) ? "" : "s"; - this.facesMessages.add("Deleted " + this.selectedBundleDeployments.size() + " bundle deployment" + pluralizer + "."); - - // Reset the data model, so the current page will get refreshed to reflect the Resources we just uninventoried. - // This is essential, since we are CONVERSATION-scoped and will live on beyond this request. - setDataModel(null); - } - - private BundleVersion loadBundleVersion() { - BundleManagerRemote bundleManager; - Subject subject; - try { - bundleManager = this.perspectiveClient.getRemoteClient().getBundleManagerRemote(); - subject = this.perspectiveClient.getSubject(); - } catch (Exception e) { - throw new RuntimeException(e); - } - BundleVersionCriteria bundleVersionCriteria = new BundleVersionCriteria(); - bundleVersionCriteria.addFilterId(this.bundleVersionId); - PageList<BundleVersion> bundleVersions = bundleManager.findBundleVersionsByCriteria(subject, bundleVersionCriteria); - if (bundleVersions.isEmpty()) { - throw new IllegalStateException("Bundle version with id " + this.bundleVersionId + " not found."); - } - return bundleVersions.get(0); - } - - private class DataModel extends PagedListDataModel<BundleDeployment> { - private DataModel(AbstractPagedDataUIBean pagedDataBean) { - super(pagedDataBean); - } - - @Override - public PageList<BundleDeployment> fetchPage(PageControl pageControl) { - PerspectiveClientUIBean perspectiveClient = BundleVersionDetailsUIBean.this.perspectiveClient; - BundleManagerRemote bundleManager; - Subject subject; - try { - bundleManager = perspectiveClient.getRemoteClient().getBundleManagerRemote(); - subject = BundleVersionDetailsUIBean.this.perspectiveClient.getSubject(); - } catch (Exception e) { - throw new RuntimeException(e); - } - - BundleDeploymentCriteria bundleDeploymentCriteria = new BundleDeploymentCriteria(); - bundleDeploymentCriteria.setPageControl(pageControl); - // TODO - //bundleDeploymentCriteria.addFilterVersionId(BundleVersionDetailsUIBean.this.bundleVersionId); - bundleDeploymentCriteria.fetchBundle(true); - // TODO: Implement user-specified filters. - PageList<BundleDeployment> bundleDeployments = bundleManager.findBundleDeploymentsByCriteria(subject, - bundleDeploymentCriteria); - return bundleDeployments; - } - } -} \ No newline at end of file diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundlesUIBean.java b/modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundlesUIBean.java deleted file mode 100644 index 3cd1959..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/java/org/rhq/enterprise/server/perspective/policy/BundlesUIBean.java +++ /dev/null @@ -1,119 +0,0 @@ -/* - * RHQ Management Platform - * Copyright (C) 2005-2010 Red Hat, Inc. - * All rights reserved. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation version 2 of the License. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - */ -package org.rhq.enterprise.server.perspective.policy; - -import org.ajax4jsf.model.KeepAlive; -import org.jboss.seam.ScopeType; -import org.jboss.seam.annotations.Name; -import org.jboss.seam.annotations.Scope; -import org.jboss.seam.international.StatusMessage; -import org.rhq.core.domain.auth.Subject; -import org.rhq.core.domain.bundle.Bundle; -import org.rhq.core.domain.criteria.BundleCriteria; -import org.rhq.core.domain.util.PageControl; -import org.rhq.core.domain.util.PageList; -import org.rhq.core.gui.table.bean.AbstractPagedDataUIBean; -import org.rhq.core.gui.table.model.PagedListDataModel; -import org.rhq.enterprise.client.RemoteClient; -import org.rhq.enterprise.server.bundle.BundleManagerRemote; -import org.rhq.enterprise.server.perspective.AbstractPerspectivePagedDataUIBean; -import org.rhq.enterprise.server.perspective.PerspectiveClientUIBean; - -import java.util.List; - -/** - * Provides CRUD operations on provisioning {@link Bundle}s. The backing bean for bundles.xhtml. - * - * @author Ian Springer - */ -@Name("BundlesUIBean") -@Scope(ScopeType.EVENT) -@KeepAlive -public class BundlesUIBean extends AbstractPerspectivePagedDataUIBean { - private List<Bundle> selectedBundles; - - @Override - public PagedListDataModel createDataModel() { - return new DataModel(this); - } - - public List<Bundle> getSelectedBundles() { - return this.selectedBundles; - } - - public void setSelectedBundles(List<Bundle> selectedResources) { - this.selectedBundles = selectedResources; - } - - public void deleteSelectedBundles() throws Exception { - RemoteClient remoteClient; - Subject subject; - try { - remoteClient = this.perspectiveClient.getRemoteClient(); - subject = this.perspectiveClient.getSubject(); - } catch (Exception e) { - this.facesMessages.add(StatusMessage.Severity.FATAL, "Failed to connect to RHQ Server - cause: " + e); - return; - } - - // ***NOTE***: The javassist.NotFoundException stack traces that are logged by this call can be ignored. - BundleManagerRemote bundleManager = remoteClient.getBundleManagerRemote(); - - int[] selectedBundleIds = new int[this.selectedBundles.size()]; - for (int i = 0, selectedBundlesSize = this.selectedBundles.size(); i < selectedBundlesSize; i++) { - Bundle selectedBundle = this.selectedBundles.get(i); - selectedBundleIds[i] = selectedBundle.getId(); - } - - bundleManager.deleteBundles(subject, selectedBundleIds); - - // Add message to tell the user the uninventory was a success. - String pluralizer = (this.selectedBundles.size() == 1) ? "" : "s"; - this.facesMessages.add("Deleted " + this.selectedBundles.size() + " bundle" + pluralizer + "."); - - // Reset the data model, so the current page will get refreshed to reflect the Resources we just uninventoried. - // This is essential, since we are CONVERSATION-scoped and will live on beyond this request. - setDataModel(null); - } - - private class DataModel extends PagedListDataModel<Bundle> { - private DataModel(AbstractPagedDataUIBean pagedDataBean) { - super(pagedDataBean); - } - - @Override - public PageList<Bundle> fetchPage(PageControl pageControl) { - PerspectiveClientUIBean perspectiveClient = BundlesUIBean.this.perspectiveClient; - BundleManagerRemote bundleManager; - Subject subject; - try { - bundleManager = perspectiveClient.getRemoteClient().getBundleManagerRemote(); - subject = BundlesUIBean.this.perspectiveClient.getSubject(); - } catch (Exception e) { - throw new RuntimeException(e); - } - - BundleCriteria bundleCriteria = new BundleCriteria(); - bundleCriteria.setPageControl(pageControl); - // TODO: Implement user-specified filters. - PageList<Bundle> bundles = bundleManager.findBundlesByCriteria(subject, bundleCriteria); - return bundles; - } - } -} diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/resources/seam.properties b/modules/enterprise/server/plugins/perspectives/policy/app/src/main/resources/seam.properties deleted file mode 100644 index b97c770..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/resources/seam.properties +++ /dev/null @@ -1,3 +0,0 @@ -# NOTE: The presence of this file tells Seam to scan this WAR for Seam -# components (i.e. classes with Name annotations) and to deploy -# any that it finds. diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundleDetails.xhtml b/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundleDetails.xhtml deleted file mode 100644 index a0b504d..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundleDetails.xhtml +++ /dev/null @@ -1,108 +0,0 @@ -<?xml version="1.0"?> - -<ui:composition - template="/WEB-INF/templates/mainTemplate.xhtml" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich" - xmlns:rhq="http://rhq-project.org/rhq" - xmlns:onc="http://jboss.org/on/component%22%3E - - <ui:param name="bundle" value="#{BundleDetailsUIBean.bundle}"/> - - <ui:define name="breadcrumbs"> - Administration > - <h:outputLink value="bundles.seam">Provisioning Bundles</h:outputLink> > - #{bundle.bundleType.name} Bundle '#{bundle.name}' - </ui:define> - - <ui:define name="body"> - - rich:panel - <div><h:panelGroup layout="block" rendered="#{ServerInfoUIBean.debugModeEnabled}"> - <b>Id:</b> #{bundle.id} - </h:panelGroup></div> - <div><h:panelGroup layout="block"> - <b>Name:</b> #{bundle.name} - </h:panelGroup></div> - <div><h:panelGroup layout="block"> - <b>Type:</b> #{bundle.bundleType.name} - </h:panelGroup></div> - </rich:panel> - - ui:remove<!-- NOTE: The table needs to be surrounded by a form for paging and sorting to work! --></ui:remove> - <a4j:form ajaxSubmit="false" reRender="bundlesVersionsDataTable"> - - <f:param name="bundleId" value="#{param.bundleId}"/> - - <rich:dataTable id="bundleVersionsDataTable" - value="#{BundleDetailsUIBean.dataModel}" var="bundleVersion" - first="#{BundleDetailsUIBean.pageControl.pageNumber}" - rows="#{BundleDetailsUIBean.pageControl.pageSize}" - sortMode="multi" - width="100%"> - - <f:facet name="header"> - <h:outputText value="Versions"/> - </f:facet> - - <rich:column width="20"> - <f:facet name="header"> - rhq:allRowsSelector/ - </f:facet> - <rhq:rowSelector value="#{BundleDetailsUIBean.selectedBundleVersions}"/> - </rich:column> - - <rich:column width="70"> - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="BundleVersion.version"> - <a4j:support event="onclick" - actionListener="#{BundleDetailsUIBean.ajaxSortListener}"/> - <h:outputText value="Version"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputText value="#{bundleVersion.version}"/> - </rich:column> - - rich:column - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="BundleVersion.name"> - <a4j:support event="onclick" - actionListener="#{BundleDetailsUIBean.ajaxSortListener}"/> - <h:outputText value="Name"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputLink value="bundleVersionDetails.seam"> - <f:param name="bundleVersionId" value="#{bundleVersion.id}"/> - <h:outputText value="#{bundleVersion.name}"/> - </h:outputLink> - </rich:column> - - <f:facet name="footer"> - rich:columnGroup - <rich:column colspan="3"> - <rhq:selectedRowsCommandButton - value="DELETE" - action="#{BundleDetailsUIBean.deleteSelectedBundleVersions}" - rendered="#{BundleDetailsUIBean.dataModel.rowCount gt 0}"/> - - <ui:include src="/WEB-INF/includes/pageControls.xhtml"> - <ui:param name="pagedDataUIBean" value="#{BundleDetailsUIBean}"/> - <ui:param name="dataTableName" value="bundleVersionsDataTable"/> - </ui:include> - </rich:column> - </rich:columnGroup> - </f:facet> - </rich:dataTable> - </a4j:form> - - </ui:define> - -</ui:composition> diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundleVersionDetails.xhtml b/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundleVersionDetails.xhtml deleted file mode 100644 index 76d5d74..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundleVersionDetails.xhtml +++ /dev/null @@ -1,120 +0,0 @@ -<?xml version="1.0"?> - -<ui:composition - template="/WEB-INF/templates/mainTemplate.xhtml" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich" - xmlns:rhq="http://rhq-project.org/rhq" - xmlns:onc="http://jboss.org/on/component%22%3E - - <ui:param name="bundleVersion" value="#{BundleVersionDetailsUIBean.bundleVersion}"/> - <ui:param name="bundle" value="#{BundleVersionDetailsUIBean.bundle}"/> - - <ui:define name="breadcrumbs"> - Administration > - <h:outputLink value="bundles.seam">Provisioning Bundles</h:outputLink> > - <h:outputLink value="bundleDetails.seam"> - <f:param name="bundleId" value="#{bundle.id}"/> - #{bundle.bundleType.name} Bundle '#{bundle.name}' - </h:outputLink> > - Version #{bundleVersion.version} - </ui:define> - - <ui:define name="body"> - - rich:panel - <div><h:panelGroup layout="block" rendered="#{ServerInfoUIBean.debugModeEnabled}"> - <b>Id:</b> #{bundleVersion.id} - </h:panelGroup></div> - <div><h:panelGroup layout="block"> - <b>Version:</b> #{bundleVersion.version} - </h:panelGroup></div> - <div><h:panelGroup layout="block"> - <b>Name:</b> #{bundleVersion.name} - </h:panelGroup></div> - </rich:panel> - - rich:panel - <f:facet name="header"> - Recipe - </f:facet> - <h:inputTextarea value="#{bundleVersion.recipe}" cols="80" rows="10" disabled="true"/> - </rich:panel> - - ui:remove<!-- NOTE: The table needs to be surrounded by a form for paging and sorting to work! --></ui:remove> - <a4j:form ajaxSubmit="false" reRender="bundleDeployDefinitionsDataTable"> - - <f:param name="bundleVersionId" value="#{param.bundleVersionId}"/> - - <rich:dataTable id="bundleDeployDefinitionsDataTable" - value="#{BundleVersionDetailsUIBean.dataModel}" var="bundleDeployDefinition" - first="#{BundleVersionDetailsUIBean.pageControl.pageNumber}" - rows="#{BundleVersionDetailsUIBean.pageControl.pageSize}" - sortMode="multi" - width="100%"> - - <f:facet name="header"> - <h:outputText value="Deployment Definitions"/> - </f:facet> - - <rich:column width="20"> - <f:facet name="header"> - rhq:allRowsSelector/ - </f:facet> - <rhq:rowSelector value="#{BundleVersionDetailsUIBean.selectedBundleDeployDefinitions}"/> - </rich:column> - - <rich:column width="125"> - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="BundleDeployDefinition.name"> - <a4j:support event="onclick" - actionListener="#{BundleVersionDetailsUIBean.ajaxSortListener}"/> - <h:outputText value="Name"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputLink value="bundleDeployDefinitionDetails.seam"> - <f:param name="bundleDeployDefinitionId" value="#{bundleDeployDefinition.id}"/> - <h:outputText value="#{bundleDeployDefinition.name}"/> - </h:outputLink> - </rich:column> - - rich:column - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="BundleDeployDefinition.description"> - <a4j:support event="onclick" - actionListener="#{BundleVersionDetailsUIBean.ajaxSortListener}"/> - <h:outputText value="Description"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputText value="#{bundleDeployDefinition.description}"/> - </rich:column> - - <f:facet name="footer"> - rich:columnGroup - <rich:column colspan="3"> - <rhq:selectedRowsCommandButton - value="DELETE" - action="#{BundleVersionDetailsUIBean.deleteSelectedBundleDeployDefinitions}" - rendered="#{BundleVersionDetailsUIBean.dataModel.rowCount gt 0}"/> - - <ui:include src="/WEB-INF/includes/pageControls.xhtml"> - <ui:param name="pagedDataUIBean" value="#{BundleVersionDetailsUIBean}"/> - <ui:param name="dataTableName" value="bundleDeployDefinitionsDataTable"/> - </ui:include> - </rich:column> - </rich:columnGroup> - </f:facet> - </rich:dataTable> - </a4j:form> - - </ui:define> - -</ui:composition> diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundles.xhtml b/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundles.xhtml deleted file mode 100644 index b680fe3..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/bundles.xhtml +++ /dev/null @@ -1,87 +0,0 @@ -<?xml version="1.0"?> - -<ui:composition - template="/WEB-INF/templates/mainTemplate.xhtml" - xmlns="http://www.w3.org/1999/xhtml" - xmlns:f="http://java.sun.com/jsf/core" - xmlns:h="http://java.sun.com/jsf/html" - xmlns:ui="http://java.sun.com/jsf/facelets" - xmlns:c="http://java.sun.com/jstl/core" - xmlns:fn="http://java.sun.com/jsp/jstl/functions" - xmlns:a4j="http://richfaces.org/a4j" - xmlns:rich="http://richfaces.org/rich" - xmlns:rhq="http://rhq-project.org/rhq" - xmlns:onc="http://jboss.org/on/component%22%3E - - <ui:define name="breadcrumbs"> - Administration > - Provisioning Bundles - </ui:define> - - <ui:define name="body"> - - ui:remove<!-- NOTE: The table needs to be surrounded by a form for paging and sorting to work! --></ui:remove> - <a4j:form ajaxSubmit="false" reRender="bundlesDataTable"> - - <rich:dataTable id="bundlesDataTable" - value="#{BundlesUIBean.dataModel}" var="bundle" - first="#{BundlesUIBean.pageControl.pageNumber}" - rows="#{BundlesUIBean.pageControl.pageSize}" - sortMode="multi" - width="100%"> - - <rich:column width="20"> - <f:facet name="header"> - rhq:allRowsSelector/ - </f:facet> - <rhq:rowSelector value="#{BundlesUIBean.selectedBundles}"/> - </rich:column> - - <rich:column width="235"> - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="Bundle.name"> - <a4j:support event="onclick" - actionListener="#{BundlesUIBean.ajaxSortListener}"/> - <h:outputText value="Name"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputLink value="bundleDetails.seam"> - <f:param name="bundleId" value="#{bundle.id}"/> - <h:outputText value="#{bundle.name}"/> - </h:outputLink> - </rich:column> - - rich:column - <f:facet name="header"> - <rhq:sortableColumnHeader sortBy="Bundle.bundleType.name"> - <a4j:support event="onclick" - actionListener="#{BundlesUIBean.ajaxSortListener}"/> - <h:outputText value="Type"/> - </rhq:sortableColumnHeader> - </f:facet> - - <h:outputText value="#{bundle.bundleType.name}"/> - </rich:column> - - <f:facet name="footer"> - rich:columnGroup - <rich:column colspan="3"> - <rhq:selectedRowsCommandButton - value="DELETE" - action="#{BundlesUIBean.deleteSelectedBundles}" - rendered="#{BundlesUIBean.dataModel.rowCount gt 0}"/> - - <ui:include src="/WEB-INF/includes/pageControls.xhtml"> - <ui:param name="pagedDataUIBean" value="#{BundlesUIBean}"/> - <ui:param name="dataTableName" value="bundlesDataTable"/> - </ui:include> - </rich:column> - </rich:columnGroup> - </f:facet> - </rich:dataTable> - </a4j:form> - - </ui:define> - -</ui:composition> diff --git a/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml b/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml deleted file mode 100644 index de9054b..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/perspective/pom.xml +++ /dev/null @@ -1,132 +0,0 @@ -<?xml version="1.0"?> - -<project - xmlns="http://maven.apache.org/POM/4.0.0" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" - xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd%22%3E - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.3.0-SNAPSHOT</version> - <relativePath>../../../../../../../pom.xml</relativePath> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-policy-perspective</artifactId> - <packaging>jar</packaging> - - <name>RHQ Policy Perspective</name> - <description>a perspective that adds support to the GUI for policy and provisioning</description> - - <dependencies> - - <!-- Below are the apps packaged with this perspective plugin --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-policy-perspective-war</artifactId> - <version>${project.version}</version> - <scope>provided</scope> - <type>war</type> - </dependency> - - <!-- Below are the core modules that are required dependencies of all server plugins --> - <dependency> - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server</artifactId> - <version>${project.version}</version> - <scope>provided</scope> <!-- provided by the server/plugin-container --> - </dependency> - - </dependencies> - - <build> - <plugins> - - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - - <execution> - <id>add-war</id> - <phase>verify</phase> - <configuration> - <target> - <property - name="classes.dir" - location="${rhq.deploymentDir}/WEB-INF/classes" /> - <jar - update="yes" - destfile="${basedir}/target/${project.artifactId}-${project.version}.jar" - basedir="${basedir}/../app/target" - includes="*.war" /> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - </executions> - </plugin> - </plugins> - </build> - - <profiles> - <profile> - <id>dev</id> - - <properties> - <rhq.rootDir>../../../../..</rhq.rootDir> - <rhq.containerDir>${rhq.rootDir}/${rhq.defaultDevContainerPath}</rhq.containerDir> - <rhq.deploymentDir>${rhq.containerDir}/jbossas/standalone/deployments/${rhq.earName}/rhq-serverplugins</rhq.deploymentDir> - </properties> - - <build> - <plugins> - - <plugin> - <artifactId>maven-antrun-plugin</artifactId> - <executions> - - <execution> - <id>deploy</id> - <phase>install</phase> - <configuration> - <target> - <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> - <echo>*** Updating ${deployment.file}...</echo> - <copy file="${basedir}/target/${project.build.finalName}.jar" toDir="${rhq.deploymentDir}" /> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - <execution> - <id>undeploy</id> - <phase>clean</phase> - <configuration> - <target> - <property name="deployment.file" location="${rhq.deploymentDir}/${project.build.finalName}.jar" /> - <echo>*** Deleting ${deployment.file}...</echo> - <delete file="${deployment.file}" /> - </target> - </configuration> - <goals> - <goal>run</goal> - </goals> - </execution> - - </executions> - </plugin> - - </plugins> - </build> - </profile> - </profiles> - -</project> - diff --git a/modules/enterprise/server/plugins/perspectives/policy/perspective/src/main/resources/META-INF/rhq-serverplugin.xml b/modules/enterprise/server/plugins/perspectives/policy/perspective/src/main/resources/META-INF/rhq-serverplugin.xml deleted file mode 100644 index dd3bc00..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/perspective/src/main/resources/META-INF/rhq-serverplugin.xml +++ /dev/null @@ -1,31 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> - -<perspective-plugin - apiVersion="1.0" - version="1.0" - description="a perspective that adds support to the GUI for policy and provisioning" - displayName="Policy Perspective" - name="PolicyPerspective" - package="org.rhq.perspective.sample" - xmlns="urn:xmlns:rhq-serverplugin.perspective" - xmlns:serverplugin="urn:xmlns:rhq-serverplugin" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%22%3E - - <!-- Declare supporting applications for this perspective --> - <application - name="policy" - baseUrl="/rhq-policy-perspective" /> - - <!-- Administration > Provisioning --> - <!-- - <menu-item - name="administration.provisioning" - displayName="Provisioning Bundles" - application="policy" - url="bundles.seam"> - <position - name="administration.content" - placement="after" /> - </menu-item> - --> -</perspective-plugin> \ No newline at end of file diff --git a/modules/enterprise/server/plugins/perspectives/policy/pom.xml b/modules/enterprise/server/plugins/perspectives/policy/pom.xml deleted file mode 100644 index 380c337..0000000 --- a/modules/enterprise/server/plugins/perspectives/policy/pom.xml +++ /dev/null @@ -1,24 +0,0 @@ -<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> - - <modelVersion>4.0.0</modelVersion> - - <parent> - <groupId>org.rhq</groupId> - <artifactId>rhq-parent</artifactId> - <version>4.3.0-SNAPSHOT</version> - <relativePath>../../../../../../pom.xml</relativePath> - </parent> - - <groupId>org.rhq</groupId> - <artifactId>rhq-enterprise-server-policy-perspective-parent</artifactId> - <packaging>pom</packaging> - - <name>RHQ Policy Perspective Parent</name> - <description>parent POM for modules comprising the RHQ Policy Perspective</description> - - <modules> - <module>perspective</module> - <module>app</module> - </modules> - -</project> diff --git a/modules/enterprise/server/plugins/pom.xml b/modules/enterprise/server/plugins/pom.xml index c1b2ffe..626d458 100644 --- a/modules/enterprise/server/plugins/pom.xml +++ b/modules/enterprise/server/plugins/pom.xml @@ -39,7 +39,6 @@ <module>yum</module> <module>url</module> <module>jboss-software</module> - <module>perspectives/core</module> <module>alert-email</module> <module>alert-irc</module> <module>alert-mobicents</module> diff --git a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml index 1f996f5..10b9f64 100644 --- a/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml +++ b/modules/enterprise/server/plugins/validate-all-serverplugins/pom.xml @@ -51,7 +51,6 @@ <pathelement location="../drift-rhq/target/rhq-serverplugin-drift-${project.version}.jar" /> <pathelement location="../filetemplate-bundle/target/rhq-serverplugin-filetemplate-bundle-${project.version}.jar" /> <pathelement location="../ant-bundle/target/rhq-serverplugin-ant-bundle-${project.version}.jar" /> - <pathelement location="../perspectives/core/target/rhq-core-perspective-${project.version}.jar" /> </classpath> <sysproperty key="org.apache.commons.logging.Log" value="org.apache.commons.logging.impl.SimpleLog" /> <sysproperty key="rhq.test.serverplugins" value="${rhq.test.serverplugins}" /> diff --git a/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtil.java b/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtil.java index 3f36ee8..a376d5f 100644 --- a/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtil.java +++ b/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtil.java @@ -78,9 +78,7 @@ public abstract class ServerPluginDescriptorUtil { PLUGIN_SCHEMA_PACKAGES.put(XmlSchemas.XSD_SERVERPLUGIN, XmlSchemas.PKG_SERVERPLUGIN); PLUGIN_SCHEMA_PACKAGES.put(XmlSchemas.XSD_SERVERPLUGIN_GENERIC, XmlSchemas.PKG_SERVERPLUGIN_GENERIC); PLUGIN_SCHEMA_PACKAGES.put(XmlSchemas.XSD_SERVERPLUGIN_CONTENT, XmlSchemas.PKG_SERVERPLUGIN_CONTENT); - PLUGIN_SCHEMA_PACKAGES.put(XmlSchemas.XSD_SERVERPLUGIN_PERSPECTIVE, XmlSchemas.PKG_SERVERPLUGIN_PERSPECTIVE); PLUGIN_SCHEMA_PACKAGES.put(XmlSchemas.XSD_SERVERPLUGIN_ALERT, XmlSchemas.PKG_SERVERPLUGIN_ALERT); - PLUGIN_SCHEMA_PACKAGES.put(XmlSchemas.XSD_SERVERPLUGIN_ENTITLEMENT, XmlSchemas.PKG_SERVERPLUGIN_ENTITLEMENT); PLUGIN_SCHEMA_PACKAGES.put(XmlSchemas.XSD_SERVERPLUGIN_BUNDLE, XmlSchemas.PKG_SERVERPLUGIN_BUNDLE); PLUGIN_SCHEMA_PACKAGES.put(XmlSchemas.XSD_SERVERPLUGIN_PACKAGETYPE, XmlSchemas.PKG_SERVERPLUGIN_PACKAGETYPE); PLUGIN_SCHEMA_PACKAGES.put(XmlSchemas.XSD_SERVERPLUGIN_DRIFT, XmlSchemas.PKG_SERVERPLUGIN_DRIFT); diff --git a/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/XmlSchemas.java b/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/XmlSchemas.java index 9141ae8..1fe1d4a 100644 --- a/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/XmlSchemas.java +++ b/modules/enterprise/server/xml-schemas/src/main/java/org/rhq/enterprise/server/xmlschema/XmlSchemas.java @@ -48,18 +48,10 @@ public interface XmlSchemas { public static final String XSD_SERVERPLUGIN_CONTENT = "rhq-serverplugin-content.xsd"; public static final String PKG_SERVERPLUGIN_CONTENT = "org.rhq.enterprise.server.xmlschema.generated.serverplugin.content";
- // the server plugin descriptor for the perspective plugin type - public static final String XSD_SERVERPLUGIN_PERSPECTIVE = "rhq-serverplugin-perspective.xsd"; - public static final String PKG_SERVERPLUGIN_PERSPECTIVE = "org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective"; - // the server plugin descriptor for the alert plugin type public static final String XSD_SERVERPLUGIN_ALERT = "rhq-serverplugin-alert.xsd"; public static final String PKG_SERVERPLUGIN_ALERT = "org.rhq.enterprise.server.xmlschema.generated.serverplugin.alert";
- // the server plugin descriptor for the entitlement plugin type - public static final String XSD_SERVERPLUGIN_ENTITLEMENT = "rhq-serverplugin-entitlement.xsd"; - public static final String PKG_SERVERPLUGIN_ENTITLEMENT = "org.rhq.enterprise.server.xmlschema.generated.serverplugin.entitlement"; - // the server plugin descriptor for the bundle plugin type public static final String XSD_SERVERPLUGIN_BUNDLE = "rhq-serverplugin-bundle.xsd"; public static final String PKG_SERVERPLUGIN_BUNDLE = "org.rhq.enterprise.server.xmlschema.generated.serverplugin.bundle"; diff --git a/modules/enterprise/server/xml-schemas/src/main/resources/rhq-serverplugin-entitlement.xsd b/modules/enterprise/server/xml-schemas/src/main/resources/rhq-serverplugin-entitlement.xsd deleted file mode 100644 index 175205e..0000000 --- a/modules/enterprise/server/xml-schemas/src/main/resources/rhq-serverplugin-entitlement.xsd +++ /dev/null @@ -1,47 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - -<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:serverplugin="urn:xmlns:rhq-serverplugin" - xmlns:entitlement="urn:xmlns:rhq-serverplugin.entitlement" - targetNamespace="urn:xmlns:rhq-serverplugin.entitlement" - elementFormDefault="qualified" - jaxb:version="2.0" - xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - blockDefault=""> - - <xs:import namespace="urn:xmlns:rhq-serverplugin" schemaLocation="rhq-serverplugin.xsd" /> - - xs:annotation - xs:documentation - Schema for entitlement server-side plugins. - </xs:documentation> - xs:appinfo - jaxb:schemaBindings - <jaxb:package name="org.rhq.enterprise.server.xmlschema.generated.serverplugin.entitlement" /> - </jaxb:schemaBindings> - </xs:appinfo> - </xs:annotation> - - <xs:element name="entitlement-plugin" type="entitlement:EntitlementPluginDescriptorType" substitutionGroup="serverplugin:server-plugin"> - xs:annotation - xs:documentation - Defines an entitlement plugin. This type of plugin provides entitlement towards the usage - of managed content. In other words, it provides the licenses that allow a piece of managed content - to be used. - </xs:documentation> - xs:appinfo - <jaxb:class name="EntitlementPluginElement" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - <xs:complexType name="EntitlementPluginDescriptorType"> - xs:complexContent - <xs:extension base="serverplugin:ServerPluginDescriptorType"> - xs:sequence - <!-- new entitlement metadata can go here --> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - -</xs:schema> diff --git a/modules/enterprise/server/xml-schemas/src/main/resources/rhq-serverplugin-perspective.xsd b/modules/enterprise/server/xml-schemas/src/main/resources/rhq-serverplugin-perspective.xsd deleted file mode 100644 index 56caebe..0000000 --- a/modules/enterprise/server/xml-schemas/src/main/resources/rhq-serverplugin-perspective.xsd +++ /dev/null @@ -1,1060 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" standalone="yes" ?> - -<xs:schema - xmlns:xs="http://www.w3.org/2001/XMLSchema" - xmlns:config="urn:xmlns:rhq-configuration" - xmlns:serverplugin="urn:xmlns:rhq-serverplugin" - xmlns:perspective="urn:xmlns:rhq-serverplugin.perspective" - targetNamespace="urn:xmlns:rhq-serverplugin.perspective" - elementFormDefault="qualified" - jaxb:version="2.0" - xmlns:jaxb="http://java.sun.com/xml/ns/jaxb" - blockDefault=""> - - <xs:include - schemaLocation=""></xs:include> - <xs:import - namespace="urn:xmlns:rhq-serverplugin" - schemaLocation="rhq-serverplugin.xsd" /> - - xs:annotation - xs:documentationSchema for a Perspective Descriptor. Perspective are deployed as Server Plugins. - </xs:documentation> - xs:appinfo - jaxb:schemaBindings - <jaxb:package - name="org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective" /> - </jaxb:schemaBindings> - </xs:appinfo> - </xs:annotation> - - <xs:element - name="perspective-plugin" - type="perspective:PerspectivePluginDescriptorType" - substitutionGroup="serverplugin:server-plugin"> - xs:annotation - xs:documentationDefines a Perspective plugin. A Perspective is deployed as a Server Plugin. The Server Plugin - Container (SPC) handles simple lifecycle management for the deployed plugins (e.g. start, stop). The plugin - is otherwise standalone and can do everything it needs to do without additional help from the SPC. - </xs:documentation> - xs:appinfo - <jaxb:class - name="PerspectivePluginElement" /> - </xs:appinfo> - </xs:annotation> - </xs:element> - - <xs:complexType - name="PerspectivePluginDescriptorType"> - xs:annotation - xs:documentationThe perspective descriptor providing the complete perspective definition.</xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="serverplugin:ServerPluginDescriptorType"> - xs:sequence - <xs:element - name="application" - type="perspective:ApplicationType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="global-task" - type="perspective:GlobalTaskType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="resource-task" - type="perspective:ResourceTaskType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="menu-item" - type="perspective:MenuItemType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="tab" - type="perspective:TabType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="page" - type="perspective:PageType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:element - name="application" - type="perspective:ApplicationType"> - - </xs:element> - - <xs:complexType - name="ApplicationType"> - xs:annotation - xs:documentationDeclares a web application referenced by an extension in the perspective. It is assumed that - the application will be deployed by the perspective or will be externally available. Extension urls can be - absolute or relative. Urls starting with "http" are external and processed as is. Urls starting with "/" are - relative to the root application (rhq-portal.war). Any other urls are assumed relative and will prepend the - baseUrl of the declared application (required in this case). specify an application will resolve url's - relatively to the root application (It is assumed that the root application (rhq-portal.war) - </xs:documentation> - </xs:annotation> - <xs:attribute - name="name" - type="perspective:NameType" - use="required"> - xs:annotation - xs:documentationInternal name for referencing the application by the extensions. By convention, the - context root.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="baseUrl" - type="xs:string" - use="required"> - xs:annotation - xs:documentationThe base url prepended to all extension urls declaring this application. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:complexType> - - <xs:complexType - name="ExtensionType" - abstract="true"> - xs:annotation - xs:documentationAll extensions extend this type.</xs:documentation> - </xs:annotation> - xs:sequence - <xs:element - name="description" - type="perspective:DescriptionType" - minOccurs="0" - maxOccurs="1"> - xs:annotation - xs:documentationAn optional verbose description for the extension - may be displayed via a tooltip or - some other means in the GUI. - </xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - - <xs:attribute - name="name" - type="perspective:NameType" - use="required"> - xs:annotation - xs:documentationInternal name for this extension. Unique within extensions of a certain type defined by - the perspective. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="application" - type="xs:string" - use="optional"> - xs:annotation - xs:documentationThe application servicing the URLs for this extension. Default is root (rhq-portal.war). - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="url" - type="xs:anyURI" - use="optional"> - xs:annotation - xs:documentationThe request URL for this extension. Typically kicks off a wizard or similar workflow. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:anyAttribute /> - </xs:complexType> - - <xs:complexType - name="RenderedExtensionType" - abstract="true"> - xs:annotation - xs:documentationAll rendered extensions extend this type.</xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ExtensionType"> - - <xs:attribute - name="displayName" - type="perspective:DisplayNameType" - use="required"> - xs:annotation - xs:documentationThe display name for this extension.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="iconUrl" - type="xs:anyURI" - use="optional"> - xs:annotation - xs:documentationThe request URL for the icon displayed for this extension. If omitted, no icon is - displayed. Required if displayName is an empty string.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="action" - type="perspective:ActionType" - use="optional" - default="add"> - xs:annotation - xs:documentationAdd the extension or remove an extension with the given name and position that was - defined - by the Core perspective. For removal, all but the name attribute are ignored. The default is - add. Note, a - Remove followed by an Add can be used to replace an extension from the Core - perspective. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="TaskType"> - xs:complexContent - <xs:extension - base="perspective:RenderedExtensionType"> - <xs:attribute - name="category" - type="xs:string" - use="optional"> - xs:annotation - xs:documentationThe display category for this task (optional). Tasks with the same category will be - grouped together in the task pane.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="ResourceTaskType"> - xs:complexContent - <xs:extension - base="perspective:TaskType"> - xs:sequence - <xs:element - name="activators" - type="perspective:ResourceActivatorsType" - minOccurs="0" - maxOccurs="1"> - xs:annotation - xs:documentationAn optional set of activators. If present, all of them must evaluate to true in - order for this resource task to be displayed for a particular Resource or Group page request. - </xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="GlobalTaskType"> - xs:complexContent - <xs:extension - base="perspective:TaskType"> - xs:sequence - <xs:element - name="activators" - type="perspective:GlobalActivatorsType" - minOccurs="0" - maxOccurs="1"> - xs:annotation - xs:documentationAn optional set of activators. If present, all of them must evaluate to true in - order for this global task to be displayed for a particular page request.</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="MenuItemType"> - xs:annotation - xs:documentationA (core) menu extension that adds or removes a top level or sub-menu item.</xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:RenderedExtensionType"> - xs:sequence - <xs:element - name="position" - type="perspective:PositionType"> - xs:annotation - xs:documentationSpecifies the position of the menu item.</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element - name="activators" - type="perspective:GlobalActivatorsType" - minOccurs="0" - maxOccurs="1"> - xs:annotation - xs:documentationAn optional set of activators. If present, all of them must evaluate to true in - order for this menu item to be displayed for a particular page request.</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - - <xs:attribute - name="feature" - type="perspective:MenuItemFeatureType" - use="optional"> - xs:annotation - xs:documentationA special built-in rendering feature that should be applied when rendering this menu - item. - </xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="newWindow" - type="xs:boolean" - use="optional" - default="false"> - xs:annotation - xs:documentationIf true, the URL should be directed to a new window. Otherwise the content should be - presented in the current page body.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="addBreak" - type="xs:boolean" - use="optional" - default="false"> - xs:annotation - xs:documentationIf true, generate a break prior to this menu item.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="TabType"> - xs:annotation - xs:documentationAn extension that adds or removes a resource tab or subtab.</xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:RenderedExtensionType"> - xs:sequence - <xs:element - name="position" - type="perspective:PositionType"> - xs:annotation - xs:documentationSpecifies the position of the tab.</xs:documentation> - </xs:annotation> - </xs:element> - <xs:element - name="activators" - type="perspective:ResourceActivatorsType" - minOccurs="0" - maxOccurs="1"> - xs:annotation - xs:documentationAn optional set of activators. If present, all of them must evaluate to true in - order for this resource task to be displayed for a particular Resource or Group page request. - </xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="PageType"> - xs:annotation - xs:documentationA page extension that injects perspective links into a core page. - </xs:documentation> - </xs:annotation> - xs:sequence - <xs:element - name="page-link" - type="perspective:PageLinkType" - minOccurs="1" - maxOccurs="unbounded"> - xs:annotation - xs:documentationA replacement url for a named link on a given page.</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - - <xs:attribute - name="name" - type="xs:string" - use="required"> - xs:annotation - xs:documentationThe page extension point name.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:complexType> - - <xs:complexType - name="PageLinkType"> - xs:annotation - xs:documentationA page link extension for a named link in a page extension point.</xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ExtensionType"> - xs:sequence - <xs:element - name="activators" - type="perspective:GlobalActivatorsType" - minOccurs="0" - maxOccurs="1"> - xs:annotation - xs:documentationAn optional set of activators. If present, all of them must evaluate to true in - order for this page link extension to be active.</xs:documentation> - </xs:annotation> - </xs:element> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - - <!-- =========================================== Activators ============================================= ---> - <xs:complexType - name="CommonActivatorsType"> - xs:annotation - xs:documentationActivators common to global and resource activators.</xs:documentation> - </xs:annotation> - xs:sequence - <xs:element - name="debug-mode" - type="perspective:DebugModeActivatorType" - minOccurs="0" - maxOccurs="1"> - </xs:element> - <xs:element - name="license-feature" - type="perspective:LicenseFeatureActivatorType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="global-permission" - type="perspective:GlobalPermissionActivatorType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="superuser" - type="perspective:SuperuserActivatorType" - minOccurs="0" - maxOccurs="1"> - </xs:element> - </xs:sequence> - </xs:complexType> - - <xs:complexType - name="GlobalActivatorsType"> - xs:annotation - xs:documentationIf any of the activator conditions evaluate to true then the global activator is active. In - other words, there is an implicit OR operation applied. For AND logic it is typical to declare several - "activators" elements in the declaring element.</xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:CommonActivatorsType"> - xs:sequence - <xs:element - name="inventory" - type="perspective:InventoryActivatorType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="ResourceActivatorsType"> - xs:annotation - xs:documentationA set of activators that must evaluate to true for the resource-level extension to be active. - In addition to the activators common to global and resource-level activatation, several more can be - evaluated against the the resource in context. Facet Activators ensure the specified facet is implemented by - the resource type of the resource in context. Resource-permission activators ensure the user has the - specified permission on the resource in context. Trait Activators ensure that the specified trait value - satisfies the specified pattern for the resource in context. Resource-type Activators can be used if the - extension is active for one or more different resource types. In this situation resource-permission and - trait activators can be set in a fine-grained way, differing for each resource type, if necessary. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:CommonActivatorsType"> - xs:choice - xs:sequence - <xs:element - name="facet" - type="perspective:FacetActivatorType" - minOccurs="1" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="resource-permission" - type="perspective:ResourcePermissionActivatorType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="trait" - type="perspective:TraitActivatorType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - </xs:sequence> - <xs:element - name="resource-type" - type="perspective:InventoryActivatorType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - </xs:choice> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="ActivatorType"> - xs:annotation - xs:documentationAll Activators extend this type.</xs:documentation> - </xs:annotation> - </xs:complexType> - - <!-- Global Activators ---> - <xs:complexType - name="LicenseFeatureActivatorType"> - xs:annotation - xs:documentationA certain license feature (e.g. monitoring) must be active in order to activate the - extension. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - <xs:attribute - name="name" - type="perspective:LicenseFeatureType" - use="required"> - xs:annotation - xs:documentationThe type of license that must be installed to activate the extension point. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="DebugModeActivatorType"> - xs:annotation - xs:documentationDebug mode must be enabled in the GUI in order to activate the extension. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="GlobalPermissionActivatorType"> - xs:annotation - xs:documentationThe user must possess the global permission in order to activate the extension. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - <xs:attribute - name="name" - type="perspective:GlobalPermissionType" - use="required"> - xs:annotation - xs:documentationThe required Global permission.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="InventoryActivatorType"> - xs:annotation - xs:documentationThe user must have in inventory resources as described to activate the extension. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - xs:sequence - <xs:element - name="resource" - type="perspective:ResourceType" - minOccurs="1" - maxOccurs="unbounded"> - </xs:element> - </xs:sequence> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="SuperuserActivatorType"> - xs:annotation - xs:documentationThe user must be superuser in order to activate the extension. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <!-- Resource Activators ---> - <xs:complexType - name="FacetActivatorType"> - xs:annotation - xs:documentationThe resource in context must be of a resource type that implements the specified facet. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - <xs:attribute - name="name" - type="perspective:FacetType" - use="required"> - xs:annotation - xs:documentationThe facet name.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="ResourcePermissionActivatorType"> - xs:annotation - xs:documentationThe user must possess the specified resource permission on the relevant resource. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - <xs:attribute - name="name" - type="perspective:ResourcePermissionType" - use="required"> - xs:annotation - xs:documentationThe Resource permission name.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <xs:complexType - name="TraitActivatorType"> - xs:annotation - xs:documentationThe relevant resource must satisfy the trait condition to activate the extension. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - <xs:attribute - name="name" - type="xs:string" - use="required"> - xs:annotation - xs:documentationThe name of the trait being tested for activation.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="value" - type="xs:string" - use="required"> - xs:annotation - xs:documentationA Java-style regular expression for the value of the trait.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <!-- Global Content Activators ---> - - <xs:complexType - name="ContentProviderActivatorType"> - xs:annotation - xs:documentationThe specified Content Source Type must be installed in order to activate the extension. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - <xs:attribute - name="name" - type="xs:string" - use="required"> - xs:annotation - xs:documentationThe required Content Source Type's internal name.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - <!-- Contextual Content Activators - - Under Construction ---> - <xs:complexType - name="ContentActivatorType"> - xs:annotation - xs:documentationThe content context must satisfy the following conditions to activate the extension. - </xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:CommonActivatorsType"> - <xs:attribute - name="providerType" - type="xs:string" - use="required"> - xs:annotation - xs:documentationThe in-context content source's type. The internal name.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="provider" - type="xs:string" - use="optional"> - xs:annotation - xs:documentationThe in-context content source. The name.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="product" - type="xs:string" - use="optional"> - xs:annotation - xs:documentationThe in-context content source's product. The name.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="repo" - type="xs:string" - use="optional"> - xs:annotation - xs:documentationThe in-context repo. The name.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="package-type" - type="xs:string" - use="optional"> - xs:annotation - xs:documentationThe in-context package's type. The internal name.</xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - - <!-- =========================================== Helper Types ============================================= ---> - - <xs:complexType - name="ResourceType"> - xs:annotation - xs:documentationResource level activation definition.</xs:documentation> - </xs:annotation> - xs:complexContent - <xs:extension - base="perspective:ActivatorType"> - xs:sequence - <xs:element - name="resource-permission" - type="perspective:ResourcePermissionActivatorType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - <xs:element - name="trait" - type="perspective:TraitActivatorType" - minOccurs="0" - maxOccurs="unbounded"> - </xs:element> - </xs:sequence> - <xs:attribute - name="plugin" - type="xs:string" - use="required"> - xs:annotation - xs:documentationPlugin for the specified resource type.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="type" - type="xs:string" - use="required"> - xs:annotation - xs:documentationResource Type that must be in inventory to activate the extension point. - </xs:documentation> - </xs:annotation> - </xs:attribute> - </xs:extension> - </xs:complexContent> - </xs:complexType> - - - <xs:complexType - name="PositionType"> - xs:annotation - xs:documentationDefines position of the extension in the UI, relative to other extensions.</xs:documentation> - </xs:annotation> - <xs:attribute - name="name" - type="perspective:NameType" - use="optional"> - xs:annotation - xs:documentationPosition relatively against this extension name. Required for all placement relative to - another extension.</xs:documentation> - </xs:annotation> - </xs:attribute> - <xs:attribute - name="placement" - type="perspective:PlacementType" - use="required"> - </xs:attribute> - </xs:complexType> - - <xs:simpleType - name="ActionType"> - xs:annotation - xs:documentation - Add : Add new extension - Remove : Remove an extension that was defined by the Core perspective - </xs:documentation> - </xs:annotation> - <xs:restriction - base="xs:string"> - <xs:enumeration - value="add"></xs:enumeration> - <xs:enumeration - value="remove"></xs:enumeration> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType - name="DisplayNameType"> - <xs:restriction - base="xs:string"> - <xs:maxLength - value="128" /> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType - name="DescriptionType"> - <xs:restriction - base="xs:string"> - <xs:maxLength - value="2000" /> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType - name="MenuItemFeatureType"> - <xs:restriction - base="xs:string"> - <xs:enumeration - value="aboutBox"></xs:enumeration> - <xs:enumeration - value="groupFavorites"></xs:enumeration> - <xs:enumeration - value="groupRecentlyViewed"></xs:enumeration> - <xs:enumeration - value="groupSearch"></xs:enumeration> - <xs:enumeration - value="resourceFavorites"></xs:enumeration> - <xs:enumeration - value="resourceRecentlyViewed"></xs:enumeration> - <xs:enumeration - value="resourceSearch"></xs:enumeration> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType - name="NameType"> - <xs:restriction - base="xs:string"> - <xs:minLength - value="1" /> - <xs:maxLength - value="64" /> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType - name="GlobalPermissionType"> - <xs:restriction - base="xs:string"> - <xs:enumeration - value="MANAGE_INVENTORY"></xs:enumeration> - <xs:enumeration - value="MANAGE_SECURITY"></xs:enumeration> - <xs:enumeration - value="MANAGE_SETTINGS"></xs:enumeration> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType - name="ResourcePermissionType"> - <xs:restriction - base="xs:string"> - <xs:enumeration - value="CONFIGURE"></xs:enumeration> - <xs:enumeration - value="CONTROL"></xs:enumeration> - <xs:enumeration - value="CREATE_CHILD_RESOURCE"></xs:enumeration> - <xs:enumeration - value="DELETE_RESOURCE"></xs:enumeration> - <xs:enumeration - value="MANAGE_ALERTS"></xs:enumeration> - <xs:enumeration - value="MANAGE_CONTENT"></xs:enumeration> - <xs:enumeration - value="MANAGE_MEASUREMENTS"></xs:enumeration> - <xs:enumeration - value="MODIFY_RESOURCE"></xs:enumeration> - <xs:enumeration - value="VIEW_RESOURCE"></xs:enumeration> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType - name="FacetType"> - <xs:restriction - base="xs:string"> - <xs:enumeration - value="measurement"> - xs:annotation - xs:documentationThe Resource type defines one or more metrics.</xs:documentation> - </xs:annotation> - </xs:enumeration> - <xs:enumeration - value="event"> - xs:annotation - xs:documentationThe Resource type defines one or more events.</xs:documentation> - </xs:annotation> - </xs:enumeration> - <xs:enumeration - value="plugin_configuration"> - xs:annotation - xs:documentation - The Resource type defines one or more plugin configuration (aka connection) properties. - </xs:documentation> - </xs:annotation> - </xs:enumeration> - <xs:enumeration - value="configuration"> - xs:annotation - xs:documentation - The Resource type defines one or more resource configuration properties. - </xs:documentation> - </xs:annotation> - </xs:enumeration> - <xs:enumeration - value="operation"> - xs:annotation - xs:documentationThe Resource type defines one or more operations.</xs:documentation> - </xs:annotation> - </xs:enumeration> - <xs:enumeration - value="content"> - xs:annotation - xs:documentationThe Resource type defines one or more packages.</xs:documentation> - </xs:annotation> - </xs:enumeration> - <xs:enumeration - value="call_time"> - xs:annotation - xs:documentationThe Resource type defines one or more call-time metrics.</xs:documentation> - </xs:annotation> - </xs:enumeration> - <xs:enumeration - value="support"> - xs:annotation - xs:documentationThe Resource type defines support snapshots.</xs:documentation> - </xs:annotation> - </xs:enumeration> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType - name="PlacementType"> - xs:annotation - xs:documentationDescribes the relative placement of an extension to another extension.</xs:documentation> - </xs:annotation> - <xs:restriction - base="xs:string"> - <xs:enumeration - value="before"></xs:enumeration> - <xs:enumeration - value="after"></xs:enumeration> - <xs:enumeration - value="firstChild"></xs:enumeration> - <xs:enumeration - value="lastChild"></xs:enumeration> - </xs:restriction> - </xs:simpleType> - - <xs:simpleType - name="LicenseFeatureType"> - xs:annotation - xs:documentationA license type.</xs:documentation> - </xs:annotation> - <xs:restriction - base="xs:string"> - <xs:enumeration - value="monitoring"></xs:enumeration> - </xs:restriction> - </xs:simpleType> - -</xs:schema> diff --git a/modules/enterprise/server/xml-schemas/src/test/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtilTest.java b/modules/enterprise/server/xml-schemas/src/test/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtilTest.java index 0669b76..20d5c4e 100644 --- a/modules/enterprise/server/xml-schemas/src/test/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtilTest.java +++ b/modules/enterprise/server/xml-schemas/src/test/java/org/rhq/enterprise/server/xmlschema/ServerPluginDescriptorUtilTest.java @@ -47,9 +47,7 @@ import org.rhq.enterprise.server.xmlschema.generated.serverplugin.ServerPluginCo import org.rhq.enterprise.server.xmlschema.generated.serverplugin.ServerPluginDescriptorType; import org.rhq.enterprise.server.xmlschema.generated.serverplugin.alert.AlertPluginDescriptorType; import org.rhq.enterprise.server.xmlschema.generated.serverplugin.bundle.BundlePluginDescriptorType; -import org.rhq.enterprise.server.xmlschema.generated.serverplugin.entitlement.EntitlementPluginDescriptorType; import org.rhq.enterprise.server.xmlschema.generated.serverplugin.generic.GenericPluginDescriptorType; -import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType;
/** * Tests that we can parse server-side plugin descriptors. @@ -230,43 +228,6 @@ public class ServerPluginDescriptorUtilTest { assert config.getPropertyDefinitionSimple("alertprop1") != null; }
- public void testPerspectivePluginDescriptor() throws Exception { - String testXml = "test-serverplugin-perspective.xml"; - ServerPluginDescriptorType data = parseTestXml(testXml); - assert data instanceof PerspectivePluginDescriptorType; - PerspectivePluginDescriptorType descriptor = (PerspectivePluginDescriptorType) data; - - assert descriptor.getApiVersion().equals("1.0"); - assert descriptor.getVersion().equals("1.0"); - assert descriptor.getName().equals("SamplePerspective"); - assert descriptor.getDisplayName().equals("Sample Perspective"); - assert descriptor.getDescription().equals("A Sample Perspective Utilizing Every Extension Point and Filter"); - assert descriptor.getPackage().equals("org.rhq.perspective.sample"); - } - - public void testEntitlementPluginDescriptor() throws Exception { - String testXml = "test-serverplugin-entitlement.xml"; - ServerPluginDescriptorType data = parseTestXml(testXml); - assert data instanceof EntitlementPluginDescriptorType; - EntitlementPluginDescriptorType descriptor = (EntitlementPluginDescriptorType) data; - - // check the validity of the root element - assert descriptor.getApiVersion().equals("1.2"); - assert descriptor.getVersion().equals("2.3"); - assert descriptor.getName().equals("entitlement name"); - assert descriptor.getDisplayName().equals("entitlement display"); - assert descriptor.getDescription().equals("entitlement description"); - assert descriptor.getPackage().equals("entitlement.package"); - - // check the validity of the plugin config definition - ConfigurationDescriptor pluginConfigXml = descriptor.getPluginConfiguration(); - assert pluginConfigXml != null : "should have parsed the plugin config"; - ConfigurationDefinition configDef = ConfigurationMetadataParser.parse("test", pluginConfigXml); - assert configDef != null : "should have parsed the plugin config properties"; - PropertyDefinitionSimple propDef = configDef.getPropertyDefinitionSimple("entitlementprop1"); - assert propDef != null : "missing a simple property definition"; - } - public void testBundlePluginDescriptor() throws Exception { String testXml = "test-serverplugin-bundle.xml"; ServerPluginDescriptorType data = parseTestXml(testXml); diff --git a/modules/enterprise/server/xml-schemas/src/test/resources/test-serverplugin-entitlement.xml b/modules/enterprise/server/xml-schemas/src/test/resources/test-serverplugin-entitlement.xml deleted file mode 100644 index 166374d..0000000 --- a/modules/enterprise/server/xml-schemas/src/test/resources/test-serverplugin-entitlement.xml +++ /dev/null @@ -1,22 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<entitlement-plugin apiVersion="1.2" - version="2.3" - name="entitlement name" - displayName="entitlement display" - description="entitlement description" - package="entitlement.package" - xmlns="urn:xmlns:rhq-serverplugin.entitlement" - xmlns:sp="urn:xmlns:rhq-serverplugin" - xmlns:c="urn:xmlns:rhq-configuration" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%22%3E - - sp:help<![CDATA[help text with <em>XML</em>]]></sp:help> - - <sp:plugin-component class="entitlement.plugin.component" /> - - sp:plugin-configuration - <!-- custom global config - unrelated to schedules --> - <c:simple-property name="entitlementprop1" type="string" required="true" default="entitlementprop1value" /> - </sp:plugin-configuration> -</entitlement-plugin> diff --git a/modules/enterprise/server/xml-schemas/src/test/resources/test-serverplugin-perspective.xml b/modules/enterprise/server/xml-schemas/src/test/resources/test-serverplugin-perspective.xml deleted file mode 100644 index 8bc5462..0000000 --- a/modules/enterprise/server/xml-schemas/src/test/resources/test-serverplugin-perspective.xml +++ /dev/null @@ -1,14 +0,0 @@ -<?xml version="1.0" encoding="UTF-8"?> - -<perspective-plugin - apiVersion="1.0" - version="1.0" - description="A Sample Perspective Utilizing Every Extension Point and Filter" - displayName="Sample Perspective" - name="SamplePerspective" - package="org.rhq.perspective.sample" - xmlns="urn:xmlns:rhq-serverplugin.perspective" - xmlns:serverplugin="urn:xmlns:rhq-serverplugin" - xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance%22%3E - -</perspective-plugin>
rhq-commits@lists.fedorahosted.org