[rhq] Branch 'rhq-on-as7' - .classpath etc/samples modules/enterprise
by mazz
.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(a)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")
-(a)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")
-(a)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")
-(a)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">
-
- <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">
-
- <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">
-<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">
-<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">
-
- <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">
-
- <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">
-
-<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:remove>Display welcome to wizard and ask first questions.</ui:remove>
-<ui:remove>In 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">
-
- <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">
-
-
-
- <!-- 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">
-
- <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
- */
-//(a)Name(PerspectiveClientUIBean.NAME)
-//(a)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">
-
- <!-- 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">
-
- <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">
-
-<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">
-
- <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">
-
- <!-- 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/">
- <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">
- <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")
-(a)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")
-(a)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")
-(a)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">
-
- <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">
-
- <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">
-
- <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">
-
- <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">
-
- <!-- 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:documentation>Schema 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:documentation>Defines 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:documentation>The 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:documentation>Declares 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:documentation>Internal 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:documentation>The 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:documentation>All extensions extend this type.</xs:documentation>
- </xs:annotation>
- <xs:sequence>
- <xs:element
- name="description"
- type="perspective:DescriptionType"
- minOccurs="0"
- maxOccurs="1">
- <xs:annotation>
- <xs:documentation>An 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:documentation>Internal 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:documentation>The 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:documentation>The 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:documentation>All 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:documentation>The display name for this extension.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute
- name="iconUrl"
- type="xs:anyURI"
- use="optional">
- <xs:annotation>
- <xs:documentation>The 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:documentation>Add 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:documentation>The 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:documentation>An 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:documentation>An 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:documentation>A (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:documentation>Specifies 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:documentation>An 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:documentation>A 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:documentation>If 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:documentation>If 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:documentation>An 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:documentation>Specifies 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:documentation>An 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:documentation>A 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:documentation>A 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:documentation>The page extension point name.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:complexType>
-
- <xs:complexType
- name="PageLinkType">
- <xs:annotation>
- <xs:documentation>A 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:documentation>An 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:documentation>Activators 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:documentation>If 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:documentation>A 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:documentation>All Activators extend this type.</xs:documentation>
- </xs:annotation>
- </xs:complexType>
-
- <!-- Global Activators
--->
- <xs:complexType
- name="LicenseFeatureActivatorType">
- <xs:annotation>
- <xs:documentation>A 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:documentation>The 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:documentation>Debug 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:documentation>The 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:documentation>The required Global permission.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType
- name="InventoryActivatorType">
- <xs:annotation>
- <xs:documentation>The 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:documentation>The 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:documentation>The 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:documentation>The facet name.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType
- name="ResourcePermissionActivatorType">
- <xs:annotation>
- <xs:documentation>The 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:documentation>The Resource permission name.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- </xs:extension>
- </xs:complexContent>
- </xs:complexType>
-
- <xs:complexType
- name="TraitActivatorType">
- <xs:annotation>
- <xs:documentation>The 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:documentation>The 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:documentation>A 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:documentation>The 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:documentation>The 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:documentation>The 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:documentation>The 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:documentation>The in-context content source. The name.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute
- name="product"
- type="xs:string"
- use="optional">
- <xs:annotation>
- <xs:documentation>The 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:documentation>The in-context repo. The name.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute
- name="package-type"
- type="xs:string"
- use="optional">
- <xs:annotation>
- <xs:documentation>The 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:documentation>Resource 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:documentation>Plugin for the specified resource type.</xs:documentation>
- </xs:annotation>
- </xs:attribute>
- <xs:attribute
- name="type"
- type="xs:string"
- use="required">
- <xs:annotation>
- <xs:documentation>Resource 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:documentation>Defines 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:documentation>Position 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:documentation>The Resource type defines one or more metrics.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration
- value="event">
- <xs:annotation>
- <xs:documentation>The 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:documentation>The Resource type defines one or more operations.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration
- value="content">
- <xs:annotation>
- <xs:documentation>The Resource type defines one or more packages.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration
- value="call_time">
- <xs:annotation>
- <xs:documentation>The Resource type defines one or more call-time metrics.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- <xs:enumeration
- value="support">
- <xs:annotation>
- <xs:documentation>The Resource type defines support snapshots.</xs:documentation>
- </xs:annotation>
- </xs:enumeration>
- </xs:restriction>
- </xs:simpleType>
-
- <xs:simpleType
- name="PlacementType">
- <xs:annotation>
- <xs:documentation>Describes 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:documentation>A 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">
-
- <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">
-
-</perspective-plugin>
11 years, 8 months
[rhq] Branch 'rhq-on-as7' - 2 commits - modules/enterprise
by mazz
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java | 5
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java | 4
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/entitlement/EntitlementManagerBean.java | 118 --
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/entitlement/EntitlementManagerLocal.java | 29
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/Extension.java | 92 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/MenuItem.java | 90 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PageLink.java | 48
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveException.java | 40
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java | 477 ---------
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerHelper.java | 42
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveTarget.java | 108 --
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/RenderedExtension.java | 53 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/Tab.java | 84 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/AbstractGlobalActivator.java | 33
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/AbstractResourceOrGroupActivator.java | 33
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/Activator.java | 37
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ActivatorHelper.java | 269 -----
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/FacetActivator.java | 39
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/GlobalPermissionActivator.java | 39
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/InventoryActivator.java | 74 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/LicenseFeature.java | 26
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/LicenseFeatureActivator.java | 40
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourceConditionSet.java | 85 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourcePermissionActivator.java | 39
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourceTypeActivator.java | 82 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/SuperuserActivator.java | 34
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/TraitActivator.java | 48
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/AbstractResourceOrGroupActivationContext.java | 54 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ActivationContext.java | 30
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ActivationContextScope.java | 35
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GlobalActivationContext.java | 87 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java | 98 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java | 99 -
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/MasterServerPluginContainer.java | 4
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementPluginValidator.java | 37
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementServerPluginContainer.java | 50
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementServerPluginManager.java | 51
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectivePluginValidator.java | 30
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectiveServerPluginContainer.java | 50
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectiveServerPluginManager.java | 268 -----
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/metadata/PerspectivePluginMetadataManager.java | 513 ----------
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java | 6
modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/StandardServerPluginService.java | 4
43 files changed, 4 insertions(+), 3480 deletions(-)
New commits:
commit c206f1cfb90856b4fc2c53060a87dc8b8a7992b1
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Sep 5 14:23:57 2012 -0400
remove Seam
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java
index 3a266e8..bd15f35 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java
@@ -46,7 +46,6 @@ import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.authz.AuthorizationManagerLocal;
import org.rhq.enterprise.server.measurement.AvailabilityManagerLocal;
import org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal;
-import org.rhq.enterprise.server.perspective.Tab;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
@@ -70,7 +69,7 @@ public class ResourceUIBean {
private Resource parent;
private ResourcePermission permissions;
private ResourceFacets facets;
- private List<Tab> tabs;
+ private List<?> tabs;
private ResourceError invalidPluginConfigurationError;
private ResourceAvailabilitySummary availabilitySummary;
private AvailabilityType availabilityType;
@@ -185,7 +184,7 @@ public class ResourceUIBean {
return this.facets;
}
- public List<Tab> getTabs() {
+ public List<?> getTabs() {
return this.tabs;
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java
index e8a38ed..d7d19fc 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java
@@ -43,9 +43,9 @@ public class PerspectiveUIBean {
//PerspectiveManagerLocal perspectiveManager = LookupUtil.getPerspectiveManager();
- public List<org.rhq.enterprise.server.perspective.MenuItem> getCoreMenu() {
+ public List<?> getCoreMenu() {
Subject subject = EnterpriseFacesContextUtility.getSubject();
- List<org.rhq.enterprise.server.perspective.MenuItem> result = null;
+ List<?> result = null;
try {
//result = perspectiveManager.getMenu(subject);
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/Extension.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/Extension.java
deleted file mode 100644
index 67ecbd1..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/Extension.java
+++ /dev/null
@@ -1,92 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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 java.util.ArrayList;
-import java.util.List;
-
-import org.rhq.enterprise.server.perspective.activator.Activator;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.ExtensionType;
-
-/**
- * A GUI extension defined by the Perspective subsystem. Currently there are four types of extensions -
- * menu item, tab, global task, and Resource task.
- *
- * @author Ian Springer
- */
-public abstract class Extension {
- protected String perspectiveName;
- protected String name;
- protected String url;
- protected boolean debugMode;
- private List<Activator<?>> activators;
-
- public Extension(ExtensionType rawExtension, String perspectiveName, String url) {
- this.perspectiveName = perspectiveName;
- this.name = rawExtension.getName();
- this.url = url;
- this.activators = new ArrayList<Activator<?>>();
- this.debugMode = false;
- }
-
- public String getPerspectiveName() {
- return perspectiveName;
- }
-
- public String getName() {
- return name;
- }
-
- public String getUrl() {
- return url;
- }
-
- public boolean isDebugMode() {
- return debugMode;
- }
-
- public List<Activator<?>> getActivators() {
- return activators;
- }
-
- @Override
- public boolean equals(Object o) {
- if (this == o)
- return true;
- if (o == null || getClass() != o.getClass())
- return false;
-
- Extension extension = (Extension) o;
-
- if (!name.equals(extension.name))
- return false;
-
- return true;
- }
-
- @Override
- public int hashCode() {
- return name.hashCode();
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName() + "[name=" + this.name + ", url=" + this.url + "]";
- }
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/MenuItem.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/MenuItem.java
deleted file mode 100644
index 5d7758a..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/MenuItem.java
+++ /dev/null
@@ -1,90 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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 java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jetbrains.annotations.NotNull;
-
-import org.rhq.enterprise.server.perspective.activator.ActivatorHelper;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.MenuItemFeatureType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.MenuItemType;
-
-/**
- * An item in the RHQ GUI's menu.
- */
-public class MenuItem extends RenderedExtension implements Serializable, Cloneable {
- private static final long serialVersionUID = 1L;
-
- private MenuItemFeatureType feature;
- private boolean newWindow;
- private boolean addBreak;
- private List<MenuItem> children;
-
- public MenuItem(MenuItemType rawMenuItem, String perspectiveName) {
- super(rawMenuItem, perspectiveName, rawMenuItem.getUrl());
- this.feature = rawMenuItem.getFeature();
- this.newWindow = rawMenuItem.isNewWindow();
- this.addBreak = rawMenuItem.isAddBreak();
- this.children = new ArrayList<MenuItem>();
- this.debugMode = ActivatorHelper.initGlobalActivators(rawMenuItem.getActivators(), getActivators());
- }
-
- public MenuItemFeatureType getFeature() {
- return feature;
- }
-
- public boolean isNewWindow() {
- return newWindow;
- }
-
- public boolean isAddBreak() {
- return addBreak;
- }
-
- @NotNull
- public List<MenuItem> getChildren() {
- return children;
- }
-
- public void setChildren(List<MenuItem> children) {
- this.children = (children != null) ? children : new ArrayList<MenuItem>();
- }
-
- public boolean isMenuGroup() {
- return (null != this.children && this.children.size() > 0);
- }
-
- public boolean isGraphic() {
- String displayName = getDisplayName();
- return (null == displayName || "".equals(displayName.trim()));
- }
-
- /**
- * Note that this will clone the children list but not the child MenuItem objects themselves.
- * @see java.lang.Object#clone()
- */
- @Override
- protected Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PageLink.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PageLink.java
deleted file mode 100644
index 4454555..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PageLink.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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 java.io.Serializable;
-
-import org.rhq.enterprise.server.perspective.activator.ActivatorHelper;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PageLinkType;
-
-/**
- * An item in the RHQ GUI's menu.
- */
-public class PageLink extends Extension implements Serializable, Cloneable {
- private static final long serialVersionUID = 1L;
-
- private String pageName;
-
- public PageLink(PageLinkType rawPageLink, String perspectiveName, String pageName, String url) {
- super(rawPageLink, perspectiveName, url);
-
- this.pageName = pageName;
- this.debugMode = ActivatorHelper.initGlobalActivators(rawPageLink.getActivators(), getActivators());
- }
-
- /**
- * @return the pageName
- */
- public String getPageName() {
- return pageName;
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveException.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveException.java
deleted file mode 100644
index b238b44..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveException.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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;
-
-public class PerspectiveException extends Exception {
-
- private static final long serialVersionUID = 1L;
-
- public PerspectiveException() {
- }
-
- public PerspectiveException(String message) {
- super(message);
- }
-
- public PerspectiveException(Throwable cause) {
- super(cause);
- }
-
- public PerspectiveException(String message, Throwable cause) {
- super(message, cause);
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java
deleted file mode 100644
index 1b1f5fb..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java
+++ /dev/null
@@ -1,477 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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 java.util.ArrayList;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-
-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.core.domain.cloud.Server;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.enterprise.server.auth.SubjectManagerLocal;
-import org.rhq.enterprise.server.cloud.instance.ServerManagerLocal;
-import org.rhq.enterprise.server.perspective.activator.Activator;
-import org.rhq.enterprise.server.perspective.activator.context.ActivationContext;
-import org.rhq.enterprise.server.perspective.activator.context.ActivationContextScope;
-import org.rhq.enterprise.server.perspective.activator.context.GlobalActivationContext;
-import org.rhq.enterprise.server.perspective.activator.context.ResourceActivationContext;
-import org.rhq.enterprise.server.plugin.pc.perspective.metadata.PerspectivePluginMetadataManager;
-
-/**
- * @author Jay Shaughnessy
- * @author Ian Springer
- */
-//@Stateless
-public class PerspectiveManagerBean {//implements PerspectiveManagerLocal {
-
- // Map of sessionId to cached menu entry. The cached menu is re-used for the same sessionId.
- // This should more appropriately use Subject as the key, but since Subject equality is
- // based on username, it's not quite appropriate.
- // The cache is cleaned anytime there is a new entry.
- static private final Map<Integer, CacheEntry> CACHE = new HashMap<Integer, CacheEntry>();
-
- static private Server server = null;
-
- private final Log log = LogFactory.getLog(PerspectiveManagerBean.class);
-
- //@EJB
- private ServerManagerLocal serverManager;
-
- //@EJB
- private SubjectManagerLocal subjectManager;
-
- /* (non-Javadoc)
- * @see org.rhq.enterprise.server.perspective.PerspectiveManagerLocal#getCoreMenu(org.rhq.core.domain.auth.Subject)
- */
- public synchronized List<MenuItem> getMenu(Subject subject) throws PerspectiveException {
- CacheEntry cacheEntry = getCacheEntry(subject);
- List<MenuItem> menu = cacheEntry.getMenu();
- return menu;
- }
-
- @NotNull
- public List<Tab> getResourceTabs(Subject subject, Resource resource) {
- // First get a cached copy of the tabs that has the global-scoped activators already applied in the context of
- // the current Subject.
- CacheEntry cacheEntry = getCacheEntry(subject);
- List<Tab> tabs = cacheEntry.getTabs();
-
- // Now apply the Resource-scoped activators in the context of the current Resource.
- ResourceActivationContext context = new ResourceActivationContext(subject, resource);
- EnumSet<ActivationContextScope> scopes = EnumSet.of(ActivationContextScope.RESOURCE_OR_GROUP);
- List<Tab> filteredTabs = applyActivatorsToTabs(context, scopes, tabs);
-
- return filteredTabs;
- }
-
- public String getPageLink(Subject subject, String pageName, String linkName, String defaultValue) {
- CacheEntry cacheEntry = getCacheEntry(subject);
- List<PageLink> pageLinks = cacheEntry.getPageLinks();
-
- String result = defaultValue;
-
- for (PageLink pageLink : pageLinks) {
- if (pageLink.getPageName().equals(pageName) && pageLink.getName().equals(linkName)) {
- result = pageLink.getUrl();
- break;
- }
- }
-
- return result;
- }
-
- /**
- * Recursively applies activators, based on the specified contexts, to a menu, and returns a
- * filtered, deep copy of the menu. The supplied <menu> is unmodified.
- */
- private List<MenuItem> applyActivatorsToMenu(ActivationContext context, EnumSet<ActivationContextScope> scopes,
- List<MenuItem> menu) {
-
- List<MenuItem> filteredMenu = new ArrayList<MenuItem>();
- for (MenuItem menuItem : menu) {
- if (isActive(context, scopes, menuItem)) {
- MenuItem clone = null;
- try {
- clone = (MenuItem) menuItem.clone();
- } catch (CloneNotSupportedException e) {
- log.error("Invalid Clone - This should not happen: " + e);
- }
-
- filteredMenu.add(clone);
- // Recurse...
- List<MenuItem> filteredChildren = applyActivatorsToMenu(context, scopes, clone.getChildren());
- clone.setChildren(filteredChildren);
- }
- }
- return filteredMenu;
- }
-
- /**
- * Recursively applies activators, based on the specified contexts, to a list of tabs, and returns a
- * filtered, deep copy of the list. The supplied <tabs> are unmodified.
- */
- private List<Tab> applyActivatorsToTabs(ActivationContext context, EnumSet<ActivationContextScope> scopes,
- List<Tab> tabs) {
-
- List<Tab> filteredTabs = new ArrayList<Tab>();
- for (Tab tab : tabs) {
- if (isActive(context, scopes, tab)) {
- Tab clone = null;
- try {
- clone = (Tab) tab.clone();
- } catch (CloneNotSupportedException e) {
- log.error("Invalid Clone - This should not happen: " + e);
- }
- filteredTabs.add(clone);
- // Recurse...
- List<Tab> filteredChildren = applyActivatorsToTabs(context, scopes, clone.getChildren());
- clone.setChildren(filteredChildren);
- }
- }
- return filteredTabs;
- }
-
- /**
- * Applies activators, based on the specified contexts, to a list of PageLinks, and returns a
- * filtered list. The supplied <List> is unmodified.
- */
- private List<PageLink> applyActivatorsToPageLinks(ActivationContext context,
- EnumSet<ActivationContextScope> scopes, List<PageLink> pageLinks) {
-
- List<PageLink> filteredPageLinks = new ArrayList<PageLink>();
- for (PageLink pageLink : pageLinks) {
- if (isActive(context, scopes, pageLink)) {
- filteredPageLinks.add(pageLink);
- }
- }
-
- return filteredPageLinks;
- }
-
- @SuppressWarnings("unchecked")
- private boolean isActive(ActivationContext context, EnumSet<ActivationContextScope> scopes, Extension extension) {
- List<Activator<?>> activators = extension.getActivators();
- for (Activator activator : activators) {
- if (scopes.contains(activator.getScope()) && !activator.isActive(context)) {
- return false;
- }
- }
- return true;
- }
-
- private CacheEntry getCacheEntry(Subject subject) {
- Integer sessionId = subject.getSessionId();
- CacheEntry cacheEntry;
- synchronized (CACHE) {
- cacheEntry = CACHE.get(sessionId);
- }
- long metadataLastModifiedTime = getPluginMetadataManager().getLastModifiedTime();
- if (cacheEntry == null || cacheEntry.getMetadataLastModifiedTime() < metadataLastModifiedTime) {
- // Take this opportunity to clean expired sessions from the cache.
- cleanCache();
-
- GlobalActivationContext context = new GlobalActivationContext(subject);
- EnumSet<ActivationContextScope> scopes = EnumSet.of(ActivationContextScope.GLOBAL);
-
- List<MenuItem> baseMenu = getPluginMetadataManager().getMenu();
- List<MenuItem> filteredMenu = applyActivatorsToMenu(context, scopes, baseMenu);
-
- List<Tab> baseTabs = getPluginMetadataManager().getResourceTabs();
- List<Tab> filteredTabs = applyActivatorsToTabs(context, scopes, baseTabs);
-
- List<PageLink> basePageLinks = getPluginMetadataManager().getPageLinks();
- List<PageLink> filteredPageLinks = applyActivatorsToPageLinks(context, scopes, basePageLinks);
-
- cacheEntry = new CacheEntry(metadataLastModifiedTime, filteredMenu, filteredTabs, filteredPageLinks);
- synchronized (CACHE) {
- CACHE.put(sessionId, cacheEntry);
- }
- }
- return cacheEntry;
- }
-
- private PerspectivePluginMetadataManager getPluginMetadataManager() {
- return PerspectiveManagerHelper.getPluginMetadataManager();
- }
-
- // TODO: Is there any sort of listener approach we could use to clear an individual cache entry
- // for various events like: change to role defs, change to inventory? Perhaps even a manual or
- // automated refresh for the session?
- private void cleanCache() {
- Subject subject;
-
- synchronized (CACHE) {
- Iterator<Integer> iterator = CACHE.keySet().iterator(); // so we can use iterator.remove and avoid concurrent-mod-exception
- while (iterator.hasNext()) {
- Integer sessionId = iterator.next();
- try {
- subject = subjectManager.getSubjectBySessionId(sessionId);
- if (null == subject) {
- log.debug("Removing perspective cache entry for session. " + sessionId);
- iterator.remove();
- }
- } catch (Exception e) {
- log.debug("Removing perspective cache entry for session: " + sessionId);
- iterator.remove();
- }
- }
- }
- }
-
- // TODO: remove this debug code
- @SuppressWarnings("unused")
- private void printMenu(List<MenuItem> menu, String indent) {
- if (null == menu)
- return;
-
- for (MenuItem menuItem : menu) {
- System.out.println(indent + menuItem.getName());
- printMenu(menuItem.getChildren(), indent + "..");
- }
- }
-
- private static class CacheEntry {
- private long metadataLastModifiedTime;
-
- // This is a copy of the base menu that has had all global-scoped activators already applied to it.
- // We cache it because the variables used by the global activators do not change very often.
- private List<MenuItem> menu;
-
- // This is a copy of the base tabs that has had all global-scoped activators already applied to it.
- // We cache it because the variables used by the global activators do not change very often.
- private List<Tab> tabs;
-
- // This is a list of references into the base pageLinks that has had all global-scoped activators
- // already applied to it. We cache it because the variables used by the global activators do not
- // change very often.
- private List<PageLink> pageLinks;
-
- public CacheEntry(long metadataLastModifiedTime, List<MenuItem> menu, List<Tab> tabs, List<PageLink> pageLinks) {
- this.metadataLastModifiedTime = metadataLastModifiedTime;
- this.menu = menu;
- this.tabs = tabs;
- this.pageLinks = pageLinks;
- }
-
- public long getMetadataLastModifiedTime() {
- return metadataLastModifiedTime;
- }
-
- public List<MenuItem> getMenu() {
- return menu;
- }
-
- public List<Tab> getTabs() {
- return tabs;
- }
-
- public List<PageLink> getPageLinks() {
- return pageLinks;
- }
- }
-
- /**
- * Given a targetUrlKey parameter value, as set in the extension, resolve that key into the targetUrl
- * for the extension's content.
- *
- * @param key, a valid key
- * @return the target url
- *
- */
- public String getUrlViaKey(int key) throws PerspectiveException {
- try {
- return getPluginMetadataManager().getUrlViaKey(key);
- } catch (Exception e) {
- throw new PerspectiveException("Failed to get URL for key: " + key, e);
- }
- }
-
- /* (non-Javadoc)
- * @see org.rhq.enterprise.server.perspective.PerspectiveManagerLocal#getMenuUrl(org.rhq.core.domain.auth.Subject, java.lang.String)
- */
- public String getMenuItemUrl(Subject subject, String menuItemName, boolean makeExplicit, boolean makeSecure) {
- if (null == menuItemName) {
- throw new IllegalArgumentException("Invalid menuItemName: null ");
- }
-
- String result = null;
-
- try {
- result = getMenuItemUrlByName(menuItemName, getMenu(subject));
- } catch (Exception e) {
- throw new IllegalArgumentException("Invalid menuItemName: " + menuItemName, e);
- }
-
- return (null == result) ? result : makeUrl(result, makeExplicit, makeSecure);
- }
-
- private String getMenuItemUrlByName(String menuItemName, List<MenuItem> menuItems) {
- if (null == menuItems) {
- return null;
- }
-
- String result = null;
-
- for (MenuItem menuItem : menuItems) {
- String url = menuItem.getUrl();
- if (null != url && menuItemName.equals(menuItem.getName())) {
- result = url;
- break;
- } else {
- result = getMenuItemUrlByName(menuItemName, menuItem.getChildren());
- if (null != result) {
- break;
- }
- }
- }
-
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.rhq.enterprise.server.perspective.PerspectiveManagerLocal#getResourceTabUrl(org.rhq.core.domain.auth.Subject, java.lang.String)
- */
- public String getResourceTabUrl(Subject subject, String tabName, int resourceId, boolean makeExplicit,
- boolean makeSecure) {
- if (null == tabName) {
- throw new IllegalArgumentException("Invalid tabName: null ");
- }
-
- String result = null;
-
- try {
- result = getResourceTabUrlByName(tabName, this.getPluginMetadataManager().getResourceTabs());
- } catch (Exception e) {
- throw new IllegalArgumentException("Invalid tabName: " + tabName, e);
- }
-
- return (null == result) ? result : makeUrl(result, makeExplicit, makeSecure);
- }
-
- private String getResourceTabUrlByName(String tabName, List<Tab> tabs) {
- if (null == tabs) {
- return null;
- }
-
- String result = null;
-
- for (Tab tab : tabs) {
- String url = tab.getUrl();
- if (null != url && tabName.equals(tab.getName())) {
- result = url;
- break;
- } else {
- result = getResourceTabUrlByName(tabName, tab.getChildren());
- if (null != result) {
- break;
- }
- }
- }
-
- return result;
-
- }
-
- /*
- * @see org.rhq.enterprise.server.perspective.PerspectiveManagerLocal#getRootUrl(org.rhq.core.domain.auth.Subject)
- */
- public String getRootUrl(Subject subject, boolean makeExplicit, boolean makeSecure) {
- return makeUrl("/", makeExplicit, makeSecure);
- }
-
- /*
- * @see org.rhq.enterprise.server.perspective.PerspectiveManagerLocal#getTargetUrl(org.rhq.core.domain.auth.Subject, org.rhq.enterprise.server.perspective.PerspectiveTarget, int, boolean, boolean)
- */
- public String getTargetUrl(Subject subject, PerspectiveTarget target, int targetId, boolean makeExplicit,
- boolean makeSecure) {
-
- return makeUrl(target.getTargetUrl(targetId), makeExplicit, makeSecure);
- }
-
- /*
- * @see org.rhq.enterprise.server.perspective.PerspectiveManagerLocal#getTargetUrls(org.rhq.core.domain.auth.Subject, org.rhq.enterprise.server.perspective.PerspectiveTarget, int[], boolean, boolean)
- */
- public Map<Integer, String> getTargetUrls(Subject subject, PerspectiveTarget target, int[] targetIds,
- boolean makeExplicit, boolean makeSecure) {
-
- Map<Integer, String> result = new HashMap<Integer, String>(targetIds.length);
-
- for (int targetId : targetIds) {
- result.put(targetId, makeUrl(target.getTargetUrl(targetId), makeExplicit, makeSecure));
- }
-
- return result;
- }
-
- /*
- * @see org.rhq.enterprise.server.perspective.PerspectiveManagerLocal#getResourceTargetUrl(org.rhq.core.domain.auth.Subject, int, org.rhq.enterprise.server.perspective.PerspectiveTarget, int, boolean, boolean)
- */
- public String getResourceTargetUrl(Subject subject, int resourceId, PerspectiveTarget target, int targetId,
- boolean makeExplicit, boolean makeSecure) {
-
- return makeUrl(target.getResourceTargetUrl(resourceId, targetId), makeExplicit, makeSecure);
- }
-
- /*
- * @see org.rhq.enterprise.server.perspective.PerspectiveManagerLocal#getResourceTargetUrls(org.rhq.core.domain.auth.Subject, int, org.rhq.enterprise.server.perspective.PerspectiveTarget, int[], boolean, boolean)
- */
- public Map<Integer, String> getResourceTargetUrls(Subject subject, int resourceId, PerspectiveTarget target,
- int[] targetIds, boolean makeExplicit, boolean makeSecure) {
-
- Map<Integer, String> result = new HashMap<Integer, String>(targetIds.length);
-
- for (int targetId : targetIds) {
- result.put(targetId, makeUrl(target.getResourceTargetUrl(resourceId, targetId), makeExplicit, makeSecure));
- }
-
- return result;
- }
-
- /* (non-Javadoc)
- * @see org.rhq.enterprise.server.perspective.PerspectiveManagerLocal#getTemplateTargetUrl(org.rhq.core.domain.auth.Subject, int, org.rhq.enterprise.server.perspective.PerspectiveTarget, int, boolean, boolean)
- */
- public String getTemplateTargetUrl(Subject subject, int resourceId, PerspectiveTarget target, int targetId,
- boolean makeExplicit, boolean makeSecure) {
-
- return makeUrl(target.getTemplateTargetUrl(resourceId, targetId), makeExplicit, makeSecure);
- }
-
- private String makeUrl(String url, boolean makeExplicit, boolean makeSecure) {
- if (null == url || !makeExplicit || url.startsWith("http")) {
- return url;
- }
-
- if (null == server) {
- server = serverManager.getServer();
- }
-
- String protocol = (makeSecure) ? "https://" : "http://";
- int port = (makeSecure) ? server.getSecurePort() : server.getPort();
- String result = protocol + server.getAddress() + ":" + port + url;
- return result;
- }
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerHelper.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerHelper.java
deleted file mode 100644
index bcc6ba0..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerHelper.java
+++ /dev/null
@@ -1,42 +0,0 @@
-package org.rhq.enterprise.server.perspective;
-
-import org.rhq.enterprise.server.plugin.pc.MasterServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginServiceManagement;
-import org.rhq.enterprise.server.plugin.pc.perspective.PerspectiveServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.perspective.PerspectiveServerPluginManager;
-import org.rhq.enterprise.server.plugin.pc.perspective.metadata.PerspectivePluginMetadataManager;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-public class PerspectiveManagerHelper {
-
- public static PerspectiveServerPluginContainer getPluginContainer() {
- PerspectiveServerPluginContainer pc;
-
- try {
- ServerPluginServiceManagement mbean = LookupUtil.getServerPluginService();
- if (!mbean.isMasterPluginContainerStarted()) {
- throw new IllegalStateException("The master plugin container is not started!");
- }
-
- MasterServerPluginContainer master = mbean.getMasterPluginContainer();
- pc = master.getPluginContainerByClass(PerspectiveServerPluginContainer.class);
- } catch (IllegalStateException ise) {
- throw ise;
- } catch (Exception e) {
- throw new IllegalStateException("Cannot obtain the Perspective plugin container!", e);
- }
-
- if (pc == null) {
- throw new IllegalStateException("Perspective plugin container is null!");
- }
-
- return pc;
- }
-
- public static PerspectivePluginMetadataManager getPluginMetadataManager() {
- PerspectiveServerPluginManager manager = (PerspectiveServerPluginManager) getPluginContainer()
- .getPluginManager();
- return manager.getMetadataManager();
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveTarget.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveTarget.java
deleted file mode 100644
index 0ea233b..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveTarget.java
+++ /dev/null
@@ -1,108 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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;
-
-/**
- * @author jshaughnessy
- */
-public enum PerspectiveTarget {
- AGENT("/rhq/ha/viewAgent.xhtml?mode=view&agentId="), //
- ALERT("/alerts/Alerts.do?mode=viewAlert&a=", true, false), //
- ALERT_DEFINITION("/alerts/Config.do?mode=viewRoles&ad=", true, false), //
- ALERT_TEMPLATE("/alerts/Config.do?mode=viewRoles&ad=", false, true), //
- CONTENT_PROVIDER("/rhq/content/contentProvider.xhtml?mode=view&id="), //
- GROUP_COMPATIBLE("/rhq/group/monitor/graphs.xhtml?category=COMPATIBLE&groupId="), //
- GROUP_DEFINITION("/rhq/definition/group/view.xhtml?groupDefinitionId="), //
- GROUP_MIXED("/rhq/group/inventory/view.xhtml?category=MIXED&groupId="), //
- METRIC_TEMPLATE("/admin/platform/monitor/Config.do?mode=configure&id=", false, true), //
- REPO("/rhq/content/repo.xhtml?mode=view&id="), //
- RESOURCE("/rhq/resource/summary/summary.xhtml?id="), //
- ROLE("/admin/role/RoleAdmin.do?mode=view&r="), //
- SERVER("/rhq/ha/viewServer.xhtml?mode=view&serverId="), //
- USER("/admin/user/UserAdmin.do?mode=view&u=");
-
- private final String baseUrl;
- private final boolean isResourceTarget;
- private final boolean isTemplateTarget;
-
- PerspectiveTarget(String baseUrl) {
- this(baseUrl, false, false);
- }
-
- private PerspectiveTarget(String baseUrl, boolean isResourceTarget, boolean isTemplateTarget) {
- this.baseUrl = baseUrl;
- this.isResourceTarget = isResourceTarget;
- this.isTemplateTarget = isTemplateTarget;
- }
-
- /**
- * @param targetId The target id. For example, the group id.
- * @return The url path for the target.
- * @throws IllegalArgumentException If the PerspectiveTarget is resource qualified (requires a resource id).
- */
- public String getTargetUrl(int targetId) {
- if (this.isResourceTarget || this.isTemplateTarget) {
- throw new IllegalArgumentException(
- "This PerspectiveTarget requires resource or resource type information, use appropriate getter: "
- + this);
- }
-
- return this.baseUrl + targetId;
- }
-
- /**
- * @param resourceId The target's resource. For example, the resource on which the alert fired.
- * @param targetId The resource target. For example, the alert for the specified resource.
- * @return The url path for the resource qualified target.
- * @throws IllegalArgumentException If the PerspectiveTarget is not resource qualified.
- */
- public String getResourceTargetUrl(int resourceId, int targetId) {
- if (!this.isResourceTarget) {
- throw new IllegalArgumentException(
- "This is not a resource qualified PerspectiveTarget. Use appropriate getter: " + this);
- }
-
- return this.baseUrl + targetId + "&id=" + resourceId;
- }
-
- /**
- * @param resourceTypeId The target's resource type. For example, the resource type for the alert template.
- * @param targetId The target. For example, the alert definition for the alert template.
- * @return The url path for the template target.
- * @throws IllegalArgumentException If the PerspectiveTarget is not a template target.
- */
- public String getTemplateTargetUrl(int resourceTypeId, int targetId) {
- if (!this.isTemplateTarget) {
- throw new IllegalArgumentException("This is not a template PerspectiveTarget. Use appropriate getter: "
- + this);
- }
-
- return this.baseUrl + targetId + "&type=" + resourceTypeId;
- }
-
- public boolean isResourceTarget() {
- return isResourceTarget;
- }
-
- public boolean isTemplateTarget() {
- return isTemplateTarget;
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/RenderedExtension.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/RenderedExtension.java
deleted file mode 100644
index f21d0d5..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/RenderedExtension.java
+++ /dev/null
@@ -1,53 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.enterprise.server.xmlschema.generated.serverplugin.perspective.RenderedExtensionType;
-
-/**
- * A GUI extension defined by the Perspective subsystem. Currently there are four types of extensions -
- * menu item, tab, global task, and Resource task.
- *
- * @author Ian Springer
- */
-public abstract class RenderedExtension extends Extension {
-
- private String displayName;
- private String iconUrl;
-
- public RenderedExtension(RenderedExtensionType rawExtension, String perspectiveName, String url) {
- super(rawExtension, perspectiveName, url);
- this.displayName = rawExtension.getDisplayName();
- this.iconUrl = rawExtension.getIconUrl();
- }
-
- public String getDisplayName() {
- return displayName;
- }
-
- public String getIconUrl() {
- return iconUrl;
- }
-
- @Override
- public String toString() {
- return this.getClass().getSimpleName() + "[name=" + this.name + ", displayName=" + this.displayName + ", url="
- + this.url + ", iconUrl=" + this.iconUrl + "]";
- }
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/Tab.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/Tab.java
deleted file mode 100644
index 4d833f8..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/Tab.java
+++ /dev/null
@@ -1,84 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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 java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-import org.jetbrains.annotations.NotNull;
-
-import org.rhq.enterprise.server.perspective.activator.ActivatorHelper;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.TabType;
-
-/**
- * A tab in the Resource or Group view.
- *
- * @author Ian Springer
- */
-public class Tab extends RenderedExtension implements Serializable, Cloneable {
- private static final long serialVersionUID = 1L;
-
- private String name;
- private String qualifiedName;
- private List<Tab> children;
-
- public Tab(TabType rawTab, String perspectiveName) {
- super(rawTab, perspectiveName, rawTab.getUrl());
- this.name = getSimpleName(rawTab.getName());
- this.qualifiedName = rawTab.getName();
- if (rawTab.getApplication() != null) {
- this.url += "&tab=" + this.qualifiedName;
- }
- this.children = new ArrayList<Tab>();
- this.debugMode = ActivatorHelper.initResourceActivators(rawTab.getActivators(), getActivators());
- }
-
- @NotNull
- public List<Tab> getChildren() {
- return children;
- }
-
- public void setChildren(List<Tab> children) {
- this.children = (children != null) ? children : new ArrayList<Tab>();
- }
-
- public String getQualifiedName() {
- return qualifiedName;
- }
-
- public String getName() {
- return name;
- }
-
- private static String getSimpleName(String qualifiedName) {
- int lastDotIndex = qualifiedName.lastIndexOf(".");
- return qualifiedName.substring(lastDotIndex + 1);
- }
-
- /**
- * Note that this will clone the children list but not the child Tab objects themselves.
- * @see java.lang.Object#clone()
- */
- @Override
- protected Object clone() throws CloneNotSupportedException {
- return super.clone();
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/AbstractGlobalActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/AbstractGlobalActivator.java
deleted file mode 100644
index 419c10a..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/AbstractGlobalActivator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import org.rhq.enterprise.server.perspective.activator.context.ActivationContextScope;
-import org.rhq.enterprise.server.perspective.activator.context.GlobalActivationContext;
-
-/**
- * @author Ian Springer
- */
-public abstract class AbstractGlobalActivator implements Activator<GlobalActivationContext> {
- private static final long serialVersionUID = 1L;
-
- public ActivationContextScope getScope() {
- return ActivationContextScope.GLOBAL;
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/AbstractResourceOrGroupActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/AbstractResourceOrGroupActivator.java
deleted file mode 100644
index cb47d13..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/AbstractResourceOrGroupActivator.java
+++ /dev/null
@@ -1,33 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import org.rhq.enterprise.server.perspective.activator.context.AbstractResourceOrGroupActivationContext;
-import org.rhq.enterprise.server.perspective.activator.context.ActivationContextScope;
-
-/**
- * @author Ian Springer
- */
-public abstract class AbstractResourceOrGroupActivator implements Activator<AbstractResourceOrGroupActivationContext> {
- private static final long serialVersionUID = 1L;
-
- public ActivationContextScope getScope() {
- return ActivationContextScope.RESOURCE_OR_GROUP;
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/Activator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/Activator.java
deleted file mode 100644
index b08dcad..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/Activator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import java.io.Serializable;
-
-import org.rhq.enterprise.server.perspective.activator.context.ActivationContext;
-import org.rhq.enterprise.server.perspective.activator.context.ActivationContextScope;
-
-/**
- * @author Ian Springer
- */
-public interface Activator<C extends ActivationContext> extends Serializable {
- ActivationContextScope getScope();
-
- /**
- * @param context The context information required to process the activation conditions.
- * @return true if all of the activation cnditions for this Activator have been met. Otherwise, false.
- */
- boolean isActive(C context);
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ActivatorHelper.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ActivatorHelper.java
deleted file mode 100644
index 3e36830..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ActivatorHelper.java
+++ /dev/null
@@ -1,269 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Locale;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.core.domain.measurement.MeasurementDataTrait;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.resource.ResourceTypeFacet;
-import org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.CommonActivatorsType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.DebugModeActivatorType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.FacetActivatorType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.GlobalActivatorsType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.GlobalPermissionActivatorType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.InventoryActivatorType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.LicenseFeatureActivatorType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.ResourceActivatorsType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.ResourcePermissionActivatorType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.ResourceType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.SuperuserActivatorType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.TraitActivatorType;
-
-public class ActivatorHelper {
-
- private static final Log LOG = LogFactory.getLog(ActivatorHelper.class);
-
- /**
- * Test trait conditions against resources. Optionally, one or all resources must much all of the
- * trait conditions.
- *
- * @param subject The current user
- * @param traitMatchers The trait activator pattern matchers that must all be satisfied
- * @param resources The resources whose trait values will be tested
- * @param matchAll If true then all resources must pass, if false only one must pass
- * @return true if, optionally, all or any resources satisfy the trait conditions
- */
- public static boolean areTraitsSatisfied(Subject subject, Map<String, Matcher> traitMatchers,
- Collection<Resource> resources, boolean matchAll) {
-
- // return true if there are no trait activators to satisfy
- if (traitMatchers.isEmpty()) {
- return true;
- }
-
- MeasurementDataManagerLocal measurementDataManager = LookupUtil.getMeasurementDataManager();
-
- for (Resource resource : resources) {
- boolean traitsSatisfied = true;
- List<MeasurementDataTrait> traits = measurementDataManager.findCurrentTraitsForResource(subject, resource
- .getId(), null);
-
- int numTraitsTested = 0;
- for (MeasurementDataTrait trait : traits) {
- Matcher traitMatcher = traitMatchers.get(trait.getName());
- if (null != traitMatcher) {
- ++numTraitsTested;
-
- traitMatcher.reset(trait.getValue());
- if (!traitMatcher.find()) {
- traitsSatisfied = false;
- break;
- }
- }
- }
-
- if (traitsSatisfied) {
- if (numTraitsTested != traitMatchers.size()) {
- if (LOG.isDebugEnabled()) {
- String error = "" //
- + "Potential error in perspective descriptor." //
- + " Not all trait activators matched trait for resource type: " + traitMatchers.keySet() //
- + " Or, Trait value may not yet have been collected for resource.";
- LOG.debug(error);
- }
-
- return false;
- }
-
- if (!matchAll) {
- return true;
- }
- } else {
- if (matchAll) {
- return false;
- }
- }
- }
-
- // if we've run through all the resources then either every resource matched (for matchAll) or
- // every resource failed (for !matchAll)
- return matchAll;
- }
-
- public static boolean initCommonActivators(CommonActivatorsType rawActivators, List<Activator<?>> activators) {
- boolean debugMode = false;
-
- if (rawActivators == null) {
- return debugMode;
- }
-
- DebugModeActivatorType rawDebugModeActivator = rawActivators.getDebugMode();
- if (rawDebugModeActivator != null) {
- debugMode = true;
- }
-
- List<LicenseFeatureActivatorType> rawLicenseFeatures = rawActivators.getLicenseFeature();
- for (LicenseFeatureActivatorType rawLicenseFeature : rawLicenseFeatures) {
- String rawName = rawLicenseFeature.getName().value();
- LicenseFeature licenseFeature = LicenseFeature.valueOf(rawName.toUpperCase(Locale.US));
- LicenseFeatureActivator licenseFeatureActivator = new LicenseFeatureActivator(licenseFeature);
- activators.add(licenseFeatureActivator);
- }
-
- SuperuserActivatorType rawSuperuserActivator = rawActivators.getSuperuser();
- if (rawSuperuserActivator != null) {
- SuperuserActivator superuserActivator = new SuperuserActivator();
- activators.add(superuserActivator);
- }
-
- List<GlobalPermissionActivatorType> rawGlobalPermissionActivators = rawActivators.getGlobalPermission();
- for (GlobalPermissionActivatorType rawGlobalPermissionActivator : rawGlobalPermissionActivators) {
- String rawName = rawGlobalPermissionActivator.getName().value();
- Permission permission = Permission.valueOf(rawName.toUpperCase(Locale.US));
- GlobalPermissionActivator globalPermissionActivator = new GlobalPermissionActivator(permission);
- activators.add(globalPermissionActivator);
- }
-
- return debugMode;
- }
-
- public static boolean initGlobalActivators(GlobalActivatorsType rawActivators, List<Activator<?>> activators) {
- if (rawActivators == null) {
- return false;
- }
-
- // Let our super class init the "common" activators.
- boolean debugMode = initCommonActivators(rawActivators, activators);
-
- List<InventoryActivatorType> rawInventoryActivators = rawActivators.getInventory();
- for (InventoryActivatorType rawInventoryActivator : rawInventoryActivators) {
- List<ResourceType> rawResourceConditions = rawInventoryActivator.getResource();
- List<ResourceConditionSet> resourceConditionSets = new ArrayList<ResourceConditionSet>(
- rawResourceConditions.size());
- for (ResourceType rawResourceCondition : rawResourceConditions) {
- List<ResourcePermissionActivatorType> rawPermissions = rawResourceCondition.getResourcePermission();
- EnumSet<Permission> permissions = EnumSet.noneOf(Permission.class);
- for (ResourcePermissionActivatorType rawPermission : rawPermissions) {
- String rawName = rawPermission.getName().toString();
- Permission permission = Permission.valueOf(rawName.toUpperCase(Locale.US));
- permissions.add(permission);
- }
-
- List<TraitActivatorType> rawTraits = rawResourceCondition.getTrait();
- Map<String, Pattern> traits = new HashMap<String, Pattern>();
- for (TraitActivatorType rawTraitActivator : rawTraits) {
- String name = rawTraitActivator.getName();
- String value = rawTraitActivator.getValue();
- traits.put(name, Pattern.compile(value));
- }
-
- ResourceConditionSet resourceConditionSet = new ResourceConditionSet(rawResourceCondition.getPlugin(),
- rawResourceCondition.getType(), permissions, traits);
- resourceConditionSets.add(resourceConditionSet);
- }
- InventoryActivator resourceTypeActivator = new InventoryActivator(resourceConditionSets);
- activators.add(resourceTypeActivator);
- }
-
- return debugMode;
- }
-
- public static boolean initResourceActivators(ResourceActivatorsType rawActivators, List<Activator<?>> activators) {
- if (rawActivators == null) {
- return false;
- }
-
- // Let our super class init the "common" activators.
- boolean debugMode = initCommonActivators(rawActivators, activators);
-
- List<FacetActivatorType> rawFacetActivators = rawActivators.getFacet();
- for (FacetActivatorType rawFacetActivator : rawFacetActivators) {
- String rawName = rawFacetActivator.getName().toString();
- FacetActivator facetActivator = new FacetActivator(ResourceTypeFacet
- .valueOf(rawName.toUpperCase(Locale.US)));
- activators.add(facetActivator);
- }
-
- List<ResourcePermissionActivatorType> rawResourcePermissionActivators = rawActivators.getResourcePermission();
- for (ResourcePermissionActivatorType rawResourcePermissionActivator : rawResourcePermissionActivators) {
- String rawName = rawResourcePermissionActivator.getName().toString();
- Permission permission = Permission.valueOf(rawName.toUpperCase(Locale.US));
- ResourcePermissionActivator resourcePermissionActivator = new ResourcePermissionActivator(permission);
- activators.add(resourcePermissionActivator);
- }
-
- List<TraitActivatorType> rawTraitActivators = rawActivators.getTrait();
- for (TraitActivatorType rawTraitActivator : rawTraitActivators) {
- String name = rawTraitActivator.getName();
- String value = rawTraitActivator.getValue();
- TraitActivator traitActivator = new TraitActivator(name, Pattern.compile(value));
- activators.add(traitActivator);
- }
-
- List<InventoryActivatorType> rawInventoryActivators = rawActivators.getResourceType();
- for (InventoryActivatorType rawInventoryActivator : rawInventoryActivators) {
- List<ResourceType> rawResourceConditions = rawInventoryActivator.getResource();
- List<ResourceConditionSet> resourceConditionSets = new ArrayList<ResourceConditionSet>(
- rawResourceConditions.size());
- for (ResourceType rawResourceCondition : rawResourceConditions) {
- List<ResourcePermissionActivatorType> rawPermissions = rawResourceCondition.getResourcePermission();
- EnumSet<Permission> permissions = EnumSet.noneOf(Permission.class);
- for (ResourcePermissionActivatorType rawPermission : rawPermissions) {
- String rawName = rawPermission.getName().toString();
- Permission permission = Permission.valueOf(rawName.toUpperCase(Locale.US));
- permissions.add(permission);
- }
-
- List<TraitActivatorType> rawTraits = rawResourceCondition.getTrait();
- Map<String, Pattern> traits = new HashMap<String, Pattern>();
- for (TraitActivatorType rawTraitActivator : rawTraits) {
- String name = rawTraitActivator.getName();
- String value = rawTraitActivator.getValue();
- traits.put(name, Pattern.compile(value));
- }
-
- ResourceConditionSet resourceConditionSet = new ResourceConditionSet(rawResourceCondition.getPlugin(),
- rawResourceCondition.getType(), permissions, traits);
- resourceConditionSets.add(resourceConditionSet);
- }
- ResourceTypeActivator resourceTypeActivator = new ResourceTypeActivator(resourceConditionSets);
- activators.add(resourceTypeActivator);
- }
-
- return debugMode;
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/FacetActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/FacetActivator.java
deleted file mode 100644
index 5145bc6..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/FacetActivator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import org.rhq.core.domain.resource.ResourceTypeFacet;
-import org.rhq.enterprise.server.perspective.activator.context.AbstractResourceOrGroupActivationContext;
-
-/**
- * @author Ian Springer
- */
-public class FacetActivator extends AbstractResourceOrGroupActivator {
- static final long serialVersionUID = 1L;
-
- private ResourceTypeFacet facet;
-
- public FacetActivator(ResourceTypeFacet facet) {
- this.facet = facet;
- }
-
- public boolean isActive(AbstractResourceOrGroupActivationContext context) {
- return context.getFacets().contains(this.facet);
- }
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/GlobalPermissionActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/GlobalPermissionActivator.java
deleted file mode 100644
index 7f1efd5..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/GlobalPermissionActivator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.enterprise.server.perspective.activator.context.GlobalActivationContext;
-
-/**
- * @author Ian Springer
- */
-public class GlobalPermissionActivator extends AbstractGlobalActivator {
- static final long serialVersionUID = 1L;
-
- private Permission permission;
-
- public GlobalPermissionActivator(Permission permission) {
- this.permission = permission;
- }
-
- public boolean isActive(GlobalActivationContext context) {
- return context.isSuperuser() || context.hasGlobalPermission(this.permission);
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/InventoryActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/InventoryActivator.java
deleted file mode 100644
index 4003d7b..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/InventoryActivator.java
+++ /dev/null
@@ -1,74 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import java.util.List;
-import java.util.Set;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.authz.Permission;
-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.server.perspective.activator.context.GlobalActivationContext;
-import org.rhq.enterprise.server.resource.ResourceManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * @author Ian Springer
- */
-public class InventoryActivator extends AbstractGlobalActivator {
- static final long serialVersionUID = 1L;
-
- private List<ResourceConditionSet> resourceConditionSets;
-
- public InventoryActivator(List<ResourceConditionSet> resourceConditionSets) {
- this.resourceConditionSets = resourceConditionSets;
- }
-
- /**
- * Returns true if any of the condition sets match an inventoried Resource.
- *
- * @param context
- * @return
- */
- public boolean isActive(GlobalActivationContext context) {
- ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
- Subject subject = context.getSubject();
-
- for (ResourceConditionSet rcs : this.resourceConditionSets) {
- ResourceCriteria criteria = new ResourceCriteria();
-
- criteria.addFilterPluginName(rcs.getPluginName());
- criteria.addFilterResourceTypeName(rcs.getResourceTypeName());
- Set<Permission> requiredPermissions = rcs.getPermissions();
- if (!((null == requiredPermissions) || requiredPermissions.isEmpty())) {
- Permission[] arr = requiredPermissions.toArray(new Permission[requiredPermissions.size()]);
- criteria.addRequiredPermissions(arr);
- }
-
- PageList<Resource> resources = resourceManager.findResourcesByCriteria(context.getSubject(), criteria);
- if (!((null == resources) || resources.isEmpty())) {
- return ActivatorHelper.areTraitsSatisfied(subject, rcs.getTraitMatchers(), resources, false);
- }
- }
-
- return false;
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/LicenseFeature.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/LicenseFeature.java
deleted file mode 100644
index aadb67a..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/LicenseFeature.java
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-/**
- * @author Ian Springer
- */
-public enum LicenseFeature {
- MONITORING
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/LicenseFeatureActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/LicenseFeatureActivator.java
deleted file mode 100644
index 6e8d91e..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/LicenseFeatureActivator.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import org.rhq.enterprise.server.perspective.activator.context.GlobalActivationContext;
-
-/**
- * A global-scoped activator that checks if a particular license feature is enabled.
- *
- * @author Ian Springer
- */
-public class LicenseFeatureActivator extends AbstractGlobalActivator {
- static final long serialVersionUID = 1L;
-
- private LicenseFeature licenseFeature;
-
- public LicenseFeatureActivator(LicenseFeature licenseFeature) {
- this.licenseFeature = licenseFeature;
- }
-
- public boolean isActive(GlobalActivationContext context) {
- return context.getLicenseFeatures().contains(this.licenseFeature);
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourceConditionSet.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourceConditionSet.java
deleted file mode 100644
index cf6fc42..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourceConditionSet.java
+++ /dev/null
@@ -1,85 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import java.util.Collections;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.rhq.core.domain.authz.Permission;
-
-/**
- * An immutable set of conditions pertaining to a Resource:
- *
- * 1) the ResourceType the Resource must have (required)
- * 2) a set of Resource permissions a user must possess on the Resource (optional)
- * 3) a set of traits with specific current values the Resource must possess (optional)
- *
- * @author Ian Springer
- */
-public class ResourceConditionSet {
- static final long serialVersionUID = 1L;
-
- private String pluginName;
- private String resourceTypeName;
- private EnumSet<Permission> permissions;
- private Map<String, Pattern> traits;
- private Map<String, Matcher> traitMatchers;
-
- public ResourceConditionSet(String pluginName, String resourceTypeName, EnumSet<Permission> permissions,
- Map<String, Pattern> traits) {
- this.pluginName = pluginName;
- this.resourceTypeName = resourceTypeName;
- this.permissions = permissions != null ? permissions : EnumSet.noneOf(Permission.class);
- if (null != traits) {
- this.traits = traits;
- this.traitMatchers = new HashMap<String, Matcher>(traits.size());
- for (String trait : traits.keySet()) {
- traitMatchers.put(trait, traits.get(trait).matcher(""));
- }
- } else {
- this.traits = Collections.<String, Pattern> emptyMap();
- this.traitMatchers = Collections.<String, Matcher> emptyMap();
- }
- }
-
- public String getPluginName() {
- return pluginName;
- }
-
- public String getResourceTypeName() {
- return resourceTypeName;
- }
-
- public EnumSet<Permission> getPermissions() {
- return permissions;
- }
-
- public Map<String, Pattern> getTraits() {
- return traits;
- }
-
- public Map<String, Matcher> getTraitMatchers() {
- return traitMatchers;
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourcePermissionActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourcePermissionActivator.java
deleted file mode 100644
index b9061d0..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourcePermissionActivator.java
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.enterprise.server.perspective.activator.context.AbstractResourceOrGroupActivationContext;
-
-/**
- * @author Ian Springer
- */
-public class ResourcePermissionActivator extends AbstractResourceOrGroupActivator {
- static final long serialVersionUID = 1L;
-
- private Permission permission;
-
- public ResourcePermissionActivator(Permission permission) {
- this.permission = permission;
- }
-
- public boolean isActive(AbstractResourceOrGroupActivationContext context) {
- return context.hasResourcePermission(this.permission);
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourceTypeActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourceTypeActivator.java
deleted file mode 100644
index 317ebe2..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/ResourceTypeActivator.java
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import java.util.Collection;
-import java.util.EnumSet;
-import java.util.List;
-import java.util.Map;
-import java.util.regex.Matcher;
-
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.enterprise.server.perspective.activator.context.AbstractResourceOrGroupActivationContext;
-
-/**
- * @author Ian Springer
- */
-public class ResourceTypeActivator extends AbstractResourceOrGroupActivator {
- static final long serialVersionUID = 1L;
-
- private List<ResourceConditionSet> resourceConditionSets;
-
- public ResourceTypeActivator(List<ResourceConditionSet> resourceConditionSets) {
- this.resourceConditionSets = resourceConditionSets;
- }
-
- /**
- * Returns true if the current Resource or compatible Group matches at least one of our resource condition sets.
- *
- * @param context
- * @return
- */
- public boolean isActive(AbstractResourceOrGroupActivationContext context) {
- for (ResourceConditionSet resourceConditionSet : this.resourceConditionSets) {
- if (context.getResourceType().getPlugin().equals(resourceConditionSet.getPluginName())
- && context.getResourceType().getName().equals(resourceConditionSet.getResourceTypeName())) {
- if (hasResourcePermissions(context, resourceConditionSet.getPermissions())) {
- if (hasTraits(context, resourceConditionSet.getTraitMatchers())) {
- return true;
- }
- }
- }
- }
- return false;
- }
-
- private boolean hasResourcePermissions(AbstractResourceOrGroupActivationContext context,
- EnumSet<Permission> resourcePermissions) {
- for (Permission permission : resourcePermissions) {
- if (!context.hasResourcePermission(permission)) {
- return false;
- }
- }
- return true;
- }
-
- private boolean hasTraits(AbstractResourceOrGroupActivationContext context, Map<String, Matcher> traitMatchers) {
-
- if (traitMatchers.isEmpty()) {
- return true;
- }
-
- Collection<Resource> resources = context.getResources();
- return ActivatorHelper.areTraitsSatisfied(context.getSubject(), traitMatchers, resources, true);
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/SuperuserActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/SuperuserActivator.java
deleted file mode 100644
index 768b25f..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/SuperuserActivator.java
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import org.rhq.enterprise.server.perspective.activator.context.GlobalActivationContext;
-
-/**
- * An subject-scoped activator that checks if the current user is the RHQ superuser.
- *
- * @author Ian Springer
- */
-public class SuperuserActivator extends AbstractGlobalActivator {
- static final long serialVersionUID = 1L;
-
- public boolean isActive(GlobalActivationContext context) {
- return context.isSuperuser();
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/TraitActivator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/TraitActivator.java
deleted file mode 100644
index c5098f1..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/TraitActivator.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.Map;
-import java.util.regex.Matcher;
-import java.util.regex.Pattern;
-
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.enterprise.server.perspective.activator.context.AbstractResourceOrGroupActivationContext;
-
-/**
- * @author Ian Springer
- */
-public class TraitActivator extends AbstractResourceOrGroupActivator {
- static final long serialVersionUID = 1L;
-
- private Map<String, Matcher> traitMatcher;
-
- public TraitActivator(String traitName, Pattern pattern) {
- traitMatcher = new HashMap<String, Matcher>(1);
- traitMatcher.put(traitName, pattern.matcher(""));
- }
-
- public boolean isActive(AbstractResourceOrGroupActivationContext context) {
-
- Collection<Resource> resources = context.getResources();
- return ActivatorHelper.areTraitsSatisfied(context.getSubject(), traitMatcher, resources, true);
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/AbstractResourceOrGroupActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/AbstractResourceOrGroupActivationContext.java
deleted file mode 100644
index cf044f8..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/AbstractResourceOrGroupActivationContext.java
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator.context;
-
-import java.util.EnumSet;
-import java.util.Set;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.domain.resource.ResourceTypeFacet;
-
-/**
- * @author Ian Springer
- */
-public abstract class AbstractResourceOrGroupActivationContext extends GlobalActivationContext {
- protected AbstractResourceOrGroupActivationContext(Subject subject) {
- super(subject);
- }
-
- @Override
- public ActivationContextScope getScope() {
- return ActivationContextScope.RESOURCE_OR_GROUP;
- }
-
- public abstract ResourceType getResourceType();
-
- public abstract EnumSet<ResourceTypeFacet> getFacets();
-
- public abstract Set<Resource> getResources();
-
- protected abstract EnumSet<Permission> getResourcePermissions();
-
- public boolean hasResourcePermission(Permission permission) {
- return hasGlobalPermission(Permission.MANAGE_INVENTORY) || getResourcePermissions().contains(permission);
- }
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ActivationContext.java
deleted file mode 100644
index e50c604..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ActivationContext.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator.context;
-
-/**
- * An activation context is used to provide contextual information, relevant to the scope of the current GUI request, to
- * a set of activators.
- *
- * @author Ian Springer
- */
-public interface ActivationContext {
-
- ActivationContextScope getScope();
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ActivationContextScope.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ActivationContextScope.java
deleted file mode 100644
index faee329..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ActivationContextScope.java
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator.context;
-
-/**
- * The activation context scopes, from widest to narrowest.
- *
- * @author Ian Springer
- */
-public enum ActivationContextScope {
- /**
- * The user is logged in to te GUI, but is not in the context of a particular Resource or Group.
- */
- GLOBAL,
- /**
- * The user is in the context of a particular Resource or Group.
- */
- RESOURCE_OR_GROUP
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GlobalActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GlobalActivationContext.java
deleted file mode 100644
index bc1937f..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GlobalActivationContext.java
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator.context;
-
-import java.util.EnumSet;
-import java.util.Set;
-
-import org.jetbrains.annotations.NotNull;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.enterprise.server.authz.AuthorizationManagerLocal;
-import org.rhq.enterprise.server.perspective.activator.LicenseFeature;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * @author Ian Springer
- */
-public class GlobalActivationContext implements ActivationContext {
- private Subject subject;
-
- private transient EnumSet<LicenseFeature> licenseFeatures;
- private transient Boolean superuser;
- private transient EnumSet<Permission> globalPermissions;
-
- public GlobalActivationContext(Subject subject) {
- this.subject = subject;
- }
-
- public ActivationContextScope getScope() {
- return ActivationContextScope.GLOBAL;
- }
-
- @NotNull
- public EnumSet<LicenseFeature> getLicenseFeatures() {
- // lazy load
- if (this.licenseFeatures == null) {
- this.licenseFeatures = EnumSet.noneOf(LicenseFeature.class);
- this.licenseFeatures.add(LicenseFeature.MONITORING); // always give this permission
- }
- return this.licenseFeatures;
- }
-
- public Subject getSubject() {
- return this.subject;
- }
-
- public boolean isSuperuser() {
- // lazy load
- if (this.superuser == null) {
- AuthorizationManagerLocal authorizationManager = LookupUtil.getAuthorizationManager();
- this.superuser = authorizationManager.isSystemSuperuser(this.subject);
- }
- return this.superuser;
- }
-
- public boolean hasGlobalPermission(Permission permission) {
- return isSuperuser() || getGlobalPermissions().contains(permission);
- }
-
- protected EnumSet<Permission> getGlobalPermissions() {
- // lazy load
- if (this.globalPermissions == null) {
- AuthorizationManagerLocal authorizationManager = LookupUtil.getAuthorizationManager();
- Set<Permission> perms = authorizationManager.getExplicitGlobalPermissions(this.subject);
- this.globalPermissions = EnumSet.noneOf(Permission.class);
- this.globalPermissions.addAll(perms);
- }
- return this.globalPermissions;
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java
deleted file mode 100644
index 7b1fe4c..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/GroupActivationContext.java
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator.context;
-
-import java.util.EnumSet;
-import java.util.List;
-import java.util.Set;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.core.domain.criteria.ResourceGroupCriteria;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.domain.resource.ResourceTypeFacet;
-import org.rhq.core.domain.resource.composite.ResourceFacets;
-import org.rhq.core.domain.resource.group.ResourceGroup;
-import org.rhq.enterprise.server.authz.AuthorizationManagerLocal;
-import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * @author Ian Springer
- */
-public class GroupActivationContext extends AbstractResourceOrGroupActivationContext {
- private ResourceGroup group;
- transient EnumSet<ResourceTypeFacet> facets;
- transient EnumSet<Permission> resourcePermissions;
-
- private ResourceTypeManagerLocal resourceTypeManager = LookupUtil.getResourceTypeManager();
- private AuthorizationManagerLocal authorizationManager = LookupUtil.getAuthorizationManager();
-
- public GroupActivationContext(Subject subject, ResourceGroup group) {
- super(subject);
- this.group = group;
- }
-
- @Override
- public ResourceType getResourceType() {
- return this.group.getResourceType();
- }
-
- @Override
- public EnumSet<ResourceTypeFacet> getFacets() {
- // lazy load
- if (this.facets == null) {
- ResourceFacets resourceFacets = this.resourceTypeManager.getResourceFacets(getResourceType().getId());
- this.facets = EnumSet.copyOf(resourceFacets.getFacets());
- }
- return this.facets;
- }
-
- public EnumSet<Permission> getResourcePermissions() {
- // lazy load
- if (this.resourcePermissions == null) {
- Set<Permission> perms = this.authorizationManager.getImplicitGroupPermissions(getSubject(), this.group
- .getId());
- this.resourcePermissions = EnumSet.noneOf(Permission.class);
- this.resourcePermissions.addAll(perms);
- }
- return this.resourcePermissions;
- }
-
- public Set<Resource> getResources() {
- // lazy load
- if (this.group.getExplicitResources() == null) {
- ResourceGroupCriteria criteria = new ResourceGroupCriteria();
- criteria.addFilterId(this.group.getId());
- criteria.fetchExplicitResources(true);
- List<ResourceGroup> resourceGroups = LookupUtil.getResourceGroupManager().findResourceGroupsByCriteria(
- this.getSubject(), criteria);
- if (!resourceGroups.isEmpty()) {
- this.group.setExplicitResources(resourceGroups.get(0).getExplicitResources());
- }
- }
- return this.group.getExplicitResources();
- }
-
- public ResourceGroup getGroup() {
- return group;
- }
-
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java
deleted file mode 100644
index b636eff..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/activator/context/ResourceActivationContext.java
+++ /dev/null
@@ -1,99 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.activator.context;
-
-import java.util.EnumSet;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.authz.Permission;
-import org.rhq.core.domain.resource.Resource;
-import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.domain.resource.ResourceTypeFacet;
-import org.rhq.core.domain.resource.composite.ResourceFacets;
-import org.rhq.enterprise.server.authz.AuthorizationManagerLocal;
-import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * @author Ian Springer
- */
-public class ResourceActivationContext extends AbstractResourceOrGroupActivationContext {
- private Resource resource;
- private Set<Resource> resourceAsSet;
- transient EnumSet<ResourceTypeFacet> facets;
- transient EnumSet<Permission> resourcePermissions;
-
- private ResourceTypeManagerLocal resourceTypeManager = LookupUtil.getResourceTypeManager();
- private AuthorizationManagerLocal authorizationManager = LookupUtil.getAuthorizationManager();
-
- public ResourceActivationContext(Subject subject, Resource resource) {
- super(subject);
- this.resource = resource;
- this.resourceAsSet = new HashSet<Resource>(1);
- this.resourceAsSet.add(resource);
- }
-
- @Override
- public ResourceType getResourceType() {
- return this.resource.getResourceType();
- }
-
- @Override
- public EnumSet<ResourceTypeFacet> getFacets() {
- // lazy load
- if (this.facets == null) {
- ResourceFacets resourceFacets = this.resourceTypeManager.getResourceFacets(resource.getResourceType()
- .getId());
- try {
- this.facets = EnumSet.copyOf(resourceFacets.getFacets());
- } catch (IllegalArgumentException e) {
- this.facets = EnumSet.noneOf(ResourceTypeFacet.class);
- }
- }
- return this.facets;
- }
-
- @Override
- public boolean hasResourcePermission(Permission permission) {
- return hasGlobalPermission(Permission.MANAGE_INVENTORY) || getResourcePermissions().contains(permission);
- }
-
- @Override
- protected EnumSet<Permission> getResourcePermissions() {
- // lazy load
- if (this.resourcePermissions == null) {
- Set<Permission> perms = this.authorizationManager.getImplicitResourcePermissions(getSubject(),
- this.resource.getId());
- this.resourcePermissions = EnumSet.noneOf(Permission.class);
- this.resourcePermissions.addAll(perms);
- }
- return this.resourcePermissions;
- }
-
- public Resource getResource() {
- return resource;
- }
-
- public Set<Resource> getResources() {
- return this.resourceAsSet;
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/MasterServerPluginContainer.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/MasterServerPluginContainer.java
index e585f91..0134031 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/MasterServerPluginContainer.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/MasterServerPluginContainer.java
@@ -43,7 +43,6 @@ import org.rhq.enterprise.server.plugin.pc.content.ContentServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.content.PackageTypeServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.generic.GenericServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.perspective.PerspectiveServerPluginContainer;
import org.rhq.enterprise.server.scheduler.EnhancedScheduler;
import org.rhq.enterprise.server.scheduler.EnhancedSchedulerImpl;
import org.rhq.enterprise.server.util.LookupUtil;
@@ -475,7 +474,6 @@ public class MasterServerPluginContainer {
ArrayList<AbstractTypeServerPluginContainer> pcs = new ArrayList<AbstractTypeServerPluginContainer>(5);
pcs.add(new GenericServerPluginContainer(this));
pcs.add(new ContentServerPluginContainer(this));
- pcs.add(new PerspectiveServerPluginContainer(this));
pcs.add(new AlertServerPluginContainer(this));
pcs.add(new BundleServerPluginContainer(this));
pcs.add(new PackageTypeServerPluginContainer(this));
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectivePluginValidator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectivePluginValidator.java
deleted file mode 100644
index f08cd78..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectivePluginValidator.java
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.plugin.pc.perspective;
-
-import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginValidator;
-
-public class PerspectivePluginValidator implements ServerPluginValidator {
- public boolean validate(ServerPluginEnvironment env) {
- // TODO test validate env.getPluginDescriptor()
- return true;
- }
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectiveServerPluginContainer.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectiveServerPluginContainer.java
deleted file mode 100644
index 355e023..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectiveServerPluginContainer.java
+++ /dev/null
@@ -1,50 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.plugin.pc.perspective;
-
-import org.rhq.enterprise.server.plugin.pc.AbstractTypeServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.MasterServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginManager;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType;
-
-/**
- * Manages perspective server plugins.
- *
- * @author Jay Shaughnessy
- * @author John Mazzitelli
- */
-public class PerspectiveServerPluginContainer extends AbstractTypeServerPluginContainer {
-
- public PerspectiveServerPluginContainer(MasterServerPluginContainer master) {
- super(master);
- }
-
- @Override
- public ServerPluginType getSupportedServerPluginType() {
- return new ServerPluginType(PerspectivePluginDescriptorType.class);
- }
-
- @Override
- protected ServerPluginManager createPluginManager() {
- return new PerspectiveServerPluginManager(this);
- }
-
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectiveServerPluginManager.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectiveServerPluginManager.java
deleted file mode 100644
index 104e85d..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/PerspectiveServerPluginManager.java
+++ /dev/null
@@ -1,268 +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.plugin.pc.perspective;
-
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.URL;
-import java.util.Collections;
-import java.util.jar.JarEntry;
-import java.util.jar.JarFile;
-
-import javax.management.MBeanException;
-import javax.management.MBeanServerConnection;
-import javax.management.ObjectName;
-import javax.naming.Context;
-import javax.naming.InitialContext;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.util.file.FileUtil;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginManager;
-import org.rhq.enterprise.server.plugin.pc.perspective.metadata.PerspectivePluginMetadataManager;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType;
-
-/**
- * This loads in all perspective server plugins that can be found. You can obtain a loaded plugin's
- * {@link ServerPluginEnvironment environment}, including its classloader, from this object as well.
- *
- * @author Jay Shaughnessy
- * @author John Mazzitelli
- */
-public class PerspectiveServerPluginManager extends ServerPluginManager {
- private final Log log = LogFactory.getLog(this.getClass());
-
- private PerspectivePluginMetadataManager metadataManager;
-
- public PerspectiveServerPluginManager(PerspectiveServerPluginContainer pc) {
- super(pc);
- }
-
- @Override
- public void initialize() throws Exception {
- super.initialize();
- this.metadataManager = new PerspectivePluginMetadataManager();
- }
-
- @Override
- public void shutdown() {
- super.shutdown();
- this.metadataManager = null;
- }
-
- /**
- * An object that can be used to process and store all metadata from all perspective plugins. This object will contain all the
- * metadata found in all loaded perspective plugins.
- *
- * @return object to retrieve plugin metadata from
- */
- public PerspectivePluginMetadataManager getMetadataManager() {
- return this.metadataManager;
- }
-
- /* At load-time ensure that any WAR files packaged with the server plugin are deployed to the RHQ
- * Server. Note, perspective apps are logically deployed along-side, not inside the rhq.ear (although physically
- * under the default/work). They should have access to the same shared components.
- *
- * @see org.rhq.enterprise.server.plugin.pc.AbstractTypeServerPluginContainer#loadPlugin(org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment)
- */
- @Override
- public synchronized void loadPlugin(ServerPluginEnvironment env, boolean enabled) throws Exception {
- super.loadPlugin(env, enabled);
-
- this.metadataManager.loadPlugin((PerspectivePluginDescriptorType) env.getPluginDescriptor());
-
- // Do this here and not startPlugin() because if the app does not deploy the perspective should
- // be considered invalid.
- deployEmbeddedWars(env);
- }
-
- private void deployEmbeddedWars(ServerPluginEnvironment env) {
- String name = null;
- try {
- JarFile pluginJarFile = new JarFile(env.getPluginUrl().getFile());
- try {
- for (JarEntry entry : Collections.list(pluginJarFile.entries())) {
- name = entry.getName();
- if (name.toLowerCase().endsWith(".war")) {
- deployWar(env, entry.getName(), pluginJarFile.getInputStream(entry));
- }
- }
- } finally {
- pluginJarFile.close();
- }
- } catch (Exception e) {
- Throwable t = (e instanceof MBeanException) ? e.getCause() : e;
- log.error("Failed to deploy " + env.getPluginKey().getPluginName() + "#" + name, t);
- }
- }
-
- private void deployWar(ServerPluginEnvironment env, String name, InputStream iStream) throws Exception {
- // Save the war file to the plugins data directory. This survives restarts and will
- // act as our deploy directory.
- File deployFile = writeWarToFile(getDeployFile(env, name), iStream);
-
- // get reference to MBean server
- Context ic = new InitialContext();
- MBeanServerConnection server = (MBeanServerConnection) ic.lookup("jmx/invoker/RMIAdaptor");
-
- // get reference to MainDeployer MBean
- ObjectName mainDeployer = new ObjectName("jboss.system:service=MainDeployer");
-
- server.invoke(mainDeployer, "deploy", new Object[] { deployFile.getAbsolutePath() },
- new String[] { String.class.getName() });
- }
-
- private File getDeployFile(ServerPluginEnvironment env, String name) throws IOException {
- File dataDir = getServerPluginContext(env).getDataDirectory();
- dataDir.mkdirs();
- return new File(dataDir, name);
- }
-
- private File writeWarToFile(File destFile, InputStream iStream) throws Exception {
- // Delete any previous instance of the file
- if (destFile.exists()) {
- getLog().debug("Existing file found and will be deleted at: " + destFile);
- destFile.delete();
- }
-
- FileUtil.writeFile(iStream, destFile);
-
- if (!destFile.exists()) {
- String err = "Temporary file for application update not written to: " + destFile;
- getLog().error(err);
- throw new Exception(err);
- }
-
- return destFile;
- }
-
- @Override
- protected void startPlugin(String pluginName) {
- super.startPlugin(pluginName);
-
- // If the metadata manager is started, then this is a hot deploy (or redeploy) of the perspective, so restart
- // the metadata manage to merge the metadata from this perspective and all other previously loaded perspectives.
- // If the metadata manager is *not* started, then this is the initial load of the perspective, and the master PC
- // will call startPlugins() once all perspectives have been loaded, which will take care of starting the
- // metadata manager.
- if (isPluginEnabled(pluginName) && this.metadataManager.isStarted()) {
- this.metadataManager.stop();
- this.metadataManager.start();
- }
-
- // TODO: execute An MBean Start on any perspective webapps?
- }
-
- /**
- * All of the plugins have been loaded, so now let the metadata manager sort through the definitions.
- *
- * @see org.rhq.enterprise.server.plugin.pc.ServerPluginManager#startPlugins()
- */
- @Override
- public synchronized void startPlugins() {
- super.startPlugins();
- this.metadataManager.start();
- }
-
- @Override
- protected void stopPlugin(String pluginName) {
- // TODO: This method can be called in three cases:
- // 1) hot-undeploy of a plugin
- // 2) hot-redeploy of a plugin (stopPlugin() is called, then startPlugin() is called)
- // 3) during shutdown of the plugin container
- // We only want to restart our metadata manager in case 2, but there's no way for us to tell which case we're
- // dealing with...
- /*if (case2 && this.metadataManager.isStarted()) {
- this.metadataManager.stop();
- this.metadataManager.start();
- }*/
-
- // TODO: execute An MBean Stop on any perspective webapps?
-
- super.stopPlugin(pluginName);
- }
-
- /* (non-Javadoc)
- * @see org.rhq.enterprise.server.plugin.pc.ServerPluginManager#stopPlugins()
- */
- @Override
- public synchronized void stopPlugins() {
- this.metadataManager.stop();
- super.stopPlugins();
- }
-
- /* At unload-time ensure that any WAR files packaged with the server plugin are un-deployed on
- * the RHQ Server.
- *
- * @see org.rhq.enterprise.server.plugin.pc.AbstractTypeServerPluginContainer#unloadPlugin(org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment)
- */
- @Override
- public synchronized void unloadPlugin(String pluginName) throws Exception {
- ServerPluginEnvironment env = getPluginEnvironment(pluginName);
- // Do this here and not stopPlugin(), treat this as a precursor to a possible perspectve deletion
- undeployWars(env);
- this.metadataManager.unloadPlugin((PerspectivePluginDescriptorType) env.getPluginDescriptor());
- super.unloadPlugin(pluginName);
- }
-
- private void undeployWars(ServerPluginEnvironment env) {
- String name = null;
- try {
- JarFile plugin = new JarFile(env.getPluginUrl().getFile());
- try {
- for (JarEntry entry : Collections.list(plugin.entries())) {
- name = entry.getName();
- if (name.toLowerCase().endsWith(".war")) {
- undeployWar(getDeployFile(env, entry.getName()));
- }
- }
- } finally {
- plugin.close();
- }
- } catch (Exception e) {
- this.log.error("Failed to deploy " + env.getPluginKey().getPluginName() + "#" + name, e);
- }
- }
-
- private void undeployWar(File deployFile) {
- try {
- // get reference to MBean server
- Context ic = new InitialContext();
- MBeanServerConnection server = (MBeanServerConnection) ic.lookup("jmx/invoker/RMIAdaptor");
-
- // get reference to MainDeployer MBean
- ObjectName mainDeployer = new ObjectName("jboss.system:service=MainDeployer");
-
- URL fileUrl = deployFile.toURI().toURL();
-
- Boolean isDeployed = (Boolean) server.invoke(mainDeployer, "isDeployed", new Object[] { fileUrl },
- new String[] { URL.class.getName() });
-
- if (isDeployed) {
- server.invoke(mainDeployer, "undeploy", new Object[] { fileUrl }, new String[] { URL.class.getName() });
- }
- } catch (Exception e) {
- log.error("Failed to undeploy perspective WAR [" + deployFile + "].", e);
- }
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/metadata/PerspectivePluginMetadataManager.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/metadata/PerspectivePluginMetadataManager.java
deleted file mode 100644
index 2d39f87..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/perspective/metadata/PerspectivePluginMetadataManager.java
+++ /dev/null
@@ -1,513 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.plugin.pc.perspective.metadata;
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.enterprise.server.perspective.MenuItem;
-import org.rhq.enterprise.server.perspective.PageLink;
-import org.rhq.enterprise.server.perspective.Tab;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.ActionType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.ApplicationType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.ExtensionType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.MenuItemType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PageLinkType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PageType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PerspectivePluginDescriptorType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PlacementType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.PositionType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.RenderedExtensionType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.TabType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.perspective.TaskType;
-
-/**
- * This loads in all deployed perspective server plugins and maintains the complete set of
- * metadata found in all plugin descriptors. Individual plugin
- * metadata is irrelevant and not retrievable. The union of the perspective definitions is
- * maintained and made available. Conflict resolution rules are applied as needed for
- * clashing perspective definitions.
- *
- * Activators are not processed here, they use session-time information. This is performed at
- * plugin-load-time.
- *
- * @author Jay Shaughnessy
- * @author Ian Springer
- */
-public class PerspectivePluginMetadataManager {
- private final String CORE_PERSPECTIVE_NAME = "CorePerspective";
-
- private static final String TARGET_MAIN_URL = "/rhq/perspective/main.xhtml?targetUrlKey=";
- private static final String TARGET_RESOURCE_URL = "/rhq/perspective/resource.xhtml?targetUrlKey=";
-
- private static final Map<Integer, String> KEY_URL_MAP = new HashMap<Integer, String>();
-
- private final Log log = LogFactory.getLog(this.getClass());
-
- private Map<String, PerspectivePluginDescriptorType> loadedPlugins = new HashMap<String, PerspectivePluginDescriptorType>();
-
- private boolean isStarted;
- private long lastModifiedTime;
- private List<Tab> resourceTabs;
- private List<MenuItem> menu;
- private List<PageLink> pageLinks;
-
- public PerspectivePluginMetadataManager() {
- }
-
- /**
- * Transforms the pluginDescriptor into domain object form and stores those objects.
- *
- * @param descriptor the descriptor to transform
- */
- public synchronized void loadPlugin(PerspectivePluginDescriptorType descriptor) {
- loadedPlugins.put(descriptor.getName(), descriptor);
- }
-
- public synchronized void unloadPlugin(PerspectivePluginDescriptorType descriptor) {
- loadedPlugins.remove(descriptor.getName());
- }
-
- public synchronized void start() {
- if (isStarted) {
- return;
- }
-
- this.menu = new ArrayList<MenuItem>();
- this.resourceTabs = new ArrayList<Tab>();
- // TODO: Init lists of global tasks and resource tasks.
- this.pageLinks = new ArrayList<PageLink>();
-
- // Always process the Core perspective first, as other perspectives may remove extensions it defines.
- try {
- processCorePerspective();
- processNonCorePerspectives();
- } finally {
- this.isStarted = true;
- this.lastModifiedTime = System.currentTimeMillis();
- }
- }
-
- public synchronized void stop() {
- if (!isStarted) {
- return;
- }
- this.menu = null;
- this.resourceTabs = null;
- this.isStarted = false;
- }
-
- private void processCorePerspective() {
- PerspectivePluginDescriptorType corePerspectiveDescriptor = this.loadedPlugins.get(CORE_PERSPECTIVE_NAME);
- if (corePerspectiveDescriptor == null) {
- throw new IllegalStateException("Core perspective is required but is missing.");
- }
- try {
- processPerspective(corePerspectiveDescriptor);
- } catch (Exception e) {
- throw new IllegalStateException("Failed to load core perspective.", e);
- }
- }
-
- private void processNonCorePerspectives() {
- for (String perspectiveName : this.loadedPlugins.keySet()) {
- if (!CORE_PERSPECTIVE_NAME.equals(perspectiveName)) {
- PerspectivePluginDescriptorType pluginDescriptor = this.loadedPlugins.get(perspectiveName);
- try {
- processPerspective(pluginDescriptor);
- } catch (Exception e) {
- log.error("Failed to load perspective [" + perspectiveName + "].", e);
- }
- }
- }
- }
-
- private void processPerspective(PerspectivePluginDescriptorType perspective) {
- List<ApplicationType> applications = perspective.getApplication();
-
- // Process MenuItem Extensions
- for (MenuItemType rawMenuItem : perspective.getMenuItem()) {
- resolveUrls(applications, rawMenuItem, TARGET_MAIN_URL);
- ActionType action = rawMenuItem.getAction();
- switch (action) {
- case ADD:
- menuAdd(rawMenuItem, perspective.getName());
- break;
- case REMOVE:
- menuRemove(rawMenuItem);
- break;
- }
- }
-
- // Process Tab Extensions
- for (TabType rawTab : perspective.getTab()) {
- resolveUrls(applications, rawTab, TARGET_RESOURCE_URL);
- ActionType action = rawTab.getAction();
- switch (action) {
- case ADD:
- addTab(rawTab, perspective.getName());
- break;
- case REMOVE:
- removeTab(rawTab);
- break;
- }
- }
-
- // TODO: Process global tasks and resource tasks.
-
- // Process Page Extensions
- // For now just assume there are a reasonable number of page extesnions such that throwing
- // them all into one list will have acceptable performance. If necessary we could segregate
- // by page name etc...
- for (PageType rawPage : perspective.getPage()) {
- for (PageLinkType rawPageLink : rawPage.getPageLink()) {
- resolveUrls(applications, rawPageLink, TARGET_MAIN_URL);
- this.pageLinks.add(new PageLink(rawPageLink, perspective.getName(), rawPage.getName(), rawPageLink
- .getUrl()));
- }
- }
- }
-
- /**
- * Update the url and iconUrl as needed by applying declared application information.
- *
- * @param applications
- * @param extension
- */
- private void resolveUrls(List<ApplicationType> applications, ExtensionType extension, String targetUrl) {
- ApplicationType applicationType = getApplicationByName(applications, extension.getApplication());
-
- if (extension instanceof TaskType) {
- TaskType task = (TaskType) extension;
- String resolvedUrl = resolveUrl(applicationType, task.getUrl(), targetUrl);
- task.setUrl(resolvedUrl);
- } else if (extension instanceof MenuItemType) {
- MenuItemType menuItem = (MenuItemType) extension;
- String resolvedUrl = resolveUrl(applicationType, menuItem.getUrl(), targetUrl);
- menuItem.setUrl(resolvedUrl);
- } else if (extension instanceof TabType) {
- TabType tab = (TabType) extension;
- String resolvedUrl = resolveUrl(applicationType, tab.getUrl(), targetUrl);
- tab.setUrl(resolvedUrl);
- } else if (extension instanceof PageLinkType) {
- PageLinkType pageLink = (PageLinkType) extension;
- String resolvedUrl = resolveUrl(applicationType, pageLink.getUrl(), targetUrl);
- pageLink.setUrl(resolvedUrl);
- }
-
- if (extension instanceof RenderedExtensionType) {
- String resolvedIconUrl = resolveUrl(applicationType, ((RenderedExtensionType) extension).getIconUrl(), null);
- ((RenderedExtensionType) extension).setIconUrl(resolvedIconUrl);
- }
- }
-
- private String resolveUrl(ApplicationType applicationType, String url, String targetUrl) {
- String result = url;
-
- if (null != url) {
- if (isPerspectiveUrl(url)) {
- if (null == applicationType) {
- throw new IllegalArgumentException(
- "Relative URL found without application. Add application attribute to fully resolve url '"
- + url + "'");
- }
-
- String baseUrl = applicationType.getBaseUrl();
- // fix the baseUrl if it lacks the separator
- if (!baseUrl.endsWith("/")) {
- baseUrl += "/";
- applicationType.setBaseUrl(baseUrl);
- }
-
- result = baseUrl + url;
-
- // if a targetUrl is supplied then it is assumed that the url will actually
- // be passed as a parameter to a predefined perspective (xhtml) page. And then
- // content will be rendered within that page. We don't want to pass urls as request
- // parameters (long, could contain characters that would need to be escaped, etc)
- // so instead we'll now replace the actual url with a numeric key for short and
- // safe param passing. The key can then be used to get back the real url at runtime.
- if (null != targetUrl) {
- String keyedUrl = baseUrl + url;
- int key = getUrlKey(keyedUrl);
-
- // return the targetUrl with the proper targetUrlKey param
- result = targetUrl + key;
- }
- }
- }
-
- return result;
- }
-
- /**
- * Determine whether the url is relative to a perspective application or whether the url is
- * for the RHQ Portal War.
- * @param url
- * @return true for a relative url in a declared perspective application
- */
- private static boolean isPerspectiveUrl(String url) {
- return (!(url.startsWith("/") || url.startsWith("http")));
- }
-
- private ApplicationType getApplicationByName(List<ApplicationType> applications, String name) {
- ApplicationType result = null;
-
- if (null != applications && null != name) {
- for (ApplicationType application : applications) {
- if (application.getName().equals(name)) {
- result = application;
- break;
- }
- }
- }
-
- return result;
- }
-
- /**
- * Return a unique key for the url.
- * @param url
- * @return
- */
- public synchronized int getUrlKey(String url) {
- int key = url.hashCode();
-
- // in the very unlikely case that we have multiple urls with the same hashcode, protect
- // ourselves. This will mess up user bookmarking of the url but saves us from internal confusion.
- String mapEntry = KEY_URL_MAP.get(key);
- while (!((null == mapEntry) || mapEntry.equals(url))) {
- key *= 13;
- mapEntry = KEY_URL_MAP.get(key);
- }
-
- if (null == mapEntry) {
- KEY_URL_MAP.put(key, url);
- }
-
- return key;
- }
-
- /**
- * Return the url for the given key.
- */
- public String getUrlViaKey(int key) {
- return KEY_URL_MAP.get(key);
- }
-
- // TODO: remove this debug code
- @SuppressWarnings("unused")
- private void printMenu(List<MenuItem> menu, String indent) {
- if (null == menu)
- return;
-
- for (MenuItem menuItem : menu) {
- System.out.println(indent + menuItem.getName());
- printMenu(menuItem.getChildren(), indent + " ");
- }
- }
-
- private void menuAdd(MenuItemType rawMenuItem, String perspectiveName) {
- PositionType position = rawMenuItem.getPosition();
- List<MenuItem> containingMenu = getContainingMenu(rawMenuItem);
-
- MenuItem menuItem = new MenuItem(rawMenuItem, perspectiveName);
-
- if (PlacementType.FIRST_CHILD == position.getPlacement()) {
- containingMenu.add(0, menuItem);
- } else if (PlacementType.LAST_CHILD == position.getPlacement()) {
- containingMenu.add(menuItem);
- } else {
- int index = getMenuItemIndex(containingMenu, position.getName());
- if (-1 == index) {
- throw new IllegalArgumentException("Invalid position defined for menuItem [" + rawMenuItem.getName()
- + "]. Referenced menuItem not found : " + position.getName()
- + ". Make sure supporting menus are defined for the menuItem.");
- }
-
- containingMenu.add((PlacementType.AFTER == position.getPlacement() ? ++index : --index), menuItem);
- }
- }
-
- private void menuRemove(MenuItemType rawMenuItem) {
- PositionType position = rawMenuItem.getPosition();
- List<MenuItem> containingMenu;
- try {
- containingMenu = getContainingMenu(rawMenuItem);
- int index = getMenuItemIndex(containingMenu, rawMenuItem.getName());
- if (-1 == index) {
- throw new IllegalArgumentException("Invalid position defined for menuItem [" + rawMenuItem.getName()
- + "]. Referenced menuItem not found : " + position.getName()
- + ". Make sure supporting menus are defined for the menuItem.");
- }
- MenuItem menuItem = containingMenu.get(index);
- if (!menuItem.getPerspectiveName().equals(CORE_PERSPECTIVE_NAME)) {
- throw new IllegalArgumentException("Invalid position defined for menuItem [" + rawMenuItem.getName()
- + "]. Referenced menuItem is defined but not by the Core perspective : " + position.getName()
- + ". Only Core menuItems can be removed.");
- }
- containingMenu.remove(index);
-
- } catch (IllegalArgumentException e) {
- log.debug("Menu item not found. Ignoring removal of menu item [" + rawMenuItem.getName() + "]: " + e);
- }
- }
-
- private List<MenuItem> getContainingMenu(MenuItemType rawMenuItem) {
- List<MenuItem> result = this.menu;
-
- String name = rawMenuItem.getName();
- String[] nameTokens = (null != name) ? name.split("\\.") : new String[0];
- for (int i = 0; (i + 1 < nameTokens.length); ++i) {
- int index = this.getMenuItemIndex(result, nameTokens[i]);
- if (-1 == index) {
- throw new IllegalArgumentException("Invalid position defined for menuItem [" + rawMenuItem.getName()
- + "]. No containing menu found for : " + name
- + ". Make sure supporting menus are defined for the menuItem.");
- }
- MenuItem menuItem = result.get(index);
- result = menuItem.getChildren();
- }
-
- return result;
- }
-
- private int getMenuItemIndex(List<MenuItem> menu, String name) {
- for (int i = 0, size = menu.size(); (i < size); ++i) {
- if (menu.get(i).getName().endsWith(name)) {
- return i;
- }
- }
- return -1;
- }
-
- private void addTab(TabType rawTab, String perspectiveName) {
- PositionType position = rawTab.getPosition();
- List<Tab> siblingTabs = getSiblingTabs(rawTab);
- Tab tab = new Tab(rawTab, perspectiveName);
-
- if (PlacementType.FIRST_CHILD == position.getPlacement()) {
- siblingTabs.add(0, tab);
- } else if (PlacementType.LAST_CHILD == position.getPlacement()) {
- siblingTabs.add(tab);
- } else {
- int index = getTabIndex(siblingTabs, position.getName());
- if (index == -1) {
- throw new IllegalArgumentException("Invalid position defined for tab [" + rawTab.getName()
- + "]. Referenced tab not found : " + position.getName()
- + ". Make sure supporting tabs are defined for the tab.");
- }
- siblingTabs.add((PlacementType.AFTER == position.getPlacement() ? ++index : --index), tab);
- }
- }
-
- private void removeTab(TabType rawTab) {
- PositionType position = rawTab.getPosition();
- List<Tab> siblingTabs;
- try {
- siblingTabs = getSiblingTabs(rawTab);
- int index = getTabIndex(siblingTabs, rawTab.getName());
- if (index == -1) {
- throw new IllegalArgumentException("Invalid position defined for menuItem [" + rawTab.getName()
- + "]. Referenced menuItem not found : " + position.getName()
- + ". Make sure supporting menus are defined for the menuItem.");
- }
- Tab tab = siblingTabs.get(index);
- if (!tab.getPerspectiveName().equals(CORE_PERSPECTIVE_NAME)) {
- throw new IllegalArgumentException("Invalid position defined for tab [" + tab.getName()
- + "]. Referenced tab is defined but not by the Core perspective : " + position.getName()
- + ". Only Core tabs can be removed.");
- }
- siblingTabs.remove(index);
- } catch (IllegalArgumentException e) {
- log.debug("Tab not found. Ignoring removal of tab [" + rawTab.getName() + "]: " + e);
- }
- }
-
- private List<Tab> getSiblingTabs(TabType rawTab) {
- List<Tab> result = this.resourceTabs;
-
- String name = rawTab.getName();
- String[] nameTokens = (name != null) ? name.split("\\.") : new String[0];
- for (int i = 0; (i + 1) < nameTokens.length; i++) {
- int index = getTabIndex(result, nameTokens[i]);
- if (index == -1) {
- throw new IllegalArgumentException("Invalid position defined for tab [" + rawTab.getName()
- + "]. No parent tab found for tab [" + name
- + "]. Make sure supporting tabs are defined for the tab.");
- }
- Tab parentTab = result.get(index);
- result = parentTab.getChildren();
- }
-
- return result;
- }
-
- private int getTabIndex(List<Tab> tabs, String name) {
- for (int i = 0, size = tabs.size(); (i < size); ++i) {
- if (tabs.get(i).getQualifiedName().endsWith(name)) {
- return i;
- }
- }
- return -1;
- }
-
- /**
- * Returns the full menu, with no activators applied. Callers should not modify the returned list or any of its
- * descendant lists.
- *
- * @return the full menu, with no activators applied
- */
- public List<MenuItem> getMenu() {
- return this.menu;
- }
-
- /**
- * Returns the full Resource tab bar, with no activators applied. Callers should not modify the returned list or any
- * of its descendant lists.
- *
- * @return the full Resource tab bar, with no activators applied
- */
- public List<Tab> getResourceTabs() {
- return this.resourceTabs;
- }
-
- /**
- * Returns the full set of defined PageLink extensions with no activators applied. Callers should not
- * modify the returned list or any of its descendant lists.
- *
- * @return the full Resource tab bar, with no activators applied
- */
- public List<PageLink> getPageLinks() {
- return this.pageLinks;
- }
-
- public synchronized boolean isStarted() {
- return this.isStarted;
- }
-
- public long getLastModifiedTime() {
- return this.lastModifiedTime;
- }
-}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/StandardServerPluginService.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/StandardServerPluginService.java
index a1f6232..5f5692f 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/StandardServerPluginService.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/StandardServerPluginService.java
@@ -36,7 +36,6 @@ import org.rhq.enterprise.server.plugin.pc.bundle.BundleServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.content.ContentServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.content.PackageTypeServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.generic.GenericServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.perspective.PerspectiveServerPluginContainer;
/**
* An MBean to use as a ServerPluginService for tests that actually don't care
@@ -93,7 +92,6 @@ public class StandardServerPluginService extends ServerPluginService implements
pluginContainerClasses.add(ContentServerPluginContainer.class);
pluginContainerClasses.add(GenericServerPluginContainer.class);
pluginContainerClasses.add(PackageTypeServerPluginContainer.class);
- pluginContainerClasses.add(PerspectiveServerPluginContainer.class);
}
@Override
commit f0769f3a620b080a86021cf12f0b36c044542c35
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Sep 5 13:44:27 2012 -0400
remove entitlement service - this is old PoC legacy code that was never implemented
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/entitlement/EntitlementManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/entitlement/EntitlementManagerBean.java
deleted file mode 100644
index 6b5738e..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/entitlement/EntitlementManagerBean.java
+++ /dev/null
@@ -1,118 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.entitlement;
-
-import java.util.Collection;
-
-import javax.ejb.Stateless;
-import javax.persistence.EntityManager;
-import javax.persistence.PersistenceContext;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.core.domain.plugin.PluginKey;
-import org.rhq.enterprise.server.RHQConstants;
-import org.rhq.enterprise.server.plugin.pc.MasterServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginServiceManagement;
-import org.rhq.enterprise.server.plugin.pc.entitlement.EntitlementServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.entitlement.EntitlementServerPluginManager;
-import org.rhq.enterprise.server.util.LookupUtil;
-
-/**
- * SLSB that provides the interface point to the entitlement subsystem and entitlement server side plugins.
- */
-@Stateless
-public class EntitlementManagerBean implements EntitlementManagerLocal {
- private final Log log = LogFactory.getLog(EntitlementManagerBean.class.getName());
-
- // TODO: might not even need this if this SLSB never needs to access the database
- @PersistenceContext(unitName = RHQConstants.PERSISTENCE_UNIT_NAME)
- private EntityManager entityManager;
-
- public void doSomething() {
- // TODO do something "entitlement-y"
- // you can call into the entitlement plugin container to do things that require the entitlement plugin to work
- // you can have the plugin container have any API you can and it interacts with the plugins
- try {
- Collection<ServerPluginEnvironment> envs = getEntitlementServerPluginManager().getPluginEnvironments();
- for (ServerPluginEnvironment env : envs) {
- PluginKey pluginKey = env.getPluginKey();
- log.info("Deployed Entitlement plugin: " + pluginKey);
- }
- } catch (Exception e) {
- e.printStackTrace();
- }
- }
-
- /**
- * This will return the entitlement server plugin manager. If it is not available, an exception
- * is thrown.
- *
- * The returned object has information available on all loaded entitlement server plugins.
- *
- * @return the plugin manager that can be used to look up entitlement plugins and their environments.
- * @throws Exception if the plugin manager is not available (usually because the master plugin container
- * hasn't been started)
- */
- private EntitlementServerPluginManager getEntitlementServerPluginManager() throws Exception {
- EntitlementServerPluginManager pluginMgr;
- pluginMgr = (EntitlementServerPluginManager) getEntitlementServerPluginContainer().getPluginManager();
- if (pluginMgr == null) {
- throw new Exception("Entitlement server plugin manager does not exist");
- }
- return pluginMgr;
- }
-
- /**
- * This will return the entitlement server plugin container. If it is not available, an exception
- * is thrown.
- *
- * The returned object has the plugin manager that manages all entitlement server plugins.
- *
- * @return the plugin container that hosts all entitlement server plugins
- * @throws Exception if the plugin container is not available (usually because the master plugin container
- * hasn't been started)
- */
- private EntitlementServerPluginContainer getEntitlementServerPluginContainer() throws Exception {
- MasterServerPluginContainer master = getMasterServerPluginContainer();
- EntitlementServerPluginContainer pc = master.getPluginContainerByClass(EntitlementServerPluginContainer.class);
- if (pc == null) {
- throw new Exception("Entitlement server plugin container does not exist");
- }
- return pc;
- }
-
- /**
- * This will return the master server plugin container. If the master has not been started, an exception
- * is thrown.
- *
- * @return the master plugin container that hosts all server plugin containers
- * @throws Exception if the master plugin container is not started
- */
- private MasterServerPluginContainer getMasterServerPluginContainer() throws Exception {
- ServerPluginServiceManagement serverPluginService = LookupUtil.getServerPluginService();
- MasterServerPluginContainer master = serverPluginService.getMasterPluginContainer();
- if (master == null) {
- throw new Exception("Master plugin container has not be started");
- }
- return master;
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/entitlement/EntitlementManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/entitlement/EntitlementManagerLocal.java
deleted file mode 100644
index e777307..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/entitlement/EntitlementManagerLocal.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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.entitlement;
-
-import javax.ejb.Local;
-
-/**
- * The local interface to the entitlement subsystem.
- */
-@Local
-public interface EntitlementManagerLocal {
- void doSomething();
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/MasterServerPluginContainer.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/MasterServerPluginContainer.java
index 5591deb..e585f91 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/MasterServerPluginContainer.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/MasterServerPluginContainer.java
@@ -42,7 +42,6 @@ import org.rhq.enterprise.server.plugin.pc.bundle.BundleServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.content.ContentServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.content.PackageTypeServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.drift.DriftServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.entitlement.EntitlementServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.generic.GenericServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.perspective.PerspectiveServerPluginContainer;
import org.rhq.enterprise.server.scheduler.EnhancedScheduler;
@@ -478,7 +477,6 @@ public class MasterServerPluginContainer {
pcs.add(new ContentServerPluginContainer(this));
pcs.add(new PerspectiveServerPluginContainer(this));
pcs.add(new AlertServerPluginContainer(this));
- pcs.add(new EntitlementServerPluginContainer(this));
pcs.add(new BundleServerPluginContainer(this));
pcs.add(new PackageTypeServerPluginContainer(this));
pcs.add(new DriftServerPluginContainer(this));
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementPluginValidator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementPluginValidator.java
deleted file mode 100644
index 8aae26c..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementPluginValidator.java
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2009 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.plugin.pc.entitlement;
-
-import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginValidator;
-
-/**
- * Validate an entitlement plugin.
- *
- * See {@link ServerPluginValidator} for more information.
- *
- * @author John Mazzitelli
- */
-public class EntitlementPluginValidator implements ServerPluginValidator {
- public boolean validate(ServerPluginEnvironment env) {
- // TODO test validate env.getPluginDescriptor()
- return true;
- }
-}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementServerPluginContainer.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementServerPluginContainer.java
deleted file mode 100644
index 6eb4203..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementServerPluginContainer.java
+++ /dev/null
@@ -1,50 +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.plugin.pc.entitlement;
-
-import org.rhq.enterprise.server.plugin.pc.AbstractTypeServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.MasterServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginManager;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginType;
-import org.rhq.enterprise.server.xmlschema.generated.serverplugin.entitlement.EntitlementPluginDescriptorType;
-
-/**
- * The container responsible for managing the lifecycle of entitlement server-side plugins.
- *
- * @author John Mazzitelli
- */
-public class EntitlementServerPluginContainer extends AbstractTypeServerPluginContainer {
-
- public EntitlementServerPluginContainer(MasterServerPluginContainer master) {
- super(master);
- }
-
- @Override
- public ServerPluginType getSupportedServerPluginType() {
- return new ServerPluginType(EntitlementPluginDescriptorType.class);
- }
-
- @Override
- protected ServerPluginManager createPluginManager() {
- return new EntitlementServerPluginManager(this);
- }
-
- // TODO: override methods if need to perform custom entitlement plugin container stuff
-
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementServerPluginManager.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementServerPluginManager.java
deleted file mode 100644
index 8a4e3b7..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/plugin/pc/entitlement/EntitlementServerPluginManager.java
+++ /dev/null
@@ -1,51 +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.plugin.pc.entitlement;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-
-import org.rhq.enterprise.server.plugin.pc.ServerPluginEnvironment;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginManager;
-
-/**
- * This loads in all entitlement server plugins that can be found. You can obtain a loaded plugin's
- * {@link ServerPluginEnvironment environment}, including its classloader, from this object as well.
- *
- * @author John Mazzitelli
- */
-public class EntitlementServerPluginManager extends ServerPluginManager {
- private final Log log = LogFactory.getLog(this.getClass());
-
- public EntitlementServerPluginManager(EntitlementServerPluginContainer pc) {
- super(pc);
- }
-
- // TODO override methods like initialize, shutdown, loadPlugin, etc. for custom entitlement functionality
-
- @Override
- public void initialize() throws Exception {
- super.initialize();
- }
-
- @Override
- public void shutdown() {
- super.shutdown();
- }
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
index 989b546..05b3662 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
@@ -112,8 +112,6 @@ import org.rhq.enterprise.server.drift.DriftTemplateManagerBean;
import org.rhq.enterprise.server.drift.DriftTemplateManagerLocal;
import org.rhq.enterprise.server.drift.JPADriftServerBean;
import org.rhq.enterprise.server.drift.JPADriftServerLocal;
-import org.rhq.enterprise.server.entitlement.EntitlementManagerBean;
-import org.rhq.enterprise.server.entitlement.EntitlementManagerLocal;
import org.rhq.enterprise.server.event.EventManagerBean;
import org.rhq.enterprise.server.event.EventManagerLocal;
import org.rhq.enterprise.server.install.remote.RemoteInstallManagerBean;
@@ -380,10 +378,6 @@ public final class LookupUtil {
return lookupLocal(EmailManagerBean.class);
}
- public static EntitlementManagerLocal getEntitlementManagerBean() {
- return lookupLocal(EntitlementManagerBean.class);
- }
-
public static EntityManagerFacadeLocal getEntityManagerFacade() {
return lookupLocal(EntityManagerFacade.class);
}
diff --git a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/StandardServerPluginService.java b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/StandardServerPluginService.java
index d17981c..a1f6232 100644
--- a/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/StandardServerPluginService.java
+++ b/modules/enterprise/server/jar/src/test/java/org/rhq/enterprise/server/test/StandardServerPluginService.java
@@ -35,7 +35,6 @@ import org.rhq.enterprise.server.plugin.pc.alert.AlertServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.bundle.BundleServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.content.ContentServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.content.PackageTypeServerPluginContainer;
-import org.rhq.enterprise.server.plugin.pc.entitlement.EntitlementServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.generic.GenericServerPluginContainer;
import org.rhq.enterprise.server.plugin.pc.perspective.PerspectiveServerPluginContainer;
@@ -92,7 +91,6 @@ public class StandardServerPluginService extends ServerPluginService implements
pluginContainerClasses.add(AlertServerPluginContainer.class);
pluginContainerClasses.add(BundleServerPluginContainer.class);
pluginContainerClasses.add(ContentServerPluginContainer.class);
- pluginContainerClasses.add(EntitlementServerPluginContainer.class);
pluginContainerClasses.add(GenericServerPluginContainer.class);
pluginContainerClasses.add(PackageTypeServerPluginContainer.class);
pluginContainerClasses.add(PerspectiveServerPluginContainer.class);
11 years, 8 months
[rhq] Branch 'rhq-on-as7' - modules/core modules/enterprise
by mazz
modules/core/gui/pom.xml | 15
modules/core/gui/src/main/java/org/rhq/core/gui/model/DefaultPageControlSettingsUIBean.java | 6
modules/core/gui/src/main/java/org/rhq/core/gui/table/bean/AbstractPagedDataUIBean.java | 12
modules/core/gui/src/main/java/org/rhq/core/gui/util/FacesContextUtility.java | 41 --
modules/enterprise/gui/base-perspective-jar/pom.xml | 51 --
modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectivePagedDataUIBean.java | 8
modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveResourceUIBean.java | 4
modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/AbstractPerspectiveUIBean.java | 13
modules/enterprise/gui/base-perspective-jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveClientUIBean.java | 31 -
modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/components.xml | 16
modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/web.xml | 36 -
modules/enterprise/gui/portal-war/pom.xml | 46 --
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/AbstractPluginConfigurationUIBean.java | 9
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/EditPluginConfigurationUIBean.java | 25 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginConfigurationUIBean.java | 21 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginFactory.java | 14
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/ServerPluginControlUIBean.java | 17
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationContextUIBean.java | 18
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationsUIBean.java | 21 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/CustomContentUIBean.java | 29 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/FacesMessagePropogationPhaseListener.java | 6
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/ServerInfoUIBean.java | 4
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java | 43 --
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.java | 11
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java | 27 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ExistingResourceConfigurationUIBean.java | 4
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/FileUploadComponent.java | 15
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/RawConfigUIBean.java | 4
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationDefinitionComponent.java | 4
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationEditor.java | 26 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationViewer.java | 20 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateContentSourceUIBean.java | 12
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/EditGroupPluginConfigurationUIBean.java | 49 +-
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/ViewGroupPluginConfigurationUIBean.java | 27 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/FavoritesUIBean.java | 10
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java | 13
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java | 20 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestConditionalFormUIBean.java | 8
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestDynamicRenderingUIBean.java | 8
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/util/LookupComponent.java | 36 -
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/components.xml | 43 --
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/faces-config.xml | 4
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/pages.xml | 48 --
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml | 39 --
modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider-plain.xhtml | 6
modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider.xhtml | 6
modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/importRepos-plain.xhtml | 2
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml | 4
modules/enterprise/gui/portal-war/src/test/groovy/org/rhq/enterprise/gui/util/LookupComponentTest.groovy | 92 -----
modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml | 4
modules/enterprise/server/ear/pom.xml | 3
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java | 13
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerLocal.java | 184 ----------
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java | 6
modules/enterprise/server/plugins/alert-operations/pom.xml | 18
modules/enterprise/server/plugins/alert-roles/pom.xml | 16
modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/WEB-INF/components.xml | 16
modules/enterprise/server/plugins/perspectives/policy/perspective/src/main/resources/META-INF/rhq-serverplugin.xml | 3
58 files changed, 218 insertions(+), 1069 deletions(-)
New commits:
commit bc20c0d433f4e1e8bbd58d6d48d0b8e44408f1c6
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Wed Sep 5 13:23:40 2012 -0400
rip out Seam since we don't want to upgrade it when porting the ear to run inside AS7. the only thing "broken" appears to be the content tab's file upload feature. that still needs to be fixed.
Conflicts:
modules/core/gui/src/main/java/org/rhq/core/gui/util/FacesContextUtility.java
modules/enterprise/server/ear/pom.xml
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java
diff --git a/modules/core/gui/pom.xml b/modules/core/gui/pom.xml
index 69bfec8..85b00f0 100644
--- a/modules/core/gui/pom.xml
+++ b/modules/core/gui/pom.xml
@@ -19,7 +19,6 @@
<properties>
<!-- dependency versions -->
<el.version>1.0</el.version>
- <seam.version>2.1.0.SP1</seam.version>
</properties>
<dependencies>
@@ -104,20 +103,6 @@
<!-- NOTE: The version is defined in the root POM's dependencyManagement section. -->
</dependency>
- <!-- == Seam Related Dependencies ================ -->
-
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <version>${seam.version}</version>
- <exclusions>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
</dependencies>
<profiles>
diff --git a/modules/core/gui/src/main/java/org/rhq/core/gui/model/DefaultPageControlSettingsUIBean.java b/modules/core/gui/src/main/java/org/rhq/core/gui/model/DefaultPageControlSettingsUIBean.java
index 49dfc32..334b145 100644
--- a/modules/core/gui/src/main/java/org/rhq/core/gui/model/DefaultPageControlSettingsUIBean.java
+++ b/modules/core/gui/src/main/java/org/rhq/core/gui/model/DefaultPageControlSettingsUIBean.java
@@ -18,17 +18,11 @@
*/
package org.rhq.core.gui.model;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
import javax.faces.model.SelectItem;
/**
* @author Ian Springer
*/
-@Name("DefaultPageControlSettingsUIBean")
-(a)Scope(ScopeType.APPLICATION)
public class DefaultPageControlSettingsUIBean {
private static final int[] PAGE_SIZES = new int[] {15, 30, 45};
private static final SelectItem[] PAGE_SIZE_SELECT_ITEMS = new SelectItem[PAGE_SIZES.length];
diff --git a/modules/core/gui/src/main/java/org/rhq/core/gui/table/bean/AbstractPagedDataUIBean.java b/modules/core/gui/src/main/java/org/rhq/core/gui/table/bean/AbstractPagedDataUIBean.java
index 8e8abe4..0116fa0 100644
--- a/modules/core/gui/src/main/java/org/rhq/core/gui/table/bean/AbstractPagedDataUIBean.java
+++ b/modules/core/gui/src/main/java/org/rhq/core/gui/table/bean/AbstractPagedDataUIBean.java
@@ -18,16 +18,15 @@
*/
package org.rhq.core.gui.table.bean;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.faces.FacesMessages;
+import javax.faces.context.FacesContext;
+import javax.faces.model.SelectItem;
+
import org.jetbrains.annotations.NotNull;
+
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.UnlimitedPageControl;
import org.rhq.core.gui.table.model.PagedListDataModel;
-import javax.faces.context.FacesContext;
-import javax.faces.model.SelectItem;
-
/**
* @author Ian Springer
*/
@@ -45,9 +44,6 @@ public abstract class AbstractPagedDataUIBean<T> {
/** The number of specific pages to display on the data scroller - limit to 7 pages until we find a general fix for
* RHQ-1813. */
private static final int DATA_SCROLLER_MAX_PAGES = 7;
-
- @In
- protected FacesMessages facesMessages;
private PageControl pageControl;
private PagedListDataModel<T> dataModel;
diff --git a/modules/core/gui/src/main/java/org/rhq/core/gui/util/FacesContextUtility.java b/modules/core/gui/src/main/java/org/rhq/core/gui/util/FacesContextUtility.java
index 650f667..0b9f1fe 100644
--- a/modules/core/gui/src/main/java/org/rhq/core/gui/util/FacesContextUtility.java
+++ b/modules/core/gui/src/main/java/org/rhq/core/gui/util/FacesContextUtility.java
@@ -35,9 +35,6 @@ import javax.servlet.http.HttpServletResponse;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.jboss.seam.core.Manager;
-import org.jboss.seam.util.Strings;
-
import org.rhq.core.util.exception.ThrowableUtil;
import org.rhq.core.util.exception.WrappedRemotingException;
@@ -156,21 +153,7 @@ public abstract class FacesContextUtility {
* @param detail localized detail message text; if null, no detail will be included in the message
*/
public static void addMessage(@NotNull Severity severity, @NotNull String summary, @Nullable String detail) {
- //Now that we're using Seam for some of the pages, we use different mechanisms for transferring messages
- //across redirect boundaries.
- //If we are inside a long running conversation, we want Seam to do its thing, otherwise
- //FacesmessagePropogationPhaseListener will step in eventually.
- if (Manager.instance().isReallyLongRunningConversation()) {
- //nothing's easy... Seam StatusMessage (which we're creating here) considers empty string the same
- //as null. If the message is then eventually shown on the page, the null detail is replaced with the
- //summary which would leave us with the summary displayed twice on the page.
- //Because the detail therefore must not be empty, we must resort to an ugly hack here and put in a unicode
- //for non-breakable space:
- String detailToUse = Strings.isEmpty(detail) ? "\u00a0" : detail;
- //FacesMessages.instance().add(toSeverity(severity), null, null, summary, detailToUse);
- } else {
- getFacesContext().addMessage(null, new FacesMessage(severity, summary, (detail != null) ? detail : ""));
- }
+ getFacesContext().addMessage(null, new FacesMessage(severity, summary, (detail != null) ? detail : ""));
}
@NotNull
@@ -271,24 +254,4 @@ public abstract class FacesContextUtility {
return detailMessage.toString();
}
-
- /**
- * Convert a FacesMessage.Severity to a StatusMessage.Severity
- *
- * Taken from {@link org.jboss.seam.faces.FacesMessages} private method.
- */
- private static org.jboss.seam.international.StatusMessage.Severity toSeverity(
- javax.faces.application.FacesMessage.Severity severity) {
- if (FacesMessage.SEVERITY_ERROR.equals(severity)) {
- return org.jboss.seam.international.StatusMessage.Severity.ERROR;
- } else if (FacesMessage.SEVERITY_FATAL.equals(severity)) {
- return org.jboss.seam.international.StatusMessage.Severity.FATAL;
- } else if (FacesMessage.SEVERITY_INFO.equals(severity)) {
- return org.jboss.seam.international.StatusMessage.Severity.INFO;
- } else if (FacesMessage.SEVERITY_WARN.equals(severity)) {
- return org.jboss.seam.international.StatusMessage.Severity.WARN;
- } else {
- return null;
- }
- }
-}
\ No newline at end of file
+}
diff --git a/modules/enterprise/gui/base-perspective-jar/pom.xml b/modules/enterprise/gui/base-perspective-jar/pom.xml
index 576b18e..bfa8dda 100644
--- a/modules/enterprise/gui/base-perspective-jar/pom.xml
+++ b/modules/enterprise/gui/base-perspective-jar/pom.xml
@@ -19,10 +19,6 @@
<properties>
<jsf.version>1.2_14</jsf.version>
<facelets.version>1.1.15.B1</facelets.version>
- <!-- NOTE: Seam 2.1.2 and 2.2.0 can't be used in webapps deployed to the RHQ Server
- due to https://jira.jboss.org/jira/browse/JBSEAM-4029. Seam 2.2.1 can be
- used once it's released. -->
- <seam.version>2.1.0.SP1</seam.version>
<jboss-el.version>1.0_02.CR5</jboss-el.version>
<richfaces.version>3.3.3.Final</richfaces.version>
</properties>
@@ -44,28 +40,6 @@
</dependency>
<dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <version>${seam.version}</version>
- <exclusions>
- <exclusion>
- <groupId>javax.el</groupId>
- <artifactId>el-api</artifactId>
- </exclusion>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-ui</artifactId>
- <version>${seam.version}</version>
- </dependency>
-
- <dependency>
<groupId>org.jboss.el</groupId>
<artifactId>jboss-el</artifactId>
<version>${jboss-el.version}</version>
@@ -125,31 +99,6 @@
</dependency>
<dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-ui</artifactId>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-debug</artifactId>
- <version>${seam.version}</version>
- <!-- we should be pulling this in directly ourselves, not relying
- jboss-seam-debug to provide it -->
- <exclusions>
- <exclusion>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- </exclusion>
- </exclusions>
- <scope>runtime</scope>
- </dependency>
-
- <dependency>
<groupId>org.jboss.el</groupId>
<artifactId>jboss-el</artifactId>
</dependency>
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
index 27629db..2f080a5 100644
--- 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
@@ -18,8 +18,6 @@
*/
package org.rhq.enterprise.server.perspective;
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Create;
import org.rhq.core.gui.table.bean.AbstractPagedDataUIBean;
/**
@@ -31,11 +29,11 @@ import org.rhq.core.gui.table.bean.AbstractPagedDataUIBean;
public abstract class AbstractPerspectivePagedDataUIBean extends AbstractPagedDataUIBean {
protected PerspectiveClientUIBean perspectiveClient;
- @Create
+ // @Create
public void init() {
if (this.perspectiveClient == null) {
- this.perspectiveClient = (PerspectiveClientUIBean) Component.getInstance(PerspectiveClientUIBean.class,
- true);
+ // 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
index f13e087..4ab63d5 100644
--- 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
@@ -3,8 +3,6 @@ package org.rhq.enterprise.server.perspective;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.seam.annotations.web.RequestParameter;
-
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.criteria.ResourceCriteria;
import org.rhq.core.domain.resource.Resource;
@@ -18,7 +16,7 @@ import org.rhq.enterprise.server.resource.ResourceManagerRemote;
public class AbstractPerspectiveResourceUIBean extends AbstractPerspectiveUIBean {
private final Log log = LogFactory.getLog(this.getClass());
- @RequestParameter
+ // @RequestParameter
private Integer rhqResourceId;
private Resource resource;
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
index 56034bb..01f8dd8 100644
--- 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
@@ -18,24 +18,19 @@
*/
package org.rhq.enterprise.server.perspective;
-import org.jboss.seam.Component;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.faces.FacesMessages;
-
/**
* A base class for Seam components that utilize the RHQ remote API.
*
* @author Ian Springer
*/
public abstract class AbstractPerspectiveUIBean {
- @In
- protected FacesMessages facesMessages;
+ // @In
+ // protected FacesMessages facesMessages;
protected PerspectiveClientUIBean perspectiveClient;
- @Create
+ // @Create
public void init() {
- this.perspectiveClient = (PerspectiveClientUIBean) Component.getInstance(PerspectiveClientUIBean.class, true);
+ // 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
index d73431a..2d8b043 100644
--- 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
@@ -4,13 +4,6 @@ import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.NotNull;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.AutoCreate;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.web.RequestParameter;
-import org.jboss.seam.core.Conversation;
-
import org.rhq.core.domain.auth.Subject;
import org.rhq.enterprise.clientapi.RemoteClient;
import org.rhq.enterprise.server.auth.SubjectManagerRemote;
@@ -18,9 +11,9 @@ import org.rhq.enterprise.server.auth.SubjectManagerRemote;
/**
* @author Ian Springer
*/
-(a)Name(PerspectiveClientUIBean.NAME)
-(a)Scope(ScopeType.CONVERSATION)
-@AutoCreate
+//(a)Name(PerspectiveClientUIBean.NAME)
+//(a)Scope(ScopeType.CONVERSATION)
+//@AutoCreate
public class PerspectiveClientUIBean {
public static final String NAME = "PerspectiveClientUIBean";
@@ -31,23 +24,23 @@ public class PerspectiveClientUIBean {
private final Log log = LogFactory.getLog(this.getClass());
- @RequestParameter
+ // @RequestParameter
private String rhqServerHost;
private String serverHost;
- @RequestParameter
+ // @RequestParameter
private Integer rhqServerPort;
private Integer serverPort;
- @RequestParameter
+ // @RequestParameter
private String rhqUsername;
private String username;
- @RequestParameter
+ // @RequestParameter
private String rhqPassword;
private String password;
- @RequestParameter
+ // @RequestParameter
private Integer rhqSessionId;
private RemoteClient remoteClient;
@@ -64,12 +57,12 @@ public class PerspectiveClientUIBean {
this.remoteClient.connect();
} catch (Exception e) {
this.remoteClient = null;
- log.info("Ending perspective client Conversation with id " + Conversation.instance().getId() + "...");
- Conversation.instance().end();
+ // 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() + ".");
+ // Conversation.instance().begin();
+ // log.info("Began perspective client Conversation with id " + Conversation.instance().getId() + ".");
}
return this.remoteClient;
}
diff --git a/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/components.xml b/modules/enterprise/gui/base-perspective-war/src/main/webapp/WEB-INF/components.xml
deleted file mode 100644
index 4631d2e..0000000
--- a/modules/enterprise/gui/base-perspective-war/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">
-
- <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/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
index fb66dca..4b9e940 100644
--- 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
@@ -7,33 +7,6 @@
<display-name>RHQ Perspective Webapp</display-name>
- <!--=== Seam ===-->
-
- <listener>
- <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
- </listener>
-
- <!-- From Seam docs: The Seam master filter must be the first filter specified
- in web.xml. This ensures it is run first. -->
- <filter>
- <filter-name>Seam Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>Seam Filter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
- <servlet>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
- <servlet-mapping>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <url-pattern>/seam/resource/*</url-pattern>
- </servlet-mapping>
-
<!-- flags for debugging during development -->
<context-param>
<param-name>com.sun.faces.validateXml</param-name>
@@ -52,10 +25,6 @@
<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>*.seam</url-pattern>
- </servlet-mapping>
<servlet-mapping>
<servlet-name>Faces Servlet</servlet-name>
@@ -84,11 +53,6 @@
<!--=== RichFaces ===-->
- <!-- From Seam docs: If RichFaces is used in your project, Seam will install
- the RichFaces Ajax filter for you, making sure to install it before all
- other built-in filters. You don't need to install the RichFaces Ajax
- filter in web.xml yourself. -->
-
<context-param>
<param-name>org.ajax4jsf.VIEW_HANDLERS</param-name>
<param-value>com.sun.facelets.FaceletViewHandler</param-value>
diff --git a/modules/enterprise/gui/portal-war/pom.xml b/modules/enterprise/gui/portal-war/pom.xml
index 7b21a37..ce18e68 100644
--- a/modules/enterprise/gui/portal-war/pom.xml
+++ b/modules/enterprise/gui/portal-war/pom.xml
@@ -19,7 +19,6 @@
<!-- dependency versions -->
<el.version>1.0</el.version>
<jsf-facelets.version>1.1.15.B1</jsf-facelets.version>
- <seam.version>2.1.0.SP1</seam.version>
<!-- plugin versions -->
<jetty-jspc-maven-plugin.version>7.0.1.v20091125</jetty-jspc-maven-plugin.version>
@@ -235,51 +234,6 @@
<scope>provided</scope> <!-- by JBossAS itself, which the container build has packaged with 1.6.5 -->
</dependency>
- <!-- == Seam Related Dependencies ================ -->
-
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <version>${seam.version}</version>
- <exclusions>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-ui</artifactId>
- <version>${seam.version}</version>
- <exclusions>
- <exclusion>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam-debug</artifactId>
- <version>${seam.version}</version>
- <!-- should be pulling this in directly ourselves, not relying
- jboss-seam-debug to provide it -->
- <exclusions>
- <exclusion>
- <groupId>com.sun.facelets</groupId>
- <artifactId>jsf-facelets</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- </exclusion>
- </exclusions>
- <scope>runtime</scope>
- </dependency>
-
<dependency>
<groupId>org.jvnet</groupId>
<artifactId>inflector</artifactId>
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/AbstractPluginConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/AbstractPluginConfigurationUIBean.java
index d8dc707..16ffcac 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/AbstractPluginConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/AbstractPluginConfigurationUIBean.java
@@ -19,8 +19,7 @@
package org.rhq.enterprise.gui.admin.plugin;
import javax.faces.application.FacesMessage;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.log.Log;
+
import org.rhq.core.clientapi.agent.metadata.ConfigurationMetadataParser;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
@@ -38,8 +37,8 @@ import org.rhq.enterprise.server.xmlschema.generated.serverplugin.ServerPluginDe
public abstract class AbstractPluginConfigurationUIBean {
protected final ServerPluginsLocal serverPluginsBean = LookupUtil.getServerPlugins();
- @Logger
- private Log log;
+ // @Logger
+ // private Log log;
private ServerPlugin plugin;
private ConfigurationDefinition pluginConfigurationDefinition;
@@ -89,7 +88,7 @@ public abstract class AbstractPluginConfigurationUIBean {
this.scheduledJobsDefinition = ConfigurationMetadataParser.parse("jobs:" + pluginKey.getPluginName(), descriptor.getScheduledJobs());
} catch (Exception e) {
String err = "Cannot determine what the plugin configuration or scheduled jobs configuration looks like";
- log.error(err + " - Cause: " + e);
+ // log.error(err + " - Cause: " + e);
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, err, e);
}
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/EditPluginConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/EditPluginConfigurationUIBean.java
index ad6c709..1929782 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/EditPluginConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/EditPluginConfigurationUIBean.java
@@ -24,15 +24,6 @@ import java.util.List;
import javax.faces.application.FacesMessage;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Logger;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.web.RequestParameter;
-import org.jboss.seam.log.Log;
-
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
@@ -42,12 +33,12 @@ import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.plugin.ServerPluginsLocal;
import org.rhq.enterprise.server.util.LookupUtil;
-(a)Scope(ScopeType.PAGE)
-@Name("editPluginConfigurationUIBean")
+//(a)Scope(ScopeType.PAGE)
+//@Name("editPluginConfigurationUIBean")
public class EditPluginConfigurationUIBean extends AbstractPluginConfigurationUIBean implements Serializable {
- @Logger
- private Log log;
+ // @Logger
+ // private Log log;
private Configuration currentConfiguration;
private ConfigurationDefinition currentConfigurationDefinition;
@@ -60,7 +51,7 @@ public class EditPluginConfigurationUIBean extends AbstractPluginConfigurationUI
return currentConfigurationDefinition;
}
- @Create
+ // @Create
public void init() {
checkPermission();
lookupConfigDefinitions();
@@ -69,14 +60,14 @@ public class EditPluginConfigurationUIBean extends AbstractPluginConfigurationUI
// The superclass holds the plugin instance variable, but in this
// case we want it injected via the PluginFactory - so this serves as
// the injection point
- @In(value = "plugin", required = false)
+ // @In(value = "plugin", required = false)
public void setCurrentPlugin(ServerPlugin currentPlugin) {
if (currentPlugin != null) {
setPlugin(currentPlugin);
}
}
- @RequestParameter("listName")
+ // @RequestParameter("listName")
public void setListName(String listName) {
ServerPlugin plugin = getPlugin();
@@ -123,7 +114,7 @@ public class EditPluginConfigurationUIBean extends AbstractPluginConfigurationUI
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Configuration settings saved.");
} catch (Exception e) {
- log.error("Error updating the plugin configurations.", e);
+ // log.error("Error updating the plugin configurations.", e);
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
"There was an error changing the configuration settings.", e);
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginConfigurationUIBean.java
index c7c25f2..70ef43d 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginConfigurationUIBean.java
@@ -21,25 +21,22 @@ package org.rhq.enterprise.gui.admin.plugin;
import java.io.Serializable;
import java.util.List;
import java.util.Map;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.web.RequestParameter;
-import org.rhq.core.domain.plugin.PluginKey;
-import org.rhq.core.domain.plugin.ServerPlugin;
-import org.rhq.enterprise.server.plugin.pc.ServerPluginType;
+
import org.richfaces.component.UITree;
import org.richfaces.component.html.HtmlTree;
import org.richfaces.event.NodeSelectedEvent;
import org.richfaces.model.TreeNode;
import org.richfaces.model.TreeNodeImpl;
-(a)Scope(ScopeType.PAGE)
-@Name("pluginConfigUIBean")
+import org.rhq.core.domain.plugin.PluginKey;
+import org.rhq.core.domain.plugin.ServerPlugin;
+import org.rhq.enterprise.server.plugin.pc.ServerPluginType;
+
+//(a)Scope(ScopeType.PAGE)
+//@Name("pluginConfigUIBean")
public class PluginConfigurationUIBean extends AbstractPluginConfigurationUIBean implements Serializable {
- @RequestParameter
+ // @RequestParameter
private String pluginName;
private TreeNode root;
@@ -47,7 +44,7 @@ public class PluginConfigurationUIBean extends AbstractPluginConfigurationUIBean
return root;
}
- @Create
+ // @Create
public void init() {
checkPermission();
createTree();
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginFactory.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginFactory.java
index 7b0a104..aa2665f 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginFactory.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/PluginFactory.java
@@ -18,10 +18,6 @@
*/
package org.rhq.enterprise.gui.admin.plugin;
-import org.jboss.seam.annotations.Factory;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.web.RequestParameter;
-
import org.rhq.core.domain.plugin.AbstractPlugin;
import org.rhq.core.domain.plugin.Plugin;
import org.rhq.core.domain.plugin.PluginDeploymentType;
@@ -36,17 +32,17 @@ import org.rhq.enterprise.server.util.LookupUtil;
*
* @author jharris
*/
-@Name("pluginFactory")
+//@Name("pluginFactory")
public class PluginFactory {
- @RequestParameter("plugin")
+ //@RequestParameter("plugin")
private String name;
- @RequestParameter("deployment")
+ //@RequestParameter("deployment")
private PluginDeploymentType deployment;
- @RequestParameter("pluginType")
+ //@RequestParameter("pluginType")
private String pluginType;
- @Factory(value = "plugin", autoCreate = true)
+ //@Factory(value = "plugin", autoCreate = true)
public AbstractPlugin lookupPlugin() {
if (this.deployment == PluginDeploymentType.AGENT) {
return LookupUtil.getPluginManager().getPlugin(this.name);
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/ServerPluginControlUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/ServerPluginControlUIBean.java
index 1a51878..a0c0f17 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/ServerPluginControlUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/admin/plugin/ServerPluginControlUIBean.java
@@ -24,13 +24,6 @@ import java.util.List;
import javax.faces.application.FacesMessage;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.web.RequestParameter;
-
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.configuration.Configuration;
@@ -45,17 +38,17 @@ import org.rhq.enterprise.server.plugin.pc.ControlResults;
import org.rhq.enterprise.server.util.LookupUtil;
import org.rhq.enterprise.server.xmlschema.ControlDefinition;
-(a)Scope(ScopeType.CONVERSATION)
-@Name("ServerPluginControlUIBean")
+//(a)Scope(ScopeType.CONVERSATION)
+//@Name("ServerPluginControlUIBean")
public class ServerPluginControlUIBean implements Serializable {
private static final long serialVersionUID = 1L;
private final ServerPluginsLocal serverPluginsBean = LookupUtil.getServerPlugins();
- @In("plugin")
+ //@In("plugin")
private AbstractPlugin abstractPlugin;
- @RequestParameter
+ //@RequestParameter
private String control;
private ServerPlugin serverPlugin;
@@ -67,7 +60,7 @@ public class ServerPluginControlUIBean implements Serializable {
private Configuration params;
private ControlResults results;
- @Create
+ //@Create
public void init() throws Exception {
this.serverPlugin = (ServerPlugin) this.abstractPlugin;
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationContextUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationContextUIBean.java
index e3a4183..dfc152d 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationContextUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationContextUIBean.java
@@ -18,16 +18,10 @@
*/
package org.rhq.enterprise.gui.alert.common;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.web.RequestParameter;
-
import org.rhq.enterprise.gui.common.framework.EnterpriseFacesContextUIBean;
-(a)Scope(ScopeType.EVENT)
-@Name("AlertNotificationContextUIBean")
+//(a)Scope(ScopeType.EVENT)
+//@Name("AlertNotificationContextUIBean")
public class AlertNotificationContextUIBean extends EnterpriseFacesContextUIBean {
private enum Context {
AlertNotificationTemplate, //
@@ -37,18 +31,18 @@ public class AlertNotificationContextUIBean extends EnterpriseFacesContextUIBean
NotificationDetails;
}
- @RequestParameter("context")
+ // @RequestParameter("context")
private String context;
- @RequestParameter("contextId")
+ // @RequestParameter("contextId")
private Integer contextId;
- @RequestParameter("contextSubId")
+ // @RequestParameter("contextSubId")
private Integer contextSubId;
private String name;
private String redirect;
private String refresh;
- @Create
+ // @Create
public void init() {
if (context.equals("template")) {
name = "Alert Notification Template";
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationsUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationsUIBean.java
index dc65e73..d69117e 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationsUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/AlertNotificationsUIBean.java
@@ -26,13 +26,6 @@ import java.util.TreeMap;
import javax.faces.application.FacesMessage;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.web.RequestParameter;
-
import org.rhq.core.domain.alert.notification.AlertNotification;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
@@ -46,18 +39,18 @@ import org.rhq.enterprise.server.alert.AlertNotificationManagerLocal;
*
* @author Justin Harris
*/
-(a)Scope(ScopeType.EVENT)
-@Name("alertNotificationsUIBean")
+//(a)Scope(ScopeType.EVENT)
+//@Name("alertNotificationsUIBean")
public class AlertNotificationsUIBean extends EnterpriseFacesContextUIBean {
- @RequestParameter("nid")
+ // @RequestParameter("nid")
private Integer notificationId;
- @RequestParameter("context")
+ // @RequestParameter("context")
private String context;
- @RequestParameter("contextId")
+ // @RequestParameter("contextId")
private Integer contextId;
- @In
+ // @In
private AlertNotificationManagerLocal alertNotificationManager;
private List<AlertNotification> alertNotifications;
@@ -121,7 +114,7 @@ public class AlertNotificationsUIBean extends EnterpriseFacesContextUIBean {
}
}
- @Create
+ // @Create
public void initNotifications() {
reloadAlertNotifications();
this.selectedNotifications = new HashSet<AlertNotification>();
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/CustomContentUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/CustomContentUIBean.java
index 1d9da88..e18d660 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/CustomContentUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/alert/common/CustomContentUIBean.java
@@ -20,15 +20,6 @@ package org.rhq.enterprise.gui.alert.common;
import javax.faces.application.FacesMessage;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.web.RequestParameter;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.contexts.Contexts;
-
import org.rhq.core.domain.alert.notification.AlertNotification;
import org.rhq.core.gui.util.FacesContextUtility;
import org.rhq.enterprise.gui.common.framework.EnterpriseFacesContextUIBean;
@@ -36,14 +27,14 @@ import org.rhq.enterprise.server.alert.AlertNotificationManagerLocal;
import org.rhq.enterprise.server.plugin.pc.alert.AlertSenderInfo;
import org.rhq.enterprise.server.plugin.pc.alert.CustomAlertSenderBackingBean;
-(a)Scope(ScopeType.EVENT)
-@Name("customContentUIBean")
+//(a)Scope(ScopeType.EVENT)
+//@Name("customContentUIBean")
public class CustomContentUIBean extends EnterpriseFacesContextUIBean {
- @RequestParameter("nid")
+ //@RequestParameter("nid")
private Integer alertNotificationId;
- @In
+ //@In
private AlertNotificationManagerLocal alertNotificationManager;
private String contentUrl;
@@ -53,7 +44,7 @@ public class CustomContentUIBean extends EnterpriseFacesContextUIBean {
return contentUrl;
}
- @Create
+ //@Create
public void init() {
if (alertNotificationId == null) {
return;
@@ -94,8 +85,8 @@ public class CustomContentUIBean extends EnterpriseFacesContextUIBean {
* name of bean, but this class is not an "official" seam component.
*/
private void outjectBean(String name, CustomAlertSenderBackingBean bean) {
- Context context = Contexts.getPageContext();
- context.set(name, bean);
+ // Context context = Contexts.getPageContext();
+ // context.set(name, bean);
}
public String saveConfiguration() {
@@ -114,9 +105,9 @@ public class CustomContentUIBean extends EnterpriseFacesContextUIBean {
int alertDefinitionId = Integer.parseInt(customBackingBean.getContextId());
alertNotificationManager.updateAlertNotification(getSubject(), alertDefinitionId, notification);
- AlertNotificationsUIBean notificationsUIBean = (AlertNotificationsUIBean) Contexts
- .lookupInStatefulContexts("alertNotificationsUIBean");
- notificationsUIBean.reselectActiveNotificationUsingDataComparison(notification);
+ // AlertNotificationsUIBean notificationsUIBean = (AlertNotificationsUIBean) Contexts
+ // .lookupInStatefulContexts("alertNotificationsUIBean");
+ // notificationsUIBean.reselectActiveNotificationUsingDataComparison(notification);
} catch (Throwable t) {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "Failed to save alert notification", t);
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/FacesMessagePropogationPhaseListener.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/FacesMessagePropogationPhaseListener.java
index d1fbc83..a21c0d2 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/FacesMessagePropogationPhaseListener.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/FacesMessagePropogationPhaseListener.java
@@ -33,8 +33,6 @@ import javax.faces.event.PhaseListener;
import org.ajax4jsf.context.AjaxContext;
import org.jetbrains.annotations.Nullable;
-import org.jboss.seam.core.Manager;
-
/**
* A phase listener that propogates global JSF messages across redirects.
*
@@ -73,9 +71,7 @@ public class FacesMessagePropogationPhaseListener implements PhaseListener {
PhaseId phaseId = event.getPhaseId();
if (phaseId == PhaseId.INVOKE_APPLICATION) {
// We want to store the messages in the context after the application has done its processing.
- if (!Manager.instance().isReallyLongRunningConversation()) {
- putGlobalFacesMessagesInSession();
- }
+ putGlobalFacesMessagesInSession();
} else if (phaseId == PhaseId.RENDER_RESPONSE) {
// If we've just rendered a response, this isn't a redirect, so we don't want to propogate messages.
// (fix for http://jira.jboss.com/jira/browse/JBNADM-1548, ips, 08/15/07)
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/ServerInfoUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/ServerInfoUIBean.java
index 0689f49..9bb6a8f 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/ServerInfoUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/framework/ServerInfoUIBean.java
@@ -27,8 +27,6 @@ import com.sun.facelets.Facelet;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.seam.Component;
-
import org.rhq.core.util.maven.MavenArtifactNotFoundException;
import org.rhq.core.util.maven.MavenArtifactProperties;
import org.rhq.enterprise.server.RHQConstants;
@@ -70,7 +68,7 @@ public class ServerInfoUIBean {
}
public String getSeamVersion() {
- return getManifestVersion(Component.class);
+ return ""; //getManifestVersion(Component.class);
}
public String getRichFacesVersion() {
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java
index b325f57..ab8e360 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/EditGroupResourceConfigurationUIBean.java
@@ -20,18 +20,7 @@ package org.rhq.enterprise.gui.configuration.group;
import javax.faces.application.FacesMessage;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.faces.Redirect;
-
import org.rhq.core.gui.util.FacesContextUtility;
-import org.rhq.enterprise.gui.legacy.ParamConstants;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.authz.PermissionException;
import org.rhq.enterprise.server.configuration.ConfigurationUpdateStillInProgressException;
@@ -41,20 +30,20 @@ import org.rhq.enterprise.server.configuration.ConfigurationUpdateStillInProgres
*
* @author Ian Springer
*/
-@Name("EditGroupResourceConfigurationUIBean")
-(a)Scope(ScopeType.CONVERSATION)
+//@Name("EditGroupResourceConfigurationUIBean")
+//(a)Scope(ScopeType.CONVERSATION)
public class EditGroupResourceConfigurationUIBean extends AbstractGroupResourceConfigurationUIBean {
public static final String VIEW_ID = "/rhq/group/configuration/editCurrent.xhtml";
- @In(value = "org.jboss.seam.faces.redirect")
- private Redirect redirect;
+ //@In(value = "org.jboss.seam.faces.redirect")
+ //private Redirect redirect;
- @Create
- @Begin
+ //@Create
+ //@Begin
public void init() {
loadConfigurations();
// We can set this once here, since this.redirect is scoped to the same CONVERSATION as this managed bean instance.
- this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
+ //this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
return;
}
@@ -73,7 +62,7 @@ public class EditGroupResourceConfigurationUIBean extends AbstractGroupResourceC
FacesContextUtility
.addMessage(FacesMessage.SEVERITY_INFO, "Group Resource Configuration update scheduled.");
- Conversation.instance().endBeforeRedirect();
+ //Conversation.instance().endBeforeRedirect();
viewId = GroupResourceConfigurationHistoryUIBean.VIEW_ID;
} catch (ConfigurationUpdateStillInProgressException updateException) {
FacesContextUtility
@@ -88,29 +77,29 @@ public class EditGroupResourceConfigurationUIBean extends AbstractGroupResourceC
"Failed to schedule group Resource Configuration update - cause: " + e);
viewId = VIEW_ID;
}
- this.redirect.setViewId(getViewId(viewId));
- this.redirect.execute();
+ //this.redirect.setViewId(getViewId(viewId));
+ //this.redirect.execute();
}
/**
* End the convo and redirect back to viewCurrent.xhtml. This gets called when user clicks the CANCEL button.
*/
- @End
+ //@End
public void cancel() {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Edit canceled.");
- this.redirect.setViewId(getViewId(ViewGroupResourceConfigurationUIBean.VIEW_ID));
- this.redirect.execute();
+ //this.redirect.setViewId(getViewId(ViewGroupResourceConfigurationUIBean.VIEW_ID));
+ // this.redirect.execute();
return;
}
/**
* End the convo and reload the current page (editCurrent.xhtml). This gets called when user clicks the RESET button.
*/
- @End
+ // @End
public void reset() {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "All properties reset to original values.");
- this.redirect.setViewId(getViewId(VIEW_ID));
- this.redirect.execute();
+ // this.redirect.setViewId(getViewId(VIEW_ID));
+ // this.redirect.execute();
return;
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.java
index 402bf33..cb4ccfa 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean.java
@@ -21,19 +21,14 @@ package org.rhq.enterprise.gui.configuration.group;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.enterprise.gui.configuration.AbstractAddNewOpenMapMemberPropertyUIBean;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.ScopeType;
-
/**
* @author Ian Springer
*/
-@Name("GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean")
-(a)Scope(ScopeType.PAGE)
+//@Name("GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean")
+//(a)Scope(ScopeType.PAGE)
public class GroupResourceConfigurationAddNewOpenMapMemberPropertyUIBean extends
AbstractAddNewOpenMapMemberPropertyUIBean {
- @In(value = "EditGroupResourceConfigurationUIBean")
+ //@In(value = "EditGroupResourceConfigurationUIBean")
EditGroupResourceConfigurationUIBean editGroupResourceConfigurationUIBean;
protected Configuration getConfiguration() {
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java
index 62d17d0..0dd512a 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/group/ViewGroupResourceConfigurationUIBean.java
@@ -18,31 +18,22 @@
*/
package org.rhq.enterprise.gui.configuration.group;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.faces.Redirect;
-
import org.rhq.core.gui.util.FacesContextUtility;
-import org.rhq.enterprise.gui.legacy.ParamConstants;
/**
* A POJO Seam component that handles loading Resource configurations across a compatible Group in view-only mode.
*
* @author Ian Springer
*/
-@Name("ViewGroupResourceConfigurationUIBean")
-(a)Scope(ScopeType.PAGE)
+//@Name("ViewGroupResourceConfigurationUIBean")
+//(a)Scope(ScopeType.PAGE)
public class ViewGroupResourceConfigurationUIBean extends AbstractGroupResourceConfigurationUIBean {
public static final String VIEW_ID = "/rhq/group/configuration/viewCurrent.xhtml";
- @In(value = "org.jboss.seam.faces.redirect")
- private Redirect redirect;
+ //@In(value = "org.jboss.seam.faces.redirect")
+ //private Redirect redirect;
- @Create
+ //@Create
public void init() {
loadConfigurations();
return;
@@ -51,11 +42,11 @@ public class ViewGroupResourceConfigurationUIBean extends AbstractGroupResourceC
/**
* Redirect to editCurrent.xhtml. This gets called when user clicks the EDIT button.
*/
- @End
+ //@End
public void edit() {
- this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
- this.redirect.setViewId(getViewId(EditGroupResourceConfigurationUIBean.VIEW_ID));
- this.redirect.execute();
+ // this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
+ // this.redirect.setViewId(getViewId(EditGroupResourceConfigurationUIBean.VIEW_ID));
+ // this.redirect.execute();
return;
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ExistingResourceConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ExistingResourceConfigurationUIBean.java
index 698f288..e78a371 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ExistingResourceConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ExistingResourceConfigurationUIBean.java
@@ -38,8 +38,6 @@ import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.Nullable;
import org.richfaces.model.UploadItem;
-import org.jboss.seam.annotations.Create;
-
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.configuration.AbstractResourceConfigurationUpdate;
import org.rhq.core.domain.configuration.Configuration;
@@ -84,7 +82,7 @@ public class ExistingResourceConfigurationUIBean extends AbstractConfigurationUI
ExistingResourceConfigurationUIBean.class);
}
- @Create
+ //@Create
public void begin() {
if (isRawSupported() || isStructuredAndRawSupported()) {
initConfigDirectories();
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/FileUploadComponent.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/FileUploadComponent.java
index c0ae9f9..a8f9046 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/FileUploadComponent.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/FileUploadComponent.java
@@ -23,16 +23,13 @@
package org.rhq.enterprise.gui.configuration.resource;
+import java.io.IOException;
+
import org.apache.commons.io.FileUtils;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.rhq.enterprise.gui.common.upload.FileUploadUIBean;
import org.richfaces.event.UploadEvent;
import org.richfaces.model.UploadItem;
-import java.io.IOException;
+import org.rhq.enterprise.gui.common.upload.FileUploadUIBean;
/**
* <p>
@@ -45,8 +42,8 @@ import java.io.IOException;
* upload which is implemented using RichFaces and Seam together.
* </p>
*/
-@Name("fileUploader")
-(a)Scope(ScopeType.PAGE)
+//@Name("fileUploader")
+//(a)Scope(ScopeType.PAGE)
public class FileUploadComponent {
private FileUploadUIBean uploadBean = new FileUploadUIBean();
@@ -54,7 +51,7 @@ public class FileUploadComponent {
/**
* Represents the currently selected file in the raw config editor
*/
- @In
+ // @In
private RawConfigUIBean selectedRawUIBean;
public UploadItem getUploadItem() {
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/RawConfigUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/RawConfigUIBean.java
index 3f1532c..37c9a78 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/RawConfigUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/RawConfigUIBean.java
@@ -25,8 +25,6 @@ package org.rhq.enterprise.gui.configuration.resource;
import java.io.File;
-import org.jboss.seam.core.Events;
-
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.RawConfiguration;
import org.rhq.core.util.MessageDigestGenerator;
@@ -71,7 +69,7 @@ public class RawConfigUIBean {
}
private void fireRawConfigUpdateEvent() {
- Events.instance().raiseEvent("rawConfigUpdate", this);
+ // Events.instance().raiseEvent("rawConfigUpdate", this);
}
/** @return The full path name of the raw config file */
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationDefinitionComponent.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationDefinitionComponent.java
index d9e4073..ca4b943 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationDefinitionComponent.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationDefinitionComponent.java
@@ -19,10 +19,6 @@
package org.rhq.enterprise.gui.configuration.resource;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Unwrap;
import org.rhq.core.domain.configuration.definition.ConfigurationDefinition;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.configuration.ConfigurationManagerLocal;
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationEditor.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationEditor.java
index d356a3f..6d8f2d5 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationEditor.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationEditor.java
@@ -23,11 +23,13 @@
package org.rhq.enterprise.gui.configuration.resource;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Observer;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.web.RequestParameter;
+import java.io.Serializable;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.ejb.EJBException;
+import javax.faces.application.FacesMessage;
+
import org.rhq.core.domain.configuration.AbstractResourceConfigurationUpdate;
import org.rhq.core.domain.configuration.Configuration;
import org.rhq.core.domain.configuration.RawConfiguration;
@@ -35,14 +37,8 @@ import org.rhq.core.gui.util.FacesContextUtility;
import org.rhq.enterprise.server.configuration.ConfigurationManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
-import javax.ejb.EJBException;
-import javax.faces.application.FacesMessage;
-import java.io.Serializable;
-import java.util.HashSet;
-import java.util.Set;
-
-@Name("configurationEditor")
-(a)Scope(ScopeType.CONVERSATION)
+//@Name("configurationEditor")
+//(a)Scope(ScopeType.CONVERSATION)
public class ResourceConfigurationEditor extends ResourceConfigurationViewer implements Serializable {
private Configuration originalResourceConfiguration;
@@ -51,7 +47,7 @@ public class ResourceConfigurationEditor extends ResourceConfigurationViewer imp
private String modalEditorContents;
- @RequestParameter
+ // @RequestParameter
private String tab;
@Override
@@ -93,7 +89,7 @@ public class ResourceConfigurationEditor extends ResourceConfigurationViewer imp
resourceConfiguration, RAW_MODE);
}
- @Observer("rawConfigUpdate")
+ // @Observer("rawConfigUpdate")
public void rawConfigUpdated(RawConfigUIBean rawConfigUIBean) {
if (rawConfigUIBean.isModified()) {
// If the file is modified and not already in the cache, then the file was previously in an unmodified state
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationViewer.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationViewer.java
index cd2adb4..9be7c6b 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationViewer.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/configuration/resource/ResourceConfigurationViewer.java
@@ -35,12 +35,6 @@ import javax.faces.application.FacesMessage;
import javax.faces.event.ValueChangeEvent;
import javax.servlet.http.HttpServletResponse;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Out;
-import org.jboss.seam.annotations.Scope;
-
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.configuration.AbstractResourceConfigurationUpdate;
import org.rhq.core.domain.configuration.Configuration;
@@ -53,8 +47,8 @@ import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.configuration.ConfigurationManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
-@Name("configurationViewer")
-(a)Scope(ScopeType.PAGE)
+//@Name("configurationViewer")
+//(a)Scope(ScopeType.PAGE)
public class ResourceConfigurationViewer {
public static final boolean STRUCTURED_MODE = true;
@@ -62,19 +56,19 @@ public class ResourceConfigurationViewer {
private boolean mode = STRUCTURED_MODE;
- @In("webUser")
+ // @In("webUser")
protected WebUser loggedInUser;
- @Out(required = false)
+ // @Out(required = false)
protected Configuration resourceConfiguration;
- @Out(required = false)
+ // @Out(required = false)
protected ConfigurationDefinition resourceConfigurationDefinition;
- @Out(required = false)
+ // @Out(required = false)
protected Collection<RawConfigDirectory> rawConfigDirectories;
- @Out(required = false)
+ // @Out(required = false)
protected RawConfigUIBean selectedRawUIBean;
protected Integer resourceId;
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateContentSourceUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateContentSourceUIBean.java
index 38c995d..06ba36f 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateContentSourceUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/content/CreateContentSourceUIBean.java
@@ -41,7 +41,6 @@ import org.rhq.enterprise.gui.common.paging.PagedListDataModel;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.content.ContentException;
import org.rhq.enterprise.server.content.ContentSourceManagerLocal;
-import org.rhq.enterprise.server.perspective.PerspectiveManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
public class CreateContentSourceUIBean extends PagedDataTableUIBean {
@@ -49,7 +48,7 @@ public class CreateContentSourceUIBean extends PagedDataTableUIBean {
private ContentSourceManagerLocal contentSourceManager = LookupUtil.getContentSourceManager();
- private PerspectiveManagerLocal perspectiveManager = LookupUtil.getPerspectiveManager();
+ //private PerspectiveManagerLocal perspectiveManager = LookupUtil.getPerspectiveManager();
private ContentSource newContentSource = new ContentSource();
private ContentSourceType selectedContentSourceType = null;
@@ -203,14 +202,15 @@ public class CreateContentSourceUIBean extends PagedDataTableUIBean {
}
}
- public String getCreateContentProviderPageLink(String typeName) {
+ public String getCreateContentProviderPageLink() {
Subject subject = EnterpriseFacesContextUtility.getSubject();
- String link = perspectiveManager.getPageLink(subject, "createContentProvider", typeName, null);
+ String link = null;//perspectiveManager.getPageLink(subject, "createContentProvider", typeName, null);
if (null == link) {
- link = "/rhq/content/createContentProvider-plain.xhtml?mode=new&typeName=" + typeName;
+ //link = "/rhq/content/createContentProvider-plain.xhtml?mode=new&typeName=" + typeName;
+ link = "/rhq/content/createContentProvider-plain.xhtml";
} else {
- link += "&mode=new&typeName=" + typeName;
+ //link += "&mode=new&typeName=" + typeName;
}
return link;
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/EditGroupPluginConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/EditGroupPluginConfigurationUIBean.java
index 33577f9..2cc7bf0 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/EditGroupPluginConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/EditGroupPluginConfigurationUIBean.java
@@ -20,18 +20,7 @@ package org.rhq.enterprise.gui.inventory.group;
import javax.faces.application.FacesMessage;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Begin;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.core.Conversation;
-import org.jboss.seam.faces.Redirect;
-
import org.rhq.core.gui.util.FacesContextUtility;
-import org.rhq.enterprise.gui.legacy.ParamConstants;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.authz.PermissionException;
@@ -40,20 +29,20 @@ import org.rhq.enterprise.server.authz.PermissionException;
*
* @author Ian Springer
*/
-@Name("EditGroupPluginConfigurationUIBean")
-(a)Scope(ScopeType.CONVERSATION)
+//@Name("EditGroupPluginConfigurationUIBean")
+//(a)Scope(ScopeType.CONVERSATION)
public class EditGroupPluginConfigurationUIBean extends AbstractGroupPluginConfigurationUIBean {
public static final String VIEW_ID = "/rhq/group/inventory/edit-connection.xhtml";
- @In(value = "org.jboss.seam.faces.redirect")
- private Redirect redirect;
+ // @In(value = "org.jboss.seam.faces.redirect")
+ // private Redirect redirect;
- @Create
- @Begin
+ // @Create
+ // @Begin
public void init() {
loadConfigurations();
// We can set this once here, since this.redirect is scoped to the same CONVERSATION as this managed bean instance.
- this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
+ // this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
return;
}
@@ -71,41 +60,41 @@ public class EditGroupPluginConfigurationUIBean extends AbstractGroupPluginConfi
} catch (Exception e) {
if (e instanceof PermissionException) {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, e.getLocalizedMessage());
- this.redirect.setViewId(ViewGroupPluginConfigurationUIBean.VIEW_ID);
+ // this.redirect.setViewId(ViewGroupPluginConfigurationUIBean.VIEW_ID);
} else {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
"Failed to schedule group plugin Configuration update - cause: " + e);
- this.redirect.setViewId(VIEW_ID);
+ // this.redirect.setViewId(VIEW_ID);
}
- this.redirect.execute();
+ // this.redirect.execute();
return;
}
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Group plugin Configuration update scheduled.");
- Conversation.instance().endBeforeRedirect();
- this.redirect.setViewId(ViewGroupConnectionPropertyHistoryUIBean.VIEW_ID);
- this.redirect.execute();
+ // Conversation.instance().endBeforeRedirect();
+ // this.redirect.setViewId(ViewGroupConnectionPropertyHistoryUIBean.VIEW_ID);
+ // this.redirect.execute();
return;
}
/**
* End the convo and redirect back to view-connection.xhtml. This gets called when user clicks the CANCEL button.
*/
- @End
+ // @End
public void cancel() {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "Edit canceled.");
- this.redirect.setViewId(ViewGroupPluginConfigurationUIBean.VIEW_ID);
- this.redirect.execute();
+ // this.redirect.setViewId(ViewGroupPluginConfigurationUIBean.VIEW_ID);
+ // this.redirect.execute();
return;
}
/**
* End the convo and reload the current page (edit-connection.xhtml). This gets called when user clicks the RESET button.
*/
- @End
+ // @End
public void reset() {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_INFO, "All properties reset to original values.");
- this.redirect.setViewId(VIEW_ID);
- this.redirect.execute();
+ // this.redirect.setViewId(VIEW_ID);
+ // this.redirect.execute();
return;
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/ViewGroupPluginConfigurationUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/ViewGroupPluginConfigurationUIBean.java
index aeee740..3e777d2 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/ViewGroupPluginConfigurationUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/group/ViewGroupPluginConfigurationUIBean.java
@@ -18,31 +18,22 @@
*/
package org.rhq.enterprise.gui.inventory.group;
-import org.rhq.enterprise.gui.legacy.ParamConstants;
-
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.faces.Redirect;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.End;
-import org.jboss.seam.annotations.In;
/**
* A POJO Seam component that handles loading plugin configurations across a compatible Group in view-only mode.
*
* @author Ian Springer
*/
-@Name("ViewGroupPluginConfigurationUIBean")
-(a)Scope(ScopeType.PAGE)
+//@Name("ViewGroupPluginConfigurationUIBean")
+//(a)Scope(ScopeType.PAGE)
public class ViewGroupPluginConfigurationUIBean extends AbstractGroupPluginConfigurationUIBean
{
public static final String VIEW_ID = "/rhq/group/inventory/view-connection.xhtml";
- @In(value = "org.jboss.seam.faces.redirect")
- private Redirect redirect;
+ //@In(value = "org.jboss.seam.faces.redirect")
+ //private Redirect redirect;
- @Create
+ //@Create
public void init() {
loadConfigurations();
return;
@@ -51,11 +42,11 @@ public class ViewGroupPluginConfigurationUIBean extends AbstractGroupPluginConfi
/**
* Redirect to editCurrent.xhtml. This gets called when user clicks the EDIT button.
*/
- @End
+ // @End
public void edit() {
- this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
- this.redirect.setViewId(EditGroupPluginConfigurationUIBean.VIEW_ID);
- this.redirect.execute();
+ // this.redirect.setParameter(ParamConstants.GROUP_ID_PARAM, getGroup().getId());
+ //this.redirect.setViewId(EditGroupPluginConfigurationUIBean.VIEW_ID);
+ // this.redirect.execute();
return;
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/FavoritesUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/FavoritesUIBean.java
index 5bf3da5..86e0473 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/FavoritesUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/FavoritesUIBean.java
@@ -21,10 +21,6 @@ package org.rhq.enterprise.gui.inventory.resource;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
import org.rhq.enterprise.gui.legacy.WebUser;
import org.rhq.enterprise.gui.legacy.WebUserPreferences;
import org.rhq.enterprise.gui.legacy.action.resource.common.QuickFavoritesUtil;
@@ -35,8 +31,8 @@ import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
*
* @author Joseph Marques
*/
-@Name("FavoritesUIBean")
-(a)Scope(ScopeType.EVENT)
+//@Name("FavoritesUIBean")
+//(a)Scope(ScopeType.EVENT)
public class FavoritesUIBean {
protected final Log log = LogFactory.getLog(FavoritesUIBean.class);
@@ -49,7 +45,7 @@ public class FavoritesUIBean {
* requests, particularly with the raw config editor. The raw config editor however extends the life of the
* current ResourceUIBean beyond the current request so that the id can be accessed through ResourceUIBean.
*/
- @In(value = ResourceUIBean.MANAGED_BEAN_NAME, create = true)
+ // @In(value = ResourceUIBean.MANAGED_BEAN_NAME, create = true)
private ResourceUIBean resourceUIBean;
public FavoritesUIBean() {
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java
index ecc1253..3a266e8 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourceUIBean.java
@@ -28,10 +28,6 @@ import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.authz.Permission;
import org.rhq.core.domain.measurement.AvailabilityType;
@@ -50,7 +46,6 @@ import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.authz.AuthorizationManagerLocal;
import org.rhq.enterprise.server.measurement.AvailabilityManagerLocal;
import org.rhq.enterprise.server.measurement.MeasurementDataManagerLocal;
-import org.rhq.enterprise.server.perspective.PerspectiveManagerLocal;
import org.rhq.enterprise.server.perspective.Tab;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.resource.ResourceTypeManagerLocal;
@@ -63,8 +58,8 @@ import org.rhq.enterprise.server.util.LookupUtil;
*
* @author Ian Springer
*/
-(a)Name(ResourceUIBean.MANAGED_BEAN_NAME)
-(a)Scope(ScopeType.EVENT)
+//(a)Name(ResourceUIBean.MANAGED_BEAN_NAME)
+//(a)Scope(ScopeType.EVENT)
public class ResourceUIBean {
protected final Log log = LogFactory.getLog(ResourceUIBean.class);
@@ -84,7 +79,7 @@ public class ResourceUIBean {
private ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
private ResourceTypeManagerLocal resourceTypeManager = LookupUtil.getResourceTypeManager();
private AuthorizationManagerLocal authorizationManager = LookupUtil.getAuthorizationManager();
- private PerspectiveManagerLocal perspectiveManager = LookupUtil.getPerspectiveManager();
+ //private PerspectiveManagerLocal perspectiveManager = LookupUtil.getPerspectiveManager();
private String message;
@@ -112,7 +107,7 @@ public class ResourceUIBean {
.getId());
this.permissions = new ResourcePermission(resourcePerms);
this.facets = this.resourceTypeManager.getResourceFacets(getResourceType().getId());
- this.tabs = this.perspectiveManager.getResourceTabs(subject, this.resource);
+ //this.tabs = this.perspectiveManager.getResourceTabs(subject, this.resource);
//parent can be viewed by user only if he is allowed to see it
if (parent != null)
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java
index ea8a93c..e8a38ed 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/perspectives/PerspectiveUIBean.java
@@ -26,14 +26,8 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.cloud.Server;
import org.rhq.core.gui.util.FacesContextUtility;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
-import org.rhq.enterprise.server.perspective.PerspectiveException;
-import org.rhq.enterprise.server.perspective.PerspectiveManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
/**
* Bean dynamically provides menu information used by menu.xhtml. This bean should be viewed
* concurrently with menu.xhtml and it's designed to provide static or dynamic menu content
@@ -43,19 +37,19 @@ import org.jboss.seam.annotations.Scope;
* @author Jay Shaughnessy
*
*/
-@Name("PerspectiveUIBean")
-(a)Scope(ScopeType.PAGE)
+//@Name("PerspectiveUIBean")
+//(a)Scope(ScopeType.PAGE)
public class PerspectiveUIBean {
- PerspectiveManagerLocal perspectiveManager = LookupUtil.getPerspectiveManager();
+ //PerspectiveManagerLocal perspectiveManager = LookupUtil.getPerspectiveManager();
public List<org.rhq.enterprise.server.perspective.MenuItem> getCoreMenu() {
Subject subject = EnterpriseFacesContextUtility.getSubject();
List<org.rhq.enterprise.server.perspective.MenuItem> result = null;
try {
- result = perspectiveManager.getMenu(subject);
- } catch (PerspectiveException e) {
+ //result = perspectiveManager.getMenu(subject);
+ } catch (Exception e) {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR, "Failed to get core menu.", e);
}
@@ -73,8 +67,8 @@ public class PerspectiveUIBean {
String result = null;
try {
- result = perspectiveManager.getUrlViaKey(Integer.valueOf(targetUrlKey));
- result = addContextParams(result);
+ // result = perspectiveManager.getUrlViaKey(Integer.valueOf(targetUrlKey));
+ // result = addContextParams(result);
} catch (NumberFormatException e) {
FacesContextUtility.addMessage(FacesMessage.SEVERITY_ERROR,
"Required request parameter 'targetUrlKey' was not numeric: " + targetUrlKey, e);
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestConditionalFormUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestConditionalFormUIBean.java
index 65871b2..4caf970 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestConditionalFormUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestConditionalFormUIBean.java
@@ -6,12 +6,8 @@ import java.util.List;
import javax.faces.event.ValueChangeEvent;
import javax.faces.model.SelectItem;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
-(a)Scope(ScopeType.PAGE)
-@Name("TestConditionalFormUIBean")
+//(a)Scope(ScopeType.PAGE)
+//@Name("TestConditionalFormUIBean")
public class TestConditionalFormUIBean {
private String currentType = "";
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestDynamicRenderingUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestDynamicRenderingUIBean.java
index abbc2fe..707ebfa 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestDynamicRenderingUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/test/TestDynamicRenderingUIBean.java
@@ -1,13 +1,9 @@
package org.rhq.enterprise.gui.test;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-
import org.rhq.core.gui.util.FacesContextUtility;
-(a)Scope(ScopeType.PAGE)
-@Name("TestDynamicRenderingUIBean")
+//(a)Scope(ScopeType.PAGE)
+//@Name("TestDynamicRenderingUIBean")
public class TestDynamicRenderingUIBean {
private final static String childOne = "/rhq/test/rerender/child-1.xhtml";
private final static String childTwo = "/rhq/test/rerender/child-2.xhtml";
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/util/LookupComponent.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/util/LookupComponent.java
index 31259a0..d224f62 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/util/LookupComponent.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/util/LookupComponent.java
@@ -20,15 +20,7 @@ package org.rhq.enterprise.gui.util;
import java.beans.Introspector;
import java.lang.reflect.Method;
-import org.jboss.seam.Component;
-import org.jboss.seam.ScopeType;
-import org.jboss.seam.annotations.Create;
-import org.jboss.seam.annotations.In;
-import org.jboss.seam.annotations.Name;
-import org.jboss.seam.annotations.Scope;
-import org.jboss.seam.annotations.Startup;
-import org.jboss.seam.contexts.Context;
-import org.jboss.seam.core.Init;
+
import org.rhq.enterprise.server.util.LookupUtil;
/**
@@ -52,18 +44,18 @@ import org.rhq.enterprise.server.util.LookupUtil;
*
* @author Justin Harris
*/
-@Startup
-(a)Scope(ScopeType.APPLICATION)
-@Name("lookupComponent")
+//@Startup
+//(a)Scope(ScopeType.APPLICATION)
+//@Name("lookupComponent")
public class LookupComponent {
- @In
- private Init init;
+ //@In
+ //private Init init;
- @In
- private Context applicationContext;
+ //@In
+ //private Context applicationContext;
- @Create
+ //@Create
public void scanComponents() {
for (Method method : LookupUtil.class.getDeclaredMethods()) {
String methodName = method.getName();
@@ -95,17 +87,17 @@ public class LookupComponent {
*/
private void addComponent(String componentName, Method creationMethod) {
LookupUtilComponent component = new LookupUtilComponent(componentName, creationMethod);
- this.applicationContext.set(componentName + ".component", component);
+ //this.applicationContext.set(componentName + ".component", component);
// set the new component to @AutoCreate
- this.init.addAutocreateVariable(componentName);
+ //this.init.addAutocreateVariable(componentName);
}
/**
* Custom Seam component that delegates component intantiation to a creation
* method. This is similar in concept to Seam @Factory methods.
*/
- class LookupUtilComponent extends Component {
+ class LookupUtilComponent /*extends Component*/{
private Method creationMethod;
@@ -114,12 +106,12 @@ public class LookupComponent {
}
private LookupUtilComponent(String name, Method creationMethod) {
- super(Object.class, name);
+ //super(Object.class, name);
this.creationMethod = creationMethod;
}
- @Override
+ //@Override
protected Object instantiate() throws Exception {
return this.creationMethod.invoke(null);
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/components.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/components.xml
deleted file mode 100644
index 9dcd041..0000000
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/components.xml
+++ /dev/null
@@ -1,43 +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"
- xmlns:core="http://jboss.com/products/seam/core"
- xsi:schemaLocation="http://jboss.com/products/seam/core http://jboss.com/products/seam/core-2.0.xsd
- 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">
-
-
- <component name="org.jboss.seam.core.init">
- <property name="debug">true</property> <!-- enable only when needed -->
- <property name="transactionManagementEnabled">false</property>
- <property name="jndiPattern">rhq/#{ejbName}/local</property>
- </component>
-
-
- <!--<component class="org.jboss.seam.web.MultipartFilter">-->
- <!--<property name="createTempFiles">true</property>-->
- <!--<property name="maxRequestSize">1000000</property>-->
- <!--<property name="urlPattern">*.xhtml</property>-->
- <!--</component>-->
-
- <!--<component class="org.rhq.enterprise.gui.configuration.resource.ExistingResourceConfigurationUIBean"-->
- <!--name="ExistingResourceConfigurationViewUIBean"-->
- <!--scope="page"/>-->
-
- <!--<component class="org.rhq.enterprise.gui.configuration.resource.ExistingResourceConfigurationUIBean"-->
- <!--name="ExistingResourceConfigurationUIBean"-->
- <!--scope="session"/>-->
-
- <!-- Load i18n bundles -->
- <core:resource-loader>
- <core:bundle-names>
- <value>messages</value>
- <value>ApplicationResources</value>
- </core:bundle-names>
- </core:resource-loader>
-
- <core:manager conversation-timeout="180000" concurrent-request-timeout="10000"/>
-
-</components>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/faces-config.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/faces-config.xml
index d2fac18..c137f08 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/faces-config.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/faces-config.xml
@@ -21,10 +21,6 @@
</application>
<lifecycle>
- <!--
- <!- - This phase listener is required for Seam applications. - ->
- <phase-listener>org.jboss.seam.jsf.SeamPhaseListener</phase-listener>
- -->
<phase-listener>org.rhq.enterprise.gui.common.framework.FacesMessagePropogationPhaseListener</phase-listener>
<phase-listener>org.rhq.enterprise.gui.common.framework.PhaseTracker</phase-listener>
<phase-listener>org.rhq.enterprise.gui.common.framework.HttpHeadersInjector</phase-listener>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/pages.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/pages.xml
deleted file mode 100644
index f0217a7..0000000
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/pages.xml
+++ /dev/null
@@ -1,48 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<pages xmlns="http://jboss.com/products/seam/pages"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://jboss.com/products/seam/pages
- http://jboss.com/products/seam/pages-2.1.xsd">
-
- <page view-id="/rhq/resource/configuration/view.xhtml">
- <action execute="#{configurationViewer.initialize}" on-postback="false"/>
- <navigation from-action="#{ConfigHelperUIBean.accessMap}">
- <render view-id="/rhq/resource/configuration/view-map.xhtml"/>
- </navigation>
- </page>
-
- <page view-id="/rhq/resource/configuration/view-map.xhtml" action="#{configurationViewer.initialize}"/>
-
- <page view-id="/rhq/resource/configuration/edit.xhtml" concurrent-request-timeout="10000" timeout="180000">
- <action execute="#{configurationEditor.initialize}"
- on-postback="false"
- if="#{!conversation.longRunning or (empty resourceConfiguration or resourceConfiguration.id ne ResourceUIBean.id)}"/>
-
- <navigation from-action="#{configurationEditor.initialize}">
- <begin-conversation join="true"/>
- <rule if="#{configurationEditor.updateInProgress}">
- <redirect view-id="/rhq/resource/configuration/view.xhtml" include-page-params="true">
- <param name="id" value="#{ResourceUIBean.id}"/>
- </redirect>
- </rule>
- </navigation>
-
- <navigation from-action="#{configurationEditor.updateConfiguration}">
- <rule if-outcome="success">
- <end-conversation before-redirect="false"/>
- <redirect view-id="/rhq/resource/configuration/history.xhtml">
- <param name="id" value="#{ResourceUIBean.id}"/>
- </redirect>
- </rule>
- </navigation>
-
- <navigation from-action="#{configurationEditor.finishAddMap}">
- <render view-id="/rhq/resource/configuration/edit.xhtml"/>
- </navigation>
-
- <navigation from-action="#{configurationEditor.finishEditMap}">
- <render view-id="/rhq/resource/configuration/edit.xhtml"/>
- </navigation>
- </page>
-
-</pages>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
index 7528dd9..0539e78 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/web.xml
@@ -7,31 +7,6 @@
<display-name>RHQ Legacy GUI</display-name>
- <!--=== Seam ===-->
-
- <listener>
- <listener-class>org.jboss.seam.servlet.SeamListener</listener-class>
- </listener>
-
- <!-- From Seam docs: The Seam master filter must be the first filter specified
- in web.xml. This ensures it is run first. -->
- <filter>
- <filter-name>Seam Filter</filter-name>
- <filter-class>org.jboss.seam.servlet.SeamFilter</filter-class>
- <init-param>
- <param-name>createTempFiles</param-name>
- <param-value>true</param-value>
- </init-param>
- <init-param>
- <param-name>maxRequestSize</param-name>
- <param-value>250000000</param-value>
- </init-param>
- </filter>
- <filter-mapping>
- <filter-name>Seam Filter</filter-name>
- <url-pattern>*.xhtml</url-pattern>
- </filter-mapping>
-
<!--=== JSF RI ===-->
<listener>
@@ -65,21 +40,12 @@
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
- <servlet>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <servlet-class>org.jboss.seam.servlet.SeamResourceServlet</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>
- <servlet-mapping>
- <servlet-name>Seam Resource Servlet</servlet-name>
- <url-pattern>/seam/resource/*</url-pattern>
- </servlet-mapping>
<!-- the suffix for files containing JSF content (default is ".jsp") -->
<context-param>
@@ -213,11 +179,6 @@
<!--=== RichFaces ===-->
- <!-- From Seam docs: If RichFaces is used in your project, Seam will install
- the RichFaces Ajax filter for you, making sure to install it before all
- other built-in filters. You don't need to install the RichFaces Ajax
- filter in web.xml yourself. -->
-
<!-- name of the CSS skin used by RichFaces (default value is "DEFAULT") -->
<context-param>
<param-name>org.richfaces.SKIN</param-name>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider-plain.xhtml
index 00dff99..1520b7e 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider-plain.xhtml
@@ -60,9 +60,9 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{CreateContentSourceUIBean.getCreateContentProviderPageLink(item.name)}">
- <!-- note, do not use f:param with perspectives -->
-
+ <h:outputLink value="#{CreateContentSourceUIBean.createContentProviderPageLink}">
+ <f:param name="typeName" value="#{item.name}" />
+ <f:param name="mode" value="new" />
<h:outputText value="#{item.displayName}" />
<h:outputText value=" *" rendered="#{(not empty param.typeName) and (param.typeName eq item.name)}"/>
</h:outputLink>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider.xhtml
index 1a48919..28a84bc 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/createContentProvider.xhtml
@@ -70,9 +70,9 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{CreateContentSourceUIBean.getCreateContentProviderPageLink(item.name)}">
- <!-- note, do not use f:param with perspectives -->
-
+ <h:outputLink value="#{CreateContentSourceUIBean.createContentProviderPageLink}">
+ <f:param name="typeName" value="#{item.name}" />
+ <f:param name="mode" value="new" />
<h:outputText value="#{item.displayName}" />
<h:outputText value=" *" rendered="#{(not empty param.typeName) and (param.typeName eq item.name)}"/>
</h:outputLink>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/importRepos-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/importRepos-plain.xhtml
index a9880ae..6ab0ee4 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/importRepos-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/importRepos-plain.xhtml
@@ -86,7 +86,7 @@
<h:outputText styleClass="headerText" value="Name" />
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="repo.xhtml">
+ <h:outputLink value="repo-plain.xhtml">
<f:param name="mode" value="view"/>
<f:param name="id" value="#{item.id}"/>
<h:outputText value="#{item.name}" />
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml
index c5e970d..c575b47 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/content/subscription-plain.xhtml
@@ -51,7 +51,7 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="/rhq/content/repo.xhtml">
+ <h:outputLink value="/rhq/content/repo-plain.xhtml">
<f:param name="mode" value="view"/>
<f:param name="id" value="#{item.repo.id}"/>
<h:outputText value="#{item.repo.name}" />
@@ -164,7 +164,7 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="/rhq/content/repo.xhtml">
+ <h:outputLink value="/rhq/content/repo-plain.xhtml">
<f:param name="mode" value="view"/>
<f:param name="id" value="#{item.repo.id}"/>
<h:outputText value="#{item.repo.name}" />
diff --git a/modules/enterprise/gui/portal-war/src/test/groovy/org/rhq/enterprise/gui/util/LookupComponentTest.groovy b/modules/enterprise/gui/portal-war/src/test/groovy/org/rhq/enterprise/gui/util/LookupComponentTest.groovy
deleted file mode 100644
index 7e1f27a..0000000
--- a/modules/enterprise/gui/portal-war/src/test/groovy/org/rhq/enterprise/gui/util/LookupComponentTest.groovy
+++ /dev/null
@@ -1,92 +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.gui.util
-
-import java.lang.reflect.Method
-import org.jboss.seam.ScopeType
-import org.jboss.seam.contexts.BasicContext
-import org.jboss.seam.contexts.Context
-import org.jboss.seam.core.Init
-import org.rhq.enterprise.gui.util.LookupComponent.LookupUtilComponent
-import org.rhq.enterprise.server.util.LookupUtil
-import org.testng.AssertJUnit
-import org.testng.annotations.BeforeClass
-import org.testng.annotations.DataProvider
-import org.testng.annotations.Test
-
-public class LookupComponentTest {
-
- def lookupComponent
- def contextMap
-
- @BeforeClass
- void setUp() {
- contextMap = [:]
-
- lookupComponent = new LookupComponent()
- lookupComponent.init = new Init()
- lookupComponent.applicationContext = new BasicContext(ScopeType.APPLICATION, contextMap)
-
- lookupComponent.scanComponents()
- }
-
- @DataProvider(name="components")
- Object[][] createExpectedComponents() {
- // Note: these are just arbitrary - feel free to add to the list
- [
- [ "activeConditionProducer.component", "activeConditionProducer", getMethod("getActiveConditionProducer") ],
- [ "activeConditionConsumer.component", "activeConditionConsumer", getMethod("getActiveConditionConsumer") ],
- [ "agentManager.component", "agentManager", getMethod("getAgentManager") ],
- [ "alertConditionCacheManager.component", "alertConditionCacheManager", getMethod("getAlertConditionCacheManager") ],
- [ "alertConditionManager.component", "alertConditionManager", getMethod("getAlertConditionManager") ],
- [ "alertDefinitionManager.component", "alertDefinitionManager", getMethod("getAlertDefinitionManager") ],
- [ "alertSubsystemManager.component", "alertSubsystemManager", getMethod("getAlertSubsystemManager") ],
- [ "configurationManager.component", "configurationManager", getMethod("getConfigurationManager") ],
- [ "emailManagerBean.component", "emailManagerBean", getMethod("getEmailManagerBean") ],
- [ "resourceManager.component", "resourceManager", getMethod("getResourceManager") ],
- ]
- }
-
- def getMethod(String methodName) {
- return LookupUtil.class.getMethod(methodName)
- }
-
- @Test(dataProvider="components")
- void componentExists(def expectedComponentName, def expectedName, def expectedMethod) {
- def component = contextMap[expectedComponentName]
-
- AssertJUnit.assertNotNull("The component: '" + expectedComponentName + "' should be in the application context.", component)
- }
-
- @Test(dataProvider="components")
- void componentName(def expectedComponentName, def expectedName, def expectedMethod) {
- def component = contextMap[expectedComponentName]
-
- AssertJUnit.assertEquals("Created component should be named: " + expectedName, expectedName, component.getName())
- }
-
- @Test(dataProvider="components")
- void componentMethod(def expectedComponentName, def expectedName, def expectedMethod) {
- def component = contextMap[expectedComponentName]
-
- AssertJUnit.assertEquals("The method: " + expectedMethod.toGenericString() + " should be called to create component: " + expectedName,
- expectedMethod, component.getCreationMethod())
- }
-
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml b/modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml
index 936c5b9..f6601ab 100644
--- a/modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml
+++ b/modules/enterprise/server/container/src/main/resources/jbossas/server/default/conf/jboss-log4j.xml
@@ -461,10 +461,6 @@
<priority value="WARN"/>
</category>
- <category name="org.jboss.seam">
- <priority value="WARN"/>
- </category>
-
<!-- ================= -->
<!-- The root category -->
<!-- ================= -->
diff --git a/modules/enterprise/server/ear/pom.xml b/modules/enterprise/server/ear/pom.xml
index fc67965..4a05dd2 100644
--- a/modules/enterprise/server/ear/pom.xml
+++ b/modules/enterprise/server/ear/pom.xml
@@ -17,9 +17,6 @@
<properties>
<earDirectory>${project.build.directory}/${project.build.finalName}</earDirectory>
-
- <!-- dependency versions -->
- <seam.version>1.2.1.GA</seam.version>
</properties>
<dependencies>
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java
index 7aea01a..1b1f5fb 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerBean.java
@@ -25,9 +25,6 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
-import javax.ejb.EJB;
-import javax.ejb.Stateless;
-
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jetbrains.annotations.NotNull;
@@ -44,12 +41,12 @@ import org.rhq.enterprise.server.perspective.activator.context.GlobalActivationC
import org.rhq.enterprise.server.perspective.activator.context.ResourceActivationContext;
import org.rhq.enterprise.server.plugin.pc.perspective.metadata.PerspectivePluginMetadataManager;
-@Stateless
/**
* @author Jay Shaughnessy
* @author Ian Springer
*/
-public class PerspectiveManagerBean implements PerspectiveManagerLocal {
+//@Stateless
+public class PerspectiveManagerBean {//implements PerspectiveManagerLocal {
// Map of sessionId to cached menu entry. The cached menu is re-used for the same sessionId.
// This should more appropriately use Subject as the key, but since Subject equality is
@@ -61,10 +58,10 @@ public class PerspectiveManagerBean implements PerspectiveManagerLocal {
private final Log log = LogFactory.getLog(PerspectiveManagerBean.class);
- @EJB
+ //@EJB
private ServerManagerLocal serverManager;
- @EJB
+ //@EJB
private SubjectManagerLocal subjectManager;
/* (non-Javadoc)
@@ -477,4 +474,4 @@ public class PerspectiveManagerBean implements PerspectiveManagerLocal {
String result = protocol + server.getAddress() + ":" + port + url;
return result;
}
-}
\ No newline at end of file
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerLocal.java
deleted file mode 100644
index 497d89c..0000000
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/perspective/PerspectiveManagerLocal.java
+++ /dev/null
@@ -1,184 +0,0 @@
-/*
- * RHQ Management Platform
- * Copyright (C) 2005-2008 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 java.util.List;
-import java.util.Map;
-
-import javax.ejb.Local;
-
-import org.rhq.core.domain.auth.Subject;
-import org.rhq.core.domain.resource.Resource;
-
-@Local
-public interface PerspectiveManagerLocal {
- /**
- * Return the core menu for the specified subject. Depending on their inventory and roles the
- * core menu for one subject1 could differ from that of subject2.
- *
- * Subsequent calls will return the same core menu for the same Subject. In other words, it does
- * not change during a user session.
- *
- * @param subject
- * @return
- */
- List<MenuItem> getMenu(Subject subject) throws PerspectiveException;
-
- /**
- * Returns the list of tabs that should be displayed for the specified user for the specified Resource.
- *
- * @param subject a user
- * @param resource an inventoried Resource
- * @return the list of tabs that should be displayed for the specified user for the specified Resource
- */
- List<Tab> getResourceTabs(Subject subject, Resource resource);
-
- /**
- * Return the url for the given page and name, if one is defined.
- *
- * @param subject a user
- * @param pageName, a valid page extension point
- * @param linkName, the link that should be replaced
- * @param defaultValue, if no perspective link is defined for the pageName+linkName, the value to return
- * @return the page link extenstion's url. defaultValue if not found
- */
- String getPageLink(Subject subject, String pageName, String linkName, String defaultValue);
-
- /**
- * Given a targetUrlKey parameter value, as set in the extension, resolve that key into the targetUrl
- * for the extension's content.
- *
- * @param key, a valid key
- * @return the target url
- */
- public String getUrlViaKey(int key) throws PerspectiveException;
-
- // *************************************************************************************************
- // The following were previously the remote API. The perspective API is not yet ready for release
- // *************************************************************************************************
-
- /**
- * Get the CoreUI context root. This can be used to assemble a url not otherwise obtainable via the API.
- * This should be used with care as hardcoded paths may break in future releases of the core UI.
- *
- * @param subject
- * @param makeExplicit If true ensure "protocol://host:port" prefix. Set true for remotely deployed perspectives.
- * @param makeSecure If true use the secure protocol and port. Ignored if makeExplicit=false or not supported.
- * @return the Core GUI root url in the format "protocol://host:port/"
- */
- String getRootUrl(Subject subject, boolean makeExplicit, boolean makeSecure);
-
- /**
- * This method does not ensure the specified subject can actually access the requested url.
- * @param subject
- * @param menuItemName The name of the menuItem extension point
- * @param makeExplicit If true ensure "protocol://host:port" prefix. Set true for remotely deployed perspectives.
- * @param makeSecure If true use the secure protocol and port. Ignored if makeExplicit=false or not supported.
- * @return The url for specified extension point. May return null if the extension does not specify a url
- * @throws IllegalArgumentException if the extension point does not exist.
- */
- String getMenuItemUrl(Subject subject, String menuItemName, boolean makeExplicit, boolean makeSecure);
-
- /**
- * This method does not ensure the specified subject can actually access the requested url.
- * @param subject
- * @param tabName The name of the resource tab extension point
- * @param resourceId The resource id to be incorporated into the url. This method does not check the validity
- * of the resourceId.
- * @param makeExplicit If true ensure "protocol://host:port" prefix. Set true for remotely deployed perspectives.
- * @param makeSecure If true use the secure protocol and port. Ignored if makeExplicit=false or not supported.
- * @return The url for specified extension point. May return null if the extension does not specify a url
- * @throws IllegalArgumentException if the extension point does not exist.
- */
- String getResourceTabUrl(Subject subject, String tabName, int resourceId, boolean makeExplicit, boolean makeSecure);
-
- /**
- * This method does not ensure the specified subject can actually access the requested url.
- *
- * @param subject
- * @param target The target of the navigation link. for example, a role.
- * @param targetId The id of the specified target. for example, a roleId
- * @param makeExplicit If true ensure "protocol://host:port" prefix. Set true for remotely deployed perspectives.
- * @param makeSecure If true use the secure protocol and port. Ignored if makeExplicit=false or not supported.
- * @return The url for specified target.
- */
- String getTargetUrl(Subject subject, PerspectiveTarget target, int targetId, boolean makeExplicit,
- boolean makeSecure);
-
- /**
- * When requesting the same target url for several targets this is a more efficient call than calling
- * getTargetUrl() repeatedly. For example, if generating links to a list of resources.
- *
- * This method does not ensure the specified subject can actually access the requested urls.
- *
- * @param subject
- * @param target The target of the navigation link. for example, a role.
- * @param targetId The id of the specified target. for example, a roleId
- * @param makeExplicit If true ensure "protocol://host:port" prefix. Set true for remotely deployed perspectives.
- * @param makeSecure If true use the secure protocol and port. Ignored if makeExplicit=false or not supported.
- * @return A Map of targetId to url mappings.
- */
- Map<Integer, String> getTargetUrls(Subject subject, PerspectiveTarget target, int[] targetIds,
- boolean makeExplicit, boolean makeSecure);
-
- /**
- * This method does not ensure the specified subject can actually access the requested url.
- *
- * @param subject
- * @param resourceId The resource id of the specified target. for example, the resource on which an alert is exists
- * @param target The target of the navigation link. for example, an alert.
- * @param targetId The id of the specified target. for example, an alertId
- * @param makeExplicit If true ensure "protocol://host:port" prefix. Set true for remotely deployed perspectives.
- * @param makeSecure If true use the secure protocol and port. Ignored if makeExplicit=false or not supported.
- * @return The url for specified target.
- */
- String getResourceTargetUrl(Subject subject, int resourceId, PerspectiveTarget target, int targetId,
- boolean makeExplicit, boolean makeSecure);
-
- /**
- * When requesting the same target url for several resource targets this is a more efficient call than calling
- * getResourceTargetUrl() repeatedly. For example, if generating links to a list of a resource's alerts.
- *
- * Same This method does not ensure the specified subject can actually access the requested urls.
- *
- * @param subject
- * @param resourceId The resource id of the specified target. for example, the resource on which an alert is exists
- * @param target The target of the navigation link. for example, an alert.
- * @param targetId The id of the specified target. for example, an alertId
- * @param makeExplicit If true ensure "protocol://host:port" prefix. Set true for remotely deployed perspectives.
- * @param makeSecure If true use the secure protocol and port. Ignored if makeExplicit=false or not supported.
- * @return A Map of targetId to url mappings.
- */
- Map<Integer, String> getResourceTargetUrls(Subject subject, int resourceId, PerspectiveTarget target,
- int[] targetIds, boolean makeExplicit, boolean makeSecure);
-
- /**
- * This method does not ensure the specified subject can actually access the requested url.
- * @param subject
- * @param resourceTypeId The resourceType id of the specified target. for example, the type for an alert template
- * @param target The target of the navigation link. for example, an alert template
- * @param targetId The id of the specified target. for example, an alert template definition Id
- * @param makeExplicit If true ensure "protocol://host:port" prefix. Set true for remotely deployed perspectives.
- * @param makeSecure If true use the secure protocol and port. Ignored if makeExplicit=false or not supported.
- * @return The url for specified target.
- */
- String getTemplateTargetUrl(Subject subject, int resourceId, PerspectiveTarget target, int targetId,
- boolean makeExplicit, boolean makeSecure);
-
-}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
index 6c82e91..989b546 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/util/LookupUtil.java
@@ -144,8 +144,6 @@ import org.rhq.enterprise.server.measurement.MeasurementViewManagerBean;
import org.rhq.enterprise.server.measurement.MeasurementViewManagerLocal;
import org.rhq.enterprise.server.operation.OperationManagerBean;
import org.rhq.enterprise.server.operation.OperationManagerLocal;
-import org.rhq.enterprise.server.perspective.PerspectiveManagerBean;
-import org.rhq.enterprise.server.perspective.PerspectiveManagerLocal;
import org.rhq.enterprise.server.plugin.ServerPluginsBean;
import org.rhq.enterprise.server.plugin.ServerPluginsLocal;
import org.rhq.enterprise.server.plugin.pc.ServerPluginServiceManagement;
@@ -574,10 +572,6 @@ public final class LookupUtil {
return lookupLocal(SystemManagerBean.class);
}
- public static PerspectiveManagerLocal getPerspectiveManager() {
- return lookupLocal(PerspectiveManagerBean.class);
- }
-
public static ProductVersionManagerLocal getProductVersionManager() {
return lookupLocal(ProductVersionManagerBean.class);
}
diff --git a/modules/enterprise/server/plugins/alert-operations/pom.xml b/modules/enterprise/server/plugins/alert-operations/pom.xml
index e768090..e8da660 100644
--- a/modules/enterprise/server/plugins/alert-operations/pom.xml
+++ b/modules/enterprise/server/plugins/alert-operations/pom.xml
@@ -13,24 +13,6 @@
<name>RHQ Enterprise Server Opertions Alert Plugin</name>
- <properties>
- <seam.version>2.1.0.SP1</seam.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <version>${seam.version}</version>
- <exclusions>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-
<build>
<plugins>
diff --git a/modules/enterprise/server/plugins/alert-roles/pom.xml b/modules/enterprise/server/plugins/alert-roles/pom.xml
index 21a5269..ae58aea 100644
--- a/modules/enterprise/server/plugins/alert-roles/pom.xml
+++ b/modules/enterprise/server/plugins/alert-roles/pom.xml
@@ -13,25 +13,9 @@
<name>RHQ Enterprise Server Roles Alert Plugin</name>
- <properties>
- <seam.version>2.1.0.SP1</seam.version>
- </properties>
-
<dependencies>
<dependency>
- <groupId>org.jboss.seam</groupId>
- <artifactId>jboss-seam</artifactId>
- <version>${seam.version}</version>
- <exclusions>
- <exclusion>
- <groupId>xml-apis</groupId>
- <artifactId>xml-apis</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
<groupId>jboss.jboss-embeddable-ejb3</groupId>
<artifactId>jboss-ejb3-all</artifactId>
<version>1.0.0.Alpha9</version>
diff --git a/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/WEB-INF/components.xml b/modules/enterprise/server/plugins/perspectives/policy/app/src/main/webapp/WEB-INF/components.xml
deleted file mode 100644
index 4631d2e..0000000
--- a/modules/enterprise/server/plugins/perspectives/policy/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">
-
- <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/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
index ded5e86..dd3bc00 100644
--- 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
@@ -17,6 +17,7 @@
baseUrl="/rhq-policy-perspective" />
<!-- Administration > Provisioning -->
+ <!--
<menu-item
name="administration.provisioning"
displayName="Provisioning Bundles"
@@ -26,5 +27,5 @@
name="administration.content"
placement="after" />
</menu-item>
-
+ -->
</perspective-plugin>
\ No newline at end of file
11 years, 8 months
[rhq] Branch 'rhq-on-as7' - modules/enterprise pom.xml
by Jay Shaughnessy
modules/enterprise/binding/pom.xml | 3 ---
modules/enterprise/remoting/cli/pom.xml | 3 +--
pom.xml | 16 +++++++++++++++-
3 files changed, 16 insertions(+), 6 deletions(-)
New commits:
commit 3ef060a732f9ca6848a3347a847bfb639764bf42
Author: Jay Shaughnessy <jshaughn(a)jshaughn.csb>
Date: Wed Sep 5 10:48:04 2012 -0400
POM Dependency work
- move opencsv version to root pom as it is used in multiple child poms
- this also fixes issue in CLI pom where opencsv.version had been accidentally removed
- add infinispan.version in root pom to be provided AS7 module version
- change resteasy version in root pom to match provided AS7 module version
Note that we will use provided AS7 module versions until it is shown
that that version is insufficient. That will be done in test phase, later.
diff --git a/modules/enterprise/binding/pom.xml b/modules/enterprise/binding/pom.xml
index 04080cb..cd97310 100644
--- a/modules/enterprise/binding/pom.xml
+++ b/modules/enterprise/binding/pom.xml
@@ -11,8 +11,6 @@
<description>Abstraction of different facilities and default configurations for script bindings</description>
<properties>
- <persistence-api.version>1.0</persistence-api.version>
- <opencsv.version>1.8</opencsv.version>
<filtered.location>src/main/java</filtered.location>
</properties>
@@ -205,7 +203,6 @@
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
- <version>${opencsv.version}</version>
</dependency>
<dependency>
diff --git a/modules/enterprise/remoting/cli/pom.xml b/modules/enterprise/remoting/cli/pom.xml
index adc27a1..56544ad 100644
--- a/modules/enterprise/remoting/cli/pom.xml
+++ b/modules/enterprise/remoting/cli/pom.xml
@@ -13,7 +13,7 @@
<name>RHQ Enterprise Remote CLI</name>
<description>RHQ Enterprise Remote Command Line Interface</description>
-
+
<dependencies>
<dependency>
<groupId>${project.groupId}</groupId>
@@ -50,7 +50,6 @@
<dependency>
<groupId>net.sf.opencsv</groupId>
<artifactId>opencsv</artifactId>
- <version>${opencsv.version}</version>
</dependency>
<dependency>
diff --git a/pom.xml b/pom.xml
index e45231f..e0f430e 100644
--- a/pom.xml
+++ b/pom.xml
@@ -106,13 +106,15 @@
<augeas.zip.location>${settings.localRepository}/net/augeas/augeas-native/${augeas.version}</augeas.zip.location>
<augeas.zip.mask>*-${augeas.classifier}.zip</augeas.zip.mask>
<ant.contrib.version>1.0b3</ant.contrib.version>
- <resteasy.version>2.3.4.Final</resteasy.version>
+ <resteasy.version>2.3.2.Final</resteasy.version>
<freemarker.version>2.3.18</freemarker.version>
<powermock.version>1.4.11</powermock.version>
<arquillian.version>1.0.1.Final</arquillian.version>
<animal.sniffer.version>1.7</animal.sniffer.version>
<xercesImpl.version>2.9.1-jbossas-2</xercesImpl.version> <!-- see BZ-820629 and CVE-2009-2625 -->
<antlr.version>2.7.7</antlr.version>
+ <infinispan.version>5.1.2.FINAL</infinispan.version>
+ <opencsv.version>1.8</opencsv.version>
<rhq.db.admin.username>rhqadmin</rhq.db.admin.username>
<rhq.db.admin.password>rhqadmin</rhq.db.admin.password>
@@ -381,6 +383,18 @@
</dependency>
<dependency>
+ <groupId>org.infinispan</groupId>
+ <artifactId>infinispan-core</artifactId>
+ <version>${infinispan.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>net.sf.opencsv</groupId>
+ <artifactId>opencsv</artifactId>
+ <version>${opencsv.version}</version>
+ </dependency>
+
+ <dependency>
<groupId>org.hyperic</groupId>
<artifactId>sigar</artifactId>
<version>${sigar.version}</version>
11 years, 8 months
[rhq] Branch 'release/jon3.1.x' - .classpath modules/core modules/enterprise pom.xml
by snegrea
.classpath | 2 +-
modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java | 2 +-
modules/core/native-system/ant-run.xml | 2 +-
modules/enterprise/agent/ant-run.xml | 2 +-
pom.xml | 2 +-
5 files changed, 5 insertions(+), 5 deletions(-)
New commits:
commit 6aa3cbcb4e8417e08338ce7219f3de5f80507764
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Sep 4 22:44:13 2012 -0500
[BZ 851313] Update Sigar version
diff --git a/.classpath b/.classpath
index d06d607..00332ee 100644
--- a/.classpath
+++ b/.classpath
@@ -234,7 +234,7 @@
<classpathentry exported="true" kind="var" path="M2_REPO/org/richfaces/ui/richfaces-ui/3.3.3.Final/richfaces-ui-3.3.3.Final.jar" sourcepath="/M2_REPO/org/richfaces/ui/richfaces-ui/3.3.0.GA/richfaces-ui-3.3.0.GA-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/postgresql/postgresql/9.0-801.jdbc4/postgresql-9.0-801.jdbc4.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/jboss/jboss-cache/1.4.1.SP9/jboss-cache-1.4.1.SP9.jar"/>
- <classpathentry exported="true" kind="var" path="M2_REPO/org/hyperic/sigar/1.6.5.132-2/sigar-1.6.5.132-2.jar" sourcepath="/M2_REPO/org/hyperic/sigar/1.6.5.132-2/sigar-1.6.5.132-2-sources.jar"/>
+ <classpathentry exported="true" kind="var" path="M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3.jar" sourcepath="/M2_REPO/org/hyperic/sigar/1.6.5.132-3/sigar-1.6.5.132-3-sources.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/transaction/jboss-jta/4.2.3.SP5/jboss-jta-4.2.3.SP5.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/transaction/jboss-jts-common/4.2.3.SP5/jboss-jts-common-4.2.3.SP5.jar"/>
<classpathentry exported="true" kind="var" path="M2_REPO/org/jboss/jbossws-spi/1.1.1.GA/jbossws-spi-1.1.1.GA.jar"/>
diff --git a/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java b/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java
index 118010a..97b6df8 100644
--- a/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java
+++ b/modules/core/arquillian-integration/container/src/main/java/org/rhq/test/arquillian/impl/util/SigarInstaller.java
@@ -63,7 +63,7 @@ public class SigarInstaller {
.loadMetadataFromPom("pom.xml")
.goOffline()
// TODO (ips, 05/02/12): Figure out how to make this work without hard-coding the version.
- .artifact("org.hyperic:sigar-dist:zip:1.6.5.132-2")
+ .artifact("org.hyperic:sigar-dist:zip:1.6.5.132-3")
.resolveAs(JavaArchive.class);
if (sigars.size() > 1) {
diff --git a/modules/core/native-system/ant-run.xml b/modules/core/native-system/ant-run.xml
index 6410e1b..a98f94d 100644
--- a/modules/core/native-system/ant-run.xml
+++ b/modules/core/native-system/ant-run.xml
@@ -11,7 +11,7 @@ Ant Script that builds a test jar to run SIGAR bug replication code.
<!-- in case it wasn't passed in, assume the default location -->
<property name="settings.localRepository" location="${user.home}/.m2/repository"/>
<property name="project.version" value="3.0.0-SNAPSHOT"/>
- <property name="sigar.version" value="1.6.5.132-2"/>
+ <property name="sigar.version" value="1.6.5.132-3"/>
<property name="log4j.version" value="1.2.16"/>
<fileset dir="${settings.localRepository}" id="jar.fileset">
diff --git a/modules/enterprise/agent/ant-run.xml b/modules/enterprise/agent/ant-run.xml
index 94c8d75..587a9e9 100644
--- a/modules/enterprise/agent/ant-run.xml
+++ b/modules/enterprise/agent/ant-run.xml
@@ -11,7 +11,7 @@ Ant Script that provides ways to package the Agent.
<!-- in case these weren't passed in (i.e. not invoked via maven), assume some defaults -->
<property name="settings.localRepository" location="${user.home}/.m2/repository"/>
<property name="project.version" value="2.0.0-SNAPSHOT"/>
- <property name="sigar.version" value="1.6.5.132-2"/>
+ <property name="sigar.version" value="1.6.5.132-3"/>
<property name="augeas.version" value="0.9.0"/>
<property name="augeas.classifier" value="el5"/>
<property name="augeas.zip.location" value="${settings.localRepository}/net/augeas/augeas-native/${augeas.version}/"/>
diff --git a/pom.xml b/pom.xml
index 24b6139..6e5dd02 100644
--- a/pom.xml
+++ b/pom.xml
@@ -93,7 +93,7 @@
<jtds.version>1.2.2</jtds.version>
<richfaces.version>3.3.3.Final</richfaces.version>
<jline.version>0.9.94</jline.version>
- <sigar.version>1.6.5.132-2</sigar.version>
+ <sigar.version>1.6.5.132-3</sigar.version>
<sigar.zip.version>1.6.5</sigar.zip.version>
<quartz.version>1.6.5</quartz.version>
<jna.version>3.2.5</jna.version>
11 years, 8 months
[rhq] Branch 'release/jon3.1.x' - modules/plugins
by snegrea
modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java | 26 +++++++++-
1 file changed, 24 insertions(+), 2 deletions(-)
New commits:
commit 14941af29769ddfd5ecbc6193762a4f15ecd4b88
Author: Stefan Negrea <snegrea(a)redhat.com>
Date: Tue Sep 4 13:12:42 2012 -0500
[BZ 852891] Add plugin side validation for all the resources that have special rules for connectors and discovery-group-name. The AS7 server does not consistently validate the configuration at resource creation time.
diff --git a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java
index dad90bc..2f1b7e3 100644
--- a/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java
+++ b/modules/plugins/jboss-as-7/src/main/java/org/rhq/modules/plugins/jbossas7/HornetQComponent.java
@@ -44,7 +44,8 @@ public class HornetQComponent extends TemplatedSubResourcesComponent {
}
ResourceType resourceType = report.getResourceType();
- if (resourceType.getName().equals("Connection-Factory")) {
+ if (resourceType.getName().equals("Connection-Factory")
+ || resourceType.getName().equals("Pooled Connection Factory")) {
// we need to check that a connector XOR a discovery-group-name is given
int found = 0;
PropertyMap connector = resourceConfiguration.getMap("connector:collapsed");
@@ -61,7 +62,28 @@ public class HornetQComponent extends TemplatedSubResourcesComponent {
if (found == 0 || found == 2) {
String errorMessage = "You need to provide either a connector name OR a discovery-group-name. You provided ";
- errorMessage += (found == 0) ? "none" : "both";
+ errorMessage += (found == 0) ? "none." : "both.";
+ report.setErrorMessage(errorMessage);
+ report.setStatus(CreateResourceStatus.FAILURE);
+ return report;
+ }
+ } else if (resourceType.getName().equals("Bridge") || resourceType.getName().equals("Cluster Connection")) {
+ // we need to check that static-connector XOR a discovery-group-name is given
+ int found = 0;
+
+ PropertyList staticConnectors = resourceConfiguration.getList("static-connectors:nullable");
+ if (staticConnectors != null && !staticConnectors.getList().isEmpty()) {
+ found++;
+ }
+
+ String discoveryGroup = resourceConfiguration.getSimpleValue("discovery-group-name", "");
+ if (!discoveryGroup.isEmpty()) {
+ found++;
+ }
+
+ if (found == 0 || found == 2) {
+ String errorMessage = "You need to provide either static-connectors OR a discovery-group-name. You provided ";
+ errorMessage += (found == 0) ? "none." : "both.";
report.setErrorMessage(errorMessage);
report.setStatus(CreateResourceStatus.FAILURE);
return report;
11 years, 8 months
[rhq] 2 commits - modules/helpers
by Heiko W. Rupp
modules/helpers/pluginAnnotations/pom.xml | 8 ++++----
modules/helpers/pluginGen/pom.xml | 6 +++---
modules/helpers/pluginGen/src/main/resources/pom.ftl | 15 ++++++---------
3 files changed, 13 insertions(+), 16 deletions(-)
New commits:
commit 42c00f9ade61af787ec4dd325b1045c6841f22bb
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Mon Aug 27 15:25:57 2012 -0400
Update pom-template.
diff --git a/modules/helpers/pluginGen/src/main/resources/pom.ftl b/modules/helpers/pluginGen/src/main/resources/pom.ftl
index 378bd76..2434ddd 100644
--- a/modules/helpers/pluginGen/src/main/resources/pom.ftl
+++ b/modules/helpers/pluginGen/src/main/resources/pom.ftl
@@ -2,7 +2,7 @@
<#--
/*
* RHQ Management Platform
- * Copyright (C) 2005-2008 Red Hat, Inc.
+ * Copyright (C) 2005-20012 Red Hat, Inc.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
@@ -31,7 +31,7 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-plugins-parent</artifactId>
- <version><#if props.rhqVersion??>${props.rhqVersion}<#else >1.3.0-SNAPSHOT</#if></version><!-- TODO adjust RHQ version -->
+ <version><#if props.rhqVersion??>${props.rhqVersion}<#else >4.5.0-SNAPSHOT</#if></version><!-- TODO adjust RHQ version -->
</parent>
<groupId>org.rhq</groupId>
@@ -43,9 +43,6 @@
<description>${props.description}</description>
</#if>
- <properties>
- <rhq.version><#if props.rhqVersion??>${props.rhqVersion}<#else >1.3.0-SNAPSHOT</#if></rhq.version> <!-- TODO adjust, see above too -->
- </properties>
<build>
<plugins>
@@ -212,26 +209,26 @@
<dependency>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-domain</artifactId>
- <version>${r"${rhq.version}"}</version>
+ <version>${r"${project.version}"}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-plugin-api</artifactId>
- <version>${r"${rhq.version}"}</version>
+ <version>${r"${project.version}"}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.rhq</groupId>
<artifactId>rhq-core-native-system</artifactId>
- <version>${r"${rhq.version}"}</version>
+ <version>${r"${project.version}"}</version>
<scope>provided</scope>
</dependency>
<#if props.dependsOnJmxPlugin>
<dependency>
<groupId>org.rhq</groupId>
<artifactId>rhq-jmx-plugin</artifactId>
- <version>${r"${rhq.version}"}</version>
+ <version>${r"${project.version}"}</version>
<scope>provided</scope>
</dependency>
</#if>
commit 11fb6e5360c29a76726d7759b680220459386497
Author: Heiko W. Rupp <hwr(a)redhat.com>
Date: Thu Aug 23 12:07:35 2012 -0400
Update plugin generator poms.
diff --git a/modules/helpers/pluginAnnotations/pom.xml b/modules/helpers/pluginAnnotations/pom.xml
index b6720cb..74800f8 100644
--- a/modules/helpers/pluginAnnotations/pom.xml
+++ b/modules/helpers/pluginAnnotations/pom.xml
@@ -7,20 +7,20 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>3.0.0</version>
+ <version>4.5.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>rhq-pluginAnnotations</artifactId>
<packaging>jar</packaging>
- <version>3.0.2-SNAPSHOT</version>
+ <version>4.5.0-SNAPSHOT</version>
<name>RHQ plugin annotations</name>
<description>Annotations to help generate plugin descriptors</description>
<build>
-
+
<plugins>
<plugin>
@@ -31,7 +31,7 @@
</configuration>
</plugin>
- <plugin>
+ <plugin>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
diff --git a/modules/helpers/pluginGen/pom.xml b/modules/helpers/pluginGen/pom.xml
index 299550d..62bf822 100644
--- a/modules/helpers/pluginGen/pom.xml
+++ b/modules/helpers/pluginGen/pom.xml
@@ -7,14 +7,14 @@
<parent>
<groupId>org.rhq</groupId>
<artifactId>rhq-parent</artifactId>
- <version>3.0.0</version>
+ <version>4.5.0-SNAPSHOT</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<groupId>org.rhq.helpers</groupId>
<artifactId>rhq-pluginGen</artifactId>
<packaging>jar</packaging>
- <version>3.0.2-SNAPSHOT</version>
+ <version>4.5.0-SNAPSHOT</version>
<name>RHQ plugin generator</name>
<description>Helper to generate plugin skeletons</description>
@@ -90,7 +90,7 @@
<dependency>
<groupId>org.rhq.helpers</groupId>
<artifactId>rhq-pluginAnnotations</artifactId>
- <version>3.0.2-SNAPSHOT</version>
+ <version>4.5.0-SNAPSHOT</version>
</dependency>
</dependencies>
11 years, 8 months