[rhq] Branch 'ui-updates' - 20 commits - modules/core modules/enterprise
by lkrejci
dev/null |binary
modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java | 89 ---
modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java | 109 +++
modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/RecentlyAddedResourceComposite.java | 14
modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceNamesDisambiguationResult.java | 36 -
modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceParentFlyweight.java | 59 --
modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/AutoGroupCompositeFlyweight.java | 28 -
modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/MembersAvailabilityHint.java | 68 ++
modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/MembersCategoryHint.java | 52 +
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java | 4
modules/enterprise/gui/coregui/src/main/webapp/css/search.css | 2
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/paging/ResourceNameDisambiguatingPagedListDataModel.java | 39 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageComponent.java | 118 ++++
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageRenderer.java | 128 ++++
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java | 120 ++++
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameRenderer.java | 62 ++
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageComponent.java | 118 ----
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java | 88 ---
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java | 35 -
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/addresource/AddResourcesPrepareAction.java | 23
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/controlactions/ViewAction.java | 40 +
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/PrepareAction.java | 18
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/ViewAction.java | 19
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/problemresources/ViewAction.java | 22
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/RSSAction.java | 38 +
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java | 18
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageDecorator.java | 77 ++
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageTag.java | 100 +++
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameDecorator.java | 110 +++
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameTag.java | 175 ++++++
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java | 49 +
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java | 58 --
modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceTreeModelUIBean.java | 43 +
modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties | 4
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-components/inventory-components.xml | 32 -
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tags/on.component.taglib.xml | 14
modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tld/display.tld | 108 +++
modules/enterprise/gui/portal-war/src/main/webapp/css/win.css | 14
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_down_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_down_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_unknown_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_unknown_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_up_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_up_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_down_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_down_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_unknown_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_unknown_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_up_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_up_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_unknown_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_unknown_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_unknown_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_unknown_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_unknown_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_unknown_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_down_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_down_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_unknown_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_unknown_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_up_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_up_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_down_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_down_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_unknown_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_up_16.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_up_24.png |binary
modules/enterprise/gui/portal-war/src/main/webapp/portlet/addresources/AddResourcesForm.jsp | 43 -
modules/enterprise/gui/portal-war/src/main/webapp/portlet/controlactions/View.jsp | 61 +-
modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/Properties.jsp | 9
modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/View.jsp | 24
modules/enterprise/gui/portal-war/src/main/webapp/portlet/problemResources/View.jsp | 31 -
modules/enterprise/gui/portal-war/src/main/webapp/portlet/recentlyApproved/View.jsp | 5
modules/enterprise/gui/portal-war/src/main/webapp/portlet/resourceHealth/View.jsp | 22
modules/enterprise/gui/portal-war/src/main/webapp/resource/group/inventory/AddResourcesForm.jsp | 21
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menu.xhtml | 10
modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menuitem.xhtml | 5
modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml | 4
modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repoSubscriptions.xhtml | 16
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/inventory/view.xhtml | 8
modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/summary.xhtml | 8
modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml | 48 -
modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/resourcePicker.xhtml | 6
modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/navigation/ResourcesTree.xhtml | 8
modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertDefinitions.xhtml | 8
modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml | 8
modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/configurationUpdate.xhtml | 8
modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/oobHistory.xhtml | 8
modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/operationHistory.xhtml | 8
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java | 147 -----
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java | 27
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DefaultDisambiguationUpdateStrategies.java | 187 ++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java | 168 ++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java | 65 ++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java | 279 ++++++++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/MutableDisambiguationReport.java | 87 +++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java | 145 +++++
modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ResourceResolution.java | 46 +
110 files changed, 2752 insertions(+), 899 deletions(-)
New commits:
commit 62411f35ab0bed414e6dcb1a5bed13b59bc87cfe
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 31 17:14:03 2010 +0200
BZ 592970 - new icon set enables unknown availability state to be shown in the tree.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/AutoGroupCompositeFlyweight.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/AutoGroupCompositeFlyweight.java
index f6c442b..dccbbaa 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/AutoGroupCompositeFlyweight.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/AutoGroupCompositeFlyweight.java
@@ -27,9 +27,17 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
+import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.group.composite.AutoGroupComposite;
/**
+ * This class is mostly a copy of {@link AutoGroupComposite} but is linked together
+ * with {@link ResourceFlyweight}, {@link ResourceTypeFlyweight} and {@link ResourceSubCategoryFlyweight} instances as opposed to
+ * their fully featured counterparts which is what makes this class flyweight.
+ * <p>
+ * In addition to the {@link AutoGroupComposite}, this class contains some more properties used
+ * in the UI layer.
+ *
* @see AutoGroupComposite
*
* @author Lukas Krejci
@@ -46,7 +54,9 @@ public class AutoGroupCompositeFlyweight implements Serializable {
private boolean mainResource;
private ResourceFlyweight parentResource;
private String name;
-
+ private MembersAvailabilityHint membersAvailabilityHint;
+ private MembersCategoryHint membersCategoryHint;
+
private List<ResourceFlyweight> resources;
public AutoGroupCompositeFlyweight(AutoGroupCompositeFlyweight other) {
@@ -154,6 +164,22 @@ public class AutoGroupCompositeFlyweight implements Serializable {
return name;
}
+ public MembersAvailabilityHint getMembersAvailabilityHint() {
+ return membersAvailabilityHint;
+ }
+
+ public void setMembersAvailabilityHint(MembersAvailabilityHint membersAvailabilityHint) {
+ this.membersAvailabilityHint = membersAvailabilityHint;
+ }
+
+ public MembersCategoryHint getMembersCategoryHint() {
+ return membersCategoryHint;
+ }
+
+ public void setMembersCategoryHint(MembersCategoryHint membersCategoryHint) {
+ this.membersCategoryHint = membersCategoryHint;
+ }
+
@Override
public String toString() {
return "AutoGroupCompositeFlyweight[" + ((this.resourceType != null) ? "Resource: " : "Subcategory: ")
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/MembersAvailabilityHint.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/MembersAvailabilityHint.java
new file mode 100644
index 0000000..325461c
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/MembersAvailabilityHint.java
@@ -0,0 +1,68 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.core.domain.resource.flyweight;
+
+import org.rhq.core.domain.measurement.AvailabilityType;
+
+/**
+ * Hints about the availability of resources in an {@link AutoGroupCompositeFlyweight}.
+ *
+ * @author Lukas Krejci
+ */
+public enum MembersAvailabilityHint {
+
+ /**
+ * All member resources are up.
+ */
+ UP,
+
+ /**
+ * Some member resources are down.
+ */
+ DOWN,
+
+ /**
+ * Some member resources don't have a known availability state.
+ */
+ UNKNOWN;
+
+ public static MembersAvailabilityHint fromAvailabilityType(AvailabilityType availType) {
+ if (availType == null) {
+ return UNKNOWN;
+ }
+
+ switch (availType) {
+ case UP:
+ return UP;
+ case DOWN:
+ return DOWN;
+ default:
+ return UNKNOWN;
+ }
+ }
+
+ public String toString() {
+ return name().toLowerCase();
+ }
+}
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/MembersCategoryHint.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/MembersCategoryHint.java
new file mode 100644
index 0000000..05b922b
--- /dev/null
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/flyweight/MembersCategoryHint.java
@@ -0,0 +1,52 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.core.domain.resource.flyweight;
+
+import org.rhq.core.domain.resource.ResourceCategory;
+
+/**
+ * Hints about the category of resources contained in a {@link AutoGroupCompositeFlyweight}.
+ *
+ * @author Lukas Krejci
+ */
+public enum MembersCategoryHint {
+ PLATFORM, SERVER, SERVICE, MIXED, NONE;
+
+ public static MembersCategoryHint fromResourceCategory(ResourceCategory category) {
+ switch (category) {
+ case PLATFORM:
+ return PLATFORM;
+ case SERVER:
+ return SERVER;
+ case SERVICE:
+ return SERVICE;
+ default:
+ return null;
+ }
+ }
+
+ public String toString() {
+ return name().toLowerCase();
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceTreeModelUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceTreeModelUIBean.java
index 2f1bd6f..269360c 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceTreeModelUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceTreeModelUIBean.java
@@ -33,6 +33,8 @@ import org.rhq.core.domain.measurement.AvailabilityType;
import org.rhq.core.domain.resource.Agent;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.flyweight.AutoGroupCompositeFlyweight;
+import org.rhq.core.domain.resource.flyweight.MembersAvailabilityHint;
+import org.rhq.core.domain.resource.flyweight.MembersCategoryHint;
import org.rhq.core.domain.resource.flyweight.ResourceFlyweight;
import org.rhq.core.domain.resource.flyweight.ResourceSubCategoryFlyweight;
import org.rhq.core.domain.resource.flyweight.ResourceTypeFlyweight;
@@ -172,7 +174,12 @@ public class ResourceTreeModelUIBean {
Map<Object, List<ResourceFlyweight>> children = new HashMap<Object, List<ResourceFlyweight>>();
log.debug("composite parent" + compositeParent);
if (compositeParent != null) {
+
+ MembersCategoryHint membersCategory = MembersCategoryHint.NONE;
+ MembersAvailabilityHint membersAvailabilityHint = MembersAvailabilityHint.UP;
+
for (ResourceFlyweight res : compositeParent.getParentResource().getChildResources()) {
+ boolean process = false;
if (compositeParent.getSubcategory() != null) {
// parent is a sub category
if (res.getResourceType().getSubCategory() != null
@@ -182,19 +189,55 @@ public class ResourceTreeModelUIBean {
// A subSubCategory in a subcategory
addToList(children, res.getResourceType().getSubCategory(), res);
+ process = true;
} else if (compositeParent.getSubcategory().equals(res.getResourceType().getSubCategory())
&& compositeParent.getParentResource().equals(res.getParentResource())) {
// Direct entries in a subcategory... now group them by autogroup (type)
addToList(children, res.getResourceType(), res);
+ process = true;
}
} else if (compositeParent.getResourceType() != null) {
if (compositeParent.getResourceType().equals(res.getResourceType())
&& compositeParent.getParentResource().getId() == res.getParentResource().getId()) {
addToList(children, res.getResourceType(), res);
+ process = true;
+ }
+ }
+
+ if (process) {
+ //amend the overall category of all the members of the auto group.
+ switch (membersCategory) {
+ case NONE: //this is the first child, so let's use its category as a starting point
+ membersCategory = MembersCategoryHint.fromResourceCategory(res.getResourceType().getCategory());
+ break;
+ case MIXED: //this is the "final" state. The children type is not going to change from this.
+ break;
+ default: //check if this child has the same category as its previous siblings.
+ if (MembersCategoryHint.fromResourceCategory(res.getResourceType().getCategory()) != membersCategory) {
+ membersCategory = MembersCategoryHint.MIXED;
+ }
+ }
+
+ //amend the availability hint of the autogroup. If all resources are up, the hint is UP, if some of the resources
+ //are down, the hint is DOWN, if some of the resources' avail state is unknown, the hint is UNKNOWN.
+ //The down state has the highest priority.
+ switch (membersAvailabilityHint) {
+ case UP:
+ membersAvailabilityHint = MembersAvailabilityHint.fromAvailabilityType(res.getCurrentAvailability().getAvailabilityType());
+ break;
+ case UNKNOWN:
+ if (res.getCurrentAvailability().getAvailabilityType() == AvailabilityType.DOWN) {
+ membersAvailabilityHint = MembersAvailabilityHint.DOWN;
+ }
+ break;
+ case DOWN:; //a "terminal" state... if some resource is down, the overall state is going to be down as that is the most important information.
}
}
}
+
+ compositeParent.setMembersCategoryHint(membersCategory);
+ compositeParent.setMembersAvailabilityHint(membersAvailabilityHint);
}
AutoGroupCompositeFlyweight compositeParentNode = (AutoGroupCompositeFlyweight) parentNode.getData();
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_16.png
deleted file mode 100644
index 4254cdf..0000000
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_16.png and /dev/null differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_24.png
deleted file mode 100644
index 9bf7418..0000000
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_24.png and /dev/null differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_down_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_down_16.png
new file mode 100644
index 0000000..35a748c
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_down_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_down_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_down_24.png
new file mode 100644
index 0000000..3237333
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_down_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_unknown_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_unknown_16.png
new file mode 100644
index 0000000..aaefc27
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_unknown_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_unknown_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_unknown_24.png
new file mode 100644
index 0000000..51e0a5e
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_unknown_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_up_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_up_16.png
new file mode 100644
index 0000000..734d98b
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_up_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_up_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_up_24.png
new file mode 100644
index 0000000..d6b06e0
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_server_up_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_down_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_down_16.png
new file mode 100644
index 0000000..2cfd4db
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_down_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_down_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_down_24.png
new file mode 100644
index 0000000..25144f1
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_down_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_unknown_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_unknown_16.png
new file mode 100644
index 0000000..f376733
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_unknown_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_unknown_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_unknown_24.png
new file mode 100644
index 0000000..8e81dc5
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_unknown_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_up_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_up_16.png
new file mode 100644
index 0000000..3bd2c67
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_up_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_up_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_up_24.png
new file mode 100644
index 0000000..b310d15
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Auto_group_service_up_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_16.png
index af73da1..7fd96d4 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_16.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_24.png
index 66627f8..ec5fbca 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_24.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_down_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_unknown_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_unknown_16.png
new file mode 100644
index 0000000..8318b3d
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_unknown_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_unknown_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_unknown_24.png
new file mode 100644
index 0000000..9bf9597
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_unknown_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_16.png
index 223b0b3..ac410ca 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_16.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_24.png
index fb50a9d..deb9e94 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_24.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Platform_up_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_16.png
index 69a4d9f..57adb89 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_16.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_24.png
index 660e4b8..06d0e26 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_24.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_down_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_unknown_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_unknown_16.png
new file mode 100644
index 0000000..e911512
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_unknown_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_unknown_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_unknown_24.png
new file mode 100644
index 0000000..1d94a83
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_unknown_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_16.png
index 132e4ce..c76e3eb 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_16.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_24.png
index 83da6ad..88ca45b 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_24.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Server_up_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_16.png
index d09143b..9240927 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_16.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_24.png
index 24b1d98..bdc8532 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_24.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_down_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_unknown_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_unknown_16.png
new file mode 100644
index 0000000..771ccff
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_unknown_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_unknown_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_unknown_24.png
new file mode 100644
index 0000000..5356ae7
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_unknown_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_16.png
index bbebc5c..0ef05e9 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_16.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_24.png
index 7df5599..6babc43 100644
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_24.png and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Service_up_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_16.png
deleted file mode 100644
index de32196..0000000
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_16.png and /dev/null differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_24.png
deleted file mode 100644
index 5566923..0000000
Binary files a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_24.png and /dev/null differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_down_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_down_16.png
new file mode 100644
index 0000000..c75e7a8
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_down_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_down_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_down_24.png
new file mode 100644
index 0000000..321ea56
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_down_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_unknown_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_unknown_16.png
new file mode 100644
index 0000000..63b2050
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_unknown_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_unknown_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_unknown_24.png
new file mode 100644
index 0000000..b9d3d88
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_unknown_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_up_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_up_16.png
new file mode 100644
index 0000000..4678909
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_up_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_up_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_up_24.png
new file mode 100644
index 0000000..b9b400d
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_server_up_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_down_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_down_16.png
new file mode 100644
index 0000000..c75e7a8
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_down_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_down_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_down_24.png
new file mode 100644
index 0000000..321ea56
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_down_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_unknown_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_unknown_16.png
new file mode 100644
index 0000000..63b2050
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_unknown_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_up_16.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_up_16.png
new file mode 100644
index 0000000..4678909
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_up_16.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_up_24.png b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_up_24.png
new file mode 100644
index 0000000..b9b400d
Binary files /dev/null and b/modules/enterprise/gui/portal-war/src/main/webapp/images/icons/Subcategory_service_up_24.png differ
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/navigation/ResourcesTree.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/navigation/ResourcesTree.xhtml
index 5275d13..2b1af7d 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/navigation/ResourcesTree.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/resource/navigation/ResourcesTree.xhtml
@@ -65,8 +65,8 @@
<rich:treeNode type="AutoGroupComposite"
iconCollapsed="/images/icons/dir_closed.png"
iconExpanded="/images/icons/dir_open.png"
- iconLeaf="/images/icons/#{resourceTreeItem.data.resourceType == null? 'Subcategory' : 'Auto_group'}_16.png"
- icon="/images/icons/#{resourceTreeItem.data.resourceType == null? 'Subcategory' : 'Auto_group'}_16.png">
+ iconLeaf="/images/icons/#{resourceTreeItem.data.resourceType == null? 'Subcategory' : 'Auto_group'}_#{resourceTreeItem.data.membersCategoryHint}_#{resourceTreeItem.data.membersAvailabilityHint}_16.png"
+ icon="/images/icons/#{resourceTreeItem.data.resourceType == null? 'Subcategory' : 'Auto_group'}_#{resourceTreeItem.data.membersCategoryHint}_#{resourceTreeItem.data.membersAvailabilityHint}_16.png">
<a4j:support event="oncontextmenu" reRender="autoGroupMenu" timeout="5000"
disableDefault="true" status="commonStatus" limitToList="true"
@@ -91,10 +91,10 @@
</rich:treeNode>
<!-- Tree Node supporting context menu -->
<rich:treeNode type="Resource"
- icon="/images/icons/#{resourceTreeItem.data.resourceType.category}_#{resourceTreeItem.data.currentAvailability.availabilityType == 'DOWN' ? 'down' : 'up'}_16.png"
+ icon="/images/icons/#{resourceTreeItem.data.resourceType.category}_#{resourceTreeItem.data.currentAvailability.availabilityType == null ? 'unknown' : (resourceTreeItem.data.currentAvailability.availabilityType == 'DOWN' ? 'down' : 'up')}_16.png"
iconCollapsed="/images/icons/dir_closed.png"
iconExpanded="/images/icons/dir_open.png"
- iconLeaf="/images/icons/#{resourceTreeItem.data.resourceType.category}_#{resourceTreeItem.data.currentAvailability.availabilityType == 'DOWN' ? 'down' : 'up'}_16.png">
+ iconLeaf="/images/icons/#{resourceTreeItem.data.resourceType.category}_#{resourceTreeItem.data.currentAvailability.availabilityType == null ? 'unknown' : (resourceTreeItem.data.currentAvailability.availabilityType == 'DOWN' ? 'down' : 'up')}_16.png">
<a4j:support event="oncontextmenu" reRender="resourceMenu" timeout="5000"
disableDefault="true" status="commonStatus" limitToList="true"
ajaxSingle="true" oncomplete="#{rich:component('resourceMenu')}.show(event, {})">
commit 0360ca3af85e2c55a2cdefd2347ec0c325444903
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed May 19 19:52:53 2010 +0200
introduce the disambiguation update strategy as a paramter to disambiguate method in ResourceManagerBean so that UI code can influence the disambiguation.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/paging/ResourceNameDisambiguatingPagedListDataModel.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/paging/ResourceNameDisambiguatingPagedListDataModel.java
index 36c7f88..8999775 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/paging/ResourceNameDisambiguatingPagedListDataModel.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/paging/ResourceNameDisambiguatingPagedListDataModel.java
@@ -29,6 +29,8 @@ import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
+import org.rhq.enterprise.server.resource.disambiguation.DefaultDisambiguationUpdateStrategies;
+import org.rhq.enterprise.server.resource.disambiguation.DisambiguationUpdateStrategy;
import org.rhq.enterprise.server.util.LookupUtil;
/**
@@ -37,7 +39,7 @@ import org.rhq.enterprise.server.util.LookupUtil;
* <p>
* This class implements the {@link PagedListDataModel#fetchPage(PageControl)} method and defers
* the actual loading of the data to a new {@link #fetchDataForPage(PageControl)} method. The result
- * of that call is supplied to the {@link ResourceManagerLocal#disambiguate(java.util.List, boolean, IntExtractor)}
+ * of that call is supplied to the {@link ResourceManagerLocal#disambiguate(java.util.List, IntExtractor, DisambiguationUpdateStrategy)}
* method and the disambiguated results are then returned from the {@link #fetchPage(PageControl)} method.
*
* @author Lukas Krejci
@@ -64,8 +66,8 @@ public abstract class ResourceNameDisambiguatingPagedListDataModel<T> extends
public PageList<DisambiguationReport<T>> fetchPage(PageControl pc) {
PageList<T> data = fetchDataForPage(pc);
- ResourceNamesDisambiguationResult<T> disambiguation = resourceManager.disambiguate(data, alwaysIncludeParents,
- getResourceIdExtractor());
+ ResourceNamesDisambiguationResult<T> disambiguation = resourceManager.disambiguate(data, getResourceIdExtractor(),
+ DefaultDisambiguationUpdateStrategies.getDefault());
return new PageList<DisambiguationReport<T>>(disambiguation.getResolution(), data.getTotalSize(), data
.getPageControl());
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
index 0837143..41e710f 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
@@ -28,6 +28,7 @@ import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
+import org.rhq.enterprise.server.resource.disambiguation.DefaultDisambiguationUpdateStrategies;
/**
* A utility class to provide page lists of disambiguated resource lists for the
@@ -42,7 +43,7 @@ public class DisambiguatedResourceListUtil {
}
public static <T> PageList<DisambiguationReport<T>> disambiguate(ResourceManagerLocal resourceManager, PageList<T> results, IntExtractor<T> resourceIdExtractor) {
- ResourceNamesDisambiguationResult<T> result = resourceManager.disambiguate(results, true, resourceIdExtractor);
+ ResourceNamesDisambiguationResult<T> result = resourceManager.disambiguate(results, resourceIdExtractor, DefaultDisambiguationUpdateStrategies.getDefault());
return new PageList<DisambiguationReport<T>>(result.getResolution(), results.getTotalSize(), results.getPageControl());
}
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java
index 1ce8845..afe2e3b 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java
@@ -31,6 +31,7 @@ import org.rhq.core.domain.util.PageControl;
import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
+import org.rhq.enterprise.server.resource.disambiguation.DefaultDisambiguationUpdateStrategies;
import org.rhq.enterprise.server.util.LookupUtil;
/**
@@ -78,6 +79,6 @@ public class ResourceSelectUIBean {
result = resourceManager.findResourceComposites(EnterpriseFacesContextUtility.getSubject(), null, null, null,
null, pref, true, pc);
- return resourceManager.disambiguate(result, false, RESOURCE_ID_EXTRACTOR).getResolution();
+ return resourceManager.disambiguate(result, RESOURCE_ID_EXTRACTOR, DefaultDisambiguationUpdateStrategies.getDefault()).getResolution();
}
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index dbc0ffd..730755e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -122,6 +122,7 @@ import org.rhq.enterprise.server.jaxb.adapter.ResourceListAdapter;
import org.rhq.enterprise.server.measurement.MeasurementScheduleManagerLocal;
import org.rhq.enterprise.server.operation.OperationManagerLocal;
import org.rhq.enterprise.server.resource.disambiguation.DisambiguationPolicy;
+import org.rhq.enterprise.server.resource.disambiguation.DisambiguationUpdateStrategy;
import org.rhq.enterprise.server.resource.disambiguation.Disambiguator;
import org.rhq.enterprise.server.resource.disambiguation.MutableDisambiguationReport;
import org.rhq.enterprise.server.resource.disambiguation.DefaultDisambiguationUpdateStrategies;
@@ -2103,11 +2104,8 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
return (findChildResources(subject, parentResource, pageControl));
}
- public <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, boolean alwaysIncludeParent,
- IntExtractor<? super T> extractor) {
- //TODO the alwaysIncludeParents is obsolete and ignored
- //DefaultDisambiguationUpdateStrategies strategy = DefaultDisambiguationUpdateStrategies.KEEP_PARENTS_TO_TOPMOST_SERVERS;
- DefaultDisambiguationUpdateStrategies strategy = DefaultDisambiguationUpdateStrategies.KEEP_ALL_PARENTS;
- return Disambiguator.disambiguate(results, strategy, extractor, entityManager);
+ public <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, IntExtractor<? super T> extractor,
+ DisambiguationUpdateStrategy updateStrategy) {
+ return Disambiguator.disambiguate(results, updateStrategy, extractor, entityManager);
}
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
index 9ce98c3..448bb78 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
@@ -36,7 +36,6 @@ import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceError;
import org.rhq.core.domain.resource.ResourceErrorType;
import org.rhq.core.domain.resource.ResourceType;
-import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite;
import org.rhq.core.domain.resource.composite.ResourceAvailabilitySummary;
import org.rhq.core.domain.resource.composite.ResourceComposite;
@@ -51,6 +50,7 @@ import org.rhq.core.domain.resource.group.composite.AutoGroupComposite;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.IntExtractor;
+import org.rhq.enterprise.server.resource.disambiguation.DisambiguationUpdateStrategy;
import org.rhq.enterprise.server.resource.disambiguation.Disambiguator;
import org.rhq.enterprise.server.resource.group.ResourceGroupNotFoundException;
@@ -458,6 +458,6 @@ public interface ResourceManagerLocal {
* @see Disambiguator#disambiguate(List, boolean, IntExtractor, javax.persistence.EntityManager)
* @return the disambiguation result or null on error
*/
- <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, boolean alwayIncludeParent,
- IntExtractor<? super T> resourceIdExtractor);
+ <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, IntExtractor<? super T> resourceIdExtractor,
+ DisambiguationUpdateStrategy updateStrategy);
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DefaultDisambiguationUpdateStrategies.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DefaultDisambiguationUpdateStrategies.java
index c5553e3..c11c3dd 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DefaultDisambiguationUpdateStrategies.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DefaultDisambiguationUpdateStrategies.java
@@ -180,4 +180,8 @@ public enum DefaultDisambiguationUpdateStrategies implements DisambiguationUpdat
resource.resourceType.plugin = null;
}
}
+
+ public static DefaultDisambiguationUpdateStrategies getDefault() {
+ return DefaultDisambiguationUpdateStrategies.KEEP_ALL_PARENTS;
+ }
}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java
index c2a11a6..4674c1e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java
@@ -27,6 +27,10 @@ import java.util.EnumSet;
/**
* Defines a strategy for updating a results list with the disambiguation information.
+ * <p>
+ * See {@link DefaultDisambiguationUpdateStrategies} for a couple of implemented strategies.
+ *
+ * @see DefaultDisambiguationUpdateStrategies
*
* @author Lukas Krejci
*/
commit 80b360465252621770543e6ee4d7b790ab856f03
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed May 19 15:19:35 2010 +0200
removing the deprecated methods from ResourceNamesDisambiguationResult + adapted quick search in menu to use the new style disambig.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java
index 6d9b93a..197378d 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java
@@ -136,16 +136,6 @@ public class DisambiguationReport<T> implements Serializable {
return parents;
}
- @Deprecated
- public String getResourceTypeName() {
- return resourceType.getName();
- }
-
- @Deprecated
- public String getResourceTypePluginName() {
- return resourceType.getPlugin();
- }
-
/**
* @return the ResourceType of the resource represented by the {@link #getOriginal()}
* or null if type disambiguation isn't needed.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceNamesDisambiguationResult.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceNamesDisambiguationResult.java
index a12053f..4578aee 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceNamesDisambiguationResult.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceNamesDisambiguationResult.java
@@ -38,19 +38,9 @@ public class ResourceNamesDisambiguationResult<T> implements Serializable {
private static final long serialVersionUID = 1L;
private List<DisambiguationReport<T>> resolution;
- @Deprecated
- private boolean typeResolutionNeeded;
- @Deprecated
- private boolean pluginResolutionNeeded;
- @Deprecated
- private boolean parentResolutionNeeded;
- public ResourceNamesDisambiguationResult(List<DisambiguationReport<T>> resolution, boolean needsTypeResolution,
- boolean needsParentResolution, boolean needsPluginResolution) {
+ public ResourceNamesDisambiguationResult(List<DisambiguationReport<T>> resolution) {
this.resolution = resolution;
- this.parentResolutionNeeded = needsParentResolution;
- this.typeResolutionNeeded = needsTypeResolution;
- this.pluginResolutionNeeded = needsPluginResolution;
}
/**
@@ -62,35 +52,7 @@ public class ResourceNamesDisambiguationResult<T> implements Serializable {
return resolution;
}
- /**
- * This tells the caller whether the result set contained resources with different types.
- */
- @Deprecated
- public boolean isTypeResolutionNeeded() {
- return typeResolutionNeeded;
- }
-
- /**
- * This is true when the resources come from different parents.
- */
- @Deprecated
- public boolean isParentResolutionNeeded() {
- return parentResolutionNeeded;
- }
-
- /**
- * This is true if the results contained resources of different types with the same name.
- * In that case, the types need to be augmented with the plugin they come from.
- */
- @Deprecated
- public boolean isPluginResolutionNeeded() {
- return pluginResolutionNeeded;
- }
-
public String toString() {
- return "ResourceNamesDisambiguationResult(typeResolutionNeeded=" + typeResolutionNeeded +
- ", parentResolutionNeeded=" + parentResolutionNeeded +
- ", pluginResolutionNeeded=" + pluginResolutionNeeded +
- ", resolution=" + resolution + ")";
+ return "ResourceNamesDisambiguationResult(resolution=" + resolution + ")";
}
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/paging/ResourceNameDisambiguatingPagedListDataModel.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/paging/ResourceNameDisambiguatingPagedListDataModel.java
index d799ec2..36c7f88 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/paging/ResourceNameDisambiguatingPagedListDataModel.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/common/paging/ResourceNameDisambiguatingPagedListDataModel.java
@@ -45,9 +45,6 @@ import org.rhq.enterprise.server.util.LookupUtil;
public abstract class ResourceNameDisambiguatingPagedListDataModel<T> extends
PagedListDataModel<DisambiguationReport<T>> {
- private boolean currentPageNeedsTypeResolution;
- private boolean currentPageNeedsPluginResolution;
- private boolean currentPageNeedsParentResolution;
private boolean alwaysIncludeParents;
private ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
@@ -70,39 +67,11 @@ public abstract class ResourceNameDisambiguatingPagedListDataModel<T> extends
ResourceNamesDisambiguationResult<T> disambiguation = resourceManager.disambiguate(data, alwaysIncludeParents,
getResourceIdExtractor());
- currentPageNeedsParentResolution = disambiguation.isParentResolutionNeeded();
- currentPageNeedsPluginResolution = disambiguation.isPluginResolutionNeeded();
- currentPageNeedsTypeResolution = disambiguation.isTypeResolutionNeeded();
-
return new PageList<DisambiguationReport<T>>(disambiguation.getResolution(), data.getTotalSize(), data
.getPageControl());
}
/**
- * @return true if the current page contains resources that need parent resolution
- * in order to become uniquely named.
- */
- public boolean isCurrentPageNeedsParentResolution() {
- return currentPageNeedsParentResolution;
- }
-
- /**
- * @return true if the current page contains resources of types that have the same name
- * and thus need to resolve those types using their plugin names.
- */
- public boolean isCurrentPageNeedsPluginResolution() {
- return currentPageNeedsPluginResolution;
- }
-
- /**
- * @return true if the current page contains resources that need type resolution
- * in order to become uniquely named.
- */
- public boolean isCurrentPageNeedsTypeResolution() {
- return currentPageNeedsTypeResolution;
- }
-
- /**
* This method is to be implemented by inheritors and is called to fetch the actual data
* that contain the resources to disambiguate.
*
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java
index eefb034..6b80cd4 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java
@@ -24,6 +24,7 @@
package org.rhq.enterprise.gui.inventory.resource;
import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.gui.util.FacesComponentUtility;
@@ -77,16 +78,17 @@ public class DisambiguatedResourceNameComponent extends UIComponentBase {
this.resourceName = resourceName;
}
- public boolean isNameAsLink() {
+ public Boolean getNameAsLink() {
if (nameAsLink == null) {
- Boolean ret = FacesComponentUtility.getExpressionAttribute(this, NAME_AS_LINK_ATTRIBUTE, Boolean.class);
- return ret == null ? true : ret;
- } else {
- return nameAsLink;
+ nameAsLink = FacesComponentUtility.getExpressionAttribute(this, NAME_AS_LINK_ATTRIBUTE, Boolean.class);
+ if (nameAsLink == null) {
+ nameAsLink = true;
+ }
}
+ return nameAsLink;
}
- public void setNameAsLink(boolean nameAsLink) {
+ public void setNameAsLink(Boolean nameAsLink) {
this.nameAsLink = nameAsLink;
}
@@ -102,4 +104,17 @@ public class DisambiguatedResourceNameComponent extends UIComponentBase {
public void setResourceId(int resourceId) {
this.resourceId = resourceId;
}
+
+ public Object saveState(FacesContext facesContext) {
+ Object[] state = new Object[2];
+ state[0] = super.saveState(facesContext);
+ state[1] = this.nameAsLink;
+ return state;
+ }
+
+ public void restoreState(FacesContext facesContext, Object stateValues) {
+ Object[] state = (Object[]) stateValues;
+ super.restoreState(facesContext, state[0]);
+ this.nameAsLink = (Boolean) state[1];
+ }
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameRenderer.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameRenderer.java
index 07c7ecd..286d063 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameRenderer.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameRenderer.java
@@ -53,7 +53,7 @@ public class DisambiguatedResourceNameRenderer extends Renderer {
DisambiguationReport.Resource resource = new DisambiguationReport.Resource(resourceId, resourceName, resourceType);
- if (nameComponent.isNameAsLink()) {
+ if (nameComponent.getNameAsLink()) {
DisambiguatedResourceLineageRenderer.encodeUrl(writer, resource);
} else {
DisambiguatedResourceLineageRenderer.encodeSimple(writer, resource);
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java
index 74ae826..1ce8845 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java
@@ -27,7 +27,6 @@ import org.apache.commons.logging.LogFactory;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.resource.composite.ResourceComposite;
-import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
@@ -53,39 +52,6 @@ public class ResourceSelectUIBean {
}
};
- public static class DisambiguationReportWrapper extends DisambiguationReport<ResourceComposite> {
- private static final long serialVersionUID = 1L;
-
- private boolean typeResolutionNeeded;
- private boolean parentResolutionNeeded;
- private boolean pluginResolutionNeeded;
-
- /**
- * @param original
- * @param parents
- * @param resourceTypeName
- * @param resourceTypePluginName
- */
- public DisambiguationReportWrapper(DisambiguationReport<ResourceComposite> report, boolean typeResolutionNeeded, boolean parentResolutionNeeded, boolean pluginResolutionNeeded) {
- super(report.getOriginal(), report.getParents(), report.getResourceType());
- this.typeResolutionNeeded = typeResolutionNeeded;
- this.parentResolutionNeeded = parentResolutionNeeded;
- this.pluginResolutionNeeded = pluginResolutionNeeded;
- }
-
- public boolean isTypeResolutionNeeded() {
- return typeResolutionNeeded;
- }
-
- public boolean isParentResolutionNeeded() {
- return parentResolutionNeeded;
- }
-
- public boolean isPluginResolutionNeeded() {
- return pluginResolutionNeeded;
- }
- }
-
public Resource getResource() {
return resource;
}
@@ -102,7 +68,7 @@ public class ResourceSelectUIBean {
this.searchString = searchString;
}
- public List<DisambiguationReportWrapper> autocomplete(Object suggest) {
+ public List<DisambiguationReport<ResourceComposite>> autocomplete(Object suggest) {
String pref = (String) suggest;
ArrayList<ResourceComposite> result;
@@ -112,24 +78,6 @@ public class ResourceSelectUIBean {
result = resourceManager.findResourceComposites(EnterpriseFacesContextUtility.getSubject(), null, null, null,
null, pref, true, pc);
- return wrap(resourceManager.disambiguate(result, false, RESOURCE_ID_EXTRACTOR));
- }
-
- private List<DisambiguationReportWrapper> wrap(ResourceNamesDisambiguationResult<ResourceComposite> result) {
- List<DisambiguationReportWrapper> ret = new ArrayList<DisambiguationReportWrapper>();
- if (result == null) {
- return ret;
- }
-
- boolean typeRes = result.isTypeResolutionNeeded();
- boolean parentRes = result.isParentResolutionNeeded();
- boolean pluginRes = result.isPluginResolutionNeeded();
-
-
- for (DisambiguationReport<ResourceComposite> r : result.getResolution()) {
- ret.add(new DisambiguationReportWrapper(r, typeRes, parentRes, pluginRes));
- }
-
- return ret;
+ return resourceManager.disambiguate(result, false, RESOURCE_ID_EXTRACTOR).getResolution();
}
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menu.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menu.xhtml
index ab5ece0..f7bbaa9 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menu.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menu.xhtml
@@ -6,7 +6,8 @@
xmlns:onf="http://jboss.org/on/function "
xmlns:ui="http://java.sun.com/jsf/facelets "
xmlns:rich="http://richfaces.ajax4jsf.org/rich "
- xmlns:a4j="http://richfaces.org/a4j ">
+ xmlns:a4j="http://richfaces.org/a4j "
+ xmlns:onc="http://jboss.org/on/component ">
<h:form>
@@ -163,11 +164,12 @@
</h:column>
<h:column>
<f:facet name="header">Resource</f:facet>
- <h:outputText value="#{result.original.resource.name}"/>
+ <onc:disambiguatedResourceName resourceName="#{result.original.resource.name}"
+ resourceId="#{result.original.resource.id}" nameAsLink="false" disambiguationReport="#{result}"/>
</h:column>
<h:column>
- <f:facet name="header">Parent</f:facet>
- <h:outputText value="#{result.original.parent.name}"/>
+ <f:facet name="header">Location</f:facet>
+ <onc:disambiguatedResourceLineage parents="#{result.parents}" renderLinks="false"/>
</h:column>
</rich:suggestionbox>
</h:panelGroup>
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
index 42d62f2..7adc22e 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
@@ -46,6 +46,31 @@ public class Disambiguator {
public static final int MAXIMUM_DISAMBIGUATED_TREE_DEPTH = 7;
+ private static final String PARENT_INFO_QUERY;
+
+ static {
+ StringBuilder selectBuilder = new StringBuilder(
+ "SELECT r0.id, r0.name, r0.resourceType.id, r0.resourceType.name, r0.resourceType.plugin, r0.resourceType.singleton");
+ StringBuilder fromBuilder = new StringBuilder("FROM Resource r0");
+
+ for (int i = 1; i <= MAXIMUM_DISAMBIGUATED_TREE_DEPTH; ++i) {
+ int pi = i - 1;
+ selectBuilder.append(", r").append(i).append(".id");
+ selectBuilder.append(", r").append(i).append(".name");
+ selectBuilder.append(", rt").append(i).append(".id");
+ selectBuilder.append(", rt").append(i).append(".name");
+ selectBuilder.append(", rt").append(i).append(".plugin");
+ selectBuilder.append(", rt").append(i).append(".singleton");
+
+ fromBuilder.append(" left join r").append(pi).append(".parentResource r").append(i);
+ fromBuilder.append(" left join r").append(i).append(".resourceType rt").append(i);
+ }
+
+ fromBuilder.append(" WHERE r0.id IN (:resourceIds)");
+
+ PARENT_INFO_QUERY = selectBuilder.append(" ").append(fromBuilder).toString();
+ }
+
private Disambiguator() {
}
@@ -77,15 +102,9 @@ public class Disambiguator {
EntityManager entityManager) {
if (results.isEmpty()) {
- return new ResourceNamesDisambiguationResult<T>(new ArrayList<DisambiguationReport<T>>(), false, false,
- false);
+ return new ResourceNamesDisambiguationResult<T>(new ArrayList<DisambiguationReport<T>>());
}
- //this is obsolete
- boolean typeResolutionNeeded = true;
- boolean pluginResolutionNeeded = true;
- boolean parentResolutionNeeded = true;
-
//we can't assume the ordering of the provided results and the disambiguation query results
//will be the same.
@@ -113,26 +132,7 @@ public class Disambiguator {
//check that we still have something to disambiguate
if (reportsByResourceId.size() > 0) {
//k, now let's construct the JPQL query to get the parents and type infos...
- StringBuilder selectBuilder = new StringBuilder(
- "SELECT r0.id, r0.name, r0.resourceType.id, r0.resourceType.name, r0.resourceType.plugin, r0.resourceType.singleton");
- StringBuilder fromBuilder = new StringBuilder("FROM Resource r0");
-
- for (int i = 1; i <= MAXIMUM_DISAMBIGUATED_TREE_DEPTH; ++i) {
- int pi = i - 1;
- selectBuilder.append(", r").append(i).append(".id");
- selectBuilder.append(", r").append(i).append(".name");
- selectBuilder.append(", rt").append(i).append(".id");
- selectBuilder.append(", rt").append(i).append(".name");
- selectBuilder.append(", rt").append(i).append(".plugin");
- selectBuilder.append(", rt").append(i).append(".singleton");
-
- fromBuilder.append(" left join r").append(pi).append(".parentResource r").append(i);
- fromBuilder.append(" left join r").append(i).append(".resourceType rt").append(i);
- }
-
- fromBuilder.append(" WHERE r0.id IN (:resourceIds)");
-
- Query parentsQuery = entityManager.createQuery(selectBuilder.append(" ").append(fromBuilder).toString());
+ Query parentsQuery = entityManager.createQuery(PARENT_INFO_QUERY);
parentsQuery.setParameter("resourceIds", reportsByResourceId.keySet());
@@ -246,8 +246,7 @@ public class Disambiguator {
resolution.add(report.getReport());
}
- return new ResourceNamesDisambiguationResult<T>(resolution, typeResolutionNeeded, parentResolutionNeeded,
- pluginResolutionNeeded);
+ return new ResourceNamesDisambiguationResult<T>(resolution);
}
private static <T> void repartitionUnique(ReportPartitions<T> partitions, DisambiguationUpdateStrategy updateStrategy, List<ReportPartitions<T>> ambigousPartitions) {
commit 84ffd30343640f9b66d238b8e85a7ccab756e08b
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed May 19 13:24:31 2010 +0200
portlets as well as the JSF based pages should work now with the new style disambiguation.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageRenderer.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageRenderer.java
index bb61ae6..60f5031 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageRenderer.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageRenderer.java
@@ -75,14 +75,14 @@ public class DisambiguatedResourceLineageRenderer extends Renderer {
encodePreName(writer, parent);
writer.startElement("a", null);
writer.writeAttribute("href", getUrl(parent), null);
- writer.writeText(parent.getName(), null);
+ writeName(writer, parent);
writer.endElement("a");
encodePostName(writer, parent);
}
public static void encodeSimple(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
encodePreName(writer, parent);
- writer.writeText(parent.getName(), null);
+ writeName(writer, parent);
encodePostName(writer, parent);
}
@@ -92,21 +92,37 @@ public class DisambiguatedResourceLineageRenderer extends Renderer {
private static void encodePreName(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
if (!parent.getType().isSingleton()) {
+ writer.startElement("span", null);
+ writer.writeAttribute("class", "disambiguated-resource-type", null);
writer.writeText(parent.getType().getName(), null);
writer.writeText(" ", null);
if (parent.getType().getPlugin() != null) {
+ writer.startElement("span", null);
+ writer.writeAttribute("class", "disambiguated-resource-plugin", null);
writer.writeText("(", null);
writer.writeText(parent.getType().getPlugin(), null);
writer.writeText(" plugin) ", null);
+ writer.endElement("span");
}
+ writer.endElement("span");
}
}
private static void encodePostName(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
if (parent.getType().isSingleton() && parent.getType().getPlugin() != null) {
+ writer.startElement("span", null);
+ writer.writeAttribute("class", "disambiguated-resource-plugin", null);
writer.writeText(" (", null);
writer.writeText(parent.getType().getPlugin(), null);
writer.writeText(" plugin) ", null);
+ writer.endElement("span");
}
}
+
+ private static void writeName(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ writer.startElement("span", null);
+ writer.writeAttribute("class", "disambiguated-resource-name", null);
+ writer.writeText(parent.getName(), null);
+ writer.endElement("span");
+ }
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
index c52d2b9..9b05558 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
@@ -120,11 +120,8 @@ public class AddGroupResourcesFormPrepareAction extends Action {
PageList<Resource> pendingResources = resourceManager.findResourceByIds(user, pendingResourceIds, true,
pcPending);
- ResourceNamesDisambiguationResult<Resource> pendingResourcesDisambiguation =
- resourceManager.disambiguate(pendingResources, true, RESOURCE_ID_EXTRACTOR);
-
- PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedpeningResources =
- DisambiguatedResourceListUtil.buildResourceList(pendingResourcesDisambiguation, pendingResources.getTotalSize(), pendingResources.getPageControl(), false);
+ PageList<DisambiguationReport<Resource>> disambiguatedpeningResources =
+ DisambiguatedResourceListUtil.disambiguate(resourceManager, pendingResources, RESOURCE_ID_EXTRACTOR);
request.setAttribute(Constants.PENDING_RESOURCES_ATTR, disambiguatedpeningResources);
request.setAttribute(Constants.NUM_PENDING_RESOURCES_ATTR, disambiguatedpeningResources.size());
@@ -152,11 +149,8 @@ public class AddGroupResourcesFormPrepareAction extends Action {
+ resourceGroup.getClass().getSimpleName() + " group type");
}
- ResourceNamesDisambiguationResult<Resource> availableResourcesDisambiguation =
- resourceManager.disambiguate(availableResources, true, RESOURCE_ID_EXTRACTOR);
-
- PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedAvailResources =
- DisambiguatedResourceListUtil.buildResourceList(availableResourcesDisambiguation, availableResources.getTotalSize(), availableResources.getPageControl(), false);
+ PageList<DisambiguationReport<Resource>> disambiguatedAvailResources =
+ DisambiguatedResourceListUtil.disambiguate(resourceManager, availableResources, RESOURCE_ID_EXTRACTOR);
request.setAttribute(Constants.AVAIL_RESOURCES_ATTR, disambiguatedAvailResources);
request.setAttribute(Constants.NUM_AVAIL_RESOURCES_ATTR, disambiguatedAvailResources.size());
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/addresource/AddResourcesPrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/addresource/AddResourcesPrepareAction.java
index fe1baf0..72d36e3 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/addresource/AddResourcesPrepareAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/addresource/AddResourcesPrepareAction.java
@@ -37,6 +37,7 @@ import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.gui.util.StringUtility;
@@ -109,9 +110,8 @@ public class AddResourcesPrepareAction extends Action {
PageList<Resource> pendingResources = resourceManager.findResourceByIds(subject, pendingResourceArray, false,
pcPending);
- PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedPendingResources =
- DisambiguatedResourceListUtil.buildResourceList(resourceManager.disambiguate(pendingResources, true, RESOURCE_ID_EXTRACTOR),
- pendingResources.getTotalSize(), pendingResources.getPageControl(), false);
+ PageList<DisambiguationReport<Resource>> disambiguatedPendingResources =
+ DisambiguatedResourceListUtil.disambiguate(resourceManager, pendingResources, RESOURCE_ID_EXTRACTOR);
// give 'em to the jsp page
log.debug("put selected page of pending resources in request");
@@ -131,11 +131,9 @@ public class AddResourcesPrepareAction extends Action {
availableResources = resourceManager.findAvailableResourcesForDashboardPortlet(subject, typeIdFilter,
categoryFilter, excludeIds, pcAvail);
- PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedAvailableResources =
- DisambiguatedResourceListUtil.buildResourceList(resourceManager.disambiguate(availableResources, true, RESOURCE_ID_EXTRACTOR),
- availableResources.getTotalSize(), availableResources.getPageControl(), false);
-
-
+ PageList<DisambiguationReport<Resource>> disambiguatedAvailableResources =
+ DisambiguatedResourceListUtil.disambiguate(resourceManager, availableResources, RESOURCE_ID_EXTRACTOR);
+
log.debug("put selected page of available resources in request");
request.setAttribute(Constants.AVAIL_RESOURCES_ATTR, disambiguatedAvailableResources);
request.setAttribute(Constants.NUM_AVAIL_RESOURCES_ATTR, disambiguatedAvailableResources.getTotalSize());
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/controlactions/ViewAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/controlactions/ViewAction.java
index a59c02f..f258108 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/controlactions/ViewAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/controlactions/ViewAction.java
@@ -33,6 +33,7 @@ import org.rhq.core.domain.operation.composite.GroupOperationLastCompletedCompos
import org.rhq.core.domain.operation.composite.GroupOperationScheduleComposite;
import org.rhq.core.domain.operation.composite.ResourceOperationLastCompletedComposite;
import org.rhq.core.domain.operation.composite.ResourceOperationScheduleComposite;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.domain.util.PageOrdering;
@@ -69,9 +70,9 @@ public class ViewAction extends TilesAction {
boolean displayLastCompleted = false;
boolean displayNextScheduled = false;
- PageList<DisambiguatedResourceListUtil.Record<ResourceOperationLastCompletedComposite>> disambiguatedLastCompletedResourceOps = new PageList<DisambiguatedResourceListUtil.Record<ResourceOperationLastCompletedComposite>>();
+ PageList<DisambiguationReport<ResourceOperationLastCompletedComposite>> disambiguatedLastCompletedResourceOps = new PageList<DisambiguationReport<ResourceOperationLastCompletedComposite>>();
PageList<GroupOperationLastCompletedComposite> lastCompletedGroupOps = new PageList<GroupOperationLastCompletedComposite>();
- PageList<DisambiguatedResourceListUtil.Record<ResourceOperationScheduleComposite>> disambiguatedNextScheduledResourceOps = new PageList<DisambiguatedResourceListUtil.Record<ResourceOperationScheduleComposite>>();
+ PageList<DisambiguationReport<ResourceOperationScheduleComposite>> disambiguatedNextScheduledResourceOps = new PageList<DisambiguationReport<ResourceOperationScheduleComposite>>();
PageList<GroupOperationScheduleComposite> nextScheduledGroupOps = new PageList<GroupOperationScheduleComposite>();
try {
@@ -97,9 +98,8 @@ public class ViewAction extends TilesAction {
PageList<ResourceOperationLastCompletedComposite> lastCompletedResourceOps =
manager.findRecentlyCompletedResourceOperations(user.getSubject(), null, pageControl);
- disambiguatedLastCompletedResourceOps = DisambiguatedResourceListUtil.buildResourceList(
- resourceManager.disambiguate(lastCompletedResourceOps, true, RESOURCE_OPERATION_RESOURCE_ID_EXTRACTOR),
- lastCompletedResourceOps.getTotalSize(), lastCompletedResourceOps.getPageControl(), true);
+ disambiguatedLastCompletedResourceOps = DisambiguatedResourceListUtil.disambiguate(
+ resourceManager, lastCompletedResourceOps, RESOURCE_OPERATION_RESOURCE_ID_EXTRACTOR);
pageControl = new PageControl(0, operationPreferences.lastCompleted);
pageControl.initDefaultOrderingField("go.createdTime", PageOrdering.DESC);
@@ -112,9 +112,8 @@ public class ViewAction extends TilesAction {
manager.findCurrentlyScheduledResourceOperations(user.getSubject(),
pageControl);
- disambiguatedNextScheduledResourceOps = DisambiguatedResourceListUtil.buildResourceList(
- resourceManager.disambiguate(nextScheduledResourceOps, true, RESOURCE_OPERATION_SCHEDULE_RESOURCE_ID_EXTRACTOR),
- nextScheduledResourceOps.getTotalSize(), nextScheduledResourceOps.getPageControl(), true);
+ disambiguatedNextScheduledResourceOps = DisambiguatedResourceListUtil.disambiguate(
+ resourceManager, nextScheduledResourceOps, RESOURCE_OPERATION_SCHEDULE_RESOURCE_ID_EXTRACTOR);
pageControl = new PageControl(0, operationPreferences.nextScheduled);
nextScheduledGroupOps = manager.findCurrentlyScheduledGroupOperations(user.getSubject(), pageControl);
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/PrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/PrepareAction.java
index b500a72..a0f94aa 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/PrepareAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/PrepareAction.java
@@ -30,6 +30,7 @@ import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.actions.TilesAction;
import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.IntExtractor;
@@ -75,9 +76,8 @@ public class PrepareAction extends TilesAction {
PageList<Resource> resources = resourceManager.findResourceByIds(user.getSubject(), alertPrefs.asArray(), false,
pageControl);
- PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedResources =
- DisambiguatedResourceListUtil.buildResourceList(resourceManager.disambiguate(resources, true, RESOURCE_ID_EXTRACTOR),
- resources.getTotalSize(), resources.getPageControl(), false);
+ PageList<DisambiguationReport<Resource>> disambiguatedResources =
+ DisambiguatedResourceListUtil.disambiguate(resourceManager, resources, RESOURCE_ID_EXTRACTOR);
request.setAttribute("criticalAlertsList", disambiguatedResources);
request.setAttribute("criticalAlertsTotalSize", disambiguatedResources.getTotalSize());
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/ViewAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/ViewAction.java
index 77da660..1d9b37b 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/ViewAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/ViewAction.java
@@ -31,6 +31,7 @@ import org.apache.struts.tiles.actions.TilesAction;
import org.rhq.core.domain.alert.Alert;
import org.rhq.core.domain.alert.AlertPriority;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.IntExtractor;
@@ -58,7 +59,7 @@ public class ViewAction extends TilesAction {
public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
- PageList<DisambiguatedResourceListUtil.Record<Alert>> disambiguatedAlerts = new PageList<DisambiguatedResourceListUtil.Record<Alert>>();
+ PageList<DisambiguationReport<Alert>> disambiguatedAlerts = new PageList<DisambiguationReport<Alert>>();
try {
WebUser user = SessionUtils.getWebUser(request.getSession());
if (user == null) {
@@ -78,8 +79,7 @@ public class ViewAction extends TilesAction {
: ArrayUtils.wrapInArray(alertPrefs.asArray())), AlertPriority.getByLegacyIndex(alertPrefs.priority),
alertPrefs.timeRange, pageControl);
- disambiguatedAlerts = DisambiguatedResourceListUtil.buildResourceList(resourceManager.disambiguate(alerts, true, RESOURCE_ID_EXTRACTOR)
- , alerts.getTotalSize(), alerts.getPageControl(), true);
+ disambiguatedAlerts = DisambiguatedResourceListUtil.disambiguate(resourceManager, alerts, RESOURCE_ID_EXTRACTOR);
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug("Dashboard Portlet [CriticalAlerts] experienced an error: " + e.getMessage(), e);
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/problemresources/ViewAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/problemresources/ViewAction.java
index 6fc3516..d4b38fb 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/problemresources/ViewAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/problemresources/ViewAction.java
@@ -36,6 +36,7 @@ import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.actions.TilesAction;
import org.rhq.core.domain.auth.Subject;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.resource.composite.ProblemResourceComposite;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
@@ -64,7 +65,7 @@ public class ViewAction extends TilesAction {
public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
- List<DisambiguatedResourceListUtil.Record<ProblemResourceComposite>> disambiguatedList = new ArrayList<DisambiguatedResourceListUtil.Record<ProblemResourceComposite>>();
+ List<DisambiguationReport<ProblemResourceComposite>> disambiguatedList = new ArrayList<DisambiguationReport<ProblemResourceComposite>>();
String timeRange = getResources(request).getMessage("dash.home.ProblemResources.timeRangeUnlimited");
try {
@@ -103,9 +104,8 @@ public class ViewAction extends TilesAction {
PageList<ProblemResourceComposite> list = problemManager.findProblemResources(subject, begin, new PageControl(0,
problemResourcePreferences.range));
- disambiguatedList = DisambiguatedResourceListUtil.buildResourceList(
- resourceManager.disambiguate(list, true, RESOURCE_ID_EXTRACTOR),
- list.getTotalSize(), list.getPageControl(), true);
+ disambiguatedList = DisambiguatedResourceListUtil.disambiguate(
+ resourceManager, list, RESOURCE_ID_EXTRACTOR);
long end = System.currentTimeMillis();
log.debug("Performance: Took [" + (end - start) + "]ms to find " + problemResourcePreferences.range
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/RSSAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/RSSAction.java
index aa6a17b..fb9be73 100755
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/RSSAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/RSSAction.java
@@ -18,6 +18,10 @@
*/
package org.rhq.enterprise.gui.legacy.portlet.resourcehealth;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.Iterator;
+
import javax.security.auth.login.LoginException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
@@ -41,6 +45,7 @@ import org.rhq.enterprise.gui.legacy.WebUserPreferences;
import org.rhq.enterprise.gui.legacy.WebUserPreferences.FavoriteResourcePortletPreferences;
import org.rhq.enterprise.gui.legacy.portlet.BaseRSSAction;
import org.rhq.enterprise.gui.legacy.portlet.RSSFeed;
+import org.rhq.enterprise.gui.legacy.taglib.display.DisambiguatedResourceLineageTag;
import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
@@ -69,11 +74,9 @@ public class RSSAction extends BaseRSSAction {
favoriteResourcePreferences.asArray(), PageControl.getUnlimitedInstance());
if ((results != null) && (results.size() > 0)) {
- ResourceNamesDisambiguationResult<ResourceHealthComposite> disambiguatedLResults = manager.disambiguate(results, true, ViewAction.RESOURCE_ID_EXTRACTOR);
-
- PageList<DisambiguatedResourceListUtil.Record<ResourceHealthComposite>> list = DisambiguatedResourceListUtil.buildResourceList(disambiguatedLResults, results.getTotalSize(), results.getPageControl(), false);
+ PageList<DisambiguationReport<ResourceHealthComposite>> list = DisambiguatedResourceListUtil.disambiguate(manager, results, ViewAction.RESOURCE_ID_EXTRACTOR);
- for (DisambiguatedResourceListUtil.Record<ResourceHealthComposite> summary : list) {
+ for (DisambiguationReport<ResourceHealthComposite> summary : list) {
String link = feed.getBaseUrl() + FunctionTagLibrary.getDefaultResourceTabURL() + "?id="
+ summary.getOriginal().getId();
@@ -83,7 +86,7 @@ public class RSSAction extends BaseRSSAction {
.getOriginal().getAlerts()));
String typeText = res.getMessage("dash.home.ResourceHealth.rss.item.resourceType", summary
.getOriginal().getTypeName());
- String parentsText = res.getMessage("dash.home.ResourceHealth.rss.item.resourceParents", summary.getLineage());
+ String parentsText = res.getMessage("dash.home.ResourceHealth.rss.item.resourceParents", getLineage(summary));
long now = System.currentTimeMillis();
@@ -112,6 +115,15 @@ public class RSSAction extends BaseRSSAction {
} else {
throw new LoginException("RSS access requires authentication");
}
-
+ }
+
+ private static String getLineage(DisambiguationReport<?> report) {
+ StringWriter writer = new StringWriter();
+ try {
+ DisambiguatedResourceLineageTag.writeParents(writer, report.getParents(), false, false);
+ return writer.toString();
+ } catch (IOException e) {
+ return "";
+ }
}
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java
index 7db8562..7a1a824 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java
@@ -59,7 +59,7 @@ public class ViewAction extends TilesAction {
public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
- PageList<DisambiguatedResourceListUtil.Record<ResourceHealthComposite>> list = new PageList<DisambiguatedResourceListUtil.Record<ResourceHealthComposite>>();
+ PageList<DisambiguationReport<ResourceHealthComposite>> list = new PageList<DisambiguationReport<ResourceHealthComposite>>();
boolean showAvailability = true;
boolean showAlerts = true;
try {
@@ -78,9 +78,7 @@ public class ViewAction extends TilesAction {
ResourceManagerLocal manager = LookupUtil.getResourceManager();
PageList<ResourceHealthComposite> lst = manager.findResourceHealth(user.getSubject(), favoriteResourcePreferences.asArray(), pc);
- ResourceNamesDisambiguationResult<ResourceHealthComposite> disambiguatedList = manager.disambiguate(lst, true, RESOURCE_ID_EXTRACTOR);
-
- list = DisambiguatedResourceListUtil.buildResourceList(disambiguatedList, lst.getTotalSize(), lst.getPageControl(), true);
+ list = DisambiguatedResourceListUtil.disambiguate(manager, lst, RESOURCE_ID_EXTRACTOR);
showAvailability = favoriteResourcePreferences.showAvailability;
showAlerts = favoriteResourcePreferences.showAlerts;
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageDecorator.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageDecorator.java
new file mode 100644
index 0000000..1c860b3
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageDecorator.java
@@ -0,0 +1,77 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.gui.legacy.taglib.display;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.List;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+
+/**
+ * The same as {@link DisambiguatedResourceLineageTag} but for use inside
+ * display:column.
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguatedResourceLineageDecorator extends BaseDecorator {
+
+ private List<DisambiguationReport.Resource> parents;
+ private Boolean renderLinks;
+
+ public List<DisambiguationReport.Resource> getParents() {
+ return parents;
+ }
+
+ public void setParents(List<DisambiguationReport.Resource> parents) {
+ this.parents = parents;
+ }
+
+ public Boolean getRenderLinks() {
+ return renderLinks;
+ }
+
+ public void setRenderLinks(Boolean renderLinks) {
+ this.renderLinks = renderLinks;
+ }
+
+ @SuppressWarnings("unchecked")
+ public String decorate(Object obj) {
+ List<DisambiguationReport.Resource> parents = getParents();
+ if (parents == null) {
+ parents = (List<DisambiguationReport.Resource>) obj;
+ }
+
+ try {
+ StringWriter writer = new StringWriter();
+ boolean renderLinks = this.renderLinks == null || this.renderLinks;
+
+ DisambiguatedResourceLineageTag.writeParents(writer, parents, renderLinks, true);
+ return writer.toString();
+ } catch (IOException e) {
+ return null;
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageTag.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageTag.java
index 77e49d8..3088a62 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageTag.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageTag.java
@@ -24,6 +24,7 @@
package org.rhq.enterprise.gui.legacy.taglib.display;
import java.io.IOException;
+import java.io.Writer;
import java.util.Iterator;
import java.util.List;
@@ -67,20 +68,8 @@ public class DisambiguatedResourceLineageTag extends TagSupport {
JspWriter writer = pageContext.getOut();
try {
- if (parents != null && parents.size() > 0) {
-
- Iterator<DisambiguationReport.Resource> it = parents.iterator();
- DisambiguationReport.Resource parent = it.next();
- DisambiguatedResourceNameTag.writeResource(writer, renderLinks, parent.getId(), parent.getName(),
- parent.getType());
-
- while (it.hasNext()) {
- writer.append(DisambiguatedResourceLineageComponent.DEFAULT_SEPARATOR);
- parent = it.next();
- DisambiguatedResourceNameTag.writeResource(writer, renderLinks, parent.getId(), parent.getName(),
- parent.getType());
- }
- }
+ boolean renderLinks = this.renderLinks == null || this.renderLinks;
+ writeParents(writer, parents, renderLinks, true);
return super.doEndTag();
} catch (IOException e) {
@@ -88,4 +77,24 @@ public class DisambiguatedResourceLineageTag extends TagSupport {
}
}
+ private static String getUrl(DisambiguationReport.Resource resource) {
+ return DisambiguatedResourceNameTag.getDefaultResourceUrl(resource.getId());
+ }
+
+ public static void writeParents(Writer writer, List<DisambiguationReport.Resource> parents, boolean renderLinks, boolean htmlOuptut) throws IOException {
+ if (parents != null && parents.size() > 0) {
+
+ Iterator<DisambiguationReport.Resource> it = parents.iterator();
+ DisambiguationReport.Resource parent = it.next();
+ DisambiguatedResourceNameTag.writeResource(writer, renderLinks ? getUrl(parent) : null, parent.getName(),
+ parent.getType(), htmlOuptut);
+
+ while (it.hasNext()) {
+ writer.append(DisambiguatedResourceLineageComponent.DEFAULT_SEPARATOR);
+ parent = it.next();
+ DisambiguatedResourceNameTag.writeResource(writer, renderLinks ? getUrl(parent) : null, parent.getName(),
+ parent.getType(), htmlOuptut);
+ }
+ }
+ }
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameDecorator.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameDecorator.java
new file mode 100644
index 0000000..1bd3fbc
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameDecorator.java
@@ -0,0 +1,110 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.gui.legacy.taglib.display;
+
+import java.io.IOException;
+import java.io.StringWriter;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+
+/**
+ * For use in display:column elements
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguatedResourceNameDecorator extends BaseDecorator {
+
+ private int resourceId;
+ private String resourceName;
+ private String url;
+ private Boolean nameAsLink;
+ private DisambiguationReport<?> disambiguationReport;
+
+ public int getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(int resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
+ public Boolean getNameAsLink() {
+ return nameAsLink;
+ }
+
+ public void setNameAsLink(Boolean nameAsLink) {
+ this.nameAsLink = nameAsLink;
+ }
+
+ public DisambiguationReport<?> getDisambiguationReport() {
+ return disambiguationReport;
+ }
+
+ public void setDisambiguationReport(DisambiguationReport<?> disambiguationReport) {
+ this.disambiguationReport = disambiguationReport;
+ }
+
+ public String decorate(Object obj) {
+ DisambiguationReport<?> report = getDisambiguationReport();
+ if (report == null) {
+ report = (DisambiguationReport<?>) obj;
+ }
+
+ try {
+ //default to true
+ boolean renderLink = nameAsLink == null || nameAsLink.booleanValue();
+
+ String renderedUrl = null;
+ if (renderLink) {
+ renderedUrl = this.url;
+ if (renderedUrl == null) {
+ renderedUrl = DisambiguatedResourceNameTag.getDefaultResourceUrl(resourceId);
+ }
+ }
+
+ StringWriter writer = new StringWriter();
+ DisambiguatedResourceNameTag.writeResource(writer, renderedUrl, resourceName, report.getResourceType(), true);
+
+ return writer.toString();
+ } catch (IOException e) {
+ return null;
+ }
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameTag.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameTag.java
index 240f4f8..1077aab 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameTag.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameTag.java
@@ -24,6 +24,7 @@
package org.rhq.enterprise.gui.legacy.taglib.display;
import java.io.IOException;
+import java.io.Writer;
import javax.servlet.jsp.JspException;
import javax.servlet.jsp.JspTagException;
@@ -40,18 +41,19 @@ import org.rhq.core.domain.resource.composite.DisambiguationReport;
public class DisambiguatedResourceNameTag extends TagSupport {
private static final long serialVersionUID = 1L;
-
- private DisambiguationReport<?> disambiguatedReport;
+
+ private DisambiguationReport<?> disambiguationReport;
private String resourceName;
private Integer resourceId;
private Boolean nameAsLink;
+ private String url;
- public DisambiguationReport<?> getDisambiguatedReport() {
- return disambiguatedReport;
+ public DisambiguationReport<?> getDisambiguationReport() {
+ return disambiguationReport;
}
- public void setDisambiguatedReport(DisambiguationReport<?> disambiguatedReport) {
- this.disambiguatedReport = disambiguatedReport;
+ public void setDisambiguationReport(DisambiguationReport<?> disambiguationReport) {
+ this.disambiguationReport = disambiguationReport;
}
public String getResourceName() {
@@ -70,6 +72,14 @@ public class DisambiguatedResourceNameTag extends TagSupport {
this.resourceId = resourceId;
}
+ public String getUrl() {
+ return url;
+ }
+
+ public void setUrl(String url) {
+ this.url = url;
+ }
+
public Boolean getNameAsLink() {
return nameAsLink;
}
@@ -83,47 +93,83 @@ public class DisambiguatedResourceNameTag extends TagSupport {
JspWriter writer = pageContext.getOut();
try {
- if (disambiguatedReport != null) {
+ if (disambiguationReport != null) {
- DisambiguationReport.ResourceType resourceType = disambiguatedReport.getResourceType();
+ DisambiguationReport.ResourceType resourceType = disambiguationReport.getResourceType();
//default to true
boolean renderLink = nameAsLink == null || nameAsLink.booleanValue();
- writeResource(writer, renderLink, resourceId, resourceName, resourceType);
+ String renderedUrl = null;
+ if (renderLink) {
+ renderedUrl = this.url;
+ if (renderedUrl == null) {
+ renderedUrl = getDefaultResourceUrl(resourceId);
+ }
+ }
+ writeResource(writer, renderedUrl, resourceName, resourceType, true);
}
-
+
return super.doEndTag();
} catch (IOException e) {
throw new JspTagException(e);
}
}
-
- public static void writeResource(JspWriter writer, boolean renderLink, int resourceId, String resourceName, DisambiguationReport.ResourceType resourceType) throws IOException {
+
+ public static void writeResource(Writer writer, String url, String resourceName,
+ DisambiguationReport.ResourceType resourceType, boolean htmlOutput) throws IOException {
if (!resourceType.isSingleton()) {
- writer.append(resourceType.getName()).append(" ");
+ if (htmlOutput) {
+ writer.append("<span class=\"disambiguated-resource-type\">");
+ }
+ writer.append(resourceType.getName()).append(" ");
+
if (resourceType.getPlugin() != null) {
- writer.append("(").append(resourceType.getPlugin())
- .append(" plugin) ");
+ if (htmlOutput) {
+ writer.append("<span class=\"disambiguated-resource-plugin\">");
+ }
+ writer.append("(").append(resourceType.getPlugin()).append(" plugin) ");
+ if (htmlOutput) {
+ writer.append("</span>");
+ }
+ }
+
+ if (htmlOutput) {
+ writer.append("</span>");
}
}
-
- if (renderLink) {
- writer.append("<a href=\"/rhq/resource/summary/overview.xhtml?id=");
- writer.print(resourceId);
- writer.append("\">");
+
+ if (url != null) {
+ writer.append("<a href=\"").append(url).append("\">");
+ }
+
+ if (htmlOutput) {
+ writer.append("<span class=\"disambiguated-resource-name\">");
}
-
writer.append(resourceName);
-
- if (renderLink) {
- writer.append("</a>");
+ if (htmlOutput) {
+ writer.append("</span>");
}
+ if (url != null) {
+ writer.append("</a>");
+ }
+
if (resourceType.isSingleton() && resourceType.getPlugin() != null) {
- writer.append(" ").append(resourceType.getPlugin())
- .append(" plugin)");
+ if (htmlOutput) {
+ writer.append("<span class=\"disambiguated-resource-plugin\">");
+ }
+
+ writer.append(" (").append(resourceType.getPlugin()).append(" plugin)");
+
+ if (htmlOutput) {
+ writer.append("</span>");
+ }
}
}
+
+ public static String getDefaultResourceUrl(int resourceId) {
+ return "/rhq/resource/summary/overview.xhtml?id=" + resourceId;
+ }
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
index 24a373a..0837143 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
@@ -23,16 +23,11 @@
package org.rhq.enterprise.gui.legacy.util;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
-import org.rhq.core.domain.resource.composite.ResourceParentFlyweight;
-import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
-import org.rhq.enterprise.gui.inventory.resource.ResourcePartialLineageComponent;
+import org.rhq.core.util.IntExtractor;
+import org.rhq.enterprise.server.resource.ResourceManagerLocal;
/**
* A utility class to provide page lists of disambiguated resource lists for the
@@ -42,79 +37,12 @@ import org.rhq.enterprise.gui.inventory.resource.ResourcePartialLineageComponent
*/
public class DisambiguatedResourceListUtil {
- private static final String RESOURCE_URL = "/rhq/resource/summary/overview.xhtml";
-
private DisambiguatedResourceListUtil() {
}
- public static class Record<T> {
-
- private T original;
- private String lineage;
- private String originalResourceTypeName;
-
- public Record(T original, String resourceTypeName, String lineage) {
- this.original = original;
- this.lineage = lineage;
- this.originalResourceTypeName = resourceTypeName;
- }
-
- public T getOriginal() {
- return original;
- }
-
- public String getLineage() {
- return lineage;
- }
-
- public String getOriginalResourceTypeName() {
- return originalResourceTypeName;
- }
- }
-
- public static <T> PageList<Record<T>> buildResourceList(ResourceNamesDisambiguationResult<T> results, int totalSize, PageControl pageControl, boolean renderLinks) {
- ArrayList<Record<T>> convertedResults = new ArrayList<Record<T>>(results.getResolution().size());
-
- for(DisambiguationReport<T> dr : results.getResolution()) {
- String typeName = dr.getResourceTypeName();
- if (results.isPluginResolutionNeeded()) {
- typeName += " (" + dr.getResourceTypePluginName() + " plugin)";
- }
- convertedResults.add(new Record<T>(dr.getOriginal(), typeName, buildLineage(dr.getParents(), renderLinks)));
- }
- return new PageList<Record<T>>(convertedResults, totalSize, pageControl);
- }
-
- private static String buildLineage(List<ResourceParentFlyweight> parents, boolean renderLinks) {
- if (parents == null || parents.size() == 0) {
- return "";
- }
-
- Iterator<ResourceParentFlyweight> it = parents.iterator();
-
- StringBuilder bld = new StringBuilder();
-
- appendParentName(bld, it.next(), renderLinks);
-
- while (it.hasNext()) {
- bld.append(ResourcePartialLineageComponent.DEFAULT_SEPARATOR);
- appendParentName(bld, it.next(), renderLinks);
- }
-
- return bld.toString();
- }
-
- private static void appendParentName(StringBuilder bld, ResourceParentFlyweight parent, boolean renderLinks) {
- if (renderLinks) {
- bld.append("<a href=\"").append(RESOURCE_URL).append("?id=").append(parent.getParentId())
- .append("\">");
- }
-
- bld.append(parent.getParentName());
-
- if (renderLinks) {
- bld.append("</a>");
- }
+ public static <T> PageList<DisambiguationReport<T>> disambiguate(ResourceManagerLocal resourceManager, PageList<T> results, IntExtractor<T> resourceIdExtractor) {
+ ResourceNamesDisambiguationResult<T> result = resourceManager.disambiguate(results, true, resourceIdExtractor);
+ return new PageList<DisambiguationReport<T>>(result.getResolution(), results.getTotalSize(), results.getPageControl());
}
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tld/display.tld b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tld/display.tld
index eefd1e1..2d7fe8e 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tld/display.tld
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tld/display.tld
@@ -893,7 +893,7 @@
<tag>
<name>disambiguatedResourceName</name>
<tag-class>org.rhq.enterprise.gui.legacy.taglib.display.DisambiguatedResourceNameTag</tag-class>
- <body-content>JSP</body-content>
+ <body-content>empty</body-content>
<attribute>
<name>disambiguationReport</name>
<required>true</required>
@@ -908,11 +908,17 @@
</attribute>
<attribute>
<name>resourceId</name>
- <required>true</required>
+ <required>false</required>
<rtexprvalue>true</rtexprvalue>
<type>Integer</type>
</attribute>
<attribute>
+ <name>url</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>String</type>
+ </attribute>
+ <attribute>
<name>nameAsLink</name>
<required>false</required>
<rtexprvalue>false</rtexprvalue>
@@ -923,7 +929,61 @@
<tag>
<name>disambiguatedResourceLineage</name>
<tag-class>org.rhq.enterprise.gui.legacy.taglib.display.DisambiguatedResourceLineageTag</tag-class>
- <body-content>JSP</body-content>
+ <body-content>empty</body-content>
+ <attribute>
+ <name>parents</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.util.List</type>
+ </attribute>
+ <attribute>
+ <name>renderLinks</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>Boolean</type>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>disambiguatedResourceNameDecorator</name>
+ <tag-class>org.rhq.enterprise.gui.legacy.taglib.display.DisambiguatedResourceNameDecorator</tag-class>
+ <body-content>empty</body-content>
+ <attribute>
+ <name>disambiguationReport</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>org.rhq.core.domain.resource.composite.DisambiguationReport</type>
+ </attribute>
+ <attribute>
+ <name>resourceName</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>String</type>
+ </attribute>
+ <attribute>
+ <name>resourceId</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>Integer</type>
+ </attribute>
+ <attribute>
+ <name>url</name>
+ <required>false</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>String</type>
+ </attribute>
+ <attribute>
+ <name>nameAsLink</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>Boolean</type>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>disambiguatedResourceLineageDecorator</name>
+ <tag-class>org.rhq.enterprise.gui.legacy.taglib.display.DisambiguatedResourceLineageDecorator</tag-class>
+ <body-content>empty</body-content>
<attribute>
<name>parents</name>
<required>true</required>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/css/win.css b/modules/enterprise/gui/portal-war/src/main/webapp/css/win.css
index 76d051e..6859fe2 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/css/win.css
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/css/win.css
@@ -2371,3 +2371,17 @@ ul.radio-group .unspecified {
.rich-tree-h-ic-img, .rich-tree-node-handleicon-collapsed, .rich-tree-node-handleicon-expanded {
cursor:pointer;
}
+
+/* Disambiguated resources formatting */
+.disambiguated-resource-type {
+ font-style: italic;
+}
+
+.disambiguated-resource-plugin {
+ font-style: italic;
+}
+
+.disambiguated-resource-name {
+}
+
+
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/addresources/AddResourcesForm.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/addresources/AddResourcesForm.jsp
index 35e9965..661008f 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/addresources/AddResourcesForm.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/addresources/AddResourcesForm.jsp
@@ -338,7 +338,6 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
</html:select>
</td>
- <td><html:img page="/images/spacer.gif" width="5" height="30" border="0"/></td>
</tr>
</table>
</td>
@@ -366,21 +365,22 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
items="${AvailableResources}"
var="item"
padRows="true"
- rightSidebar="true"
+ rightSidebar="true"
styleId="fromTable"
postfix="a" >
<display:column width="1%" property="original.id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"fromToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
<display:checkboxdecorator name="availableResources" onclick="ToggleSelection(this, widgetProperties)" styleClass="availableListMember"/>
</display:column>
- <display:column property="original.name" title="common.header.ResourceName"
- width="30%"
- sortAttr="res.name" />
- <display:column property="original.resourceType.name" title="resource.group.inventory.TypeTH"
- width="39%"
- sortAttr="res.resourceType.name" >
+ <display:column title="common.header.ResourceName"
+ width="49%"
+ sortAttr="res.name">
+
+ <display:disambiguatedResourceNameDecorator resourceName="${item.original.name}" disambiguationReport="${item}" nameAsLink="false"/>
</display:column>
- <display:column property="lineage" title="resource.group.inventory.ParentTH"
- width="30%" />
+ <display:column title="resource.group.inventory.ParentTH"
+ width="50%">
+ <display:disambiguatedResourceLineageDecorator parents="${item.parents}" renderLinks="false" />
+ </display:column>
</display:table>
</div>
@@ -415,7 +415,7 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
<display:table cellpadding="0" cellspacing="0" border="0" width="100%"
action="${selfPpAction}"
items="${PendingResources}"
- var="resource"
+ var="item"
padRows="true"
leftSidebar="true"
styleId="toTable"
@@ -423,15 +423,15 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
<display:column width="1%" property="original.id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"toToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
<display:checkboxdecorator name="pendingResources" onclick="ToggleSelection(this, widgetProperties)" styleClass="pendingListMember"/>
</display:column>
- <display:column property="original.name" title="common.header.ResourceName"
- width="30%"
- sortAttr="res.name" />
- <display:column property="original.resourceType.name" title="resource.group.inventory.TypeTH"
- width="39%"
- sortAttr="res.resourceType.name" >
- </display:column>
- <display:column property="lineage" title="resource.group.inventory.ParentTH"
- width="30%" />
+ <display:column title="common.header.ResourceName"
+ width="49%"
+ sortAttr="res.name">
+ <display:disambiguatedResourceNameDecorator resourceName="${item.original.name}" disambiguationReport="${item}" nameAsLink="false"/>
+ </display:column>
+ <display:column title="resource.group.inventory.ParentTH"
+ width="50%">
+ <display:disambiguatedResourceLineageDecorator parents="${item.parents}" renderLinks="false" />
+ </display:column>
</display:table>
</div>
<!-- / -->
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/controlactions/View.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/controlactions/View.jsp
index 810963c..ba76919 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/controlactions/View.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/controlactions/View.jsp
@@ -5,6 +5,7 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt " prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core " prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/hq.tld" prefix="hq" %>
+<%@ taglib uri="/WEB-INF/tld/display.tld" prefix="display" %>
<tiles:importAttribute name="displayLastCompleted"/>
<tiles:importAttribute name="lastCompletedResource" ignore="true"/>
@@ -46,7 +47,6 @@
<c:if test="${!empty lastCompletedResource}">
<tr>
<td width="25%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ResourceName"/></td>
- <td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Type"/></td>
<td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Location"/></td>
<td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ControlAction"/></td>
<td width="20%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
@@ -54,9 +54,8 @@
</tr>
<c:forEach items="${lastCompletedResource}" var="obj">
<tr class="ListRow">
- <td class="ListCell"><html:link page="/rhq/resource/summary/overview.xhtml?id=${obj.original.resourceId}"><c:out value="${obj.original.resourceName}"/></html:link></td>
- <td class="ListCell"><c:out value="${obj.original.resourceTypeName}"/></td>
- <td class="ListCell"><c:out value="${obj.lineage}" escapeXml="false"/></td>
+ <td class="ListCell"><display:disambiguatedResourceName resourceName="${obj.original.resourceName}" disambiguationReport="${obj}" resourceId="${obj.original.resourceId}" /></td>
+ <td class="ListCell"><display:disambiguatedResourceLineage parents="${obj.parents}" /></td>
<td class="ListCell"><c:out value="${obj.original.operationName}"/></td>
<td class="ListCell"><hq:dateFormatter value="${obj.original.operationStartTime}"/></td>
<td class="ListCell" align="center">
@@ -83,7 +82,7 @@
<c:if test="${!empty lastCompletedGroup}">
<tr>
<td width="40%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.GroupName"/></td>
- <td width="35%" class="ListHeaderInactive" colspan="2"><fmt:message key="dash.home.TableHeader.GroupResourceType"/></td>
+ <td width="35%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.GroupResourceType"/></td>
<td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ControlAction"/></td>
<td width="25%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
<td width="5%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Status"/></td>
@@ -91,7 +90,7 @@
<c:forEach items="${lastCompletedGroup}" var="obj">
<tr class="ListRow">
<td class="ListCell"><html:link page="/rhq/groups/monitor/graphs.xhtml?category=COMPATIBLE&groupId=${obj.groupId}"><c:out value="${obj.groupName}"/></html:link></td>
- <td class="ListCell" colspan="2"><c:out value="${obj.groupResourceTypeName}"/></td>
+ <td class="ListCell"><c:out value="${obj.groupResourceTypeName}"/></td>
<td class="ListCell"><c:out value="${obj.operationName}"/></td>
<td class="ListCell"><hq:dateFormatter value="${obj.operationStartTime}"/></td>
<td class="ListCell" align="center">
@@ -141,16 +140,14 @@
<c:if test="${!empty nextScheduledResource}">
<tr>
<td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ResourceName"/></td>
- <td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Type"/></td>
- <td width="35%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Location"/></td>
+ <td width="35%" class="ListHeaderInactive" colspan="2"><fmt:message key="dash.home.TableHeader.Location"/></td>
<td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ControlAction"/></td>
<td width="15%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
</tr>
<c:forEach items="${nextScheduledResource}" var="obj">
<tr class="ListRow">
- <td class="ListCell"><html:link page="/rhq/resource/operation/resourceOperationScheduleDetails.xhtml?id=${obj.original.resourceId}&jobId=${obj.original.operationJobId}"><c:out value="${obj.original.resourceName}"/></html:link></td>
- <td class="ListCell"><c:out value="${obj.original.resourceTypeName}"/></td>
- <td class="ListCell"><c:out value="${obj.lineage}" escapeXml="false" /></td>
+ <td class="ListCell"><display:disambiguatedResourceName resourceName="${obj.original.resourceName}" disambiguationReport="${obj}" url="/rhq/resource/operation/resourceOperationScheduleDetails.xhtml?id=${obj.original.resourceId}&jobId=${obj.original.operationJobId}"/></td>
+ <td class="ListCell" colspan="2"><display:disambiguatedResourceLineage parents="${obj.parents}" /></td>
<td class="ListCell"><c:out value="${obj.original.operationName}"/></td>
<td class="ListCell"><hq:dateFormatter value="${obj.original.operationNextFireTime}"/></td>
</tr>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/Properties.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/Properties.jsp
index 4221584..eebbc19 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/Properties.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/Properties.jsp
@@ -99,9 +99,12 @@ var help = '<hq:help/>';
<display:checkboxdecorator name="ids" onclick="ToggleSelection(this, widgetProperties, true)" styleClass="listMember"/>
</display:column>
- <display:column width="25%" property="original.name" sortAttr="res.name" title="dash.settings.ListHeader.Resource" />
- <display:column width="25%" property="original.resourceType.name" title="dash.settings.ListHeader.Type" />
- <display:column width="25%" property="lineage" title="dash.settings.ListHeader.Location" />
+ <display:column width="25%" sortAttr="res.name" title="dash.settings.ListHeader.Resource">
+ <display:disambiguatedResourceNameDecorator resourceName="${resource.original.name}" resourceId="${resource.original.id}" disambiguationReport="${resource}"/>
+ </display:column>
+ <display:column width="25%" title="dash.settings.ListHeader.Location">
+ <display:disambiguatedResourceLineageDecorator parents="${resource.parents}"/>
+ </display:column>
<display:column width="25%" property="original.description" sortAttr="res.description" title="common.header.Description" />
</display:table>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/View.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/View.jsp
index 7e0205e..0d3e602 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/View.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/View.jsp
@@ -5,6 +5,8 @@
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt " prefix="fmt" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core " prefix="c" %>
<%@ taglib uri="/WEB-INF/tld/hq.tld" prefix="hq" %>
+<%@ taglib uri="/WEB-INF/tld/display.tld" prefix="display" %>
+
<tiles:importAttribute name="criticalAlerts"/>
<c:url var="rssUrl" value="/rss/ViewCriticalAlerts.rss">
@@ -33,7 +35,6 @@
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="20%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.ResourceName"/><html:img page="/images/tb_sortup_inactive.gif" width="9" height="9" border="0"/></td>
- <td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Type"/></td>
<td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Location"/></td>
<td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.AlertName"/></td>
<td width="20%" class="ListHeaderInactiveCenter"><fmt:message key="dash.home.TableHeader.DateTime"/></td>
@@ -42,16 +43,15 @@
<tr class="ListRow">
<c:choose>
<c:when test="{item.original.alertDefinition.resource eq null}">
- <td class="ListCell" colspan="3">
+ <td class="ListCell" colspan="2">
<fmt:message key="dash.home.removed.resource"/>
</td>
</c:when>
<c:otherwise>
<td class="ListCell">
- <html:link page="/rhq/resource/summary/overview.xhtml?id=${item.original.alertDefinition.resource.id}"><c:out value="${item.original.alertDefinition.resource.name}"/> </html:link>
+ <display:disambiguatedResourceName resourceName="${item.original.alertDefinition.resource.name}" disambiguationReport="${item}" resourceId="${item.original.alertDefinition.resource.id}"/>
</td>
- <td class="ListCell"><c:out value="${item.original.alertDefinition.resource.resourceType.name}" /></td>
- <td class="ListCell"><c:out value="${item.lineage}" /> </td>
+ <td class="ListCell"><display:disambiguatedResourceLineage parents="${item.parents}" /> </td>
</c:otherwise>
</c:choose>
<td class="ListCell"><html:link page="/alerts/Alerts.do?mode=viewAlert&id=${item.original.alertDefinition.resource.id}&a=${item.original.id}"><c:out value="${item.original.alertDefinition.name}"/> </html:link></td>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/problemResources/View.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/problemResources/View.jsp
index 93695da..481cb5c 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/problemResources/View.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/problemResources/View.jsp
@@ -33,9 +33,12 @@
<c:when test="${not empty problemResources}">
<display:table cellspacing="0" cellpadding="0" width="100%" action="/Dashboard.do"
var="obj" items="${problemResources}" >
- <display:column width="20%" href="/rhq/resource/summary/overview.xhtml?id=${obj.original.resourceId}" property="original.resourceName" title="dash.home.TableHeader.ResourceName"/>
- <display:column width="20%" property="originalResourceTypeName" title="dash.home.TableHeader.Type"/>
- <display:column width="20%" property="lineage" title="dash.home.TableHeader.Location"/>
+ <display:column width="20%" title="dash.home.TableHeader.ResourceName">
+ <display:disambiguatedResourceNameDecorator resourceName="${obj.original.resourceName}" resourceId="${obj.original.resourceId}" disambiguationReport="${obj}"/>
+ </display:column>
+ <display:column width="20%" title="dash.home.TableHeader.Location">
+ <display:disambiguatedResourceLineageDecorator parents="${obj.parents}"/>
+ </display:column>
<display:column width="10%" property="original.numAlerts" title="dash.home.TableHeader.Alerts" align="center"/>
<display:column width="10%" property="original.availabilityType" title="resource.common.monitor.visibility.CAvailabilityTH" align="center" >
<display:availabilitydecorator/>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/resourceHealth/View.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/resourceHealth/View.jsp
index a347bb3..58e74b7 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/resourceHealth/View.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/resourceHealth/View.jsp
@@ -24,14 +24,15 @@
<tiles:importAttribute name="alerts"/>
<c:choose >
- <c:when test="${not empty resourceHealth}">
-
- <display:table cellspacing="0" cellpadding="0" width="100%" action="/Dashboard.do"
+ <c:when test="${not empty resourceHealth}">
+ <display:table cellspacing="0" cellpadding="0" width="100%" action="/Dashboard.do"
var="item" items="${resourceHealth}" >
-
- <display:column width="25%" href="/rhq/resource/summary/overview.xhtml?id=${item.original.id}" property="original.name" sortAttr="res.name" title="dash.home.TableHeader.ResourceName"/>
- <display:column width="25%" property="original.typeName" title="dash.home.TableHeader.Type"/>
- <display:column width="25%" property="lineage" title="dash.home.TableHeader.Location"/>
+ <display:column width="25%" sortAttr="res.name" title="dash.home.TableHeader.ResourceName">
+ <display:disambiguatedResourceNameDecorator resourceName="${item.original.name}" disambiguationReport="${item}" resourceId="${item.original.id}"/>
+ </display:column>
+ <display:column width="25%" title="dash.home.TableHeader.Location">
+ <display:disambiguatedResourceLineageDecorator parents="${item.parents}"/>
+ </display:column>
<c:if test="${alerts}">
<display:column width="10%" property="original.alerts" title="dash.home.TableHeader.Alerts" align="center"/>
</c:if>
@@ -42,9 +43,7 @@
</display:column>
</c:if>
</display:table>
-
<tiles:insert definition=".dashContent.seeAll"/>
-
</c:when>
<c:otherwise>
<table width="100%" cellpadding="0" cellspacing="0" border="0">
commit dcfd561e28af59dddaa52cad801733c14eebee1c
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 17 20:06:53 2010 +0200
Implementing the JSP tags for disambiguated resources...
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageTag.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageTag.java
new file mode 100644
index 0000000..77e49d8
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceLineageTag.java
@@ -0,0 +1,91 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.gui.legacy.taglib.display;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+import org.rhq.enterprise.gui.inventory.resource.DisambiguatedResourceLineageComponent;
+
+/**
+ * Renders the location of a disambiguated resource.
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguatedResourceLineageTag extends TagSupport {
+ private static final long serialVersionUID = 1L;
+
+ private List<DisambiguationReport.Resource> parents;
+ private Boolean renderLinks;
+
+ public List<DisambiguationReport.Resource> getParents() {
+ return parents;
+ }
+
+ public void setParents(List<DisambiguationReport.Resource> parents) {
+ this.parents = parents;
+ }
+
+ public Boolean getRenderLinks() {
+ return renderLinks;
+ }
+
+ public void setRenderLinks(Boolean renderLinks) {
+ this.renderLinks = renderLinks;
+ }
+
+ @Override
+ public int doEndTag() throws JspException {
+ JspWriter writer = pageContext.getOut();
+
+ try {
+ if (parents != null && parents.size() > 0) {
+
+ Iterator<DisambiguationReport.Resource> it = parents.iterator();
+ DisambiguationReport.Resource parent = it.next();
+ DisambiguatedResourceNameTag.writeResource(writer, renderLinks, parent.getId(), parent.getName(),
+ parent.getType());
+
+ while (it.hasNext()) {
+ writer.append(DisambiguatedResourceLineageComponent.DEFAULT_SEPARATOR);
+ parent = it.next();
+ DisambiguatedResourceNameTag.writeResource(writer, renderLinks, parent.getId(), parent.getName(),
+ parent.getType());
+ }
+ }
+
+ return super.doEndTag();
+ } catch (IOException e) {
+ throw new JspTagException(e);
+ }
+ }
+
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameTag.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameTag.java
new file mode 100644
index 0000000..240f4f8
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/taglib/display/DisambiguatedResourceNameTag.java
@@ -0,0 +1,129 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.gui.legacy.taglib.display;
+
+import java.io.IOException;
+
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspTagException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+
+/**
+ *
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguatedResourceNameTag extends TagSupport {
+
+ private static final long serialVersionUID = 1L;
+
+ private DisambiguationReport<?> disambiguatedReport;
+ private String resourceName;
+ private Integer resourceId;
+ private Boolean nameAsLink;
+
+ public DisambiguationReport<?> getDisambiguatedReport() {
+ return disambiguatedReport;
+ }
+
+ public void setDisambiguatedReport(DisambiguationReport<?> disambiguatedReport) {
+ this.disambiguatedReport = disambiguatedReport;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public Integer getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(Integer resourceId) {
+ this.resourceId = resourceId;
+ }
+
+ public Boolean getNameAsLink() {
+ return nameAsLink;
+ }
+
+ public void setNameAsLink(Boolean nameAsLink) {
+ this.nameAsLink = nameAsLink;
+ }
+
+ @Override
+ public int doEndTag() throws JspException {
+ JspWriter writer = pageContext.getOut();
+
+ try {
+ if (disambiguatedReport != null) {
+
+ DisambiguationReport.ResourceType resourceType = disambiguatedReport.getResourceType();
+
+ //default to true
+ boolean renderLink = nameAsLink == null || nameAsLink.booleanValue();
+
+ writeResource(writer, renderLink, resourceId, resourceName, resourceType);
+ }
+
+ return super.doEndTag();
+ } catch (IOException e) {
+ throw new JspTagException(e);
+ }
+ }
+
+ public static void writeResource(JspWriter writer, boolean renderLink, int resourceId, String resourceName, DisambiguationReport.ResourceType resourceType) throws IOException {
+ if (!resourceType.isSingleton()) {
+ writer.append(resourceType.getName()).append(" ");
+
+ if (resourceType.getPlugin() != null) {
+ writer.append("(").append(resourceType.getPlugin())
+ .append(" plugin) ");
+ }
+ }
+
+ if (renderLink) {
+ writer.append("<a href=\"/rhq/resource/summary/overview.xhtml?id=");
+ writer.print(resourceId);
+ writer.append("\">");
+ }
+
+ writer.append(resourceName);
+
+ if (renderLink) {
+ writer.append("</a>");
+ }
+
+ if (resourceType.isSingleton() && resourceType.getPlugin() != null) {
+ writer.append(" ").append(resourceType.getPlugin())
+ .append(" plugin)");
+ }
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tld/display.tld b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tld/display.tld
index 15c0f95..eefd1e1 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tld/display.tld
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tld/display.tld
@@ -889,4 +889,52 @@
</display:table>
]]> </example>
</tag>
+
+ <tag>
+ <name>disambiguatedResourceName</name>
+ <tag-class>org.rhq.enterprise.gui.legacy.taglib.display.DisambiguatedResourceNameTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>disambiguationReport</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>org.rhq.core.domain.resource.composite.DisambiguationReport</type>
+ </attribute>
+ <attribute>
+ <name>resourceName</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>String</type>
+ </attribute>
+ <attribute>
+ <name>resourceId</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>Integer</type>
+ </attribute>
+ <attribute>
+ <name>nameAsLink</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>Boolean</type>
+ </attribute>
+ </tag>
+
+ <tag>
+ <name>disambiguatedResourceLineage</name>
+ <tag-class>org.rhq.enterprise.gui.legacy.taglib.display.DisambiguatedResourceLineageTag</tag-class>
+ <body-content>JSP</body-content>
+ <attribute>
+ <name>parents</name>
+ <required>true</required>
+ <rtexprvalue>true</rtexprvalue>
+ <type>java.util.List</type>
+ </attribute>
+ <attribute>
+ <name>renderLinks</name>
+ <required>false</required>
+ <rtexprvalue>false</rtexprvalue>
+ <type>Boolean</type>
+ </attribute>
+ </tag>
</taglib>
commit 1cd199930a8af38a2384d143e2251a8af1a82192
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 17 20:06:25 2010 +0200
Fixes to the DisambiguatedResourceNameComponent
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java
index b189de9..eefb034 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java
@@ -26,28 +26,39 @@ package org.rhq.enterprise.gui.inventory.resource;
import javax.faces.component.UIComponentBase;
import org.rhq.core.domain.resource.composite.DisambiguationReport;
+import org.rhq.core.gui.util.FacesComponentUtility;
/**
- *
+ * Component for displaying a resource name together with disambiguation
+ * information.
*
* @author Lukas Krejci
*/
public class DisambiguatedResourceNameComponent extends UIComponentBase {
public static final String COMPONENT_TYPE = "org.jboss.on.DisambiguatedResourceName";
public static final String COMPONENT_FAMILY = "org.jboss.on.DisambiguatedResourceName";
-
+ private static final String DISAMBIGUATION_REPORT_ATTRIBUTE = "disambiguationReport";
+ private static final String RESOURCE_NAME_ATTRIBUTE = "resourceName";
+ private static final String RESOURCE_ID_ATTRIBUTE = "resourceId";
+ private static final String NAME_AS_LINK_ATTRIBUTE = "nameAsLink";
+
private DisambiguationReport<?> disambiguationReport;
private String resourceName;
- private int resourceId;
- private boolean nameAsLink = true;
-
+ private Integer resourceId;
+ private Boolean nameAsLink;
+
@Override
public String getFamily() {
return COMPONENT_FAMILY;
}
public DisambiguationReport<?> getDisambiguationReport() {
- return disambiguationReport;
+ if (disambiguationReport == null) {
+ return FacesComponentUtility.getExpressionAttribute(this, DISAMBIGUATION_REPORT_ATTRIBUTE,
+ DisambiguationReport.class);
+ } else {
+ return disambiguationReport;
+ }
}
public void setDisambiguationReport(DisambiguationReport<?> disambiguationReport) {
@@ -55,7 +66,11 @@ public class DisambiguatedResourceNameComponent extends UIComponentBase {
}
public String getResourceName() {
- return resourceName;
+ if (resourceName == null) {
+ return FacesComponentUtility.getExpressionAttribute(this, RESOURCE_NAME_ATTRIBUTE);
+ } else {
+ return resourceName;
+ }
}
public void setResourceName(String resourceName) {
@@ -63,7 +78,12 @@ public class DisambiguatedResourceNameComponent extends UIComponentBase {
}
public boolean isNameAsLink() {
- return nameAsLink;
+ if (nameAsLink == null) {
+ Boolean ret = FacesComponentUtility.getExpressionAttribute(this, NAME_AS_LINK_ATTRIBUTE, Boolean.class);
+ return ret == null ? true : ret;
+ } else {
+ return nameAsLink;
+ }
}
public void setNameAsLink(boolean nameAsLink) {
@@ -71,7 +91,12 @@ public class DisambiguatedResourceNameComponent extends UIComponentBase {
}
public int getResourceId() {
- return resourceId;
+ if (resourceId == null) {
+ Integer ret = FacesComponentUtility.getExpressionAttribute(this, RESOURCE_ID_ATTRIBUTE, Integer.class);
+ return ret == null ? 0 : ret;
+ } else {
+ return resourceId;
+ }
}
public void setResourceId(int resourceId) {
commit 2e8907e9e8f025de47f5b036f5703ad284f5d250
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 17 14:58:17 2010 +0200
Renaming ResourcePartialLineage* to DisambiguatedResourceLineage* and adding a new DisambiguatedResourceName(Component|Renderer) to easily change the way we render a disambiguated resource name uniformly across the (JSF based) UI.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageComponent.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageComponent.java
new file mode 100644
index 0000000..d02d26e
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageComponent.java
@@ -0,0 +1,118 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.gui.inventory.resource;
+
+import java.util.List;
+
+import javax.faces.component.UIComponentBase;
+import javax.faces.context.FacesContext;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+import org.rhq.core.gui.util.FacesComponentUtility;
+
+/**
+ * A component for displaying partial resource lineage that comes out of the resource name
+ * disambiguation procedure.
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguatedResourceLineageComponent extends UIComponentBase {
+ public static final String COMPONENT_TYPE = "org.jboss.on.DisambiguatedResourceLineage";
+ public static final String COMPONENT_FAMILY = "org.jboss.on.DisambiguatedResourceLineage";
+
+ public static final String DEFAULT_SEPARATOR = " > ";
+
+ private static final String PARENTS_ATTRIBUTE = "parents";
+ private static final String RENDER_LINKS_ATTRIBUTE = "renderLinks";
+ private static final String SEPARATOR_ATTRIBUTE = "separator";
+
+ private Boolean renderLinks;
+ private String separator;
+ private List<DisambiguationReport.Resource> parents;
+
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public Boolean getRenderLinks() {
+ if (renderLinks == null) {
+ renderLinks = FacesComponentUtility.getExpressionAttribute(this, RENDER_LINKS_ATTRIBUTE, Boolean.class);
+ if (renderLinks == null) {
+ renderLinks = true;
+ }
+ }
+ return renderLinks;
+ }
+
+
+ public void setRenderLinks(Boolean renderLinks) {
+ this.renderLinks = renderLinks;
+ }
+
+
+ public String getSeparator() {
+ if (separator == null) {
+ separator = FacesComponentUtility.getExpressionAttribute(this, SEPARATOR_ATTRIBUTE, String.class);
+ if (separator == null) {
+ separator = DEFAULT_SEPARATOR;
+ }
+ }
+ return separator;
+ }
+
+ public void setSeparator(String separator) {
+ this.separator = separator;
+ }
+
+ @SuppressWarnings("unchecked")
+ public List<DisambiguationReport.Resource> getParents() {
+ if (parents == null) {
+ //do *NOT* store this value into the parents explicitly
+ //unless dynamic updates (if the expression is in loop for example)
+ //won't work.
+ return FacesComponentUtility.getExpressionAttribute(this, PARENTS_ATTRIBUTE, List.class);
+ } else {
+ return parents;
+ }
+ }
+
+ public void setParents(List<DisambiguationReport.Resource> parents) {
+ this.parents = parents;
+ }
+
+ public Object saveState(FacesContext facesContext) {
+ Object[] state = new Object[3];
+ state[0] = super.saveState(facesContext);
+ state[1] = this.renderLinks;
+ state[2] = this.separator;
+ return state;
+ }
+
+ public void restoreState(FacesContext facesContext, Object stateValues) {
+ Object[] state = (Object[]) stateValues;
+ super.restoreState(facesContext, state[0]);
+ this.renderLinks = (Boolean) state[1];
+ this.separator = (String) state[2];
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageRenderer.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageRenderer.java
new file mode 100644
index 0000000..bb61ae6
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceLineageRenderer.java
@@ -0,0 +1,112 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.gui.inventory.resource;
+
+import java.io.IOException;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+
+/**
+ * Renderer for {@link DisambiguatedResourceLineageComponent}
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguatedResourceLineageRenderer extends Renderer {
+ private static final String RESOURCE_URL = "/rhq/resource/summary/overview.xhtml";
+
+ @Override
+ public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
+ DisambiguatedResourceLineageComponent lineageComponent = (DisambiguatedResourceLineageComponent) component;
+
+ String separator = lineageComponent.getSeparator();
+ List<DisambiguationReport.Resource> parents = lineageComponent.getParents();
+ boolean renderLinks = lineageComponent.getRenderLinks();
+
+ if (parents != null && parents.size() > 0) {
+ ResponseWriter writer = context.getResponseWriter();
+
+ Iterator<DisambiguationReport.Resource> parentsIt = parents.iterator();
+
+ if (renderLinks) {
+ encodeUrl(writer, parentsIt.next());
+ while(parentsIt.hasNext()) {
+ writer.writeText(separator, null);
+ encodeUrl(writer, parentsIt.next());
+ }
+ } else {
+ encodeSimple(writer, parentsIt.next());
+ while(parentsIt.hasNext()) {
+ writer.writeText(separator, null);
+ encodeSimple(writer, parentsIt.next());
+ }
+ }
+ }
+ }
+
+ public static void encodeUrl(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ encodePreName(writer, parent);
+ writer.startElement("a", null);
+ writer.writeAttribute("href", getUrl(parent), null);
+ writer.writeText(parent.getName(), null);
+ writer.endElement("a");
+ encodePostName(writer, parent);
+ }
+
+ public static void encodeSimple(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ encodePreName(writer, parent);
+ writer.writeText(parent.getName(), null);
+ encodePostName(writer, parent);
+ }
+
+ private static String getUrl(DisambiguationReport.Resource parent) {
+ return RESOURCE_URL + "?id=" + parent.getId();
+ }
+
+ private static void encodePreName(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ if (!parent.getType().isSingleton()) {
+ writer.writeText(parent.getType().getName(), null);
+ writer.writeText(" ", null);
+ if (parent.getType().getPlugin() != null) {
+ writer.writeText("(", null);
+ writer.writeText(parent.getType().getPlugin(), null);
+ writer.writeText(" plugin) ", null);
+ }
+ }
+ }
+
+ private static void encodePostName(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ if (parent.getType().isSingleton() && parent.getType().getPlugin() != null) {
+ writer.writeText(" (", null);
+ writer.writeText(parent.getType().getPlugin(), null);
+ writer.writeText(" plugin) ", null);
+ }
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java
new file mode 100644
index 0000000..b189de9
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameComponent.java
@@ -0,0 +1,80 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.gui.inventory.resource;
+
+import javax.faces.component.UIComponentBase;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+
+/**
+ *
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguatedResourceNameComponent extends UIComponentBase {
+ public static final String COMPONENT_TYPE = "org.jboss.on.DisambiguatedResourceName";
+ public static final String COMPONENT_FAMILY = "org.jboss.on.DisambiguatedResourceName";
+
+ private DisambiguationReport<?> disambiguationReport;
+ private String resourceName;
+ private int resourceId;
+ private boolean nameAsLink = true;
+
+ @Override
+ public String getFamily() {
+ return COMPONENT_FAMILY;
+ }
+
+ public DisambiguationReport<?> getDisambiguationReport() {
+ return disambiguationReport;
+ }
+
+ public void setDisambiguationReport(DisambiguationReport<?> disambiguationReport) {
+ this.disambiguationReport = disambiguationReport;
+ }
+
+ public String getResourceName() {
+ return resourceName;
+ }
+
+ public void setResourceName(String resourceName) {
+ this.resourceName = resourceName;
+ }
+
+ public boolean isNameAsLink() {
+ return nameAsLink;
+ }
+
+ public void setNameAsLink(boolean nameAsLink) {
+ this.nameAsLink = nameAsLink;
+ }
+
+ public int getResourceId() {
+ return resourceId;
+ }
+
+ public void setResourceId(int resourceId) {
+ this.resourceId = resourceId;
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameRenderer.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameRenderer.java
new file mode 100644
index 0000000..07c7ecd
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/DisambiguatedResourceNameRenderer.java
@@ -0,0 +1,62 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.gui.inventory.resource;
+
+import java.io.IOException;
+
+import javax.faces.component.UIComponent;
+import javax.faces.context.FacesContext;
+import javax.faces.context.ResponseWriter;
+import javax.faces.render.Renderer;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+
+/**
+ *
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguatedResourceNameRenderer extends Renderer {
+
+ @Override
+ public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
+ DisambiguatedResourceNameComponent nameComponent = (DisambiguatedResourceNameComponent) component;
+
+ ResponseWriter writer = context.getResponseWriter();
+
+ DisambiguationReport<?> report = nameComponent.getDisambiguationReport();
+ String resourceName = nameComponent.getResourceName();
+ int resourceId = nameComponent.getResourceId();
+
+ DisambiguationReport.ResourceType resourceType = report.getResourceType();
+
+ DisambiguationReport.Resource resource = new DisambiguationReport.Resource(resourceId, resourceName, resourceType);
+
+ if (nameComponent.isNameAsLink()) {
+ DisambiguatedResourceLineageRenderer.encodeUrl(writer, resource);
+ } else {
+ DisambiguatedResourceLineageRenderer.encodeSimple(writer, resource);
+ }
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageComponent.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageComponent.java
deleted file mode 100644
index 98502bc..0000000
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageComponent.java
+++ /dev/null
@@ -1,118 +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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * 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 and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package org.rhq.enterprise.gui.inventory.resource;
-
-import java.util.List;
-
-import javax.faces.component.UIComponentBase;
-import javax.faces.context.FacesContext;
-
-import org.rhq.core.domain.resource.composite.DisambiguationReport;
-import org.rhq.core.gui.util.FacesComponentUtility;
-
-/**
- * A component for displaying partial resource lineage that comes out of the resource name
- * disambiguation procedure.
- *
- * @author Lukas Krejci
- */
-public class ResourcePartialLineageComponent extends UIComponentBase {
- public static final String COMPONENT_TYPE = "org.jboss.on.ResourcePartialLineage";
- public static final String COMPONENT_FAMILY = "org.jboss.on.ResourcePartialLineage";
-
- public static final String DEFAULT_SEPARATOR = " > ";
-
- private static final String PARENTS_ATTRIBUTE = "parents";
- private static final String RENDER_LINKS_ATTRIBUTE = "renderLinks";
- private static final String SEPARATOR_ATTRIBUTE = "separator";
-
- private Boolean renderLinks;
- private String separator;
- private List<DisambiguationReport.Resource> parents;
-
- public String getFamily() {
- return COMPONENT_FAMILY;
- }
-
- public Boolean getRenderLinks() {
- if (renderLinks == null) {
- renderLinks = FacesComponentUtility.getExpressionAttribute(this, RENDER_LINKS_ATTRIBUTE, Boolean.class);
- if (renderLinks == null) {
- renderLinks = true;
- }
- }
- return renderLinks;
- }
-
-
- public void setRenderLinks(Boolean renderLinks) {
- this.renderLinks = renderLinks;
- }
-
-
- public String getSeparator() {
- if (separator == null) {
- separator = FacesComponentUtility.getExpressionAttribute(this, SEPARATOR_ATTRIBUTE, String.class);
- if (separator == null) {
- separator = DEFAULT_SEPARATOR;
- }
- }
- return separator;
- }
-
- public void setSeparator(String separator) {
- this.separator = separator;
- }
-
- @SuppressWarnings("unchecked")
- public List<DisambiguationReport.Resource> getParents() {
- if (parents == null) {
- //do *NOT* store this value into the parents explicitly
- //unless dynamic updates (if the expression is in loop for example)
- //won't work.
- return FacesComponentUtility.getExpressionAttribute(this, PARENTS_ATTRIBUTE, List.class);
- } else {
- return parents;
- }
- }
-
- public void setParents(List<DisambiguationReport.Resource> parents) {
- this.parents = parents;
- }
-
- public Object saveState(FacesContext facesContext) {
- Object[] state = new Object[3];
- state[0] = super.saveState(facesContext);
- state[1] = this.renderLinks;
- state[2] = this.separator;
- return state;
- }
-
- public void restoreState(FacesContext facesContext, Object stateValues) {
- Object[] state = (Object[]) stateValues;
- super.restoreState(facesContext, state[0]);
- this.renderLinks = (Boolean) state[1];
- this.separator = (String) state[2];
- }
-}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
deleted file mode 100644
index 9cd471e..0000000
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
+++ /dev/null
@@ -1,112 +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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * 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 and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package org.rhq.enterprise.gui.inventory.resource;
-
-import java.io.IOException;
-import java.util.Iterator;
-import java.util.List;
-
-import javax.faces.component.UIComponent;
-import javax.faces.context.FacesContext;
-import javax.faces.context.ResponseWriter;
-import javax.faces.render.Renderer;
-
-import org.rhq.core.domain.resource.composite.DisambiguationReport;
-
-/**
- * Renderer for {@link ResourcePartialLineageComponent}
- *
- * @author Lukas Krejci
- */
-public class ResourcePartialLineageRenderer extends Renderer {
- private static final String RESOURCE_URL = "/rhq/resource/summary/overview.xhtml";
-
- @Override
- public void encodeBegin(FacesContext context, UIComponent component) throws IOException {
- ResourcePartialLineageComponent lineageComponent = (ResourcePartialLineageComponent) component;
-
- String separator = lineageComponent.getSeparator();
- List<DisambiguationReport.Resource> parents = lineageComponent.getParents();
- boolean renderLinks = lineageComponent.getRenderLinks();
-
- if (parents != null && parents.size() > 0) {
- ResponseWriter writer = context.getResponseWriter();
-
- Iterator<DisambiguationReport.Resource> parentsIt = parents.iterator();
-
- if (renderLinks) {
- encodeUrl(writer, parentsIt.next());
- while(parentsIt.hasNext()) {
- writer.writeText(separator, null);
- encodeUrl(writer, parentsIt.next());
- }
- } else {
- encodeSimple(writer, parentsIt.next());
- while(parentsIt.hasNext()) {
- writer.writeText(separator, null);
- encodeSimple(writer, parentsIt.next());
- }
- }
- }
- }
-
- private void encodeUrl(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
- encodePreName(writer, parent);
- writer.startElement("a", null);
- writer.writeAttribute("href", getUrl(parent), null);
- writer.writeText(parent.getName(), null);
- writer.endElement("a");
- encodePostName(writer, parent);
- }
-
- private void encodeSimple(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
- encodePreName(writer, parent);
- writer.writeText(parent.getName(), null);
- encodePostName(writer, parent);
- }
-
- private static String getUrl(DisambiguationReport.Resource parent) {
- return RESOURCE_URL + "?id=" + parent.getId();
- }
-
- private void encodePreName(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
- if (!parent.getType().isSingleton()) {
- writer.writeText(parent.getType().getName(), null);
- writer.writeText(" ", null);
- if (parent.getType().getPlugin() != null) {
- writer.writeText(" (", null);
- writer.writeText(parent.getType().getPlugin(), null);
- writer.writeText(" plugin) ", null);
- }
- }
- }
-
- private void encodePostName(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
- if (parent.getType().isSingleton() && parent.getType().getPlugin() != null) {
- writer.writeText(" (", null);
- writer.writeText(parent.getType().getPlugin(), null);
- writer.writeText(" plugin) ", null);
- }
- }
-}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
index 082425d..c52d2b9 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
@@ -44,8 +44,7 @@ import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.IntExtractor;
-import org.rhq.enterprise.gui.inventory.resource.ResourcePartialLineageComponent;
-import org.rhq.enterprise.gui.inventory.resource.ResourcePartialLineageRenderer;
+import org.rhq.enterprise.gui.inventory.resource.DisambiguatedResourceLineageComponent;
import org.rhq.enterprise.gui.legacy.Constants;
import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.gui.legacy.util.RequestUtils;
@@ -223,7 +222,7 @@ public class AddGroupResourcesFormPrepareAction extends Action {
StringBuilder bld = new StringBuilder(it.next().getName());
while (it.hasNext()) {
- bld.append(ResourcePartialLineageComponent.DEFAULT_SEPARATOR).append(it.next().getName());
+ bld.append(DisambiguatedResourceLineageComponent.DEFAULT_SEPARATOR).append(it.next().getName());
}
return bld.toString();
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-components/inventory-components.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-components/inventory-components.xml
index 2d20275..d8865f1 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-components/inventory-components.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/jsf-components/inventory-components.xml
@@ -15,15 +15,25 @@
</component>
<component>
- <component-type>org.jboss.on.ResourcePartialLineage</component-type>
- <component-class>org.rhq.enterprise.gui.inventory.resource.ResourcePartialLineageComponent</component-class>
+ <component-type>org.jboss.on.DisambiguatedResourceLineage</component-type>
+ <component-class>org.rhq.enterprise.gui.inventory.resource.DisambiguatedResourceLineageComponent</component-class>
<component-extension>
- <component-family>org.jboss.on.ResourcePartialLineage</component-family>
- <renderer-type>org.jboss.on.ResourcePartialLineage</renderer-type>
+ <component-family>org.jboss.on.DisambiguatedResourceLineage</component-family>
+ <renderer-type>org.jboss.on.DisambiguatedResourceLineage</renderer-type>
</component-extension>
</component>
+ <component>
+ <component-type>org.jboss.on.DisambiguatedResourceName</component-type>
+ <component-class>org.rhq.enterprise.gui.inventory.resource.DisambiguatedResourceNameComponent</component-class>
+
+ <component-extension>
+ <component-family>org.jboss.on.DisambiguatedResourceName</component-family>
+ <renderer-type>org.jboss.on.DisambiguatedResourceName</renderer-type>
+ </component-extension>
+ </component>
+
<render-kit>
<renderer>
<description>renderer for a ResourceLineage component</description>
@@ -32,10 +42,16 @@
<renderer-class>org.rhq.enterprise.gui.inventory.resource.ResourceLineageRenderer</renderer-class>
</renderer>
<renderer>
- <description>renderer for a ResourcePartialLineage component</description>
- <component-family>org.jboss.on.ResourcePartialLineage</component-family>
- <renderer-type>org.jboss.on.ResourcePartialLineage</renderer-type>
- <renderer-class>org.rhq.enterprise.gui.inventory.resource.ResourcePartialLineageRenderer</renderer-class>
+ <description>renderer for a DisambiguatedResourceLineage component</description>
+ <component-family>org.jboss.on.DisambiguatedResourceLineage</component-family>
+ <renderer-type>org.jboss.on.DisambiguatedResourceLineage</renderer-type>
+ <renderer-class>org.rhq.enterprise.gui.inventory.resource.DisambiguatedResourceLineageRenderer</renderer-class>
+ </renderer>
+ <renderer>
+ <description>renderer for a DisambiguatedResourceName component</description>
+ <component-family>org.jboss.on.DisambiguatedResourceName</component-family>
+ <renderer-type>org.jboss.on.DisambiguatedResourceName</renderer-type>
+ <renderer-class>org.rhq.enterprise.gui.inventory.resource.DisambiguatedResourceNameRenderer</renderer-class>
</renderer>
</render-kit>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tags/on.component.taglib.xml b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tags/on.component.taglib.xml
index 665299a..1f06adf 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tags/on.component.taglib.xml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/WEB-INF/tags/on.component.taglib.xml
@@ -97,10 +97,18 @@
</tag>
<tag>
- <tag-name>resourcePartialLineage</tag-name>
+ <tag-name>disambiguatedResourceLineage</tag-name>
<component>
- <component-type>org.jboss.on.ResourcePartialLineage</component-type>
- <renderer-type>org.jboss.on.ResourcePartialLineage</renderer-type>
+ <component-type>org.jboss.on.DisambiguatedResourceLineage</component-type>
+ <renderer-type>org.jboss.on.DisambiguatedResourceLineage</renderer-type>
+ </component>
+ </tag>
+
+ <tag>
+ <tag-name>disambiguatedResourceName</tag-name>
+ <component>
+ <component-type>org.jboss.on.DisambiguatedResourceName</component-type>
+ <renderer-type>org.jboss.on.DisambiguatedResourceName</renderer-type>
</component>
</tag>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menuitem.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menuitem.xhtml
index 3bbce89..eeedfee 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menuitem.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/common/menu/menuitem.xhtml
@@ -234,6 +234,9 @@ currentMenuItem - the org.rhq.enterprise.server.perspective.menuItem to render
<h:column>
<f:facet name="header">Resource</f:facet>
<h:outputText value="#{result.original.resource.name}" />
+ <onc:disambiguatedResourceName resourceName="#{result.original.resource.name}"
+ resourceId="#{result.original.resource.id}" disambiguationReport="#{result}"
+ nameAsLink="false" />
</h:column>
<h:column rendered="#{result.typeResolutionNeeded}">
<f:facet name="header">Type</f:facet>
@@ -241,7 +244,7 @@ currentMenuItem - the org.rhq.enterprise.server.perspective.menuItem to render
</h:column>
<h:column rendered="#{result.parentResolutionNeeded}">
<f:facet name="header">Parent</f:facet>
- <onc:resourcePartialLineage parents="#{result.parents}" renderLinks="false" />
+ <onc:disambiguatedResourceLineage parents="#{result.parents}" renderLinks="false" />
</h:column>
</rich:suggestionbox>
</h:panelGroup>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml
index 28edad0..347697e 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repo.xhtml
@@ -416,6 +416,8 @@
</onc:sortableColumnHeader>
</f:facet>
+ <onc:disambiguatedResourceName resourceName="#{resourceitem.original.name}"
+ resourceId="#{resourceitem.original.id}" disambiguationReport="#{resourceitem}" />
<h:outputLink value="#{onf:getDefaultResourceTabURL()}">
<f:param name="id" value="#{resourceitem.original.id}" />
<h:outputText value="#{resourceitem.original.name}" />
@@ -426,7 +428,7 @@
<f:facet name="header">
<h:outputText value="Parent" />
</f:facet>
- <onc:resourcePartialLineage parents="#{resourceitem.parents}"/>
+ <onc:disambiguatedResourceLineage parents="#{resourceitem.parents}"/>
</rich:column>
<rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repoSubscriptions.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repoSubscriptions.xhtml
index 2977cda..01d1a57 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repoSubscriptions.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/content/repoSubscriptions.xhtml
@@ -103,17 +103,15 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{resourceitem.original.id}"/>
- <h:outputText value="#{resourceitem.original.name}" />
- </h:outputLink>
+ <onc:disambiguatedResourceName resourceName="#{resourceitem.original.name}"
+ resourceId="#{resourceitem.original.id}" disambiguationReport="#{resourceitem}" />
</rich:column>
<rich:column>
<f:facet name="header">
<h:outputText value="Parent" />
</f:facet>
- <onc:resourcePartialLineage parents="#{resourceitem.parents}" />
+ <onc:disambiguatedResourceLineage parents="#{resourceitem.parents}" />
</rich:column>
<rich:column>
@@ -246,10 +244,8 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{availableitem.original.id}"/>
- <h:outputText value="#{availableitem.original.name}" />
- </h:outputLink>
+ <onc:disambiguatedResourceName resourceName="#{resourceitem.original.name}"
+ resourceId="#{resourceitem.original.id}" disambiguationReport="#{resourceitem}" />
</rich:column>
<rich:column>
@@ -257,7 +253,7 @@
<h:outputText value="Parent"/>
</f:facet>
- <onc:resourcePartialLineage parents="#{availableitem.parents}"/>
+ <onc:disambiguatedResourceLineage parents="#{availableitem.parents}"/>
</rich:column>
<rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/inventory/view.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/inventory/view.xhtml
index a7076f4..c189e92 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/inventory/view.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/inventory/view.xhtml
@@ -229,10 +229,8 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{resourceWithAvailability.original.resource.id}"/>
- <h:outputText value="#{resourceWithAvailability.original.resource.name}"/>
- </h:outputLink>
+ <onc:disambiguatedResourceName resourceName="#{resourceWithAvailability.original.resource.name}"
+ resourceId="#{resourceWithAvailability.original.resource.id}" disambiguationReport="#{resourceWithAvailability}" />
</rich:column>
<rich:column >
@@ -240,7 +238,7 @@
<h:outputText styleClass="headerText" value="Parent"/>
</f:facet>
- <onc:resourcePartialLineage parents="#{resourceWithAvailability.parents}" />
+ <onc:disambiguatedResourceLineage parents="#{resourceWithAvailability.parents}" />
</rich:column>
<rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/summary.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/summary.xhtml
index 9f132c8..c4969a8 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/summary.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/group/layout/summary.xhtml
@@ -179,10 +179,8 @@ groupId - the group id of the Group being accessed
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{resourceWithAvailability.original.resource.id}"/>
- <h:outputText value="#{resourceWithAvailability.original.resource.name}"/>
- </h:outputLink>
+ <onc:disambiguatedResourceName resourceName="#{resourceWithAvailability.original.resource.name}"
+ resourceId="#{resourceWithAvailability.original.resource.id}" disambiguationReport="#{resourceWithAvailability}" />
</rich:column>
<rich:column>
@@ -190,7 +188,7 @@ groupId - the group id of the Group being accessed
<h:outputText styleClass="headerText" value="Parent"/>
</f:facet>
- <onc:resourcePartialLineage parents="#{resourceWithAvailability.parents}"/>
+ <onc:disambiguatedResourceLineage parents="#{resourceWithAvailability.parents}"/>
</rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
index b1c3495..a112891 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
@@ -130,26 +130,8 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputText value="#{item.resourceType.singleton ? '' : item.resourceType.name}" />
- <h:outputText value="#{item.resourceType.singleton ? '' : ' '}" />
- <h:outputText value="#{not item.resourceType.singleton and item.resourceType.plugin != null ? '(' : ''}" />
- <h:outputText value="#{not item.resourceType.singleton and item.resourceType.plugin != null ? item.resourceType.plugin : ''}" />
- <h:outputText value="#{not item.resourceType.singleton and item.resourceType.plugin != null ? ' plugin) ' : ''}" />
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{item.original.resource.id}" />
- <!--
- <h:outputText value="#{item.original.resource.name}" />
- <h:outputText value="#{item.resourceType.singleton ? '' : ' ('}" />
- <h:outputText value="#{item.resourceType.singleton ? '' : item.original.resource.resourceType.name}" />
- <h:outputText value="#{not item.resourceType.singleton and browseResourcesDataModel.currentPageNeedsPluginResolution ? ', plugin ' : ''}" />
- <h:outputText value="#{not item.resourceType.singleton and browseResourcesDataModel.currentPageNeedsPluginResolution ? item.resourceType.plugin : ''}" />
- <h:outputText value="#{item.resourceType.singleton ? '' : ')'}" />
- -->
- <h:outputText value="#{item.original.resource.name}" />
- </h:outputLink>
- <h:outputText value="#{item.resourceType.singleton and item.resourceType.plugin != null ? ' (' : ''}" />
- <h:outputText value="#{item.resourceType.singleton and item.resourceType.plugin != null ? item.resourceType.plugin : ''}" />
- <h:outputText value="#{item.resourceType.singleton and item.resourceType.plugin != null ? ' plugin)' : ''}" />
+ <onc:disambiguatedResourceName resourceName="#{item.original.resource.name}"
+ resourceId="#{item.original.resource.id}" disambiguationReport="#{item}"/>
</rich:column>
<!--
<rich:column>
@@ -167,7 +149,7 @@
<h:outputText styleClass="headerText" value="Location" />
</f:facet>
- <onc:resourcePartialLineage parents="#{item.parents}" renderLinks="true"/>
+ <onc:disambiguatedResourceLineage parents="#{item.parents}" renderLinks="true"/>
</rich:column>
<rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/resourcePicker.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/resourcePicker.xhtml
index 6e46aff..287e571 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/resourcePicker.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/resourcePicker.xhtml
@@ -98,7 +98,9 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputText value="#{item.original.resource.name}" />
+ <onc:disambiguatedResourceName resourceName="#{item.original.resource.name}"
+ resourceId="#{item.original.resource.id}" disambiguationReport="#{item}"
+ nameAsLink="false" />
</rich:column>
<rich:column>
@@ -106,7 +108,7 @@
<h:outputText styleClass="headerText" value="Parent" />
</f:facet>
- <onc:resourcePartialLineage parents="#{item.parents}" renderLinks="false"/>
+ <onc:disambiguatedResourceLineage parents="#{item.parents}" renderLinks="false"/>
</rich:column>
<rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertDefinitions.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertDefinitions.xhtml
index 863357b..bf85748 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertDefinitions.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertDefinitions.xhtml
@@ -100,10 +100,8 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{item.original.alertDefinition.resource.id}" />
- <h:outputText value="#{item.original.alertDefinition.resource.name}" />
- </h:outputLink>
+ <onc:disambiguatedResourceName resourceName="#{item.original.alertDefinition.resource.name}"
+ resourceId="#{item.original.alertDefinition.resource.id}" disambiguationReport="#{item}"/>
</rich:column>
<rich:column>
@@ -111,7 +109,7 @@
<h:outputText styleClass="headerText" value="Parent" />
</f:facet>
- <onc:resourcePartialLineage parents="#{item.parents}"/>
+ <onc:disambiguatedResourceLineage parents="#{item.parents}"/>
</rich:column>
<rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml
index f2ca8fd..e97f9fc 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/alertHistory.xhtml
@@ -100,10 +100,8 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{item.original.alert.alertDefinition.resource.id}" />
- <h:outputText value="#{item.original.alert.alertDefinition.resource.name}" />
- </h:outputLink>
+ <onc:disambiguatedResourceName resourceName="#{item.original.alert.alertDefinition.resource.name}"
+ resourceId="#{item.original.alert.alertDefinition.resource.id}" disambiguationReport="#{item}"/>
</rich:column>
<rich:column>
@@ -111,7 +109,7 @@
<h:outputText styleClass="headerText" value="Parent" />
</f:facet>
- <onc:resourcePartialLineage parents="#{item.parents}"/>
+ <onc:disambiguatedResourceLineage parents="#{item.parents}"/>
</rich:column>
<rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/configurationUpdate.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/configurationUpdate.xhtml
index a07d657..1de7009 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/configurationUpdate.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/configurationUpdate.xhtml
@@ -91,10 +91,8 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{item.original.resourceId}" />
- <h:outputText value="#{item.original.resourceName}" />
- </h:outputLink>
+ <onc:disambiguatedResourceName resourceName="#{item.original.resourceName}"
+ resourceId="#{item.original.resourceId}" disambiguationReport="#{item}"/>
</rich:column>
<rich:column>
@@ -102,7 +100,7 @@
<h:outputText styleClass="headerText" value="Parent" />
</f:facet>
- <onc:resourcePartialLineage parents="#{item.parents}" />
+ <onc:disambiguatedResourceLineage parents="#{item.parents}" />
</rich:column>
<rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/oobHistory.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/oobHistory.xhtml
index a7cebd5..8559c91 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/oobHistory.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/oobHistory.xhtml
@@ -96,10 +96,8 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{item.original.resourceId}" />
- <h:outputText value="#{item.original.resourceName}" />
- </h:outputLink>
+ <onc:disambiguatedResourceName resourceName="#{item.original.resourceName}"
+ resourceId="#{item.original.resourceId}" disambiguationReport="#{item}"/>
</rich:column>
<rich:column>
@@ -107,7 +105,7 @@
<h:outputText styleClass="headerText" value="Parent" />
</f:facet>
- <onc:resourcePartialLineage parents="#{item.parents}"/>
+ <onc:disambiguatedResourceLineage parents="#{item.parents}"/>
</rich:column>
<rich:column>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/operationHistory.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/operationHistory.xhtml
index 302037d..0259872 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/operationHistory.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/subsystem/operationHistory.xhtml
@@ -91,10 +91,8 @@
</onc:sortableColumnHeader>
</f:facet>
- <h:outputLink value="#{onf:getDefaultResourceTabURL()}">
- <f:param name="id" value="#{item.original.history.resource.id}" />
- <h:outputText value="#{item.original.history.resource.name}" />
- </h:outputLink>
+ <onc:disambiguatedResourceName resourceName="#{item.original.history.resource.name}"
+ resourceId="#{item.original.history.resource.id}" disambiguationReport="#{item}"/>
</rich:column>
<rich:column>
@@ -102,7 +100,7 @@
<h:outputText styleClass="headerText" value="Parent" />
</f:facet>
- <onc:resourcePartialLineage parents="#{item.parents}" />
+ <onc:disambiguatedResourceLineage parents="#{item.parents}" />
</rich:column>
<rich:column>
commit 8de71a4dcd50f65586ebc2d3bc400b0055265496
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue May 11 21:39:51 2010 +0200
Moving stuff around to make more sense + making the DisambiguationUpdatePolicy an interface to allow for new impls.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
index f7b2381..ed96aa5 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
@@ -862,89 +862,8 @@ public class Resource implements Comparable<Resource>, Serializable {
public static final String QUERY_RESOURCE_REPORT = "Resource.findResourceReport";
public static final String QUERY_RESOURCE_VERSION_REPORT = "Resource.findResourceVersionReport";
- public static final int MAX_SUPPORTED_RESOURCE_HIERARCHY_DEPTH = 7;
-
- private static final String NAME_CONCAT_SEPARATOR = "~!@#)))";
-
private static final int UUID_LENGTH = 36;
- /**
- * Helper for {@link #NATIVE_QUERY_FIND_DISAMBIGUATION_LEVEL}.
- * We need to guard against concatenation with a NULL value which
- * would yield a NULL result. We don't want that in that query, otherwise
- * we'd get skewed results for combination of resources on different
- * levels in the resource hierarchy.
- *
- * @param column
- * @return
- */
- private static String guardNullCase(String column) {
- return "(CASE WHEN " + column + " IS NULL THEN 'null' ELSE " + column + " END)";
- }
-
- /**
- * We're trying to find the minimum ancestry level that provides the disambiguate paths
- * (in terms of unique resource names) for given resources. Obviously this query only works
- * for hierarchies at most 7 levels deep (as the rest of the named queries above).
- *
- * <ul>
- * <li>target_cnt gives us the number of resources we're trying to disambiguate.
- * <li>l1_cnt gives us the number of resources with unique names,
- * <li>l2_cnt gives us the number of resources with unique names with the names of the parent taken into account,
- * <li>l3_cnt is the number of resource with unique names when parent and grandparent are included, etc.
- * </ul>
- *
- * So when the caller gets the result row of this query, s/he can reason as follows:
- * <ul>
- * <li>l1_cnt = target_cnt: the names of the resources are unique in the given set
- * <li>l2_cnt = target_cnt: the names + parent names are unique
- * <li>...
- * </ul>
- *
- * we need to do the concatenation of names instead of doing a DISTINCT over
- * more columns because (at least in Postgres) a set of columns doesn't define
- * equality operator to be used in the COUNT aggregate.
- * Thus we need to add the "unlikely separator" hack.
- *
- * This query has to be native because Hibernate doesn't understand the
- * COUNT(DISTINCT ...)) where ... is anything else than a path to a property in Hibernate terminology.
- */
- public static final String NATIVE_QUERY_FIND_DISAMBIGUATION_LEVEL = "" //
- + "SELECT COUNT(r.ID) AS target_cnt, " //
- + "COUNT(DISTINCT(t.name)) AS bare_type_cnt," //
- + "COUNT(DISTINCT(t.name || '" + NAME_CONCAT_SEPARATOR + "' || t.plugin)) AS full_type_cnt," //
- + "COUNT(DISTINCT(r.name)) AS l1_cnt," //
- + "COUNT(DISTINCT(r.name || '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p1.name") + ")) AS l2_cnt," //
- + "COUNT(DISTINCT(r.name || '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p1.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p2.name") + ")) AS l3_cnt," //
- + "COUNT(DISTINCT(r.name || '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p1.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p2.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p3.name") + ")) AS l4_cnt," //
- + "COUNT(DISTINCT(r.name || '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p1.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p2.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p3.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p4.name") + ")) AS l5_cnt," //
- + "COUNT(DISTINCT(r.name || '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p1.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p2.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p3.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p4.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p5.name") + ")) AS l6_cnt," //
- + "COUNT(DISTINCT(r.name || '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p1.name") //
- + "|| " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p2.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p3.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p4.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p5.name") //
- + " || " + " '" + NAME_CONCAT_SEPARATOR + "' || " + guardNullCase("p6.name") + ")) AS l7_cnt " //
- + "FROM " + TABLE_NAME + " r " //
- + "JOIN " + ResourceType.TABLE_NAME + " t ON r.RESOURCE_TYPE_ID = t.ID " //
- + "LEFT OUTER JOIN " + TABLE_NAME + " p1 ON r.PARENT_RESOURCE_ID = p1.ID " //
- + "LEFT OUTER JOIN " + TABLE_NAME + " p2 ON p1.PARENT_RESOURCE_ID = p2.ID " //
- + "LEFT OUTER JOIN " + TABLE_NAME + " p3 ON p2.PARENT_RESOURCE_ID = p3.ID " //
- + "LEFT OUTER JOIN " + TABLE_NAME + " p4 ON p3.PARENT_RESOURCE_ID = p4.ID " //
- + "LEFT OUTER JOIN " + TABLE_NAME + " p5 ON p4.PARENT_RESOURCE_ID = p5.ID " //
- + "LEFT OUTER JOIN " + TABLE_NAME + " p6 ON p5.PARENT_RESOURCE_ID = p6.ID " //
- + "WHERE r.ID IN (@@RESOURCE_IDS@@)";
-
private static final long serialVersionUID = 1L;
public static final Resource ROOT = null;
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index d04e6cd..dbc0ffd 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -124,7 +124,7 @@ import org.rhq.enterprise.server.operation.OperationManagerLocal;
import org.rhq.enterprise.server.resource.disambiguation.DisambiguationPolicy;
import org.rhq.enterprise.server.resource.disambiguation.Disambiguator;
import org.rhq.enterprise.server.resource.disambiguation.MutableDisambiguationReport;
-import org.rhq.enterprise.server.resource.disambiguation.DisambiguationUpdateStrategy;
+import org.rhq.enterprise.server.resource.disambiguation.DefaultDisambiguationUpdateStrategies;
import org.rhq.enterprise.server.resource.disambiguation.ReportPartitions;
import org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
@@ -2106,8 +2106,8 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
public <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, boolean alwaysIncludeParent,
IntExtractor<? super T> extractor) {
//TODO the alwaysIncludeParents is obsolete and ignored
- //DisambiguationUpdateStrategy strategy = DisambiguationUpdateStrategy.KEEP_PARENTS_TO_TOPMOST_SERVERS;
- DisambiguationUpdateStrategy strategy = DisambiguationUpdateStrategy.KEEP_ALL_PARENTS;
+ //DefaultDisambiguationUpdateStrategies strategy = DefaultDisambiguationUpdateStrategies.KEEP_PARENTS_TO_TOPMOST_SERVERS;
+ DefaultDisambiguationUpdateStrategies strategy = DefaultDisambiguationUpdateStrategies.KEEP_ALL_PARENTS;
return Disambiguator.disambiguate(results, strategy, extractor, entityManager);
}
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DefaultDisambiguationUpdateStrategies.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DefaultDisambiguationUpdateStrategies.java
new file mode 100644
index 0000000..c5553e3
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DefaultDisambiguationUpdateStrategies.java
@@ -0,0 +1,183 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.server.resource.disambiguation;
+
+import java.util.EnumSet;
+
+import org.rhq.enterprise.server.resource.disambiguation.MutableDisambiguationReport.Resource;
+
+/**
+ * This enumerates different strategies that can be used to update the results to produce disambiguated list.
+ *
+ * @author Lukas Krejci
+ */
+public enum DefaultDisambiguationUpdateStrategies implements DisambiguationUpdateStrategy {
+
+ /**
+ * The disambiguation policy is followed precisely.
+ */
+ EXACT {
+ public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
+ updateResources(policy, report);
+ int nofParents = policy.size() - 1;
+ if (nofParents < 0)
+ nofParents = 0;
+
+ if (nofParents == 0) {
+ report.parents.clear();
+ } else {
+ while (report.parents.size() > nofParents) {
+ report.parents.remove(report.parents.size() - 1);
+ }
+ }
+ }
+ },
+
+ /**
+ * Even if the disambiguation policy determined that parents are not needed to disambiguate the
+ * results, at least one of them is kept in the report.
+ */
+ KEEP_AT_LEAST_ONE_PARENT {
+ public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
+ updateResources(policy, report);
+ int nofParents = policy.size() - 1;
+ if (nofParents < 1)
+ nofParents = 1;
+
+ while (report.parents.size() > nofParents) {
+ report.parents.remove(report.parents.size() - 1);
+ }
+ }
+
+ @Override
+ public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
+ return EnumSet.allOf(ResourceResolution.class);
+ }
+ },
+
+ /**
+ * The parentage of the report is retained at least up to the server/service directly under platform.
+ * If the policy needs the platform to stay, it is of course preserved.
+ */
+ KEEP_PARENTS_TO_TOPMOST_SERVERS {
+ public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
+ updateResources(policy, report);
+ //only remove the platform, if the policy doesn't dictate its presence...
+ if (policy.size() > 1 && report.parents.size() > policy.size() - 1) {
+ report.parents.remove(report.parents.size() - 1);
+ }
+ }
+
+ @Override
+ public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
+ return EnumSet.allOf(ResourceResolution.class);
+ }
+ },
+
+ /**
+ * All parents are preserved no matter what the policy says.
+ */
+ KEEP_ALL_PARENTS {
+ public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
+ updateResources(policy, report);
+ //do nothing to the parents, keep them as they are...
+ }
+
+ @Override
+ public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
+ return EnumSet.allOf(ResourceResolution.class);
+ }
+ };
+
+ /**
+ * This updates the resources in the report according to the resolutions contained in the policy.
+ * This method is called as part of the {@link DisambiguationUpdateStrategy#update(DisambiguationPolicy, MutableDisambiguationReport)}
+ * implementations in this enum before the individual enums modify the parent list as they see fit.
+ * This method is left public because it is generic enough to be reused by other potential implementations of the
+ * {@link DisambiguationUpdateStrategy} interface.
+ *
+ * @param <T>
+ * @param policy
+ * @param report
+ */
+ public static <T> void updateResources(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
+ updateResource(policy.get(0), report.resource);
+
+ int disambiguationPolicyIndex = 1;
+ while (disambiguationPolicyIndex < policy.size() && disambiguationPolicyIndex - 1 < report.parents.size()) {
+ ResourceResolution parentResolution = policy.get(disambiguationPolicyIndex);
+ MutableDisambiguationReport.Resource parent = report.parents.get(disambiguationPolicyIndex - 1);
+ updateResource(parentResolution, parent);
+
+ disambiguationPolicyIndex++;
+ }
+
+ disambiguationPolicyIndex--;
+
+ //because the parents update strategy might leave more parents than this policy requires for disambiguation
+ //we need to treat those parents as well. Because they are not needed for disambiguation, treat them as
+ //if only the name and type was needed for them.
+ for (; disambiguationPolicyIndex < report.parents.size(); ++disambiguationPolicyIndex) {
+ updateResource(ResourceResolution.TYPE, report.parents.get(disambiguationPolicyIndex));
+ }
+
+ //don't replicate the plugin information on the parents if it was reported
+ //on the resource already.
+ //this has to be done on all the parents, not just the ones that are immediately needed
+ //for disambiguation. The parents update strategies might leave more parents than those needed.
+ if (policy.get(0) == ResourceResolution.PLUGIN) {
+ for (MutableDisambiguationReport.Resource parent : report.parents) {
+ if (report.resource.resourceType.plugin.equals(parent.resourceType.plugin)) {
+
+ parent.resourceType.plugin = null;
+ }
+ }
+ }
+ }
+
+ /**
+ * @return a set of resolutions for which the unique reports need to be repartitioned at the resource level.
+ * In another words this forces the disambiguation to continue on up the disambiguation chain even if the
+ * it disambiguates the resuts successfully at the resource level.
+ */
+ public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
+ return EnumSet.noneOf(ResourceResolution.class);
+ }
+
+ /**
+ * @return a set of resolutions for which uniquely disambiguated reports are to be repartitioned further.
+ * The resolutions from this set apply on the parents (on any level), unlike the resolutions from {@link #resourceLevelRepartitionableResolutions()}.
+ */
+ public EnumSet<ResourceResolution> alwaysRepartitionableResolutions() {
+ return EnumSet.noneOf(ResourceResolution.class);
+ }
+
+
+ private static void updateResource(ResourceResolution resolution, Resource resource) {
+ switch (resolution) {
+ case NAME: case TYPE:
+ resource.resourceType.plugin = null;
+ }
+ }
+}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java
index 39c7f92..d4ce232 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java
@@ -150,44 +150,6 @@ public class DisambiguationPolicy extends ArrayList<ResourceResolution> {
return null;
}
- public <T> void update(MutableDisambiguationReport<T> report) {
- ResourceResolution resourceResolution = this.get(0);
- resourceResolution.update(report.resource);
-
- int disambiguationPolicyIndex = 1;
- while (disambiguationPolicyIndex < this.size() && disambiguationPolicyIndex - 1 < report.parents.size()) {
- ResourceResolution parentResolution = this.get(disambiguationPolicyIndex);
- MutableDisambiguationReport.Resource parent = report.parents.get(disambiguationPolicyIndex - 1);
- parentResolution.update(parent);
-
- disambiguationPolicyIndex++;
- }
-
- disambiguationPolicyIndex--;
-
- //because the parents update strategy might leave more parents than this policy requires for disambiguation
- //we need to treat those parents as well. Because they are not needed for disambiguation, treat them as
- //if only the name and type was needed for them.
- for (; disambiguationPolicyIndex < report.parents.size(); ++disambiguationPolicyIndex) {
- ResourceResolution.TYPE.update(report.parents.get(disambiguationPolicyIndex));
- }
-
- //don't replicate the plugin information on the parents if it was reported
- //on the resource already.
- //this has to be done on all the parents, not just the ones that are immediately needed
- //for disambiguation. The parents update strategies might leave more parents than those needed.
- if (resourceResolution == ResourceResolution.PLUGIN) {
- for (MutableDisambiguationReport.Resource parent : report.parents) {
- if (report.resource.resourceType.plugin.equals(parent.resourceType.plugin)) {
-
- parent.resourceType.plugin = null;
- }
- }
- }
-
- parentsUpdateStrategy.update(this, report);
- }
-
private <T> MutableDisambiguationReport.Resource getComparingResource(MutableDisambiguationReport<T> report) {
int size = size();
if (size == 0)
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java
index 03b046a..c2a11a6 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java
@@ -26,107 +26,36 @@ package org.rhq.enterprise.server.resource.disambiguation;
import java.util.EnumSet;
/**
- * This enumerates different strategies that can be used to update the results to produce disambiguated list.
+ * Defines a strategy for updating a results list with the disambiguation information.
*
* @author Lukas Krejci
*/
-public enum DisambiguationUpdateStrategy {
+public interface DisambiguationUpdateStrategy {
/**
- * The disambiguation policy is followed precisely.
- */
- EXACT {
- public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
- int nofParents = policy.size() - 1;
- if (nofParents < 0)
- nofParents = 0;
-
- if (nofParents == 0) {
- report.parents.clear();
- } else {
- while (report.parents.size() > nofParents) {
- report.parents.remove(report.parents.size() - 1);
- }
- }
- }
- },
-
- /**
- * Even if the disambiguation policy determined that parents are not needed to disambiguate the
- * results, at least one of them is kept in the report.
- */
- KEEP_AT_LEAST_ONE_PARENT {
- public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
- int nofParents = policy.size() - 1;
- if (nofParents < 1)
- nofParents = 1;
-
- while (report.parents.size() > nofParents) {
- report.parents.remove(report.parents.size() - 1);
- }
- }
-
- @Override
- public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
- return EnumSet.allOf(ResourceResolution.class);
- }
- },
-
- /**
- * The parentage of the report is retained at least up to the server/service directly under platform.
- * If the policy needs the platform to stay, it is of course preserved.
- */
- KEEP_PARENTS_TO_TOPMOST_SERVERS {
- public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
- //only remove the platform, if the policy doesn't dictate its presence...
- if (policy.size() > 1 && report.parents.size() > policy.size() - 1) {
- report.parents.remove(report.parents.size() - 1);
- }
- }
-
- @Override
- public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
- return EnumSet.allOf(ResourceResolution.class);
- }
- },
-
- /**
- * All parents are preserved no matter what the policy says.
- */
- KEEP_ALL_PARENTS {
- public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
- //do nothing to the parents, keep them as they are...
- }
-
- @Override
- public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
- return EnumSet.allOf(ResourceResolution.class);
- }
- };
-
- /**
- * Updates the report using the policy.
+ * Updates the report using the policy. It is guaranteed that the resource and its parents
+ * in the report are already processed using the
+ * {@link ResourceResolution#update(MutableDisambiguationReport.Resource)}
+ * method. This method is then called to ensure that the report as a whole conforms to the policy *and* this
+ * strategy. This might entail removing some elements from the parent list for example.
*
* @param <T>
* @param policy
* @param report
*/
- public abstract <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report);
+ <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report);
/**
* @return a set of resolutions for which the unique reports need to be repartitioned at the resource level.
* In another words this forces the disambiguation to continue on up the disambiguation chain even if the
* it disambiguates the resuts successfully at the resource level.
*/
- public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
- return EnumSet.noneOf(ResourceResolution.class);
- }
+ EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions();
/**
* @return a set of resolutions for which uniquely disambiguated reports are to be repartitioned further.
* The resolutions from this set apply on the parents (on any level), unlike the resolutions from {@link #resourceLevelRepartitionableResolutions()}.
*/
- public EnumSet<ResourceResolution> alwaysRepartitionableResolutions() {
- return EnumSet.noneOf(ResourceResolution.class);
- }
-}
\ No newline at end of file
+ EnumSet<ResourceResolution> alwaysRepartitionableResolutions();
+
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
index 2390a69..42d62f2 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
@@ -45,11 +45,11 @@ import org.rhq.core.util.IntExtractor;
public class Disambiguator {
public static final int MAXIMUM_DISAMBIGUATED_TREE_DEPTH = 7;
-
+
private Disambiguator() {
-
+
}
-
+
/**
* Given a list of results, this method produces an object decorates the provided original results
* with data needed to disambiguate the results with respect to resource names, their types and ancestory.
@@ -67,13 +67,14 @@ public class Disambiguator {
*
* @param <T> the type of the result elements
* @param results the results to disambiguate
- * @param parentsDisambiguationStrategy how are the parents going to be disambiguated
+ * @param disambiguationUpdateStrategy how is the disambiguation info going to be applied to the results.
* @param resourceIdExtractor an object able to extract resource id from an instance of type parameter.
* @param entityManager an entityManager to be used to access the database
* @return the disambiguation result or null on error
*/
- public static <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, DisambiguationUpdateStrategy parentsDisambiguationStrategy,
- IntExtractor<? super T> extractor, EntityManager entityManager) {
+ public static <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results,
+ DisambiguationUpdateStrategy disambiguationUpdateStrategy, IntExtractor<? super T> extractor,
+ EntityManager entityManager) {
if (results.isEmpty()) {
return new ResourceNamesDisambiguationResult<T>(new ArrayList<DisambiguationReport<T>>(), false, false,
@@ -124,7 +125,7 @@ public class Disambiguator {
selectBuilder.append(", rt").append(i).append(".name");
selectBuilder.append(", rt").append(i).append(".plugin");
selectBuilder.append(", rt").append(i).append(".singleton");
-
+
fromBuilder.append(" left join r").append(pi).append(".parentResource r").append(i);
fromBuilder.append(" left join r").append(i).append(".resourceType rt").append(i);
}
@@ -140,31 +141,33 @@ public class Disambiguator {
//I will partition the resulting reports by resource name.to create groups of
//resources that are "mutually ambiguous". Because each such group potenitally
//requires different level of disambiguation, I will then process them individually.
-
- ReportPartitions<T> partitionedReports = new ReportPartitions<T>(DisambiguationPolicy.getUniqueNamePolicy(parentsDisambiguationStrategy));
-
+
+ ReportPartitions<T> partitionedReports = new ReportPartitions<T>(DisambiguationPolicy
+ .getUniqueNamePolicy(disambiguationUpdateStrategy));
+
@SuppressWarnings("unchecked")
List<Object[]> parentsResults = (List<Object[]>) parentsQuery.getResultList();
for (Object[] parentsResult : parentsResults) {
- List<MutableDisambiguationReport.Resource> parents = new ArrayList<MutableDisambiguationReport.Resource>(MAXIMUM_DISAMBIGUATED_TREE_DEPTH);
+ List<MutableDisambiguationReport.Resource> parents = new ArrayList<MutableDisambiguationReport.Resource>(
+ MAXIMUM_DISAMBIGUATED_TREE_DEPTH);
Integer resourceId = (Integer) parentsResult[0];
String resourceName = (String) parentsResult[1];
Integer typeId = (Integer) parentsResult[2];
String typeName = (String) parentsResult[3];
String pluginName = (String) parentsResult[4];
Boolean singleton = (Boolean) parentsResult[5];
-
+
MutableDisambiguationReport.ResourceType resourceType = new MutableDisambiguationReport.ResourceType();
resourceType.id = typeId;
resourceType.name = typeName;
resourceType.plugin = pluginName;
resourceType.singleton = singleton;
-
+
MutableDisambiguationReport.Resource resource = new MutableDisambiguationReport.Resource();
resource.id = resourceId;
resource.name = resourceName;
resource.resourceType = resourceType;
-
+
for (int i = 0; i < MAXIMUM_DISAMBIGUATED_TREE_DEPTH; ++i) {
Integer parentId = (Integer) parentsResult[6 + 6 * i];
if (parentId == null)
@@ -174,18 +177,18 @@ public class Disambiguator {
String parentType = (String) parentsResult[6 + 6 * i + 3];
String parentPlugin = (String) parentsResult[6 + 6 * i + 4];
Boolean parentSingleton = (Boolean) parentsResult[6 + 6 * i + 5];
-
+
MutableDisambiguationReport.ResourceType type = new MutableDisambiguationReport.ResourceType();
type.id = parentTypeId;
type.name = parentType;
type.plugin = parentPlugin;
type.singleton = parentSingleton;
-
+
MutableDisambiguationReport.Resource parent = new MutableDisambiguationReport.Resource();
parent.id = parentId;
parent.name = parentName;
parent.resourceType = type;
-
+
parents.add(parent);
}
@@ -193,68 +196,45 @@ public class Disambiguator {
for (MutableDisambiguationReport<T> report : reportsByResourceId.get(resourceId)) {
report.resource = resource;
report.parents = parents;
-
+
partitionedReports.put(report);
}
}
-
+
//ok, now I have the reports partitioned by resource name. let's go through each partition
//and figure out the disambiguation needed for it.
-
+
List<ReportPartitions<T>> ambiguousSubPartitions = new ArrayList<ReportPartitions<T>>();
-
+
if (!partitionedReports.isPartitionsUnique()) {
ambiguousSubPartitions.add(partitionedReports);
} else {
- ReportPartitions<T> repartition = partitionedReports.updateUniqueReports();
- while (repartition != null) {
- if(!repartition.isPartitionsUnique()) {
- ambiguousSubPartitions.add(repartition);
- repartition = null;
- } else {
- repartition = repartition.updateUniqueReports();
- }
- }
+ repartitionUnique(partitionedReports, disambiguationUpdateStrategy, ambiguousSubPartitions);
}
-
+
while (ambiguousSubPartitions.size() > 0) {
Iterator<ReportPartitions<T>> subPartitionIterator = ambiguousSubPartitions.iterator();
List<ReportPartitions<T>> newAmbiguousPartitions = new ArrayList<ReportPartitions<T>>();
-
- while(subPartitionIterator.hasNext()) {
+
+ while (subPartitionIterator.hasNext()) {
ReportPartitions<T> subPartition = subPartitionIterator.next();
- ReportPartitions<T> repartition = subPartition.updateUniqueReports();
- while (repartition != null) {
- if(!repartition.isPartitionsUnique()) {
- newAmbiguousPartitions.add(repartition);
- repartition = null;
- } else {
- repartition = repartition.updateUniqueReports();
- }
- }
-
- for(List<MutableDisambiguationReport<T>> partitionReports : subPartition.getAmbiguousPartitions()) {
- ReportPartitions<T> replacementSubpartition = new ReportPartitions<T>(subPartition.getDisambiguationPolicy().getNext());
+ repartitionUnique(subPartition, disambiguationUpdateStrategy, newAmbiguousPartitions);
+
+ for (List<MutableDisambiguationReport<T>> partitionReports : subPartition.getAmbiguousPartitions()) {
+ ReportPartitions<T> replacementSubpartition = new ReportPartitions<T>(subPartition
+ .getDisambiguationPolicy().getNext());
replacementSubpartition.putAll(partitionReports);
if (!replacementSubpartition.isPartitionsUnique()) {
newAmbiguousPartitions.add(replacementSubpartition);
} else {
- repartition = replacementSubpartition.updateUniqueReports();
- while (repartition != null) {
- if(!repartition.isPartitionsUnique()) {
- newAmbiguousPartitions.add(repartition);
- repartition = null;
- } else {
- repartition = repartition.updateUniqueReports();
- }
- }
+ repartitionUnique(replacementSubpartition, disambiguationUpdateStrategy, newAmbiguousPartitions);
}
}
subPartitionIterator.remove();
}
-
- for(ReportPartitions<T> newPartition : newAmbiguousPartitions) {
+
+ for (ReportPartitions<T> newPartition : newAmbiguousPartitions) {
ambiguousSubPartitions.add(newPartition);
}
}
@@ -267,6 +247,34 @@ public class Disambiguator {
}
return new ResourceNamesDisambiguationResult<T>(resolution, typeResolutionNeeded, parentResolutionNeeded,
- pluginResolutionNeeded);
+ pluginResolutionNeeded);
+ }
+
+ private static <T> void repartitionUnique(ReportPartitions<T> partitions, DisambiguationUpdateStrategy updateStrategy, List<ReportPartitions<T>> ambigousPartitions) {
+
+ while (true) {
+ //try to repartition
+ DisambiguationPolicy repartitionPolicy = partitions.getDisambiguationPolicy().getNextRepartitioningPolicy();
+ if (repartitionPolicy != null) {
+ //ok, we have a new policy to try... let's see if it makes any difference.
+ partitions = new ReportPartitions<T>(repartitionPolicy, partitions.getUniquePartitions());
+
+ //bail out if we have partitions that are not unique
+ if (!partitions.isPartitionsUnique()) {
+ ambigousPartitions.add(partitions);
+ return;
+ }
+ } else {
+ //ok, there is no other repartitioning policy that we can try.
+ //Let's update the reports in the unique partitions...
+ for (List<MutableDisambiguationReport<T>> partition : partitions.getUniquePartitions()) {
+ for (MutableDisambiguationReport<T> report : partition) {
+ updateStrategy.update(partitions.getDisambiguationPolicy(), report);
+ }
+ }
+
+ return;
+ }
+ }
}
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java
index ba24e29..8fbb9ab 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java
@@ -24,9 +24,8 @@
package org.rhq.enterprise.server.resource.disambiguation;
import java.util.ArrayList;
-import java.util.HashMap;
+import java.util.Collections;
import java.util.List;
-import java.util.Map;
/**
* This class partitions the reports inserted into it by chunking them up
@@ -41,18 +40,30 @@ public class ReportPartitions<T> {
private static final long serialVersionUID = 1L;
private DisambiguationPolicy disambiguationPolicy;
- private Map<Integer, List<MutableDisambiguationReport<T>>> partitions;
+ private List<List<MutableDisambiguationReport<T>>> partitions;
/**
- * @see MutableDisambiguationReport#getComparisonForLevel(int)
+ * Constructs a new instance with no partitions in it.
*
- * @param comparisonLevel
+ * @param disambiguationPolicy the policy that decides if reports are ambiguous.
*/
public ReportPartitions(DisambiguationPolicy disambiguationPolicy) {
this.disambiguationPolicy = disambiguationPolicy;
- partitions = new HashMap<Integer, List<MutableDisambiguationReport<T>>>();
+ partitions = new ArrayList<List<MutableDisambiguationReport<T>>>();
}
+ public ReportPartitions(DisambiguationPolicy disambiguationPolicy, ReportPartitions<T> other) {
+ this(disambiguationPolicy);
+ putAll(other);
+ }
+
+ public ReportPartitions(DisambiguationPolicy disambiguationPolicy, List<List<MutableDisambiguationReport<T>>> partitions) {
+ this(disambiguationPolicy);
+ for(List<MutableDisambiguationReport<T>> partition : partitions) {
+ putAll(partition);
+ }
+ }
+
public DisambiguationPolicy getDisambiguationPolicy() {
return disambiguationPolicy;
}
@@ -60,7 +71,7 @@ public class ReportPartitions<T> {
public List<List<MutableDisambiguationReport<T>>> getAmbiguousPartitions() {
List<List<MutableDisambiguationReport<T>>> ret = new ArrayList<List<MutableDisambiguationReport<T>>>();
- for (List<MutableDisambiguationReport<T>> partition : partitions.values()) {
+ for (List<MutableDisambiguationReport<T>> partition : partitions) {
if (partition.size() > 1) {
ret.add(partition);
}
@@ -72,7 +83,7 @@ public class ReportPartitions<T> {
public List<List<MutableDisambiguationReport<T>>> getUniquePartitions() {
List<List<MutableDisambiguationReport<T>>> ret = new ArrayList<List<MutableDisambiguationReport<T>>>();
- for (List<MutableDisambiguationReport<T>> partition : partitions.values()) {
+ for (List<MutableDisambiguationReport<T>> partition : partitions) {
if (partition.size() == 1) {
ret.add(partition);
}
@@ -81,17 +92,21 @@ public class ReportPartitions<T> {
return ret;
}
+ public List<List<MutableDisambiguationReport<T>>> getAllPartitions() {
+ return Collections.unmodifiableList(partitions);
+ }
+
public void put(MutableDisambiguationReport<T> value) {
boolean found = false;
- for (Map.Entry<Integer, List<MutableDisambiguationReport<T>>> entry : partitions.entrySet()) {
- for (MutableDisambiguationReport<T> partitionPrototype : entry.getValue()) {
+ for (List<MutableDisambiguationReport<T>> partition : partitions) {
+ for (MutableDisambiguationReport<T> partitionPrototype : partition) {
if (disambiguationPolicy.areAmbiguous(partitionPrototype, value)) {
found = true;
break;
}
}
if (found) {
- entry.getValue().add(value);
+ partition.add(value);
break;
}
}
@@ -99,7 +114,7 @@ public class ReportPartitions<T> {
if (!found) {
List<MutableDisambiguationReport<T>> newPartition = new ArrayList<MutableDisambiguationReport<T>>();
newPartition.add(value);
- partitions.put(partitions.size(), newPartition);
+ partitions.add(newPartition);
}
}
@@ -109,37 +124,14 @@ public class ReportPartitions<T> {
}
}
- /**
- * Updates the reports in the unique partitions.
- *
- * @return if the current policy is determined "repartitionable", the returned partitions instance splits the current
- * unique reports by some other policy. If the current policy is not repartitionable, a null value is returned.
- */
- public ReportPartitions<T> updateUniqueReports() {
- List<MutableDisambiguationReport<T>> uniqueReports = new ArrayList<MutableDisambiguationReport<T>>();
- for (List<MutableDisambiguationReport<T>> val : partitions.values()) {
- if (val.size() == 1) {
- uniqueReports.addAll(val);
- }
+ public void putAll(ReportPartitions<T> other) {
+ for (List<MutableDisambiguationReport<T>> partition : other.getAllPartitions()) {
+ putAll(partition);
}
-
- DisambiguationPolicy repartitioningPolicy = disambiguationPolicy.getNextRepartitioningPolicy();
- if (repartitioningPolicy != null) {
- ReportPartitions<T> ret = new ReportPartitions<T>(repartitioningPolicy);
- ret.putAll(uniqueReports);
-
- return ret;
- }
-
- for (MutableDisambiguationReport<T> report : uniqueReports) {
- disambiguationPolicy.update(report);
- }
-
- return null;
}
-
+
public boolean isPartitionsUnique() {
- for (List<MutableDisambiguationReport<T>> partition : partitions.values()) {
+ for (List<MutableDisambiguationReport<T>> partition : partitions) {
if (partition.size() > 1) {
return false;
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ResourceResolution.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ResourceResolution.java
index bc5d89c..054f05d 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ResourceResolution.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ResourceResolution.java
@@ -28,22 +28,12 @@ public enum ResourceResolution {
public boolean areAmbiguous(MutableDisambiguationReport.Resource a, MutableDisambiguationReport.Resource b) {
return (a.id != b.id && a.name.equals(b.name));
}
-
- @Override
- public void update(MutableDisambiguationReport.Resource resource) {
- resource.resourceType.plugin = null;
- }
},
TYPE {
public boolean areAmbiguous(MutableDisambiguationReport.Resource a, MutableDisambiguationReport.Resource b) {
return ((a.resourceType.id != b.resourceType.id) && (a.resourceType.name.equals(b.resourceType.name)))
|| (a.resourceType.id == b.resourceType.id && NAME.areAmbiguous(a, b));
}
-
- @Override
- public void update(MutableDisambiguationReport.Resource resource) {
- resource.resourceType.plugin = null;
- }
},
PLUGIN {
public boolean areAmbiguous(MutableDisambiguationReport.Resource a, MutableDisambiguationReport.Resource b) {
@@ -52,9 +42,5 @@ public enum ResourceResolution {
}
};
- public abstract boolean areAmbiguous(MutableDisambiguationReport.Resource a, MutableDisambiguationReport.Resource b);
-
- public void update(MutableDisambiguationReport.Resource resource) {
- //by default do nothing
- }
+ public abstract boolean areAmbiguous(MutableDisambiguationReport.Resource a, MutableDisambiguationReport.Resource b);
}
\ No newline at end of file
commit c02b9d0969fd72e7300c681386fa26b0897eda49
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 10 15:28:42 2010 +0200
Imports cleanup
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java
index 8de734b..39c7f92 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java
@@ -24,7 +24,6 @@
package org.rhq.enterprise.server.resource.disambiguation;
import java.util.ArrayList;
-import java.util.EnumSet;
/**
* A disambiguation policy determines whether two disambiguation reports are still ambiguous or not.
@@ -175,7 +174,7 @@ public class DisambiguationPolicy extends ArrayList<ResourceResolution> {
//don't replicate the plugin information on the parents if it was reported
//on the resource already.
- //this has to be done on all the parents, not just the ones that are immediatelly needed
+ //this has to be done on all the parents, not just the ones that are immediately needed
//for disambiguation. The parents update strategies might leave more parents than those needed.
if (resourceResolution == ResourceResolution.PLUGIN) {
for (MutableDisambiguationReport.Resource parent : report.parents) {
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
index bbd5934..2390a69 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
@@ -32,11 +32,9 @@ import java.util.Map;
import javax.persistence.EntityManager;
import javax.persistence.Query;
-import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
import org.rhq.core.util.IntExtractor;
-import org.rhq.core.util.jdbc.JDBCUtil;
/**
* This is basically a helper class that provides the disambiguation method.
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java
index 7b57270..ba24e29 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java
@@ -24,7 +24,6 @@
package org.rhq.enterprise.server.resource.disambiguation;
import java.util.ArrayList;
-import java.util.EnumSet;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
commit 47f9c51efdd0536fb8639f08094e8474b0d98ee4
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Fri May 7 21:44:25 2010 +0200
Major update of the way disambiguation works as well as how it is displayed in the search results. More work on the UI side is needed as well as on the backend (make the DisambiguationPolicy and ResourceResolution interfaces to be more flexible for the future?).
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java
index 5ce12d0..6d9b93a 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java
@@ -61,9 +61,15 @@ public class DisambiguationReport<T> implements Serializable {
public String getName() {
return name;
}
+
+ /**
+ * @return the plugin that defines this type or null if such information
+ * isn't needed to disambiguate this type.
+ */
public String getPlugin() {
return plugin;
}
+
public boolean isSingleton() {
return singleton;
}
@@ -99,6 +105,10 @@ public class DisambiguationReport<T> implements Serializable {
return name;
}
+ /**
+ * @return the resource type to use to disambiguate the concrete resource or null
+ * if no type disambiguation is needed.
+ */
public ResourceType getType() {
return type;
}
@@ -118,6 +128,10 @@ public class DisambiguationReport<T> implements Serializable {
return original;
}
+ /**
+ * @return the list of parents to disambiguate the original. Empty if no disambiguation using
+ * parents is needed.
+ */
public List<Resource> getParents() {
return parents;
}
@@ -134,6 +148,7 @@ public class DisambiguationReport<T> implements Serializable {
/**
* @return the ResourceType of the resource represented by the {@link #getOriginal()}
+ * or null if type disambiguation isn't needed.
*/
public ResourceType getResourceType() {
return resourceType;
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceNamesDisambiguationResult.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceNamesDisambiguationResult.java
index 5d2bf2d..a12053f 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceNamesDisambiguationResult.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceNamesDisambiguationResult.java
@@ -38,8 +38,11 @@ public class ResourceNamesDisambiguationResult<T> implements Serializable {
private static final long serialVersionUID = 1L;
private List<DisambiguationReport<T>> resolution;
+ @Deprecated
private boolean typeResolutionNeeded;
+ @Deprecated
private boolean pluginResolutionNeeded;
+ @Deprecated
private boolean parentResolutionNeeded;
public ResourceNamesDisambiguationResult(List<DisambiguationReport<T>> resolution, boolean needsTypeResolution,
@@ -62,6 +65,7 @@ public class ResourceNamesDisambiguationResult<T> implements Serializable {
/**
* This tells the caller whether the result set contained resources with different types.
*/
+ @Deprecated
public boolean isTypeResolutionNeeded() {
return typeResolutionNeeded;
}
@@ -69,6 +73,7 @@ public class ResourceNamesDisambiguationResult<T> implements Serializable {
/**
* This is true when the resources come from different parents.
*/
+ @Deprecated
public boolean isParentResolutionNeeded() {
return parentResolutionNeeded;
}
@@ -77,6 +82,7 @@ public class ResourceNamesDisambiguationResult<T> implements Serializable {
* This is true if the results contained resources of different types with the same name.
* In that case, the types need to be augmented with the plugin they come from.
*/
+ @Deprecated
public boolean isPluginResolutionNeeded() {
return pluginResolutionNeeded;
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
index d6e12a9..9cd471e 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
@@ -72,22 +72,41 @@ public class ResourcePartialLineageRenderer extends Renderer {
}
private void encodeUrl(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ encodePreName(writer, parent);
writer.startElement("a", null);
writer.writeAttribute("href", getUrl(parent), null);
- encodeSimple(writer, parent);
+ writer.writeText(parent.getName(), null);
writer.endElement("a");
+ encodePostName(writer, parent);
}
private void encodeSimple(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ encodePreName(writer, parent);
writer.writeText(parent.getName(), null);
- if (!parent.getType().isSingleton()) {
- writer.writeText(" (", null);
- writer.writeText(parent.getType().getName(), null);
- writer.writeText(")", null);
- }
+ encodePostName(writer, parent);
}
private static String getUrl(DisambiguationReport.Resource parent) {
return RESOURCE_URL + "?id=" + parent.getId();
}
+
+ private void encodePreName(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ if (!parent.getType().isSingleton()) {
+ writer.writeText(parent.getType().getName(), null);
+ writer.writeText(" ", null);
+ if (parent.getType().getPlugin() != null) {
+ writer.writeText(" (", null);
+ writer.writeText(parent.getType().getPlugin(), null);
+ writer.writeText(" plugin) ", null);
+ }
+ }
+ }
+
+ private void encodePostName(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ if (parent.getType().isSingleton() && parent.getType().getPlugin() != null) {
+ writer.writeText(" (", null);
+ writer.writeText(parent.getType().getPlugin(), null);
+ writer.writeText(" plugin) ", null);
+ }
+ }
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java
index 6672fbe..74ae826 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/navigation/resource/ResourceSelectUIBean.java
@@ -28,7 +28,6 @@ import org.rhq.core.domain.resource.Resource;
import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.resource.composite.ResourceComposite;
import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
-import org.rhq.core.domain.resource.composite.ResourceParentFlyweight;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility;
@@ -68,7 +67,7 @@ public class ResourceSelectUIBean {
* @param resourceTypePluginName
*/
public DisambiguationReportWrapper(DisambiguationReport<ResourceComposite> report, boolean typeResolutionNeeded, boolean parentResolutionNeeded, boolean pluginResolutionNeeded) {
- super(report.getOriginal(), report.getParents(), report.getResourceTypeName(), report.getResourceTypePluginName());
+ super(report.getOriginal(), report.getParents(), report.getResourceType());
this.typeResolutionNeeded = typeResolutionNeeded;
this.parentResolutionNeeded = parentResolutionNeeded;
this.pluginResolutionNeeded = pluginResolutionNeeded;
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
index b58a0b9..b1c3495 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
@@ -126,20 +126,30 @@
<rich:column>
<f:facet name="header">
<onc:sortableColumnHeader sort="r.name">
- <h:outputText styleClass="headerText" value="Name" />
+ <h:outputText styleClass="headerText" value="Resource" />
</onc:sortableColumnHeader>
</f:facet>
+ <h:outputText value="#{item.resourceType.singleton ? '' : item.resourceType.name}" />
+ <h:outputText value="#{item.resourceType.singleton ? '' : ' '}" />
+ <h:outputText value="#{not item.resourceType.singleton and item.resourceType.plugin != null ? '(' : ''}" />
+ <h:outputText value="#{not item.resourceType.singleton and item.resourceType.plugin != null ? item.resourceType.plugin : ''}" />
+ <h:outputText value="#{not item.resourceType.singleton and item.resourceType.plugin != null ? ' plugin) ' : ''}" />
<h:outputLink value="#{onf:getDefaultResourceTabURL()}">
<f:param name="id" value="#{item.original.resource.id}" />
- <h:outputText value="#{item.original.resource.name}" />
- <!--
- <h:outputText value=" (#{item.original.resource.resourceType.name})" />
- -->
+ <!--
+ <h:outputText value="#{item.original.resource.name}" />
<h:outputText value="#{item.resourceType.singleton ? '' : ' ('}" />
<h:outputText value="#{item.resourceType.singleton ? '' : item.original.resource.resourceType.name}" />
+ <h:outputText value="#{not item.resourceType.singleton and browseResourcesDataModel.currentPageNeedsPluginResolution ? ', plugin ' : ''}" />
+ <h:outputText value="#{not item.resourceType.singleton and browseResourcesDataModel.currentPageNeedsPluginResolution ? item.resourceType.plugin : ''}" />
<h:outputText value="#{item.resourceType.singleton ? '' : ')'}" />
+ -->
+ <h:outputText value="#{item.original.resource.name}" />
</h:outputLink>
+ <h:outputText value="#{item.resourceType.singleton and item.resourceType.plugin != null ? ' (' : ''}" />
+ <h:outputText value="#{item.resourceType.singleton and item.resourceType.plugin != null ? item.resourceType.plugin : ''}" />
+ <h:outputText value="#{item.resourceType.singleton and item.resourceType.plugin != null ? ' plugin)' : ''}" />
</rich:column>
<!--
<rich:column>
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index a427db1..d04e6cd 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -23,16 +23,19 @@ import java.util.Arrays;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
+import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.ListIterator;
import java.util.Map;
+import java.util.Set;
import javax.ejb.EJB;
import javax.ejb.Stateless;
import javax.ejb.TransactionAttribute;
import javax.ejb.TransactionAttributeType;
+import javax.persistence.DiscriminatorType;
import javax.persistence.EntityManager;
import javax.persistence.NoResultException;
import javax.persistence.PersistenceContext;
@@ -118,6 +121,11 @@ import org.rhq.enterprise.server.core.AgentManagerLocal;
import org.rhq.enterprise.server.jaxb.adapter.ResourceListAdapter;
import org.rhq.enterprise.server.measurement.MeasurementScheduleManagerLocal;
import org.rhq.enterprise.server.operation.OperationManagerLocal;
+import org.rhq.enterprise.server.resource.disambiguation.DisambiguationPolicy;
+import org.rhq.enterprise.server.resource.disambiguation.Disambiguator;
+import org.rhq.enterprise.server.resource.disambiguation.MutableDisambiguationReport;
+import org.rhq.enterprise.server.resource.disambiguation.DisambiguationUpdateStrategy;
+import org.rhq.enterprise.server.resource.disambiguation.ReportPartitions;
import org.rhq.enterprise.server.resource.group.ResourceGroupManagerLocal;
import org.rhq.enterprise.server.util.CriteriaQueryGenerator;
import org.rhq.enterprise.server.util.CriteriaQueryRunner;
@@ -2097,148 +2105,9 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
public <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, boolean alwaysIncludeParent,
IntExtractor<? super T> extractor) {
-
- if (results.isEmpty()) {
- return new ResourceNamesDisambiguationResult<T>(new ArrayList<DisambiguationReport<T>>(), false, false,
- false);
- }
-
- boolean typeResolutionNeeded = false;
- boolean pluginResolutionNeeded = false;
- boolean parentResolutionNeeded = false;
-
- //we can't assume the ordering of the provided results and the disambiguation query results
- //will be the same.
-
- //this list contains the resulting reports in the same order as the original results
- List<MutableDisambiguationReport<T>> reports = new ArrayList<MutableDisambiguationReport<T>>(results.size());
-
- //this maps the reports to resourceIds. More than one report can correspond to a single
- //resource id. The reports in this map are the same instances as in the reports list.
- Map<Integer, List<MutableDisambiguationReport<T>>> reportsByResourceId = new HashMap<Integer, List<MutableDisambiguationReport<T>>>();
- for (T r : results) {
- MutableDisambiguationReport<T> value = new MutableDisambiguationReport<T>();
- value.original = r;
- int resourceId = extractor.extract(r);
- if (resourceId > 0) {
- List<MutableDisambiguationReport<T>> correspondingResults = reportsByResourceId.get(resourceId);
- if (correspondingResults == null) {
- correspondingResults = new ArrayList<MutableDisambiguationReport<T>>();
- reportsByResourceId.put(resourceId, correspondingResults);
- }
- correspondingResults.add(value);
- }
- reports.add(value);
- }
-
- //check that we still have something to disambiguate
- if (reportsByResourceId.size() > 0) {
- //first find out how many ancestors we are going to require to disambiguate the resuls
- String query = Resource.NATIVE_QUERY_FIND_DISAMBIGUATION_LEVEL;
-
- query = JDBCUtil.transformQueryForMultipleInParameters(query, "@@RESOURCE_IDS@@", results.size());
- Query disambiguateQuery = entityManager.createNativeQuery(query);
- int i = 1;
- for (T r : results) {
- disambiguateQuery.setParameter(i++, extractor.extract(r));
- }
-
- Object[] rs = (Object[]) disambiguateQuery.getSingleResult();
-
- int disambiguationLevel = Resource.MAX_SUPPORTED_RESOURCE_HIERARCHY_DEPTH; //the max we support
-
- Long targetCnt = ((Number) rs[0]).longValue();
- Long typeCnt = ((Number) rs[1]).longValue();
- Long typeAndPluginCnt = ((Number) rs[2]).longValue();
- for (i = 1; i <= Resource.MAX_SUPPORTED_RESOURCE_HIERARCHY_DEPTH; ++i) {
- Long levelCnt = ((Number) rs[2 + i]).longValue();
- if (levelCnt == targetCnt) {
- disambiguationLevel = i - 1;
- break;
- }
- }
-
- if (alwaysIncludeParent && disambiguationLevel == 0) {
- disambiguationLevel = 1;
- }
-
- typeResolutionNeeded = typeAndPluginCnt > 1L;
- pluginResolutionNeeded = typeAndPluginCnt > typeCnt;
- parentResolutionNeeded = disambiguationLevel > 0;
-
- //k, now let's construct the JPQL query to get the parents and type infos...
- StringBuilder selectBuilder = new StringBuilder(
- "SELECT r0.id, r0.resourceType.name, r0.resourceType.plugin, r0.resourceType.singleton");
- StringBuilder fromBuilder = new StringBuilder("FROM Resource r0");
-
- for (i = 1; i <= disambiguationLevel; ++i) {
- int pi = i - 1;
- selectBuilder.append(", r").append(i).append(".id");
- selectBuilder.append(", r").append(i).append(".name");
- selectBuilder.append(", r").append(i).append(".resourceType.name");
- selectBuilder.append(", r").append(i).append(".resourceType.plugin");
- selectBuilder.append(", r").append(i).append(".resourceType.singleton");
-
- fromBuilder.append(" left join r").append(pi).append(".parentResource r").append(i);
- }
-
- fromBuilder.append(" WHERE r0.id IN (:resourceIds)");
-
- Query parentsQuery = entityManager.createQuery(selectBuilder.append(" ").append(fromBuilder).toString());
-
- parentsQuery.setParameter("resourceIds", reportsByResourceId.keySet());
-
- @SuppressWarnings("unchecked")
- List<Object[]> parentsResults = (List<Object[]>) parentsQuery.getResultList();
- for (Object[] parentsResult : parentsResults) {
- List<DisambiguationReport.Resource> parents = new ArrayList<DisambiguationReport.Resource>(disambiguationLevel);
- Integer resourceId = (Integer) parentsResult[0];
- String typeName = (String) parentsResult[1];
- String pluginName = (String) parentsResult[2];
- Boolean singleton = (Boolean) parentsResult[3];
-
- DisambiguationReport.ResourceType resourceType = new DisambiguationReport.ResourceType(typeName, pluginName, singleton);
-
- for (i = 0; i < disambiguationLevel; ++i) {
- Integer parentId = (Integer) parentsResult[4 + 5 * i];
- if (parentId == null)
- break;
- String parentName = (String) parentsResult[4 + 5 * i + 1];
- String parentType = (String) parentsResult[4 + 5 * i + 2];
- String parentPlugin = (String) parentsResult[4 + 5 * i + 3];
- Boolean parentSingleton = (Boolean) parentsResult[4 + 5 * i + 4];
-
- DisambiguationReport.ResourceType type = new DisambiguationReport.ResourceType(parentType, parentPlugin, parentSingleton);
-
- parents.add(new DisambiguationReport.Resource(parentId, parentName, type));
- }
-
- //update all the reports that correspond to this resourceId
- for (MutableDisambiguationReport<T> report : reportsByResourceId.get(resourceId)) {
- report.resourceType = resourceType;
- report.parents = parents;
- }
- }
- }
-
- List<DisambiguationReport<T>> resolution = new ArrayList<DisambiguationReport<T>>(results.size());
-
- for (MutableDisambiguationReport<T> report : reports) {
- resolution.add(report.getReport());
- }
-
- return new ResourceNamesDisambiguationResult<T>(resolution, typeResolutionNeeded, parentResolutionNeeded,
- pluginResolutionNeeded);
- }
-
- private static class MutableDisambiguationReport<T> {
- public T original;
- public DisambiguationReport.ResourceType resourceType;
- public List<DisambiguationReport.Resource> parents;
-
- public DisambiguationReport<T> getReport() {
- return new DisambiguationReport<T>(original, parents == null ? Collections
- .<DisambiguationReport.Resource> emptyList() : parents, resourceType);
- }
+ //TODO the alwaysIncludeParents is obsolete and ignored
+ //DisambiguationUpdateStrategy strategy = DisambiguationUpdateStrategy.KEEP_PARENTS_TO_TOPMOST_SERVERS;
+ DisambiguationUpdateStrategy strategy = DisambiguationUpdateStrategy.KEEP_ALL_PARENTS;
+ return Disambiguator.disambiguate(results, strategy, extractor, entityManager);
}
}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
index 066aae4..9ce98c3 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerLocal.java
@@ -51,6 +51,7 @@ import org.rhq.core.domain.resource.group.composite.AutoGroupComposite;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.util.IntExtractor;
+import org.rhq.enterprise.server.resource.disambiguation.Disambiguator;
import org.rhq.enterprise.server.resource.group.ResourceGroupNotFoundException;
/**
@@ -454,25 +455,7 @@ public interface ResourceManagerLocal {
Resource getParentResource(Subject subject, int resourceId);
/**
- * Given a list of results, this method produces an object decorates the provided original results
- * with data needed to disambiguate the results with respect to resource names, their types and ancestory.
- * <p>
- * The disambiguation result contains information on what types of information are needed to make the resources
- * in the original result unambiguous and contains the decorated original data in the same order as the
- * supplied result list.
- * <p>
- * The objects in results do not necessarily need to correspond to a resource. In case of such objects,
- * the resourceIdExtractor should return 0. In the resulting report such objects will still be wrapped
- * in a {@link DisambiguationReport} but the parent list will be empty and resource type and plugin name will
- * be null.
- *
- * @see ResourceNamesDisambiguationResult
- *
- * @param <T> the type of the result elements
- * @param results the results to disambiguate
- * @param alwayIncludeParent if true, the parent disambiguation will always be included in the result
- * even if the results wouldn't have to be disambiguated using parents.
- * @param resourceIdExtractor an object able to extract resource id from an instance of type parameter.
+ * @see Disambiguator#disambiguate(List, boolean, IntExtractor, javax.persistence.EntityManager)
* @return the disambiguation result or null on error
*/
<T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, boolean alwayIncludeParent,
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java
new file mode 100644
index 0000000..8de734b
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationPolicy.java
@@ -0,0 +1,207 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.server.resource.disambiguation;
+
+import java.util.ArrayList;
+import java.util.EnumSet;
+
+/**
+ * A disambiguation policy determines whether two disambiguation reports are still ambiguous or not.
+ * <p>
+ * The policy is basically a list of {@link ResourceResolution} instances each corresponding to either
+ * the resource itself of some of its parent in the hierarchy. Each of the {@link ResourceResolution} instances
+ * in the list determines how the appropriate part of the report is disambiguated.
+ * <p>
+ * Only last element in this list actually decides whether the two reports are still ambiguous. The thinking
+ * behind this is that the previous resolutions in the chain are "decided" and the last one is the one
+ * we are currently trying to determine the correct resolution for.
+ *
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguationPolicy extends ArrayList<ResourceResolution> {
+ private static final long serialVersionUID = 1L;
+
+ private DisambiguationUpdateStrategy parentsUpdateStrategy;
+
+ public DisambiguationPolicy(DisambiguationUpdateStrategy parentsDisambiguationStrategy) {
+ this.parentsUpdateStrategy = parentsDisambiguationStrategy;
+ }
+
+ public DisambiguationPolicy(DisambiguationPolicy other) {
+ super(other);
+ this.parentsUpdateStrategy = other.parentsUpdateStrategy;
+ }
+
+ public static DisambiguationPolicy getUniqueNamePolicy(DisambiguationUpdateStrategy parentsDisambiguationStrategy) {
+ DisambiguationPolicy ret = new DisambiguationPolicy(parentsDisambiguationStrategy);
+ ret.add(ResourceResolution.NAME);
+
+ return ret;
+ }
+
+ public DisambiguationUpdateStrategy getParentsUpdateStrategy() {
+ return parentsUpdateStrategy;
+ }
+
+ public void setParentsUpdateStrategy(DisambiguationUpdateStrategy parentsUpdateStrategy) {
+ this.parentsUpdateStrategy = parentsUpdateStrategy;
+ }
+
+ /**
+ * Tells whether the last resolution in this policy determines the reports ambiguous.
+ *
+ * @param <T>
+ * @param a
+ * @param b
+ * @return
+ */
+ public <T> boolean areAmbiguous(MutableDisambiguationReport<T> a, MutableDisambiguationReport<T> b) {
+ MutableDisambiguationReport.Resource ra = getComparingResource(a);
+ MutableDisambiguationReport.Resource rb = getComparingResource(b);
+
+ if (ra == null || rb == null)
+ return false;
+
+ ResourceResolution resolution = get(size() - 1);
+
+ return resolution.areAmbiguous(ra, rb);
+ }
+
+ /**
+ * @return the currently deciding {@link ResourceResolution} (i.e. the last element in this
+ * policy)
+ */
+ public ResourceResolution getCurrentResourceResolution() {
+ return size() > 0 ? get(size() - 1) : null;
+ }
+
+ /**
+ * If the user of this class determines that this policy can't disambiguate some list of reports,
+ * s/he can get the next policy to try by calling this method.
+ *
+ * @return the next policy in "chain" of possible policies
+ */
+ public DisambiguationPolicy getNext() {
+ int lastIdx = size() - 1;
+ ResourceResolution lastResolution = get(lastIdx);
+
+ DisambiguationPolicy ret = new DisambiguationPolicy(this);
+
+ switch (lastResolution) {
+ case NAME:
+ ret.set(lastIdx, ResourceResolution.TYPE);
+ break;
+ case TYPE:
+ ret.set(lastIdx, ResourceResolution.PLUGIN);
+ break;
+ case PLUGIN:
+ ret.add(ResourceResolution.NAME);
+ break;
+ }
+
+ return ret;
+ }
+
+ /**
+ * @return a policy to be used to repartition unique reports using some other criteria or null
+ * if the current policy doesn't require repartitioning of unique reports.
+ */
+ public DisambiguationPolicy getNextRepartitioningPolicy() {
+ ResourceResolution currentResolution = get(size() - 1);
+
+ if (parentsUpdateStrategy.alwaysRepartitionableResolutions().contains(currentResolution) || (size() == 1)
+ && parentsUpdateStrategy.resourceLevelRepartitionableResolutions().contains(currentResolution)) {
+
+ DisambiguationPolicy newPolicy = getNext();
+
+ //this policy is used for reports uniquely identified by type, but we are repartitioning them further.
+ //but this doesn't mean that they need to be repartitioned by plugin name because that would
+ //only supplement the information that is already evident from the type partitioning.
+ //therefore, skip the plugin resolution in that case.
+ if (currentResolution == ResourceResolution.TYPE) {
+ newPolicy = newPolicy.getNext();
+ newPolicy.set(newPolicy.size() - 2, ResourceResolution.TYPE);
+ }
+
+ return newPolicy;
+ }
+
+ return null;
+ }
+
+ public <T> void update(MutableDisambiguationReport<T> report) {
+ ResourceResolution resourceResolution = this.get(0);
+ resourceResolution.update(report.resource);
+
+ int disambiguationPolicyIndex = 1;
+ while (disambiguationPolicyIndex < this.size() && disambiguationPolicyIndex - 1 < report.parents.size()) {
+ ResourceResolution parentResolution = this.get(disambiguationPolicyIndex);
+ MutableDisambiguationReport.Resource parent = report.parents.get(disambiguationPolicyIndex - 1);
+ parentResolution.update(parent);
+
+ disambiguationPolicyIndex++;
+ }
+
+ disambiguationPolicyIndex--;
+
+ //because the parents update strategy might leave more parents than this policy requires for disambiguation
+ //we need to treat those parents as well. Because they are not needed for disambiguation, treat them as
+ //if only the name and type was needed for them.
+ for (; disambiguationPolicyIndex < report.parents.size(); ++disambiguationPolicyIndex) {
+ ResourceResolution.TYPE.update(report.parents.get(disambiguationPolicyIndex));
+ }
+
+ //don't replicate the plugin information on the parents if it was reported
+ //on the resource already.
+ //this has to be done on all the parents, not just the ones that are immediatelly needed
+ //for disambiguation. The parents update strategies might leave more parents than those needed.
+ if (resourceResolution == ResourceResolution.PLUGIN) {
+ for (MutableDisambiguationReport.Resource parent : report.parents) {
+ if (report.resource.resourceType.plugin.equals(parent.resourceType.plugin)) {
+
+ parent.resourceType.plugin = null;
+ }
+ }
+ }
+
+ parentsUpdateStrategy.update(this, report);
+ }
+
+ private <T> MutableDisambiguationReport.Resource getComparingResource(MutableDisambiguationReport<T> report) {
+ int size = size();
+ if (size == 0)
+ return null;
+
+ if (size == 1) {
+ return report.resource;
+ } else {
+ int parentIdx = size - 2;
+ if (report.parents.size() > parentIdx) {
+ return report.parents.get(parentIdx);
+ }
+ }
+ return null;
+ }
+}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java
new file mode 100644
index 0000000..03b046a
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/DisambiguationUpdateStrategy.java
@@ -0,0 +1,132 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.server.resource.disambiguation;
+
+import java.util.EnumSet;
+
+/**
+ * This enumerates different strategies that can be used to update the results to produce disambiguated list.
+ *
+ * @author Lukas Krejci
+ */
+public enum DisambiguationUpdateStrategy {
+
+ /**
+ * The disambiguation policy is followed precisely.
+ */
+ EXACT {
+ public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
+ int nofParents = policy.size() - 1;
+ if (nofParents < 0)
+ nofParents = 0;
+
+ if (nofParents == 0) {
+ report.parents.clear();
+ } else {
+ while (report.parents.size() > nofParents) {
+ report.parents.remove(report.parents.size() - 1);
+ }
+ }
+ }
+ },
+
+ /**
+ * Even if the disambiguation policy determined that parents are not needed to disambiguate the
+ * results, at least one of them is kept in the report.
+ */
+ KEEP_AT_LEAST_ONE_PARENT {
+ public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
+ int nofParents = policy.size() - 1;
+ if (nofParents < 1)
+ nofParents = 1;
+
+ while (report.parents.size() > nofParents) {
+ report.parents.remove(report.parents.size() - 1);
+ }
+ }
+
+ @Override
+ public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
+ return EnumSet.allOf(ResourceResolution.class);
+ }
+ },
+
+ /**
+ * The parentage of the report is retained at least up to the server/service directly under platform.
+ * If the policy needs the platform to stay, it is of course preserved.
+ */
+ KEEP_PARENTS_TO_TOPMOST_SERVERS {
+ public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
+ //only remove the platform, if the policy doesn't dictate its presence...
+ if (policy.size() > 1 && report.parents.size() > policy.size() - 1) {
+ report.parents.remove(report.parents.size() - 1);
+ }
+ }
+
+ @Override
+ public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
+ return EnumSet.allOf(ResourceResolution.class);
+ }
+ },
+
+ /**
+ * All parents are preserved no matter what the policy says.
+ */
+ KEEP_ALL_PARENTS {
+ public <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report) {
+ //do nothing to the parents, keep them as they are...
+ }
+
+ @Override
+ public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
+ return EnumSet.allOf(ResourceResolution.class);
+ }
+ };
+
+ /**
+ * Updates the report using the policy.
+ *
+ * @param <T>
+ * @param policy
+ * @param report
+ */
+ public abstract <T> void update(DisambiguationPolicy policy, MutableDisambiguationReport<T> report);
+
+ /**
+ * @return a set of resolutions for which the unique reports need to be repartitioned at the resource level.
+ * In another words this forces the disambiguation to continue on up the disambiguation chain even if the
+ * it disambiguates the resuts successfully at the resource level.
+ */
+ public EnumSet<ResourceResolution> resourceLevelRepartitionableResolutions() {
+ return EnumSet.noneOf(ResourceResolution.class);
+ }
+
+ /**
+ * @return a set of resolutions for which uniquely disambiguated reports are to be repartitioned further.
+ * The resolutions from this set apply on the parents (on any level), unlike the resolutions from {@link #resourceLevelRepartitionableResolutions()}.
+ */
+ public EnumSet<ResourceResolution> alwaysRepartitionableResolutions() {
+ return EnumSet.noneOf(ResourceResolution.class);
+ }
+}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
new file mode 100644
index 0000000..bbd5934
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/Disambiguator.java
@@ -0,0 +1,274 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.server.resource.disambiguation;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+
+import javax.persistence.EntityManager;
+import javax.persistence.Query;
+
+import org.rhq.core.domain.resource.Resource;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
+import org.rhq.core.util.IntExtractor;
+import org.rhq.core.util.jdbc.JDBCUtil;
+
+/**
+ * This is basically a helper class that provides the disambiguation method.
+ * It is intended to be used in an SLSB context.
+ *
+ * @author Lukas Krejci
+ */
+public class Disambiguator {
+
+ public static final int MAXIMUM_DISAMBIGUATED_TREE_DEPTH = 7;
+
+ private Disambiguator() {
+
+ }
+
+ /**
+ * Given a list of results, this method produces an object decorates the provided original results
+ * with data needed to disambiguate the results with respect to resource names, their types and ancestory.
+ * <p>
+ * The disambiguation result contains information on what types of information are needed to make the resources
+ * in the original result unambiguous and contains the decorated original data in the same order as the
+ * supplied result list.
+ * <p>
+ * The objects in results do not necessarily need to correspond to a resource. In case of such objects,
+ * the resourceIdExtractor should return 0. In the resulting report such objects will still be wrapped
+ * in a {@link DisambiguationReport} but the parent list will be empty and resource type and plugin name will
+ * be null.
+ *
+ * @see ResourceNamesDisambiguationResult
+ *
+ * @param <T> the type of the result elements
+ * @param results the results to disambiguate
+ * @param parentsDisambiguationStrategy how are the parents going to be disambiguated
+ * @param resourceIdExtractor an object able to extract resource id from an instance of type parameter.
+ * @param entityManager an entityManager to be used to access the database
+ * @return the disambiguation result or null on error
+ */
+ public static <T> ResourceNamesDisambiguationResult<T> disambiguate(List<T> results, DisambiguationUpdateStrategy parentsDisambiguationStrategy,
+ IntExtractor<? super T> extractor, EntityManager entityManager) {
+
+ if (results.isEmpty()) {
+ return new ResourceNamesDisambiguationResult<T>(new ArrayList<DisambiguationReport<T>>(), false, false,
+ false);
+ }
+
+ //this is obsolete
+ boolean typeResolutionNeeded = true;
+ boolean pluginResolutionNeeded = true;
+ boolean parentResolutionNeeded = true;
+
+ //we can't assume the ordering of the provided results and the disambiguation query results
+ //will be the same.
+
+ //this list contains the resulting reports in the same order as the original results
+ List<MutableDisambiguationReport<T>> reports = new ArrayList<MutableDisambiguationReport<T>>(results.size());
+
+ //this maps the reports to resourceIds. More than one report can correspond to a single
+ //resource id. The reports in this map are the same instances as in the reports list.
+ Map<Integer, List<MutableDisambiguationReport<T>>> reportsByResourceId = new HashMap<Integer, List<MutableDisambiguationReport<T>>>();
+ for (T r : results) {
+ int resourceId = extractor.extract(r);
+ MutableDisambiguationReport<T> value = new MutableDisambiguationReport<T>();
+ value.original = r;
+ if (resourceId > 0) {
+ List<MutableDisambiguationReport<T>> correspondingResults = reportsByResourceId.get(resourceId);
+ if (correspondingResults == null) {
+ correspondingResults = new ArrayList<MutableDisambiguationReport<T>>();
+ reportsByResourceId.put(resourceId, correspondingResults);
+ }
+ correspondingResults.add(value);
+ }
+ reports.add(value);
+ }
+
+ //check that we still have something to disambiguate
+ if (reportsByResourceId.size() > 0) {
+ //k, now let's construct the JPQL query to get the parents and type infos...
+ StringBuilder selectBuilder = new StringBuilder(
+ "SELECT r0.id, r0.name, r0.resourceType.id, r0.resourceType.name, r0.resourceType.plugin, r0.resourceType.singleton");
+ StringBuilder fromBuilder = new StringBuilder("FROM Resource r0");
+
+ for (int i = 1; i <= MAXIMUM_DISAMBIGUATED_TREE_DEPTH; ++i) {
+ int pi = i - 1;
+ selectBuilder.append(", r").append(i).append(".id");
+ selectBuilder.append(", r").append(i).append(".name");
+ selectBuilder.append(", rt").append(i).append(".id");
+ selectBuilder.append(", rt").append(i).append(".name");
+ selectBuilder.append(", rt").append(i).append(".plugin");
+ selectBuilder.append(", rt").append(i).append(".singleton");
+
+ fromBuilder.append(" left join r").append(pi).append(".parentResource r").append(i);
+ fromBuilder.append(" left join r").append(i).append(".resourceType rt").append(i);
+ }
+
+ fromBuilder.append(" WHERE r0.id IN (:resourceIds)");
+
+ Query parentsQuery = entityManager.createQuery(selectBuilder.append(" ").append(fromBuilder).toString());
+
+ parentsQuery.setParameter("resourceIds", reportsByResourceId.keySet());
+
+ //ok, now I will obtain all the information about the parents and types
+ //using the above defined JPQL query.
+ //I will partition the resulting reports by resource name.to create groups of
+ //resources that are "mutually ambiguous". Because each such group potenitally
+ //requires different level of disambiguation, I will then process them individually.
+
+ ReportPartitions<T> partitionedReports = new ReportPartitions<T>(DisambiguationPolicy.getUniqueNamePolicy(parentsDisambiguationStrategy));
+
+ @SuppressWarnings("unchecked")
+ List<Object[]> parentsResults = (List<Object[]>) parentsQuery.getResultList();
+ for (Object[] parentsResult : parentsResults) {
+ List<MutableDisambiguationReport.Resource> parents = new ArrayList<MutableDisambiguationReport.Resource>(MAXIMUM_DISAMBIGUATED_TREE_DEPTH);
+ Integer resourceId = (Integer) parentsResult[0];
+ String resourceName = (String) parentsResult[1];
+ Integer typeId = (Integer) parentsResult[2];
+ String typeName = (String) parentsResult[3];
+ String pluginName = (String) parentsResult[4];
+ Boolean singleton = (Boolean) parentsResult[5];
+
+ MutableDisambiguationReport.ResourceType resourceType = new MutableDisambiguationReport.ResourceType();
+ resourceType.id = typeId;
+ resourceType.name = typeName;
+ resourceType.plugin = pluginName;
+ resourceType.singleton = singleton;
+
+ MutableDisambiguationReport.Resource resource = new MutableDisambiguationReport.Resource();
+ resource.id = resourceId;
+ resource.name = resourceName;
+ resource.resourceType = resourceType;
+
+ for (int i = 0; i < MAXIMUM_DISAMBIGUATED_TREE_DEPTH; ++i) {
+ Integer parentId = (Integer) parentsResult[6 + 6 * i];
+ if (parentId == null)
+ break;
+ String parentName = (String) parentsResult[6 + 6 * i + 1];
+ Integer parentTypeId = (Integer) parentsResult[6 + 6 * i + 2];
+ String parentType = (String) parentsResult[6 + 6 * i + 3];
+ String parentPlugin = (String) parentsResult[6 + 6 * i + 4];
+ Boolean parentSingleton = (Boolean) parentsResult[6 + 6 * i + 5];
+
+ MutableDisambiguationReport.ResourceType type = new MutableDisambiguationReport.ResourceType();
+ type.id = parentTypeId;
+ type.name = parentType;
+ type.plugin = parentPlugin;
+ type.singleton = parentSingleton;
+
+ MutableDisambiguationReport.Resource parent = new MutableDisambiguationReport.Resource();
+ parent.id = parentId;
+ parent.name = parentName;
+ parent.resourceType = type;
+
+ parents.add(parent);
+ }
+
+ //update all the reports that correspond to this resourceId
+ for (MutableDisambiguationReport<T> report : reportsByResourceId.get(resourceId)) {
+ report.resource = resource;
+ report.parents = parents;
+
+ partitionedReports.put(report);
+ }
+ }
+
+ //ok, now I have the reports partitioned by resource name. let's go through each partition
+ //and figure out the disambiguation needed for it.
+
+ List<ReportPartitions<T>> ambiguousSubPartitions = new ArrayList<ReportPartitions<T>>();
+
+ if (!partitionedReports.isPartitionsUnique()) {
+ ambiguousSubPartitions.add(partitionedReports);
+ } else {
+ ReportPartitions<T> repartition = partitionedReports.updateUniqueReports();
+ while (repartition != null) {
+ if(!repartition.isPartitionsUnique()) {
+ ambiguousSubPartitions.add(repartition);
+ repartition = null;
+ } else {
+ repartition = repartition.updateUniqueReports();
+ }
+ }
+ }
+
+ while (ambiguousSubPartitions.size() > 0) {
+ Iterator<ReportPartitions<T>> subPartitionIterator = ambiguousSubPartitions.iterator();
+ List<ReportPartitions<T>> newAmbiguousPartitions = new ArrayList<ReportPartitions<T>>();
+
+ while(subPartitionIterator.hasNext()) {
+ ReportPartitions<T> subPartition = subPartitionIterator.next();
+
+ ReportPartitions<T> repartition = subPartition.updateUniqueReports();
+ while (repartition != null) {
+ if(!repartition.isPartitionsUnique()) {
+ newAmbiguousPartitions.add(repartition);
+ repartition = null;
+ } else {
+ repartition = repartition.updateUniqueReports();
+ }
+ }
+
+ for(List<MutableDisambiguationReport<T>> partitionReports : subPartition.getAmbiguousPartitions()) {
+ ReportPartitions<T> replacementSubpartition = new ReportPartitions<T>(subPartition.getDisambiguationPolicy().getNext());
+ replacementSubpartition.putAll(partitionReports);
+ if (!replacementSubpartition.isPartitionsUnique()) {
+ newAmbiguousPartitions.add(replacementSubpartition);
+ } else {
+ repartition = replacementSubpartition.updateUniqueReports();
+ while (repartition != null) {
+ if(!repartition.isPartitionsUnique()) {
+ newAmbiguousPartitions.add(repartition);
+ repartition = null;
+ } else {
+ repartition = repartition.updateUniqueReports();
+ }
+ }
+ }
+ }
+ subPartitionIterator.remove();
+ }
+
+ for(ReportPartitions<T> newPartition : newAmbiguousPartitions) {
+ ambiguousSubPartitions.add(newPartition);
+ }
+ }
+ }
+
+ List<DisambiguationReport<T>> resolution = new ArrayList<DisambiguationReport<T>>(results.size());
+
+ for (MutableDisambiguationReport<T> report : reports) {
+ resolution.add(report.getReport());
+ }
+
+ return new ResourceNamesDisambiguationResult<T>(resolution, typeResolutionNeeded, parentResolutionNeeded,
+ pluginResolutionNeeded);
+ }
+}
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/MutableDisambiguationReport.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/MutableDisambiguationReport.java
new file mode 100644
index 0000000..68995d9
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/MutableDisambiguationReport.java
@@ -0,0 +1,87 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.server.resource.disambiguation;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+
+/**
+ * This is a helper class representing a disambiguation report during the process of disambiguation
+ * where a writable access is needed to the report's properties. The resulting {@link DisambiguationReport}
+ * is an immutable class.
+ *
+ * @param <T> the type of the instances being disambiguated
+ *
+ * @author Lukas Krejci
+ */
+public class MutableDisambiguationReport<T> {
+ public static class ResourceType {
+ public int id;
+ public String name;
+ public String plugin;
+ public boolean singleton;
+
+ public DisambiguationReport.ResourceType getResourceType() {
+ return new DisambiguationReport.ResourceType(name, plugin, singleton);
+ }
+
+ public String toString() {
+ return "MutableResourceType[id=" + id + ", name='" + name + "', plugin='" + plugin + "', singleton=" + singleton + "]";
+ }
+ }
+
+ public static class Resource {
+ public int id;
+ public String name;
+ public MutableDisambiguationReport.ResourceType resourceType;
+
+ public DisambiguationReport.Resource getResource() {
+ return new DisambiguationReport.Resource(id, name, resourceType.getResourceType());
+ }
+
+ public String toString() {
+ return "MutableResource[id=" + id + ", name='" + name + ", resourceType=" + resourceType + "]";
+ }
+ }
+
+ public T original;
+ public MutableDisambiguationReport.Resource resource;
+ public List<MutableDisambiguationReport.Resource> parents;
+
+ public DisambiguationReport<T> getReport() {
+ List<DisambiguationReport.Resource> realParents = new ArrayList<DisambiguationReport.Resource>();
+ if (parents != null) {
+ for(MutableDisambiguationReport.Resource p : parents) {
+ realParents.add(p.getResource());
+ }
+ }
+ return new DisambiguationReport<T>(original, realParents, resource.resourceType.getResourceType());
+ }
+
+ public String toString() {
+ return "MutableDisambiguationReport[resource=" + resource + ", parents=" + parents + "]";
+ }
+}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java
new file mode 100644
index 0000000..7b57270
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ReportPartitions.java
@@ -0,0 +1,154 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.server.resource.disambiguation;
+
+import java.util.ArrayList;
+import java.util.EnumSet;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * This class partitions the reports inserted into it by chunking them up
+ * into sublists containing mutually ambiguous reports. The ambiguity is determined using
+ * a {@link DisambiguationPolicy}.
+ *
+ * @param <T> the type of the original instances the are being disambiguated.
+ *
+ * @author Lukas Krejci
+ */
+public class ReportPartitions<T> {
+
+ private static final long serialVersionUID = 1L;
+ private DisambiguationPolicy disambiguationPolicy;
+ private Map<Integer, List<MutableDisambiguationReport<T>>> partitions;
+
+ /**
+ * @see MutableDisambiguationReport#getComparisonForLevel(int)
+ *
+ * @param comparisonLevel
+ */
+ public ReportPartitions(DisambiguationPolicy disambiguationPolicy) {
+ this.disambiguationPolicy = disambiguationPolicy;
+ partitions = new HashMap<Integer, List<MutableDisambiguationReport<T>>>();
+ }
+
+ public DisambiguationPolicy getDisambiguationPolicy() {
+ return disambiguationPolicy;
+ }
+
+ public List<List<MutableDisambiguationReport<T>>> getAmbiguousPartitions() {
+ List<List<MutableDisambiguationReport<T>>> ret = new ArrayList<List<MutableDisambiguationReport<T>>>();
+
+ for (List<MutableDisambiguationReport<T>> partition : partitions.values()) {
+ if (partition.size() > 1) {
+ ret.add(partition);
+ }
+ }
+
+ return ret;
+ }
+
+ public List<List<MutableDisambiguationReport<T>>> getUniquePartitions() {
+ List<List<MutableDisambiguationReport<T>>> ret = new ArrayList<List<MutableDisambiguationReport<T>>>();
+
+ for (List<MutableDisambiguationReport<T>> partition : partitions.values()) {
+ if (partition.size() == 1) {
+ ret.add(partition);
+ }
+ }
+
+ return ret;
+ }
+
+ public void put(MutableDisambiguationReport<T> value) {
+ boolean found = false;
+ for (Map.Entry<Integer, List<MutableDisambiguationReport<T>>> entry : partitions.entrySet()) {
+ for (MutableDisambiguationReport<T> partitionPrototype : entry.getValue()) {
+ if (disambiguationPolicy.areAmbiguous(partitionPrototype, value)) {
+ found = true;
+ break;
+ }
+ }
+ if (found) {
+ entry.getValue().add(value);
+ break;
+ }
+ }
+
+ if (!found) {
+ List<MutableDisambiguationReport<T>> newPartition = new ArrayList<MutableDisambiguationReport<T>>();
+ newPartition.add(value);
+ partitions.put(partitions.size(), newPartition);
+ }
+ }
+
+ public void putAll(List<MutableDisambiguationReport<T>> values) {
+ for (MutableDisambiguationReport<T> v : values) {
+ put(v);
+ }
+ }
+
+ /**
+ * Updates the reports in the unique partitions.
+ *
+ * @return if the current policy is determined "repartitionable", the returned partitions instance splits the current
+ * unique reports by some other policy. If the current policy is not repartitionable, a null value is returned.
+ */
+ public ReportPartitions<T> updateUniqueReports() {
+ List<MutableDisambiguationReport<T>> uniqueReports = new ArrayList<MutableDisambiguationReport<T>>();
+ for (List<MutableDisambiguationReport<T>> val : partitions.values()) {
+ if (val.size() == 1) {
+ uniqueReports.addAll(val);
+ }
+ }
+
+ DisambiguationPolicy repartitioningPolicy = disambiguationPolicy.getNextRepartitioningPolicy();
+ if (repartitioningPolicy != null) {
+ ReportPartitions<T> ret = new ReportPartitions<T>(repartitioningPolicy);
+ ret.putAll(uniqueReports);
+
+ return ret;
+ }
+
+ for (MutableDisambiguationReport<T> report : uniqueReports) {
+ disambiguationPolicy.update(report);
+ }
+
+ return null;
+ }
+
+ public boolean isPartitionsUnique() {
+ for (List<MutableDisambiguationReport<T>> partition : partitions.values()) {
+ if (partition.size() > 1) {
+ return false;
+ }
+ }
+ return true;
+ }
+
+ public String toString() {
+ return "ReportPartitions[policy=" + disambiguationPolicy + ", partitions=" + partitions + "]";
+ }
+}
\ No newline at end of file
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ResourceResolution.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ResourceResolution.java
new file mode 100644
index 0000000..bc5d89c
--- /dev/null
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/disambiguation/ResourceResolution.java
@@ -0,0 +1,60 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.server.resource.disambiguation;
+
+public enum ResourceResolution {
+ NAME {
+ public boolean areAmbiguous(MutableDisambiguationReport.Resource a, MutableDisambiguationReport.Resource b) {
+ return (a.id != b.id && a.name.equals(b.name));
+ }
+
+ @Override
+ public void update(MutableDisambiguationReport.Resource resource) {
+ resource.resourceType.plugin = null;
+ }
+ },
+ TYPE {
+ public boolean areAmbiguous(MutableDisambiguationReport.Resource a, MutableDisambiguationReport.Resource b) {
+ return ((a.resourceType.id != b.resourceType.id) && (a.resourceType.name.equals(b.resourceType.name)))
+ || (a.resourceType.id == b.resourceType.id && NAME.areAmbiguous(a, b));
+ }
+
+ @Override
+ public void update(MutableDisambiguationReport.Resource resource) {
+ resource.resourceType.plugin = null;
+ }
+ },
+ PLUGIN {
+ public boolean areAmbiguous(MutableDisambiguationReport.Resource a, MutableDisambiguationReport.Resource b) {
+ return (a.resourceType.id != b.resourceType.id) && (a.resourceType.name.equals(b.resourceType.name)) && (a.resourceType.plugin.equals(b.resourceType.plugin))
+ || (a.resourceType.id == b.resourceType.id && NAME.areAmbiguous(a, b));
+ }
+ };
+
+ public abstract boolean areAmbiguous(MutableDisambiguationReport.Resource a, MutableDisambiguationReport.Resource b);
+
+ public void update(MutableDisambiguationReport.Resource resource) {
+ //by default do nothing
+ }
+}
\ No newline at end of file
commit 6b776093a7ed0b998801763ae3448c423682e59f
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Thu Apr 29 15:29:49 2010 +0200
Set of changes to implement the different variants of search page results.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java
index dd359da..5ce12d0 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/DisambiguationReport.java
@@ -36,34 +36,110 @@ public class DisambiguationReport<T> implements Serializable {
private static final long serialVersionUID = 1L;
private T original;
- private List<ResourceParentFlyweight> parents;
- private String resourceTypeName;
- private String resourceTypePluginName;
+ private List<Resource> parents;
+ private ResourceType resourceType;
- public DisambiguationReport(T original, List<ResourceParentFlyweight> parents, String resourceTypeName, String resourceTypePluginName) {
+ public static class ResourceType implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ private String name;
+ private String plugin;
+ private boolean singleton;
+
+ /**
+ * @param name
+ * @param plugin
+ * @param singleton
+ */
+ public ResourceType(String name, String plugin, boolean singleton) {
+ super();
+ this.name = name;
+ this.plugin = plugin;
+ this.singleton = singleton;
+ }
+
+ public String getName() {
+ return name;
+ }
+ public String getPlugin() {
+ return plugin;
+ }
+ public boolean isSingleton() {
+ return singleton;
+ }
+
+ public String toString() {
+ return "ResourceType[name='" + name + "', plugin='" + plugin + "'" + "]";
+ }
+ }
+
+ public static class Resource implements Serializable {
+
+ private static final long serialVersionUID = 1L;
+ private int id;
+ private String name;
+ private ResourceType type;
+
+ /**
+ * @param id
+ * @param name
+ * @param type
+ */
+ public Resource(int id, String name, ResourceType type) {
+ this.id = id;
+ this.name = name;
+ this.type = type;
+ }
+
+ public int getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public ResourceType getType() {
+ return type;
+ }
+
+ public String toString() {
+ return "Resource[id=" + id + ", name='" + name + "', type=" + type + "]";
+ }
+ }
+
+ public DisambiguationReport(T original, List<Resource> parents, ResourceType resourceType) {
this.original = original;
this.parents = Collections.unmodifiableList(parents);
- this.resourceTypeName = resourceTypeName;
- this.resourceTypePluginName = resourceTypePluginName;
+ this.resourceType = resourceType;
}
public T getOriginal() {
return original;
}
- public List<ResourceParentFlyweight> getParents() {
+ public List<Resource> getParents() {
return parents;
}
+ @Deprecated
public String getResourceTypeName() {
- return resourceTypeName;
+ return resourceType.getName();
}
+ @Deprecated
public String getResourceTypePluginName() {
- return resourceTypePluginName;
+ return resourceType.getPlugin();
+ }
+
+ /**
+ * @return the ResourceType of the resource represented by the {@link #getOriginal()}
+ */
+ public ResourceType getResourceType() {
+ return resourceType;
}
public String toString() {
- return "DisambiguationReport(type=" + resourceTypeName + ", plugin=" + resourceTypePluginName + ", parents=" + parents + ", original=" + original + ")";
+ return "DisambiguationReport(type=" + resourceType + ", parents=" + parents + ", original=" + original + ")";
}
}
\ No newline at end of file
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceParentFlyweight.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceParentFlyweight.java
deleted file mode 100644
index c0d09ca..0000000
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceParentFlyweight.java
+++ /dev/null
@@ -1,65 +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, version 2, as
- * published by the Free Software Foundation, and/or the GNU Lesser
- * General Public License, version 2.1, also as published by the Free
- * Software Foundation.
- *
- * 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 and the GNU Lesser General Public License
- * for more details.
- *
- * You should have received a copy of the GNU General Public License
- * and the GNU Lesser General Public License along with this program;
- * if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
- */
-
-package org.rhq.core.domain.resource.composite;
-
-import java.io.Serializable;
-
-/**
- * A light-weight representation of a resource parent.
- *
- * @author Lukas Krejci
- */
-public class ResourceParentFlyweight implements Serializable {
-
- private static final long serialVersionUID = 1L;
- private int parentId;
- private String parentName;
- private String parentResourceTypeName;
-
- /**
- * @param parentId
- * @param parentName
- */
- public ResourceParentFlyweight(int parentId, String parentName, String parentResourceTypeName) {
- this.parentId = parentId;
- this.parentName = parentName;
- this.parentResourceTypeName = parentResourceTypeName;
- }
-
- public int getParentId() {
- return parentId;
- }
-
- public String getParentName() {
- return parentName;
- }
-
- public String getParentResourceTypeName() {
- return parentResourceTypeName;
- }
-
- public String toString() {
- return "ResourceParentFlyweight(id=" + parentId + ", name=" + parentName + ")";
- }
-}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageComponent.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageComponent.java
index fdfde42..98502bc 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageComponent.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageComponent.java
@@ -28,7 +28,7 @@ import java.util.List;
import javax.faces.component.UIComponentBase;
import javax.faces.context.FacesContext;
-import org.rhq.core.domain.resource.composite.ResourceParentFlyweight;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.gui.util.FacesComponentUtility;
/**
@@ -49,7 +49,7 @@ public class ResourcePartialLineageComponent extends UIComponentBase {
private Boolean renderLinks;
private String separator;
- private List<ResourceParentFlyweight> parents;
+ private List<DisambiguationReport.Resource> parents;
public String getFamily() {
return COMPONENT_FAMILY;
@@ -86,7 +86,7 @@ public class ResourcePartialLineageComponent extends UIComponentBase {
}
@SuppressWarnings("unchecked")
- public List<ResourceParentFlyweight> getParents() {
+ public List<DisambiguationReport.Resource> getParents() {
if (parents == null) {
//do *NOT* store this value into the parents explicitly
//unless dynamic updates (if the expression is in loop for example)
@@ -97,7 +97,7 @@ public class ResourcePartialLineageComponent extends UIComponentBase {
}
}
- public void setParents(List<ResourceParentFlyweight> parents) {
+ public void setParents(List<DisambiguationReport.Resource> parents) {
this.parents = parents;
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
index 63eeda4..d6e12a9 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
@@ -32,7 +32,7 @@ import javax.faces.context.FacesContext;
import javax.faces.context.ResponseWriter;
import javax.faces.render.Renderer;
-import org.rhq.core.domain.resource.composite.ResourceParentFlyweight;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
/**
* Renderer for {@link ResourcePartialLineageComponent}
@@ -47,13 +47,13 @@ public class ResourcePartialLineageRenderer extends Renderer {
ResourcePartialLineageComponent lineageComponent = (ResourcePartialLineageComponent) component;
String separator = lineageComponent.getSeparator();
- List<ResourceParentFlyweight> parents = lineageComponent.getParents();
+ List<DisambiguationReport.Resource> parents = lineageComponent.getParents();
boolean renderLinks = lineageComponent.getRenderLinks();
if (parents != null && parents.size() > 0) {
ResponseWriter writer = context.getResponseWriter();
- Iterator<ResourceParentFlyweight> parentsIt = parents.iterator();
+ Iterator<DisambiguationReport.Resource> parentsIt = parents.iterator();
if (renderLinks) {
encodeUrl(writer, parentsIt.next());
@@ -71,21 +71,23 @@ public class ResourcePartialLineageRenderer extends Renderer {
}
}
- private void encodeUrl(ResponseWriter writer, ResourceParentFlyweight parent) throws IOException {
+ private void encodeUrl(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
writer.startElement("a", null);
writer.writeAttribute("href", getUrl(parent), null);
encodeSimple(writer, parent);
writer.endElement("a");
}
- private void encodeSimple(ResponseWriter writer, ResourceParentFlyweight parent) throws IOException {
- writer.writeText(parent.getParentName(), null);
- writer.writeText(" (", null);
- writer.writeText(parent.getParentResourceTypeName(), null);
- writer.writeText(")", null);
+ private void encodeSimple(ResponseWriter writer, DisambiguationReport.Resource parent) throws IOException {
+ writer.writeText(parent.getName(), null);
+ if (!parent.getType().isSingleton()) {
+ writer.writeText(" (", null);
+ writer.writeText(parent.getType().getName(), null);
+ writer.writeText(")", null);
+ }
}
- private static String getUrl(ResourceParentFlyweight parent) {
- return RESOURCE_URL + "?id=" + parent.getParentId();
+ private static String getUrl(DisambiguationReport.Resource parent) {
+ return RESOURCE_URL + "?id=" + parent.getId();
}
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
index 589b54c..082425d 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
@@ -39,7 +39,6 @@ import org.rhq.core.domain.resource.ResourceCategory;
import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
-import org.rhq.core.domain.resource.composite.ResourceParentFlyweight;
import org.rhq.core.domain.resource.group.GroupCategory;
import org.rhq.core.domain.resource.group.ResourceGroup;
import org.rhq.core.domain.util.PageControl;
@@ -189,5 +188,44 @@ public class AddGroupResourcesFormPrepareAction extends Action {
}
return resourceCategoryTypes;
- }
-}
\ No newline at end of file
+ }
+
+ //
+ // These two methods are to support the resource names disambiguation in the above code.
+ // Hopefully this page gets rewritten in JSF so that we don't have to employ this kind of
+ // nasties.
+ //
+
+ private static PageList<Resource> buildResourceList(ResourceNamesDisambiguationResult<Resource> results, int totalSize, PageControl pageControl) {
+ ArrayList<Resource> convertedResults = new ArrayList<Resource>(results.getResolution().size());
+
+ for(DisambiguationReport<Resource> dr : results.getResolution()) {
+ Resource resource = dr.getOriginal();
+
+ Resource parent = resource.getParentResource();
+ //platforms don't have parents, need to check for null here
+ if (parent != null) {
+ parent.setName(buildLineage(dr.getParents()));
+ }
+
+ convertedResults.add(resource);
+ }
+ return new PageList<Resource>(convertedResults, totalSize, pageControl);
+ }
+
+ private static String buildLineage(List<DisambiguationReport.Resource> parents) {
+ if (parents == null || parents.size() == 0) {
+ return "";
+ }
+
+ Iterator<DisambiguationReport.Resource> it = parents.iterator();
+
+ StringBuilder bld = new StringBuilder(it.next().getName());
+
+ while (it.hasNext()) {
+ bld.append(ResourcePartialLineageComponent.DEFAULT_SEPARATOR).append(it.next().getName());
+ }
+
+ return bld.toString();
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
index 0e66beb..b58a0b9 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
@@ -126,17 +126,32 @@
<rich:column>
<f:facet name="header">
<onc:sortableColumnHeader sort="r.name">
- <h:outputText styleClass="headerText" value="Resource" />
+ <h:outputText styleClass="headerText" value="Name" />
</onc:sortableColumnHeader>
</f:facet>
<h:outputLink value="#{onf:getDefaultResourceTabURL()}">
<f:param name="id" value="#{item.original.resource.id}" />
<h:outputText value="#{item.original.resource.name}" />
+ <!--
<h:outputText value=" (#{item.original.resource.resourceType.name})" />
+ -->
+ <h:outputText value="#{item.resourceType.singleton ? '' : ' ('}" />
+ <h:outputText value="#{item.resourceType.singleton ? '' : item.original.resource.resourceType.name}" />
+ <h:outputText value="#{item.resourceType.singleton ? '' : ')'}" />
</h:outputLink>
</rich:column>
-
+<!--
+ <rich:column>
+ <f:facet name="header">
+ <onc:sortableColumnHeader sort="r.resourceType.name">
+ <h:outputText styleClass="headerText" value="Type" />
+ </onc:sortableColumnHeader>
+ </f:facet>
+
+ <h:outputText value="#{item.original.resource.resourceType.name}" />
+ </rich:column>
+ -->
<rich:column>
<f:facet name="header">
<h:outputText styleClass="headerText" value="Location" />
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index f4cde3a..a427db1 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -95,7 +95,6 @@ import org.rhq.core.domain.resource.composite.ResourceHealthComposite;
import org.rhq.core.domain.resource.composite.ResourceIdFlyWeight;
import org.rhq.core.domain.resource.composite.ResourceInstallCount;
import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
-import org.rhq.core.domain.resource.composite.ResourceParentFlyweight;
import org.rhq.core.domain.resource.composite.ResourceWithAvailability;
import org.rhq.core.domain.resource.flyweight.FlyweightCache;
import org.rhq.core.domain.resource.flyweight.ResourceFlyweight;
@@ -2169,7 +2168,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
//k, now let's construct the JPQL query to get the parents and type infos...
StringBuilder selectBuilder = new StringBuilder(
- "SELECT r0.id, r0.resourceType.name, r0.resourceType.plugin");
+ "SELECT r0.id, r0.resourceType.name, r0.resourceType.plugin, r0.resourceType.singleton");
StringBuilder fromBuilder = new StringBuilder("FROM Resource r0");
for (i = 1; i <= disambiguationLevel; ++i) {
@@ -2177,6 +2176,9 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
selectBuilder.append(", r").append(i).append(".id");
selectBuilder.append(", r").append(i).append(".name");
selectBuilder.append(", r").append(i).append(".resourceType.name");
+ selectBuilder.append(", r").append(i).append(".resourceType.plugin");
+ selectBuilder.append(", r").append(i).append(".resourceType.singleton");
+
fromBuilder.append(" left join r").append(pi).append(".parentResource r").append(i);
}
@@ -2189,25 +2191,31 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
@SuppressWarnings("unchecked")
List<Object[]> parentsResults = (List<Object[]>) parentsQuery.getResultList();
for (Object[] parentsResult : parentsResults) {
- List<ResourceParentFlyweight> parents = new ArrayList<ResourceParentFlyweight>(disambiguationLevel);
+ List<DisambiguationReport.Resource> parents = new ArrayList<DisambiguationReport.Resource>(disambiguationLevel);
Integer resourceId = (Integer) parentsResult[0];
String typeName = (String) parentsResult[1];
String pluginName = (String) parentsResult[2];
-
+ Boolean singleton = (Boolean) parentsResult[3];
+
+ DisambiguationReport.ResourceType resourceType = new DisambiguationReport.ResourceType(typeName, pluginName, singleton);
+
for (i = 0; i < disambiguationLevel; ++i) {
- Integer parentId = (Integer) parentsResult[3 + 3 * i];
+ Integer parentId = (Integer) parentsResult[4 + 5 * i];
if (parentId == null)
break;
- String parentName = (String) parentsResult[3 + 3 * i + 1];
- String parentType = (String) parentsResult[3 + 3 * i + 2];
+ String parentName = (String) parentsResult[4 + 5 * i + 1];
+ String parentType = (String) parentsResult[4 + 5 * i + 2];
+ String parentPlugin = (String) parentsResult[4 + 5 * i + 3];
+ Boolean parentSingleton = (Boolean) parentsResult[4 + 5 * i + 4];
+
+ DisambiguationReport.ResourceType type = new DisambiguationReport.ResourceType(parentType, parentPlugin, parentSingleton);
- parents.add(new ResourceParentFlyweight(parentId, parentName, parentType));
+ parents.add(new DisambiguationReport.Resource(parentId, parentName, type));
}
//update all the reports that correspond to this resourceId
for (MutableDisambiguationReport<T> report : reportsByResourceId.get(resourceId)) {
- report.typeName = typeName;
- report.pluginName = pluginName;
+ report.resourceType = resourceType;
report.parents = parents;
}
}
@@ -2225,13 +2233,12 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
private static class MutableDisambiguationReport<T> {
public T original;
- public String typeName;
- public String pluginName;
- public List<ResourceParentFlyweight> parents;
+ public DisambiguationReport.ResourceType resourceType;
+ public List<DisambiguationReport.Resource> parents;
public DisambiguationReport<T> getReport() {
return new DisambiguationReport<T>(original, parents == null ? Collections
- .<ResourceParentFlyweight> emptyList() : parents, typeName, pluginName);
+ .<DisambiguationReport.Resource> emptyList() : parents, resourceType);
}
}
}
commit 1ae4b54324d310c4e7e3ccc15ba811b332c99a51
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Wed Apr 21 09:44:37 2010 +0200
Preliminary version of search results UI.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceParentFlyweight.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceParentFlyweight.java
index 1298df4..c0d09ca 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceParentFlyweight.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/ResourceParentFlyweight.java
@@ -35,14 +35,16 @@ public class ResourceParentFlyweight implements Serializable {
private static final long serialVersionUID = 1L;
private int parentId;
private String parentName;
-
+ private String parentResourceTypeName;
+
/**
* @param parentId
* @param parentName
*/
- public ResourceParentFlyweight(int parentId, String parentName) {
+ public ResourceParentFlyweight(int parentId, String parentName, String parentResourceTypeName) {
this.parentId = parentId;
this.parentName = parentName;
+ this.parentResourceTypeName = parentResourceTypeName;
}
public int getParentId() {
@@ -53,6 +55,10 @@ public class ResourceParentFlyweight implements Serializable {
return parentName;
}
+ public String getParentResourceTypeName() {
+ return parentResourceTypeName;
+ }
+
public String toString() {
return "ResourceParentFlyweight(id=" + parentId + ", name=" + parentName + ")";
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
index a526a53..63eeda4 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/inventory/resource/ResourcePartialLineageRenderer.java
@@ -80,6 +80,9 @@ public class ResourcePartialLineageRenderer extends Renderer {
private void encodeSimple(ResponseWriter writer, ResourceParentFlyweight parent) throws IOException {
writer.writeText(parent.getParentName(), null);
+ writer.writeText(" (", null);
+ writer.writeText(parent.getParentResourceTypeName(), null);
+ writer.writeText(")", null);
}
private static String getUrl(ResourceParentFlyweight parent) {
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
index 571d93d..0e66beb 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/rhq/inventory/browseResources.xhtml
@@ -65,7 +65,7 @@
value="#{browseResourcesDataModel}"
var="item"
width="100%"
- columnsWidth="1%, 5%, 20%, 20%, 5%, 10%, 10%, 25%, 4%"
+ columnsWidth="1%, 5%, 30%, 44%, 19%, 1%"
headerClass="tableRowHeader"
footerClass="on-pager-footer"
onRowMouseOver="this.style.backgroundColor='#E7E7E7'"
@@ -125,20 +125,21 @@
<rich:column>
<f:facet name="header">
- <onc:sortableColumnHeader sort="name">
- <h:outputText styleClass="headerText" value="Name" />
+ <onc:sortableColumnHeader sort="r.name">
+ <h:outputText styleClass="headerText" value="Resource" />
</onc:sortableColumnHeader>
</f:facet>
<h:outputLink value="#{onf:getDefaultResourceTabURL()}">
<f:param name="id" value="#{item.original.resource.id}" />
<h:outputText value="#{item.original.resource.name}" />
+ <h:outputText value=" (#{item.original.resource.resourceType.name})" />
</h:outputLink>
</rich:column>
<rich:column>
<f:facet name="header">
- <h:outputText styleClass="headerText" value="Parent" />
+ <h:outputText styleClass="headerText" value="Location" />
</f:facet>
<onc:resourcePartialLineage parents="#{item.parents}" renderLinks="true"/>
@@ -146,37 +147,7 @@
<rich:column>
<f:facet name="header">
- <onc:sortableColumnHeader sort="resourceType.category">
- <h:outputText styleClass="headerText" value="Category" />
- </onc:sortableColumnHeader>
- </f:facet>
-
- <h:outputText value="#{item.original.resource.resourceType.category.name}" />
- </rich:column>
-
- <rich:column>
- <f:facet name="header">
- <onc:sortableColumnHeader sort="resourceType.name">
- <h:outputText styleClass="headerText" value="Type" />
- </onc:sortableColumnHeader>
- </f:facet>
-
- <h:outputText value="#{item.original.resource.resourceType.name}" />
- </rich:column>
-
- <rich:column>
- <f:facet name="header">
- <onc:sortableColumnHeader sort="resourceType.plugin">
- <h:outputText styleClass="headerText" value="Plugin" />
- </onc:sortableColumnHeader>
- </f:facet>
-
- <h:outputText value="#{item.original.resource.resourceType.plugin}" />
- </rich:column>
-
- <rich:column>
- <f:facet name="header">
- <onc:sortableColumnHeader sort="description">
+ <onc:sortableColumnHeader sort="r.description">
<h:outputText styleClass="headerText" value="Description" />
</onc:sortableColumnHeader>
</f:facet>
@@ -196,7 +167,7 @@
<f:facet name="footer">
<rich:columnGroup>
- <rich:column colspan="9" width="100%">
+ <rich:column colspan="6" width="100%">
<onc:selectCommandButton action="#{BrowseResourcesUIBean.uninventorySelectedResources}"
value="UNINVENTORY SELECTED" target="selectedItems" styleClass="on-pager-button buttonsmall"
rendered="#{GlobalPermissionsUIBean.inventory}" />
diff --git a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
index 5fbbaa6..f4cde3a 100644
--- a/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
+++ b/modules/enterprise/server/jar/src/main/java/org/rhq/enterprise/server/resource/ResourceManagerBean.java
@@ -2176,6 +2176,7 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
int pi = i - 1;
selectBuilder.append(", r").append(i).append(".id");
selectBuilder.append(", r").append(i).append(".name");
+ selectBuilder.append(", r").append(i).append(".resourceType.name");
fromBuilder.append(" left join r").append(pi).append(".parentResource r").append(i);
}
@@ -2193,12 +2194,14 @@ public class ResourceManagerBean implements ResourceManagerLocal, ResourceManage
String typeName = (String) parentsResult[1];
String pluginName = (String) parentsResult[2];
- for (i = 1; i <= disambiguationLevel; ++i) {
- Integer parentId = (Integer) parentsResult[2 * i + 1];
+ for (i = 0; i < disambiguationLevel; ++i) {
+ Integer parentId = (Integer) parentsResult[3 + 3 * i];
if (parentId == null)
break;
- String parentName = (String) parentsResult[2 * i + 2];
- parents.add(new ResourceParentFlyweight(parentId, parentName));
+ String parentName = (String) parentsResult[3 + 3 * i + 1];
+ String parentType = (String) parentsResult[3 + 3 * i + 2];
+
+ parents.add(new ResourceParentFlyweight(parentId, parentName, parentType));
}
//update all the reports that correspond to this resourceId
commit 7bdf38a07aaf771c5d9c0136d2eccf251d9dfb59
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue May 4 14:01:30 2010 +0200
BZ 580919 - The "Has Alerts or Currently Unavailable" (aka problemResources) portlet uses resource names disambiguation.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/problemresources/ViewAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/problemresources/ViewAction.java
index 0e8a6a2..6fc3516 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/problemresources/ViewAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/problemresources/ViewAction.java
@@ -38,23 +38,33 @@ import org.apache.struts.tiles.actions.TilesAction;
import org.rhq.core.domain.auth.Subject;
import org.rhq.core.domain.resource.composite.ProblemResourceComposite;
import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.gui.legacy.WebUser;
import org.rhq.enterprise.gui.legacy.WebUserPreferences;
import org.rhq.enterprise.gui.legacy.WebUserPreferences.ProblemResourcesPortletPreferences;
+import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.gui.legacy.util.SessionUtils;
import org.rhq.enterprise.server.measurement.MeasurementProblemManagerLocal;
import org.rhq.enterprise.server.measurement.util.MeasurementUtils;
+import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
public class ViewAction extends TilesAction {
private static final Log log = LogFactory.getLog(ViewAction.class);
+ private static final IntExtractor<ProblemResourceComposite> RESOURCE_ID_EXTRACTOR = new IntExtractor<ProblemResourceComposite>() {
+ public int extract(ProblemResourceComposite object) {
+ return object.getResourceId();
+ }
+ };
+
@Override
public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
- List<ProblemResourceComposite> list = new ArrayList<ProblemResourceComposite>();
+ List<DisambiguatedResourceListUtil.Record<ProblemResourceComposite>> disambiguatedList = new ArrayList<DisambiguatedResourceListUtil.Record<ProblemResourceComposite>>();
String timeRange = getResources(request).getMessage("dash.home.ProblemResources.timeRangeUnlimited");
try {
@@ -88,9 +98,15 @@ public class ViewAction extends TilesAction {
try {
MeasurementProblemManagerLocal problemManager = LookupUtil.getMeasurementProblemManager();
+ ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
long start = System.currentTimeMillis();
- list = problemManager.findProblemResources(subject, begin, new PageControl(0,
+ PageList<ProblemResourceComposite> list = problemManager.findProblemResources(subject, begin, new PageControl(0,
problemResourcePreferences.range));
+
+ disambiguatedList = DisambiguatedResourceListUtil.buildResourceList(
+ resourceManager.disambiguate(list, true, RESOURCE_ID_EXTRACTOR),
+ list.getTotalSize(), list.getPageControl(), true);
+
long end = System.currentTimeMillis();
log.debug("Performance: Took [" + (end - start) + "]ms to find " + problemResourcePreferences.range
+ " problem resources");
@@ -105,7 +121,7 @@ public class ViewAction extends TilesAction {
}
} finally {
request.setAttribute("timeRange", timeRange);
- context.putAttribute("problemResources", list);
+ context.putAttribute("problemResources", disambiguatedList);
}
return null;
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
index e0c3b5b..24a373a 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
@@ -52,10 +52,12 @@ public class DisambiguatedResourceListUtil {
private T original;
private String lineage;
+ private String originalResourceTypeName;
- public Record(T original, String lineage) {
+ public Record(T original, String resourceTypeName, String lineage) {
this.original = original;
this.lineage = lineage;
+ this.originalResourceTypeName = resourceTypeName;
}
public T getOriginal() {
@@ -65,13 +67,21 @@ public class DisambiguatedResourceListUtil {
public String getLineage() {
return lineage;
}
+
+ public String getOriginalResourceTypeName() {
+ return originalResourceTypeName;
+ }
}
public static <T> PageList<Record<T>> buildResourceList(ResourceNamesDisambiguationResult<T> results, int totalSize, PageControl pageControl, boolean renderLinks) {
ArrayList<Record<T>> convertedResults = new ArrayList<Record<T>>(results.getResolution().size());
for(DisambiguationReport<T> dr : results.getResolution()) {
- convertedResults.add(new Record<T>(dr.getOriginal(), buildLineage(dr.getParents(), renderLinks)));
+ String typeName = dr.getResourceTypeName();
+ if (results.isPluginResolutionNeeded()) {
+ typeName += " (" + dr.getResourceTypePluginName() + " plugin)";
+ }
+ convertedResults.add(new Record<T>(dr.getOriginal(), typeName, buildLineage(dr.getParents(), renderLinks)));
}
return new PageList<Record<T>>(convertedResults, totalSize, pageControl);
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/problemResources/View.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/problemResources/View.jsp
index f7cea49..93695da 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/problemResources/View.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/problemResources/View.jsp
@@ -32,19 +32,21 @@
</c:when>
<c:when test="${not empty problemResources}">
<display:table cellspacing="0" cellpadding="0" width="100%" action="/Dashboard.do"
- var="probres" items="${problemResources}" >
- <display:column width="60%" href="/rhq/resource/summary/overview.xhtml?id=${probres.resourceId}" property="resourceName" title="dash.home.TableHeader.ResourceName"/>
- <display:column width="10%" property="numAlerts" title="dash.home.TableHeader.Alerts" align="center"/>
- <display:column width="10%" property="availabilityType" title="resource.common.monitor.visibility.CAvailabilityTH" align="center" >
- <display:availabilitydecorator/>
- </display:column>
- <display:footer>
- <tr class="ListRow">
- <td class="ListCell" colspan="4">
- <i><c:out value="${timeRange}"/></i>
- </td>
- </tr>
- </display:footer>
+ var="obj" items="${problemResources}" >
+ <display:column width="20%" href="/rhq/resource/summary/overview.xhtml?id=${obj.original.resourceId}" property="original.resourceName" title="dash.home.TableHeader.ResourceName"/>
+ <display:column width="20%" property="originalResourceTypeName" title="dash.home.TableHeader.Type"/>
+ <display:column width="20%" property="lineage" title="dash.home.TableHeader.Location"/>
+ <display:column width="10%" property="original.numAlerts" title="dash.home.TableHeader.Alerts" align="center"/>
+ <display:column width="10%" property="original.availabilityType" title="resource.common.monitor.visibility.CAvailabilityTH" align="center" >
+ <display:availabilitydecorator/>
+ </display:column>
+ <display:footer>
+ <tr class="ListRow">
+ <td class="ListCell" colspan="4">
+ <i><c:out value="${timeRange}"/></i>
+ </td>
+ </tr>
+ </display:footer>
</display:table>
</c:when>
<c:otherwise>
commit dd31f7bea3ac6e1d53c8661e3945d22ee0c966fa
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Tue May 4 12:58:06 2010 +0200
BZ 580919 - Operations (aka controlActions) portlet converted to disambiguate resources.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/controlactions/ViewAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/controlactions/ViewAction.java
index e91edd2..a59c02f 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/controlactions/ViewAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/controlactions/ViewAction.java
@@ -36,17 +36,32 @@ import org.rhq.core.domain.operation.composite.ResourceOperationScheduleComposit
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.domain.util.PageOrdering;
+import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.gui.legacy.WebUser;
import org.rhq.enterprise.gui.legacy.WebUserPreferences;
import org.rhq.enterprise.gui.legacy.WebUserPreferences.OperationPortletPreferences;
+import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.gui.legacy.util.SessionUtils;
import org.rhq.enterprise.server.operation.OperationManagerLocal;
+import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
public class ViewAction extends TilesAction {
private static final Log log = LogFactory.getLog(ViewAction.class);
+ private static final IntExtractor<ResourceOperationLastCompletedComposite> RESOURCE_OPERATION_RESOURCE_ID_EXTRACTOR = new IntExtractor<ResourceOperationLastCompletedComposite>() {
+ public int extract(ResourceOperationLastCompletedComposite object) {
+ return object.getResourceId();
+ }
+ };
+
+ private static final IntExtractor<ResourceOperationScheduleComposite> RESOURCE_OPERATION_SCHEDULE_RESOURCE_ID_EXTRACTOR = new IntExtractor<ResourceOperationScheduleComposite>() {
+ public int extract(ResourceOperationScheduleComposite object) {
+ return object.getResourceId();
+ }
+ };
+
@Override
public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
@@ -54,9 +69,9 @@ public class ViewAction extends TilesAction {
boolean displayLastCompleted = false;
boolean displayNextScheduled = false;
- PageList<ResourceOperationLastCompletedComposite> lastCompletedResourceOps = new PageList<ResourceOperationLastCompletedComposite>();
+ PageList<DisambiguatedResourceListUtil.Record<ResourceOperationLastCompletedComposite>> disambiguatedLastCompletedResourceOps = new PageList<DisambiguatedResourceListUtil.Record<ResourceOperationLastCompletedComposite>>();
PageList<GroupOperationLastCompletedComposite> lastCompletedGroupOps = new PageList<GroupOperationLastCompletedComposite>();
- PageList<ResourceOperationScheduleComposite> nextScheduledResourceOps = new PageList<ResourceOperationScheduleComposite>();
+ PageList<DisambiguatedResourceListUtil.Record<ResourceOperationScheduleComposite>> disambiguatedNextScheduledResourceOps = new PageList<DisambiguatedResourceListUtil.Record<ResourceOperationScheduleComposite>>();
PageList<GroupOperationScheduleComposite> nextScheduledGroupOps = new PageList<GroupOperationScheduleComposite>();
try {
@@ -74,13 +89,18 @@ public class ViewAction extends TilesAction {
displayNextScheduled = operationPreferences.useNextScheduled;
OperationManagerLocal manager = LookupUtil.getOperationManager();
-
+ ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
+
if (operationPreferences.useLastCompleted) {
PageControl pageControl = new PageControl(0, operationPreferences.lastCompleted);
pageControl.initDefaultOrderingField("ro.createdTime", PageOrdering.DESC);
- lastCompletedResourceOps = manager.findRecentlyCompletedResourceOperations(user.getSubject(), null,
- pageControl);
+ PageList<ResourceOperationLastCompletedComposite> lastCompletedResourceOps =
+ manager.findRecentlyCompletedResourceOperations(user.getSubject(), null, pageControl);
+ disambiguatedLastCompletedResourceOps = DisambiguatedResourceListUtil.buildResourceList(
+ resourceManager.disambiguate(lastCompletedResourceOps, true, RESOURCE_OPERATION_RESOURCE_ID_EXTRACTOR),
+ lastCompletedResourceOps.getTotalSize(), lastCompletedResourceOps.getPageControl(), true);
+
pageControl = new PageControl(0, operationPreferences.lastCompleted);
pageControl.initDefaultOrderingField("go.createdTime", PageOrdering.DESC);
lastCompletedGroupOps = manager.findRecentlyCompletedGroupOperations(user.getSubject(), pageControl);
@@ -88,9 +108,14 @@ public class ViewAction extends TilesAction {
if (operationPreferences.useNextScheduled) {
PageControl pageControl = new PageControl(0, operationPreferences.nextScheduled);
- nextScheduledResourceOps = manager.findCurrentlyScheduledResourceOperations(user.getSubject(),
+ PageList<ResourceOperationScheduleComposite> nextScheduledResourceOps =
+ manager.findCurrentlyScheduledResourceOperations(user.getSubject(),
pageControl);
+ disambiguatedNextScheduledResourceOps = DisambiguatedResourceListUtil.buildResourceList(
+ resourceManager.disambiguate(nextScheduledResourceOps, true, RESOURCE_OPERATION_SCHEDULE_RESOURCE_ID_EXTRACTOR),
+ nextScheduledResourceOps.getTotalSize(), nextScheduledResourceOps.getPageControl(), true);
+
pageControl = new PageControl(0, operationPreferences.nextScheduled);
nextScheduledGroupOps = manager.findCurrentlyScheduledGroupOperations(user.getSubject(), pageControl);
}
@@ -103,9 +128,9 @@ public class ViewAction extends TilesAction {
} finally {
context.putAttribute("displayLastCompleted", displayLastCompleted);
context.putAttribute("displayNextScheduled", displayNextScheduled);
- context.putAttribute("lastCompletedResource", lastCompletedResourceOps);
+ context.putAttribute("lastCompletedResource", disambiguatedLastCompletedResourceOps);
context.putAttribute("lastCompletedGroup", lastCompletedGroupOps);
- context.putAttribute("nextScheduledResource", nextScheduledResourceOps);
+ context.putAttribute("nextScheduledResource", disambiguatedNextScheduledResourceOps);
context.putAttribute("nextScheduledGroup", nextScheduledGroupOps);
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/controlactions/View.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/controlactions/View.jsp
index e198032..810963c 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/controlactions/View.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/controlactions/View.jsp
@@ -45,32 +45,34 @@
<c:otherwise>
<c:if test="${!empty lastCompletedResource}">
<tr>
- <td width="40%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ResourceName"/></td>
+ <td width="25%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ResourceName"/></td>
<td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Type"/></td>
+ <td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Location"/></td>
<td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ControlAction"/></td>
- <td width="25%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
+ <td width="20%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
<td width="5%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Status"/></td>
</tr>
<c:forEach items="${lastCompletedResource}" var="obj">
<tr class="ListRow">
- <td class="ListCell"><html:link page="/rhq/resource/summary/overview.xhtml?id=${obj.resourceId}"><c:out value="${obj.resourceName}"/></html:link></td>
- <td class="ListCell"><c:out value="${obj.resourceTypeName}"/></td>
- <td class="ListCell"><c:out value="${obj.operationName}"/></td>
- <td class="ListCell"><hq:dateFormatter value="${obj.operationStartTime}"/></td>
+ <td class="ListCell"><html:link page="/rhq/resource/summary/overview.xhtml?id=${obj.original.resourceId}"><c:out value="${obj.original.resourceName}"/></html:link></td>
+ <td class="ListCell"><c:out value="${obj.original.resourceTypeName}"/></td>
+ <td class="ListCell"><c:out value="${obj.lineage}" escapeXml="false"/></td>
+ <td class="ListCell"><c:out value="${obj.original.operationName}"/></td>
+ <td class="ListCell"><hq:dateFormatter value="${obj.original.operationStartTime}"/></td>
<td class="ListCell" align="center">
- <html:link page="/rhq/resource/operation/resourceOperationHistoryDetails.xhtml?id=${obj.resourceId}&opId=${obj.operationHistoryId}">
+ <html:link page="/rhq/resource/operation/resourceOperationHistoryDetails.xhtml?id=${obj.original.resourceId}&opId=${obj.original.operationHistoryId}">
<c:choose>
- <c:when test="${obj.operationStatus == 'SUCCESS'}">
- <html:img page="/images/icons/availability_green_16.png" alt="${obj.operationStatus}" title="${obj.operationStatus}" />
+ <c:when test="${obj.original.operationStatus == 'SUCCESS'}">
+ <html:img page="/images/icons/availability_green_16.png" alt="${obj.original.operationStatus}" title="${obj.original.operationStatus}" />
</c:when>
- <c:when test="${obj.operationStatus == 'FAILURE'}">
- <html:img page="/images/icons/availability_red_16.png" alt="${obj.operationStatus}" title="${obj.operationStatus}" />
+ <c:when test="${obj.original.operationStatus == 'FAILURE'}">
+ <html:img page="/images/icons/availability_red_16.png" alt="${obj.original.operationStatus}" title="${obj.original.operationStatus}" />
</c:when>
- <c:when test="${obj.operationStatus == 'CANCELED'}">
- <html:img page="/images/icons/availability_yellow_16.png" alt="${obj.operationStatus}" title="${obj.operationStatus}" />
+ <c:when test="${obj.original.operationStatus == 'CANCELED'}">
+ <html:img page="/images/icons/availability_yellow_16.png" alt="${obj.original.operationStatus}" title="${obj.original.operationStatus}" />
</c:when>
<c:otherwise>
- <html:img page="/images/icons/availability_grey_16.png" alt="${obj.operationStatus}" title="${obj.operationStatus}"/>
+ <html:img page="/images/icons/availability_grey_16.png" alt="${obj.original.operationStatus}" title="${obj.original.operationStatus}"/>
</c:otherwise>
</c:choose>
</html:link>
@@ -81,7 +83,7 @@
<c:if test="${!empty lastCompletedGroup}">
<tr>
<td width="40%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.GroupName"/></td>
- <td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.GroupResourceType"/></td>
+ <td width="35%" class="ListHeaderInactive" colspan="2"><fmt:message key="dash.home.TableHeader.GroupResourceType"/></td>
<td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ControlAction"/></td>
<td width="25%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
<td width="5%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Status"/></td>
@@ -89,7 +91,7 @@
<c:forEach items="${lastCompletedGroup}" var="obj">
<tr class="ListRow">
<td class="ListCell"><html:link page="/rhq/groups/monitor/graphs.xhtml?category=COMPATIBLE&groupId=${obj.groupId}"><c:out value="${obj.groupName}"/></html:link></td>
- <td class="ListCell"><c:out value="${obj.groupResourceTypeName}"/></td>
+ <td class="ListCell" colspan="2"><c:out value="${obj.groupResourceTypeName}"/></td>
<td class="ListCell"><c:out value="${obj.operationName}"/></td>
<td class="ListCell"><hq:dateFormatter value="${obj.operationStartTime}"/></td>
<td class="ListCell" align="center">
@@ -138,31 +140,33 @@
<c:otherwise>
<c:if test="${!empty nextScheduledResource}">
<tr>
- <td width="37" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ResourceName"/></td>
- <td width="21%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Type"/></td>
- <td width="21%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ControlAction"/></td>
- <td width="21%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
+ <td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ResourceName"/></td>
+ <td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Type"/></td>
+ <td width="35%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Location"/></td>
+ <td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ControlAction"/></td>
+ <td width="15%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
</tr>
- <c:forEach items="${nextScheduledResource}" var="schedule">
+ <c:forEach items="${nextScheduledResource}" var="obj">
<tr class="ListRow">
- <td class="ListCell"><html:link page="/rhq/resource/operation/resourceOperationScheduleDetails.xhtml?id=${schedule.resourceId}&jobId=${schedule.operationJobId}"><c:out value="${schedule.resourceName}"/></html:link></td>
- <td class="ListCell"><c:out value="${schedule.resourceTypeName}"/></td>
- <td class="ListCell"><c:out value="${schedule.operationName}"/></td>
- <td class="ListCell"><hq:dateFormatter value="${schedule.operationNextFireTime}"/></td>
+ <td class="ListCell"><html:link page="/rhq/resource/operation/resourceOperationScheduleDetails.xhtml?id=${obj.original.resourceId}&jobId=${obj.original.operationJobId}"><c:out value="${obj.original.resourceName}"/></html:link></td>
+ <td class="ListCell"><c:out value="${obj.original.resourceTypeName}"/></td>
+ <td class="ListCell"><c:out value="${obj.lineage}" escapeXml="false" /></td>
+ <td class="ListCell"><c:out value="${obj.original.operationName}"/></td>
+ <td class="ListCell"><hq:dateFormatter value="${obj.original.operationNextFireTime}"/></td>
</tr>
</c:forEach>
</c:if>
<c:if test="${!empty nextScheduledGroup}">
<tr>
- <td width="37" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.GroupName"/></td>
- <td width="21%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.GroupResourceType"/></td>
- <td width="21%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ControlAction"/></td>
- <td width="21%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
+ <td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.GroupName"/></td>
+ <td width="50%" class="ListHeaderInactive" colspan="2"><fmt:message key="dash.home.TableHeader.GroupResourceType"/></td>
+ <td width="15%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.ControlAction"/></td>
+ <td width="15%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.DateTime"/><html:img page="/images/tb_sortdown_inactive.gif" width="9" height="9" border="0"/></td>
</tr>
<c:forEach items="${nextScheduledGroup}" var="schedule">
<tr class="ListRow">
<td class="ListCell"><html:link page="/rhq/group/operation/groupOperationScheduleDetails.xhtml?groupId=${schedule.groupId}&jobId=${schedule.operationJobId}&category=COMPATIBLE"><c:out value="${schedule.groupName}"/></html:link></td>
- <td class="ListCell"><c:out value="${schedule.groupResourceTypeName}"/></td>
+ <td class="ListCell" colspan="2"><c:out value="${schedule.groupResourceTypeName}"/></td>
<td class="ListCell"><c:out value="${schedule.operationName}"/></td>
<td class="ListCell"><hq:dateFormatter value="${schedule.operationNextFireTime}"/></td>
</tr>
commit 972b649c0e6de9f8539d85b6d0cd69192965d09d
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 3 21:53:38 2010 +0200
BZ 580919 - Recent alerts (aka criticalAlerts) portlet converted to use resource disambiguation.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/addresource/AddResourcesPrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/addresource/AddResourcesPrepareAction.java
index c26fa9f..fe1baf0 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/addresource/AddResourcesPrepareAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/addresource/AddResourcesPrepareAction.java
@@ -40,10 +40,12 @@ import org.rhq.core.domain.resource.ResourceType;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.core.gui.util.StringUtility;
+import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.gui.legacy.Constants;
import org.rhq.enterprise.gui.legacy.WebUser;
import org.rhq.enterprise.gui.legacy.WebUserPreferences;
import org.rhq.enterprise.gui.legacy.util.DashboardUtils;
+import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.gui.legacy.util.RequestUtils;
import org.rhq.enterprise.gui.legacy.util.SessionUtils;
import org.rhq.enterprise.gui.util.WebUtility;
@@ -59,6 +61,12 @@ import org.rhq.enterprise.server.util.LookupUtil;
public class AddResourcesPrepareAction extends Action {
private static final int DEFAULT_RESOURCE_TYPE = -1;
+ private static final IntExtractor<Resource> RESOURCE_ID_EXTRACTOR = new IntExtractor<Resource>() {
+ public int extract(Resource object) {
+ return object.getId();
+ }
+ };
+
@Override
@SuppressWarnings( { "unchecked", "deprecation" })
public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
@@ -101,10 +109,14 @@ public class AddResourcesPrepareAction extends Action {
PageList<Resource> pendingResources = resourceManager.findResourceByIds(subject, pendingResourceArray, false,
pcPending);
+ PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedPendingResources =
+ DisambiguatedResourceListUtil.buildResourceList(resourceManager.disambiguate(pendingResources, true, RESOURCE_ID_EXTRACTOR),
+ pendingResources.getTotalSize(), pendingResources.getPageControl(), false);
+
// give 'em to the jsp page
log.debug("put selected page of pending resources in request");
- request.setAttribute(Constants.PENDING_RESOURCES_ATTR, pendingResources);
- request.setAttribute(Constants.NUM_PENDING_RESOURCES_ATTR, pendingResources.getTotalSize());
+ request.setAttribute(Constants.PENDING_RESOURCES_ATTR, disambiguatedPendingResources);
+ request.setAttribute(Constants.NUM_PENDING_RESOURCES_ATTR, disambiguatedPendingResources.getTotalSize());
// available resources are all resources in the system that are not associated with the user and are not pending
log.debug("determine if user wants to filter available resources");
@@ -119,9 +131,14 @@ public class AddResourcesPrepareAction extends Action {
availableResources = resourceManager.findAvailableResourcesForDashboardPortlet(subject, typeIdFilter,
categoryFilter, excludeIds, pcAvail);
+ PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedAvailableResources =
+ DisambiguatedResourceListUtil.buildResourceList(resourceManager.disambiguate(availableResources, true, RESOURCE_ID_EXTRACTOR),
+ availableResources.getTotalSize(), availableResources.getPageControl(), false);
+
+
log.debug("put selected page of available resources in request");
- request.setAttribute(Constants.AVAIL_RESOURCES_ATTR, availableResources);
- request.setAttribute(Constants.NUM_AVAIL_RESOURCES_ATTR, availableResources.getTotalSize());
+ request.setAttribute(Constants.AVAIL_RESOURCES_ATTR, disambiguatedAvailableResources);
+ request.setAttribute(Constants.NUM_AVAIL_RESOURCES_ATTR, disambiguatedAvailableResources.getTotalSize());
log.debug("get the available resources user can filter by");
setDropDowns(addForm, request, subject, categoryFilter);
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/PrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/PrepareAction.java
index f3133c1..b500a72 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/PrepareAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/PrepareAction.java
@@ -32,16 +32,26 @@ import org.apache.struts.tiles.actions.TilesAction;
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.util.IntExtractor;
import org.rhq.enterprise.gui.legacy.Constants;
import org.rhq.enterprise.gui.legacy.WebUser;
import org.rhq.enterprise.gui.legacy.WebUserPreferences;
import org.rhq.enterprise.gui.legacy.WebUserPreferences.AlertsPortletPreferences;
+import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.gui.legacy.util.SessionUtils;
import org.rhq.enterprise.gui.util.WebUtility;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
public class PrepareAction extends TilesAction {
+
+ private static final IntExtractor<Resource> RESOURCE_ID_EXTRACTOR = new IntExtractor<Resource>() {
+
+ public int extract(Resource object) {
+ return object.getId();
+ }
+ };
+
@Override
public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
@@ -65,8 +75,12 @@ public class PrepareAction extends TilesAction {
PageList<Resource> resources = resourceManager.findResourceByIds(user.getSubject(), alertPrefs.asArray(), false,
pageControl);
- request.setAttribute("criticalAlertsList", resources);
- request.setAttribute("criticalAlertsTotalSize", resources.getTotalSize());
+ PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedResources =
+ DisambiguatedResourceListUtil.buildResourceList(resourceManager.disambiguate(resources, true, RESOURCE_ID_EXTRACTOR),
+ resources.getTotalSize(), resources.getPageControl(), false);
+
+ request.setAttribute("criticalAlertsList", disambiguatedResources);
+ request.setAttribute("criticalAlertsTotalSize", disambiguatedResources.getTotalSize());
return null;
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/ViewAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/ViewAction.java
index c96920f..77da660 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/ViewAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/criticalalerts/ViewAction.java
@@ -33,23 +33,32 @@ import org.rhq.core.domain.alert.Alert;
import org.rhq.core.domain.alert.AlertPriority;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
+import org.rhq.core.util.IntExtractor;
import org.rhq.core.util.collection.ArrayUtils;
import org.rhq.enterprise.gui.legacy.WebUser;
import org.rhq.enterprise.gui.legacy.WebUserPreferences;
import org.rhq.enterprise.gui.legacy.WebUserPreferences.AlertsPortletPreferences;
+import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.gui.legacy.util.SessionUtils;
import org.rhq.enterprise.server.alert.AlertManagerLocal;
+import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
public class ViewAction extends TilesAction {
private static final Log log = LogFactory.getLog(ViewAction.class);
+ static final IntExtractor<Alert> RESOURCE_ID_EXTRACTOR = new IntExtractor<Alert>() {
+ public int extract(Alert object) {
+ return object.getAlertDefinition().getResource().getId();
+ }
+ };
+
@Override
public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
- PageList<Alert> alerts = new PageList<Alert>();
+ PageList<DisambiguatedResourceListUtil.Record<Alert>> disambiguatedAlerts = new PageList<DisambiguatedResourceListUtil.Record<Alert>>();
try {
WebUser user = SessionUtils.getWebUser(request.getSession());
if (user == null) {
@@ -64,9 +73,13 @@ public class ViewAction extends TilesAction {
PageControl pageControl = new PageControl(0, alertPrefs.count);
AlertManagerLocal alertManager = LookupUtil.getAlertManager();
- alerts = alertManager.findAlerts(user.getSubject(), ("all".equals(alertPrefs.displayAll) ? null
+ ResourceManagerLocal resourceManager = LookupUtil.getResourceManager();
+ PageList<Alert> alerts = alertManager.findAlerts(user.getSubject(), ("all".equals(alertPrefs.displayAll) ? null
: ArrayUtils.wrapInArray(alertPrefs.asArray())), AlertPriority.getByLegacyIndex(alertPrefs.priority),
alertPrefs.timeRange, pageControl);
+
+ disambiguatedAlerts = DisambiguatedResourceListUtil.buildResourceList(resourceManager.disambiguate(alerts, true, RESOURCE_ID_EXTRACTOR)
+ , alerts.getTotalSize(), alerts.getPageControl(), true);
} catch (Exception e) {
if (log.isDebugEnabled()) {
log.debug("Dashboard Portlet [CriticalAlerts] experienced an error: " + e.getMessage(), e);
@@ -74,7 +87,7 @@ public class ViewAction extends TilesAction {
log.error("Dashboard Portlet [CriticalAlerts] experienced an error: " + e.getMessage());
}
} finally {
- context.putAttribute("criticalAlerts", alerts);
+ context.putAttribute("criticalAlerts", disambiguatedAlerts);
}
return null;
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties b/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties
index 2893eb1..3c46731 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties
+++ b/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties
@@ -877,6 +877,8 @@ dash.settings.SelectedResources=Selected Resources
dash.settings.Resources=Resources
dash.settings.AddToList=Add To List
dash.settings.ListHeader.Resource=Resource
+dash.settings.ListHeader.Type=Resource Type
+dash.settings.ListHeader.Location=Location
dash.settings.ListHeader.ResourceChart=Resource Chart
dash.settings.FormLabel.FilterBy=Filter List By Type:
dash.settings.FormLabel.NameContains=Name Contains:
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/addresources/AddResourcesForm.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/addresources/AddResourcesForm.jsp
index 4ca4d79..35e9965 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/addresources/AddResourcesForm.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/addresources/AddResourcesForm.jsp
@@ -364,20 +364,24 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
<display:table cellpadding="0" cellspacing="0" border="0" width="100%"
action="${selfPaAction}"
items="${AvailableResources}"
- var="resource"
+ var="item"
padRows="true"
rightSidebar="true"
styleId="fromTable"
postfix="a" >
- <display:column width="1%" property="id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"fromToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
+ <display:column width="1%" property="original.id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"fromToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
<display:checkboxdecorator name="availableResources" onclick="ToggleSelection(this, widgetProperties)" styleClass="availableListMember"/>
</display:column>
- <display:column property="name" title="common.header.ResourceName"
- width="40%"
+ <display:column property="original.name" title="common.header.ResourceName"
+ width="30%"
sortAttr="res.name" />
- <display:column property="description" title="common.header.Description"
- width="59%"
- sortAttr="res.resourceType.description" />
+ <display:column property="original.resourceType.name" title="resource.group.inventory.TypeTH"
+ width="39%"
+ sortAttr="res.resourceType.name" >
+ </display:column>
+ <display:column property="lineage" title="resource.group.inventory.ParentTH"
+ width="30%" />
+
</display:table>
</div>
<!-- / -->
@@ -416,15 +420,18 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
leftSidebar="true"
styleId="toTable"
postfix="p" >
- <display:column width="1%" property="id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"toToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
+ <display:column width="1%" property="original.id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"toToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
<display:checkboxdecorator name="pendingResources" onclick="ToggleSelection(this, widgetProperties)" styleClass="pendingListMember"/>
</display:column>
- <display:column property="name" title="common.header.ResourceName"
- width="40%"
+ <display:column property="original.name" title="common.header.ResourceName"
+ width="30%"
sortAttr="res.name" />
- <display:column property="description" title="common.header.Description"
- width="59%"
- sortAttr="res.resourceType.description" />
+ <display:column property="original.resourceType.name" title="resource.group.inventory.TypeTH"
+ width="39%"
+ sortAttr="res.resourceType.name" >
+ </display:column>
+ <display:column property="lineage" title="resource.group.inventory.ParentTH"
+ width="30%" />
</display:table>
</div>
<!-- / -->
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/Properties.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/Properties.jsp
index 59c062e..4221584 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/Properties.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/Properties.jsp
@@ -99,8 +99,10 @@ var help = '<hq:help/>';
<display:checkboxdecorator name="ids" onclick="ToggleSelection(this, widgetProperties, true)" styleClass="listMember"/>
</display:column>
- <display:column width="50%" property="name" sortAttr="res.name" title="dash.settings.ListHeader.Resource" />
- <display:column width="50%" property="description" sortAttr="res.description" title="common.header.Description" />
+ <display:column width="25%" property="original.name" sortAttr="res.name" title="dash.settings.ListHeader.Resource" />
+ <display:column width="25%" property="original.resourceType.name" title="dash.settings.ListHeader.Type" />
+ <display:column width="25%" property="lineage" title="dash.settings.ListHeader.Location" />
+ <display:column width="25%" property="original.description" sortAttr="res.description" title="common.header.Description" />
</display:table>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/View.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/View.jsp
index 23357b0..7e0205e 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/View.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/criticalAlerts/View.jsp
@@ -32,24 +32,30 @@
<c:when test="${not empty criticalAlerts}">
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
- <td width="60%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.ResourceName"/><html:img page="/images/tb_sortup_inactive.gif" width="9" height="9" border="0"/></td>
+ <td width="20%" class="ListHeaderInactiveSorted"><fmt:message key="dash.home.TableHeader.ResourceName"/><html:img page="/images/tb_sortup_inactive.gif" width="9" height="9" border="0"/></td>
+ <td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Type"/></td>
+ <td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.Location"/></td>
<td width="20%" class="ListHeaderInactive"><fmt:message key="dash.home.TableHeader.AlertName"/></td>
<td width="20%" class="ListHeaderInactiveCenter"><fmt:message key="dash.home.TableHeader.DateTime"/></td>
</tr>
- <c:forEach items="${criticalAlerts}" var="alert">
+ <c:forEach items="${criticalAlerts}" var="item">
<tr class="ListRow">
- <td class="ListCell">
<c:choose>
- <c:when test="{alert.resource eq null}">
- <fmt:message key="dash.home.removed.resource"/>
+ <c:when test="{item.original.alertDefinition.resource eq null}">
+ <td class="ListCell" colspan="3">
+ <fmt:message key="dash.home.removed.resource"/>
+ </td>
</c:when>
<c:otherwise>
- <html:link page="/rhq/resource/summary/overview.xhtml?id=${alert.alertDefinition.resource.id}"><c:out value="${alert.alertDefinition.resource.name}"/> </html:link>
+ <td class="ListCell">
+ <html:link page="/rhq/resource/summary/overview.xhtml?id=${item.original.alertDefinition.resource.id}"><c:out value="${item.original.alertDefinition.resource.name}"/> </html:link>
+ </td>
+ <td class="ListCell"><c:out value="${item.original.alertDefinition.resource.resourceType.name}" /></td>
+ <td class="ListCell"><c:out value="${item.lineage}" /> </td>
</c:otherwise>
</c:choose>
- </td>
- <td class="ListCell"><html:link page="/alerts/Alerts.do?mode=viewAlert&id=${alert.alertDefinition.resource.id}&a=${alert.id}"><c:out value="${alert.alertDefinition.name}"/> </html:link></td>
- <td class="ListCell" align="center"><hq:dateFormatter value="${alert.ctime}"/> </td>
+ <td class="ListCell"><html:link page="/alerts/Alerts.do?mode=viewAlert&id=${item.original.alertDefinition.resource.id}&a=${item.original.id}"><c:out value="${item.original.alertDefinition.name}"/> </html:link></td>
+ <td class="ListCell" align="center"><hq:dateFormatter value="${item.original.ctime}"/> </td>
</tr>
</c:forEach>
</table>
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/group/inventory/AddResourcesForm.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/group/inventory/AddResourcesForm.jsp
index 4240d33..2b6c3cc 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/group/inventory/AddResourcesForm.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/group/inventory/AddResourcesForm.jsp
@@ -400,7 +400,7 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
rightSidebar="true"
styleId="fromTable"
postfix="a" >
- <display:column width="1%" property="id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"fromToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
+ <display:column width="1%" property="original.id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"fromToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
<display:checkboxdecorator name="availableResource" onclick="ToggleSelection(this, widgetProperties)" styleClass="availableListMember" />
</display:column>
<display:column property="original.name" title="resource.group.inventory.NameTH"
@@ -453,7 +453,7 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
leftSidebar="true"
styleId="toTable"
postfix="p" >
- <display:column width="1%" property="id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"toToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
+ <display:column width="1%" property="original.id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"toToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
<display:checkboxdecorator name="pendingResource" onclick="ToggleSelection(this, widgetProperties)" styleClass="pendingListMember" />
</display:column>
<display:column property="original.name" title="resource.group.inventory.NameTH"
commit f3cf404cff2166bf04d639f39d3cea44df48afdd
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 3 18:02:06 2010 +0200
BZ 580919 - This makes the group member addition page in line with the way the resources are disambiguated in the rest of the UI.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
index 808f331..589b54c 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/action/resource/group/inventory/AddGroupResourcesFormPrepareAction.java
@@ -48,6 +48,7 @@ import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.gui.inventory.resource.ResourcePartialLineageComponent;
import org.rhq.enterprise.gui.inventory.resource.ResourcePartialLineageRenderer;
import org.rhq.enterprise.gui.legacy.Constants;
+import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.gui.legacy.util.RequestUtils;
import org.rhq.enterprise.gui.legacy.util.SessionUtils;
import org.rhq.enterprise.gui.util.WebUtility;
@@ -124,10 +125,11 @@ public class AddGroupResourcesFormPrepareAction extends Action {
ResourceNamesDisambiguationResult<Resource> pendingResourcesDisambiguation =
resourceManager.disambiguate(pendingResources, true, RESOURCE_ID_EXTRACTOR);
- pendingResources = buildResourceList(pendingResourcesDisambiguation, pendingResources.getTotalSize(), pendingResources.getPageControl());
+ PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedpeningResources =
+ DisambiguatedResourceListUtil.buildResourceList(pendingResourcesDisambiguation, pendingResources.getTotalSize(), pendingResources.getPageControl(), false);
- request.setAttribute(Constants.PENDING_RESOURCES_ATTR, pendingResources);
- request.setAttribute(Constants.NUM_PENDING_RESOURCES_ATTR, pendingResources.size());
+ request.setAttribute(Constants.PENDING_RESOURCES_ATTR, disambiguatedpeningResources);
+ request.setAttribute(Constants.NUM_PENDING_RESOURCES_ATTR, disambiguatedpeningResources.size());
/*
* available resources are all resources in the system that are not associated with the user and are not pending
@@ -155,10 +157,11 @@ public class AddGroupResourcesFormPrepareAction extends Action {
ResourceNamesDisambiguationResult<Resource> availableResourcesDisambiguation =
resourceManager.disambiguate(availableResources, true, RESOURCE_ID_EXTRACTOR);
- availableResources = buildResourceList(availableResourcesDisambiguation, availableResources.getTotalSize(), availableResources.getPageControl());
+ PageList<DisambiguatedResourceListUtil.Record<Resource>> disambiguatedAvailResources =
+ DisambiguatedResourceListUtil.buildResourceList(availableResourcesDisambiguation, availableResources.getTotalSize(), availableResources.getPageControl(), false);
- request.setAttribute(Constants.AVAIL_RESOURCES_ATTR, availableResources);
- request.setAttribute(Constants.NUM_AVAIL_RESOURCES_ATTR, availableResources.size());
+ request.setAttribute(Constants.AVAIL_RESOURCES_ATTR, disambiguatedAvailResources);
+ request.setAttribute(Constants.NUM_AVAIL_RESOURCES_ATTR, disambiguatedAvailResources.size());
return null;
}
@@ -186,44 +189,5 @@ public class AddGroupResourcesFormPrepareAction extends Action {
}
return resourceCategoryTypes;
- }
-
- //
- // These two methods are to support the resource names disambiguation in the above code.
- // Hopefully this page gets rewritten in JSF so that we don't have to employ this kind of
- // nasties.
- //
-
- private static PageList<Resource> buildResourceList(ResourceNamesDisambiguationResult<Resource> results, int totalSize, PageControl pageControl) {
- ArrayList<Resource> convertedResults = new ArrayList<Resource>(results.getResolution().size());
-
- for(DisambiguationReport<Resource> dr : results.getResolution()) {
- Resource resource = dr.getOriginal();
-
- Resource parent = resource.getParentResource();
- //platforms don't have parents, need to check for null here
- if (parent != null) {
- parent.setName(buildLineage(dr.getParents()));
- }
-
- convertedResults.add(resource);
- }
- return new PageList<Resource>(convertedResults, totalSize, pageControl);
- }
-
- private static String buildLineage(List<ResourceParentFlyweight> parents) {
- if (parents == null || parents.size() == 0) {
- return "";
- }
-
- Iterator<ResourceParentFlyweight> it = parents.iterator();
-
- StringBuilder bld = new StringBuilder(it.next().getParentName());
-
- while (it.hasNext()) {
- bld.append(ResourcePartialLineageComponent.DEFAULT_SEPARATOR).append(it.next().getParentName());
- }
-
- return bld.toString();
- }
+ }
}
\ No newline at end of file
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/RSSAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/RSSAction.java
index a3deb88..aa6a17b 100755
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/RSSAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/RSSAction.java
@@ -29,7 +29,9 @@ import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.util.MessageResources;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.resource.composite.ResourceHealthComposite;
+import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
import org.rhq.enterprise.gui.common.tag.FunctionTagLibrary;
@@ -39,6 +41,7 @@ import org.rhq.enterprise.gui.legacy.WebUserPreferences;
import org.rhq.enterprise.gui.legacy.WebUserPreferences.FavoriteResourcePortletPreferences;
import org.rhq.enterprise.gui.legacy.portlet.BaseRSSAction;
import org.rhq.enterprise.gui.legacy.portlet.RSSFeed;
+import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
import org.rhq.enterprise.server.util.LookupUtil;
@@ -66,22 +69,29 @@ public class RSSAction extends BaseRSSAction {
favoriteResourcePreferences.asArray(), PageControl.getUnlimitedInstance());
if ((results != null) && (results.size() > 0)) {
- for (ResourceHealthComposite summary : results) {
+ ResourceNamesDisambiguationResult<ResourceHealthComposite> disambiguatedLResults = manager.disambiguate(results, true, ViewAction.RESOURCE_ID_EXTRACTOR);
+
+ PageList<DisambiguatedResourceListUtil.Record<ResourceHealthComposite>> list = DisambiguatedResourceListUtil.buildResourceList(disambiguatedLResults, results.getTotalSize(), results.getPageControl(), false);
+
+ for (DisambiguatedResourceListUtil.Record<ResourceHealthComposite> summary : list) {
String link = feed.getBaseUrl() + FunctionTagLibrary.getDefaultResourceTabURL() + "?id="
- + summary.getId();
+ + summary.getOriginal().getId();
String availText = res.getMessage("dash.home.ResourceHealth.rss.item.availability", summary
- .getAvailabilityType().toString());
+ .getOriginal().getAvailabilityType().toString());
String alertsText = res.getMessage("dash.home.ResourceHealth.rss.item.alerts", Long.valueOf(summary
- .getAlerts()));
+ .getOriginal().getAlerts()));
String typeText = res.getMessage("dash.home.ResourceHealth.rss.item.resourceType", summary
- .getTypeName());
-
+ .getOriginal().getTypeName());
+ String parentsText = res.getMessage("dash.home.ResourceHealth.rss.item.resourceParents", summary.getLineage());
+
long now = System.currentTimeMillis();
StringBuffer desc = new StringBuffer();
desc.append("<table><tr><td align=\"left\">").append(typeText).append("</td></tr>");
+ desc.append("<tr><td align=\"left\">").append(parentsText).append("</td></tr>");
+
if (favoriteResourcePreferences.showAvailability) {
desc.append("<tr><td align=\"left\">").append(availText).append("</td></tr>");
}
@@ -92,7 +102,7 @@ public class RSSAction extends BaseRSSAction {
desc.append("</table>");
- feed.addItem(summary.getName(), link, desc.toString(), now);
+ feed.addItem(summary.getOriginal().getName(), link, desc.toString(), now);
}
}
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java
index 6afe922..7db8562 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java
@@ -48,7 +48,7 @@ public class ViewAction extends TilesAction {
private static final Log log = LogFactory.getLog(ViewAction.class);
- private static final IntExtractor<ResourceHealthComposite> RESOURCE_ID_EXTRACTOR = new IntExtractor<ResourceHealthComposite>() {
+ static final IntExtractor<ResourceHealthComposite> RESOURCE_ID_EXTRACTOR = new IntExtractor<ResourceHealthComposite>() {
public int extract(ResourceHealthComposite object) {
return object.getId();
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties b/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties
index a4b54ff..2893eb1 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties
+++ b/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties
@@ -710,6 +710,7 @@ dash.home.ResourceHealth=Favorite Resources
dash.home.ResourceHealth.rss.item.availability=Current Availability: {0}
dash.home.ResourceHealth.rss.item.alerts=Number of Alerts: {0}
dash.home.ResourceHealth.rss.item.resourceType=Resource Type: {0}
+dash.home.ResourceHealth.rss.item.resourceParents=Resource Parents: {0}
dash.home.RecentlyApproved=Recently Added Resources
dash.home.CriticalAlerts=Recent Alerts
dash.home.Inventory=Recent Inventory Changes
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/resource/group/inventory/AddResourcesForm.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/resource/group/inventory/AddResourcesForm.jsp
index 0c0dbfe..4240d33 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/resource/group/inventory/AddResourcesForm.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/resource/group/inventory/AddResourcesForm.jsp
@@ -403,15 +403,15 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
<display:column width="1%" property="id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"fromToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
<display:checkboxdecorator name="availableResource" onclick="ToggleSelection(this, widgetProperties)" styleClass="availableListMember" />
</display:column>
- <display:column property="name" title="resource.group.inventory.NameTH"
+ <display:column property="original.name" title="resource.group.inventory.NameTH"
width="30%"
sortAttr="res.name" />
- <display:column property="parentResource.name" title="resource.group.inventory.ParentTH"
- width="30%" />
- <display:column property="resourceType.name" title="resource.group.inventory.TypeTH"
+ <display:column property="original.resourceType.name" title="resource.group.inventory.TypeTH"
width="39%"
sortAttr="res.resourceType.name" >
</display:column>
+ <display:column property="lineage" title="resource.group.inventory.ParentTH"
+ width="30%" />
</display:table>
</div>
@@ -456,17 +456,16 @@ widgetProperties = getWidgetProperties('<c:out value="${widgetInstanceName}"/>')
<display:column width="1%" property="id" title="<input type=\"checkbox\" onclick=\"ToggleAll(this, widgetProperties)\" name=\"toToggleAll\">" isLocalizedTitle="false" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox">
<display:checkboxdecorator name="pendingResource" onclick="ToggleSelection(this, widgetProperties)" styleClass="pendingListMember" />
</display:column>
- <display:column property="name" title="resource.group.inventory.NameTH"
+ <display:column property="original.name" title="resource.group.inventory.NameTH"
width="30%"
sortAttr="res.name" />
- <display:column property="parentResource.name" title="resource.group.inventory.ParentTH"
- width="30%"
- sortAttr="parent.name" />
- <display:column property="resourceType.name" title="resource.group.inventory.TypeTH"
+ <display:column property="original.resourceType.name" title="resource.group.inventory.TypeTH"
width="39%"
sortAttr="res.resourceType.name" >
<%-- TODO GH: I don't see this doing anything at all? <display:resourcedecorator resource="${resource}" type="true" />--%>
</display:column>
+ <display:column property="lineage" title="resource.group.inventory.ParentTH"
+ width="30%" />
</display:table>
</div>
commit 2ebbc4cf78ed504cd49c3a846176665425a0cc41
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 3 16:21:55 2010 +0200
BZ 580919 - favorite resources (aka resource health) portlet shows disambiguated names.
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java
index bda2130..6afe922 100644
--- a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/portlet/resourcehealth/ViewAction.java
@@ -29,12 +29,16 @@ import org.apache.struts.action.ActionMapping;
import org.apache.struts.tiles.ComponentContext;
import org.apache.struts.tiles.actions.TilesAction;
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
import org.rhq.core.domain.resource.composite.ResourceHealthComposite;
+import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
import org.rhq.core.domain.util.PageControl;
import org.rhq.core.domain.util.PageList;
+import org.rhq.core.util.IntExtractor;
import org.rhq.enterprise.gui.legacy.WebUser;
import org.rhq.enterprise.gui.legacy.WebUserPreferences;
import org.rhq.enterprise.gui.legacy.WebUserPreferences.FavoriteResourcePortletPreferences;
+import org.rhq.enterprise.gui.legacy.util.DisambiguatedResourceListUtil;
import org.rhq.enterprise.gui.legacy.util.SessionUtils;
import org.rhq.enterprise.gui.util.WebUtility;
import org.rhq.enterprise.server.resource.ResourceManagerLocal;
@@ -44,11 +48,18 @@ public class ViewAction extends TilesAction {
private static final Log log = LogFactory.getLog(ViewAction.class);
+ private static final IntExtractor<ResourceHealthComposite> RESOURCE_ID_EXTRACTOR = new IntExtractor<ResourceHealthComposite>() {
+
+ public int extract(ResourceHealthComposite object) {
+ return object.getId();
+ }
+ };
+
@Override
public ActionForward execute(ComponentContext context, ActionMapping mapping, ActionForm form,
HttpServletRequest request, HttpServletResponse response) throws Exception {
- PageList<ResourceHealthComposite> list = new PageList<ResourceHealthComposite>();
+ PageList<DisambiguatedResourceListUtil.Record<ResourceHealthComposite>> list = new PageList<DisambiguatedResourceListUtil.Record<ResourceHealthComposite>>();
boolean showAvailability = true;
boolean showAlerts = true;
try {
@@ -65,7 +76,12 @@ public class ViewAction extends TilesAction {
.getFavoriteResourcePortletPreferences();
ResourceManagerLocal manager = LookupUtil.getResourceManager();
- list = manager.findResourceHealth(user.getSubject(), favoriteResourcePreferences.asArray(), pc);
+ PageList<ResourceHealthComposite> lst = manager.findResourceHealth(user.getSubject(), favoriteResourcePreferences.asArray(), pc);
+
+ ResourceNamesDisambiguationResult<ResourceHealthComposite> disambiguatedList = manager.disambiguate(lst, true, RESOURCE_ID_EXTRACTOR);
+
+ list = DisambiguatedResourceListUtil.buildResourceList(disambiguatedList, lst.getTotalSize(), lst.getPageControl(), true);
+
showAvailability = favoriteResourcePreferences.showAvailability;
showAlerts = favoriteResourcePreferences.showAlerts;
} catch (Exception e) {
diff --git a/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
new file mode 100644
index 0000000..e0c3b5b
--- /dev/null
+++ b/modules/enterprise/gui/portal-war/src/main/java/org/rhq/enterprise/gui/legacy/util/DisambiguatedResourceListUtil.java
@@ -0,0 +1,110 @@
+/*
+ * 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, version 2, as
+ * published by the Free Software Foundation, and/or the GNU Lesser
+ * General Public License, version 2.1, also as published by the Free
+ * Software Foundation.
+ *
+ * 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 and the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * and the GNU Lesser General Public License along with this program;
+ * if not, write to the Free Software Foundation, Inc.,
+ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ */
+
+package org.rhq.enterprise.gui.legacy.util;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.rhq.core.domain.resource.composite.DisambiguationReport;
+import org.rhq.core.domain.resource.composite.ResourceNamesDisambiguationResult;
+import org.rhq.core.domain.resource.composite.ResourceParentFlyweight;
+import org.rhq.core.domain.util.PageControl;
+import org.rhq.core.domain.util.PageList;
+import org.rhq.enterprise.gui.inventory.resource.ResourcePartialLineageComponent;
+
+/**
+ * A utility class to provide page lists of disambiguated resource lists for the
+ * Struts legacy UI.
+ *
+ * @author Lukas Krejci
+ */
+public class DisambiguatedResourceListUtil {
+
+ private static final String RESOURCE_URL = "/rhq/resource/summary/overview.xhtml";
+
+ private DisambiguatedResourceListUtil() {
+
+ }
+
+ public static class Record<T> {
+
+ private T original;
+ private String lineage;
+
+ public Record(T original, String lineage) {
+ this.original = original;
+ this.lineage = lineage;
+ }
+
+ public T getOriginal() {
+ return original;
+ }
+
+ public String getLineage() {
+ return lineage;
+ }
+ }
+
+ public static <T> PageList<Record<T>> buildResourceList(ResourceNamesDisambiguationResult<T> results, int totalSize, PageControl pageControl, boolean renderLinks) {
+ ArrayList<Record<T>> convertedResults = new ArrayList<Record<T>>(results.getResolution().size());
+
+ for(DisambiguationReport<T> dr : results.getResolution()) {
+ convertedResults.add(new Record<T>(dr.getOriginal(), buildLineage(dr.getParents(), renderLinks)));
+ }
+ return new PageList<Record<T>>(convertedResults, totalSize, pageControl);
+ }
+
+ private static String buildLineage(List<ResourceParentFlyweight> parents, boolean renderLinks) {
+ if (parents == null || parents.size() == 0) {
+ return "";
+ }
+
+ Iterator<ResourceParentFlyweight> it = parents.iterator();
+
+ StringBuilder bld = new StringBuilder();
+
+ appendParentName(bld, it.next(), renderLinks);
+
+ while (it.hasNext()) {
+ bld.append(ResourcePartialLineageComponent.DEFAULT_SEPARATOR);
+ appendParentName(bld, it.next(), renderLinks);
+ }
+
+ return bld.toString();
+ }
+
+ private static void appendParentName(StringBuilder bld, ResourceParentFlyweight parent, boolean renderLinks) {
+ if (renderLinks) {
+ bld.append("<a href=\"").append(RESOURCE_URL).append("?id=").append(parent.getParentId())
+ .append("\">");
+ }
+
+ bld.append(parent.getParentName());
+
+ if (renderLinks) {
+ bld.append("</a>");
+ }
+ }
+}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties b/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties
index ca4439f..a4b54ff 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties
+++ b/modules/enterprise/gui/portal-war/src/main/webapp-filtered/WEB-INF/classes/ApplicationResources.properties
@@ -823,6 +823,7 @@ dash.home.TableHeader.Title=Title
dash.home.TableHeader.Product=Product
dash.home.TableHeader.SoftwareType=Type
dash.home.TableHeader.SoftwareSource=Source
+dash.home.TableHeader.Location=Location
dash.home.DisplayCategory.PlatformTotal=Platform Total
dash.home.DisplayCategory.ServerTotal=Server Total
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/resourceHealth/View.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/resourceHealth/View.jsp
index ef8ba0c..a347bb3 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/resourceHealth/View.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/resourceHealth/View.jsp
@@ -27,15 +27,16 @@
<c:when test="${not empty resourceHealth}">
<display:table cellspacing="0" cellpadding="0" width="100%" action="/Dashboard.do"
- var="resource" items="${resourceHealth}" >
+ var="item" items="${resourceHealth}" >
- <display:column width="50%" href="/rhq/resource/summary/overview.xhtml?id=${resource.id}" property="name" sortAttr="res.name" title="dash.home.TableHeader.ResourceName"/>
- <display:column width="25%" property="typeName" title="dash.home.TableHeader.Type"/>
+ <display:column width="25%" href="/rhq/resource/summary/overview.xhtml?id=${item.original.id}" property="original.name" sortAttr="res.name" title="dash.home.TableHeader.ResourceName"/>
+ <display:column width="25%" property="original.typeName" title="dash.home.TableHeader.Type"/>
+ <display:column width="25%" property="lineage" title="dash.home.TableHeader.Location"/>
<c:if test="${alerts}">
- <display:column width="10%" property="alerts" title="dash.home.TableHeader.Alerts" align="center"/>
+ <display:column width="10%" property="original.alerts" title="dash.home.TableHeader.Alerts" align="center"/>
</c:if>
<c:if test="${availability}">
- <display:column width="15%" property="availabilityType" title="resource.common.monitor.visibility.AvailabilityTH" align="center"
+ <display:column width="15%" property="original.availabilityType" title="resource.common.monitor.visibility.AvailabilityTH" align="center"
sortAttr="avail.availabilityType" styleClass="ListCellCheckbox" headerStyleClass="ListHeaderCheckbox" valign="middle">
<display:availabilitydecorator/>
</display:column>
commit 7b20873d50bbe2bbf2d7d3605ed5c54252ceddc9
Author: Lukas Krejci <lkrejci(a)redhat.com>
Date: Mon May 3 16:04:01 2010 +0200
BZ 580919 - recently added resources portlet now shows the type name.
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
index 72521d4..f7b2381 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/Resource.java
@@ -182,27 +182,27 @@ import org.rhq.core.domain.util.Summary;
+ " FROM Resource res " //
+ " WHERE res.parentResource = :parent "),
@NamedQuery(name = Resource.QUERY_RECENTLY_ADDED_PLATFORMS, query = "" //
- + " SELECT DISTINCT new org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite(res.id, res.name, res.itime) "
+ + " SELECT DISTINCT new org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite(res.id, res.name, res.resourceType.name, res.itime) "
+ " FROM Resource res JOIN res.childResources child JOIN res.implicitGroups g JOIN g.roles r JOIN r.subjects s "
+ " WHERE (res.itime >= :oldestEpochTime OR ((child.itime >= :oldestEpochTime) AND (child.inventoryStatus = 'COMMITTED'))) "
+ " AND res.resourceType.category = 'PLATFORM' "
+ " AND res.inventoryStatus = 'COMMITTED' "
+ " AND s = :subject " + "ORDER BY res.itime DESC "),
@NamedQuery(name = Resource.QUERY_RECENTLY_ADDED_PLATFORMS_ADMIN, query = "" //
- + " SELECT DISTINCT new org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite(res.id, res.name, res.itime) "
+ + " SELECT DISTINCT new org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite(res.id, res.name, res.resourceType.name, res.itime) "
+ " FROM Resource res JOIN res.childResources child "
+ " WHERE ((res.itime >= :oldestEpochTime) OR ((child.itime >= :oldestEpochTime) AND (child.inventoryStatus = 'COMMITTED'))) "
+ " AND res.resourceType.category = 'PLATFORM' "
+ " AND res.inventoryStatus = 'COMMITTED' "
+ "ORDER BY res.itime DESC "),
@NamedQuery(name = Resource.QUERY_RECENTLY_ADDED_SERVERS, query = ""
- + " SELECT DISTINCT new org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite(res.id, res.name, res.itime) "
+ + " SELECT DISTINCT new org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite(res.id, res.name, res.resourceType.name, res.itime) "
+ " FROM Resource res JOIN res.implicitGroups g JOIN g.roles r JOIN r.subjects s "
+ " WHERE res.itime >= :oldestEpochTime " + " AND res.resourceType.category = 'SERVER' "
+ " AND res.inventoryStatus = 'COMMITTED' " + " AND res.parentResource.id = :platformId "
+ " AND s = :subject " + "ORDER BY res.itime DESC "),
@NamedQuery(name = Resource.QUERY_RECENTLY_ADDED_SERVERS_ADMIN, query = ""
- + " SELECT DISTINCT new org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite(res.id, res.name, res.itime) "
+ + " SELECT DISTINCT new org.rhq.core.domain.resource.composite.RecentlyAddedResourceComposite(res.id, res.name, res.resourceType.name, res.itime) "
+ " FROM Resource res " + " WHERE res.itime >= :oldestEpochTime "
+ " AND res.resourceType.category = 'SERVER' " + " AND res.inventoryStatus = 'COMMITTED' "
+ " AND res.parentResource.id = :platformId " + "ORDER BY res.itime DESC "),
diff --git a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/RecentlyAddedResourceComposite.java b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/RecentlyAddedResourceComposite.java
index 0018621..f34e28d 100644
--- a/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/RecentlyAddedResourceComposite.java
+++ b/modules/core/domain/src/main/java/org/rhq/core/domain/resource/composite/RecentlyAddedResourceComposite.java
@@ -36,13 +36,15 @@ public class RecentlyAddedResourceComposite implements Serializable {
private long ctime;
private boolean showChildren;
private List<RecentlyAddedResourceComposite> children;
-
- public RecentlyAddedResourceComposite() {
+ private String resourceTypeName;
+
+ public RecentlyAddedResourceComposite() {
}
-
- public RecentlyAddedResourceComposite(int id, String name, long ctime) {
+
+ public RecentlyAddedResourceComposite(int id, String name, String resourceTypeName, long ctime) {
this.id = id;
this.name = name;
+ this.resourceTypeName = resourceTypeName;
this.ctime = ctime;
}
@@ -58,6 +60,10 @@ public class RecentlyAddedResourceComposite implements Serializable {
return name;
}
+ public String getResourceTypeName() {
+ return resourceTypeName;
+ }
+
public long getCtime() {
return ctime;
}
diff --git a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/recentlyApproved/View.jsp b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/recentlyApproved/View.jsp
index 824857c..4970c00 100644
--- a/modules/enterprise/gui/portal-war/src/main/webapp/portlet/recentlyApproved/View.jsp
+++ b/modules/enterprise/gui/portal-war/src/main/webapp/portlet/recentlyApproved/View.jsp
@@ -24,7 +24,8 @@
<table width="100%" cellpadding="0" cellspacing="0" border="0">
<tr>
<td width="3%" class="ListHeaderInactive"> </td>
- <td width="67%" class="ListHeaderInactive" align="left"><fmt:message key="dash.home.TableHeader.ResourceName"/></td>
+ <td width="37%" class="ListHeaderInactive" align="left"><fmt:message key="dash.home.TableHeader.ResourceName"/></td>
+ <td width="30%" class="ListHeaderInactive" align="left"><fmt:message key="dash.home.TableHeader.Type"/></td>
<td width="30%" class="ListHeaderInactive" align="left"><fmt:message key="dash.home.TableHeader.DateTime"/></td>
</tr>
<c:forEach items="${recentlyApproved}" var="platform">
@@ -48,6 +49,7 @@
</c:choose>
</td>
<td class="ListCell" align="left"><html:link page="/rhq/resource/summary/overview.xhtml?id=${platform.id}"><c:out value="${platform.name}"/> </html:link></td>
+ <td class="ListCell" align="left"><c:out value="${platform.resourceTypeName}"/></td>
<td class="ListCell" align="left"><hq:dateFormatter value="${platform.ctime}"/> </td>
</tr>
<c:if test="${platform.showChildren}">
@@ -56,6 +58,7 @@
<tr class="ListRow">
<td class="ListCell"></td>
<td class="ListCell" align="left"><html:link page="/rhq/resource/summary/overview.xhtml?id=${server.id}"><c:out value="${server.name}"/> </html:link></td>
+ <td class="ListCell" align="left"><c:out value="${server.resourceTypeName}"/></td>
<td class="ListCell" align="left"><hq:dateFormatter value="${server.ctime}"/> </td>
</tr>
</c:forEach> <!-- For each server -->
commit 484cf431e96da323dad56167a1765e179e822e6d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Mon May 31 06:36:14 2010 -0400
BZ-598053: prevent dynamic outline for text boxes used in the SearchBar
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css b/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
index 4eccb09..4d572cf 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
@@ -29,6 +29,7 @@ div {
margin: 0;
border-color: white;
border-style: none;
+ outline: none;
}
.patternNameLabel {
@@ -49,6 +50,7 @@ div {
border-color: gray;
border-style: dotted;
border-width: thin;
+ outline: none;
}
commit e1424094013722e3b6563bfe00eaa62ce75d2904
Author: Joseph Marques <joseph(a)redhat.com>
Date: Mon May 31 05:38:30 2010 -0400
BZ-598027: keep the cursor where it was for up/down arrow events when suggestions are showing
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
index a79f248..120c474 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
@@ -203,7 +203,7 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
suggestionMenu.moveSelectionDown();
}
}
- //suggestionMenu.selectItem(suggestionMenu.getSelectedItemIndex() + 1);
+ event.preventDefault();
break;
case KeyCodes.KEY_UP:
suggestionMenu.moveSelectionUp();
@@ -214,7 +214,7 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
suggestionMenu.moveSelectionUp();
}
}
- //suggestionMenu.selectItem(suggestionMenu.getSelectedItemIndex() - 1);
+ event.preventDefault();
break;
case KeyCodes.KEY_ENTER:
if (suggestionMenu.getSelectedItemIndex() < 0) {
13 years, 6 months
[rhq] modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/webapp/css/search.css | 2 ++
1 file changed, 2 insertions(+)
New commits:
commit 484cf431e96da323dad56167a1765e179e822e6d
Author: Joseph Marques <joseph(a)redhat.com>
Date: Mon May 31 06:36:14 2010 -0400
BZ-598053: prevent dynamic outline for text boxes used in the SearchBar
diff --git a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css b/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
index 4eccb09..4d572cf 100644
--- a/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
+++ b/modules/enterprise/gui/coregui/src/main/webapp/css/search.css
@@ -29,6 +29,7 @@ div {
margin: 0;
border-color: white;
border-style: none;
+ outline: none;
}
.patternNameLabel {
@@ -49,6 +50,7 @@ div {
border-color: gray;
border-style: dotted;
border-width: thin;
+ outline: none;
}
13 years, 6 months
[rhq] modules/enterprise
by Joseph Marques
modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit e1424094013722e3b6563bfe00eaa62ce75d2904
Author: Joseph Marques <joseph(a)redhat.com>
Date: Mon May 31 05:38:30 2010 -0400
BZ-598027: keep the cursor where it was for up/down arrow events when suggestions are showing
diff --git a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
index a79f248..120c474 100644
--- a/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
+++ b/modules/enterprise/gui/coregui/src/main/java/org/rhq/enterprise/gui/coregui/client/search/suggest/SuggestTextBox_v3.java
@@ -203,7 +203,7 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
suggestionMenu.moveSelectionDown();
}
}
- //suggestionMenu.selectItem(suggestionMenu.getSelectedItemIndex() + 1);
+ event.preventDefault();
break;
case KeyCodes.KEY_UP:
suggestionMenu.moveSelectionUp();
@@ -214,7 +214,7 @@ public class SuggestTextBox_v3 extends Composite implements HasText, HasAllFocus
suggestionMenu.moveSelectionUp();
}
}
- //suggestionMenu.selectItem(suggestionMenu.getSelectedItemIndex() - 1);
+ event.preventDefault();
break;
case KeyCodes.KEY_ENTER:
if (suggestionMenu.getSelectedItemIndex() < 0) {
13 years, 6 months
[rhq] modules/common
by mazz
modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/BundleTask.java | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
New commits:
commit 2a3f9f394374e628de3c8a4298ac6dcd379d0d28
Author: John Mazzitelli <mazz(a)redhat.com>
Date: Sun May 30 23:47:34 2010 -0400
ignore if on windows and we are missing a drive letter - the Deployer will use the drive letter for the agent cwd which is what we want for a default so we can do easier cross-platform provisioning
diff --git a/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/BundleTask.java b/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/BundleTask.java
index 88bb491..ad5fed5 100644
--- a/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/BundleTask.java
+++ b/modules/common/ant-bundle/src/main/java/org/rhq/bundle/ant/task/BundleTask.java
@@ -85,8 +85,11 @@ public class BundleTask extends AbstractBundleTask {
}
File deployDirFile = new File(deployDir);
if (!deployDirFile.isAbsolute()) {
- throw new BuildException("Value of property [" + DeployPropertyNames.DEPLOY_DIR + "] (" + deployDirFile
- + ") is not an absolute path.");
+ // throw exception unless we are on windows and the path is a root dir without a drive letter - ignore missing drive letter
+ if (!deployDirFile.getPath().startsWith(File.separator)) {
+ throw new BuildException("Value of property [" + DeployPropertyNames.DEPLOY_DIR + "] (" + deployDirFile
+ + ") is not an absolute path.");
+ }
}
getProject().setDeployDir(deployDirFile);
log(DeployPropertyNames.DEPLOY_DIR + "=\"" + deployDir + "\"", Project.MSG_DEBUG);
13 years, 6 months
[rhq] Branch 'translations' - modules/enterprise
by Heiko W. Rupp
modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_pt.properties | 75 ++++++++++
modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_pt_br.properties | 75 ----------
modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml | 2
3 files changed, 76 insertions(+), 76 deletions(-)
New commits:
commit bcb4899b2284d07b862eb2b4466ad7147f5b1b81
Author: Heiko W. Rupp <hwr(a)pilhuhn.de>
Date: Sun May 30 10:12:29 2010 +0200
Use this translation for all of pt language for now
diff --git a/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_pt.properties b/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_pt.properties
new file mode 100644
index 0000000..5c15b50
--- /dev/null
+++ b/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_pt.properties
@@ -0,0 +1,75 @@
+product.shortName=RHQ
+product.name=RHQ
+product.fullName=RHQ
+product.url=${product.url}
+product.sales.email=sales(a)rhq-project.org
+product.support.email=info(a)rhq-project.org
+helpDocRoot=http://support.rhq-project.org/display/RHQ/
+createDatabaseUserTitle=Criar Base de Dados/Usu\u00E1rio
+createDatabaseUserHelp=Entre com as informa\u00E7\u00F5es do administrador do banco de dados e clique no bot\u00E3o para criar o baco de dados e o usu\u00E1rio.
+adminConnectionUrl=URL de conex\u00E3o com BD
+adminUsername=Usu\u00E1rio administrador do BD
+adminPassword=Senha de administrador do BD
+experimentalDb=O banco de dados selecionado \u00E9 utilizado apenas para demonstra\u00E7\u00E3o. Ele n\u00E3o deve ser utilizado em ambiente de produ\u00E7\u00E3o. N\u00E3o h\u00E1 suporte dispon\u00EDvel para insta\u00E7\u00E3oes que utilizam H2 ou MS SQL Server como banco de dados.
+createDatabaseNote=Cria um banco de dados e usu\u00E1rio se necess\u00E1rio
+createDatabaseButton=Criar Banco de Dados
+testDatabaseNote=Confirmar configura\u00E7\u00F5es do banco de dados
+testDatabaseButton=Testar Conex\u00E3o
+existingSchemaQuestion=O esquema do banco de dados j\u00E1 existe. O que deseja fazer?
+existingSchemaAnswerOverwrite=Substituir (os dados existentes ser\u00E3o perdidos)
+existingSchemaAnswerUpgrade=Manter (os dados existentes ser\u00E3o mantidos)
+existingSchemaAnswerSkip=Prosseguir (deixar o banco de dados como est\u00E1)
+invalidNumber=O valor da propriedade {0} \u00E9 um n\u00FAmero inv\u00E1lido\: [{1}]
+invalidBoolean=O valor da propriedade booleana {0} deve ser 'true' ou 'false' mas foi atribu\u00EDdo como [{1}]
+invalidString=O valor da propriedade {0} deve ser informado.
+saveFailure=Falha ao gravar as propriedades e implantar - O Servidor RHQ n\u00E3o funcionar\u00E1 apropriadamente\nCausa\: {0}
+errorLabel=Erro
+saveError=Por algum motivo n\u00E3o foi poss\u00EDvel gravar as configura\u00E7\u00F5es.
+invalidDatabaseSettings=N\u00E3o foi poss\u00EDvel conectar ao banco banco de dados com as propriedades informadas. \nFavor verificar as configura\u00E7\u00F5es do banco de dados e certifircar-se de que est\u00E1 em execu\u00E7\u00E3o.
+setPropertiesInstructions=Estas s\u00E3o as configura\u00E7\u00F5es para a instala\u00E7\u00E3o do Servidor RHQ. \nVoc\u00EA pode customizar alguma, todas ou nenhuma conforme necess\u00E1rio. Clique no nome da propriedade para visualizar a ajuda espec\u00EDfica. Altera\u00E7\u00F5es nas configura\u00E7\u00F5es marcadas como "Restart Necess\u00E1rio" \nn\u00E3o ter\u00E3o efeito at\u00E9 que o servidor seja reiniciado. Nesse caso reinicie o servidor imediatamente ap\u00F3s a instala\u00E7\u00E3o ter sido conclu\u00EDda com sucesso.
+advancedSettingsInstructions=Marque esta caixa de sele\u00E7\u00E3o para visualizar as configura\u00E7\u00F5es avan\u00E7adas.
+installButtonsText=Pressione o bot\u00E3o 'Instala\u00E7\u00E3o de Produ\u00E7\u00E3o' para uma instala\u00E7\u00E3o normal.\nPressione o bot\u00E3o 'Instala\u00E7ao Embutida' para criar rapidamente um ambiente completo com a ajuda do banco de dados e do agente embutidos. A instala\u00E7\u00E3o embutida possui apenas o prop\u00F3sito de demonstra\u00E7\u00E3o e avalia\u00E7\u00E3o\!
+orText=-- ou --
+saveEmbeddedMode=Instala\u00E7\u00E3o habilitada
+databaseSettingsInstructions=As propriedades do banco de dados definem o banco de dados configurado para esta instala\u00E7\u00E3o. Todos os campos s\u00E3o necess\u00E1rios. Use o bot\u00E3o "Testar Conex\u00E3o" para validar as propriedades.
+installSettingsInstructions=As propriedades de acesso definem localiza\u00E7\u00E3o (endpoint) do servidor.
+installSettingsNote1=No caso de uma atualiza\u00E7\u00E3o ou reinstala\u00E7\u00E3o selecione a partir da lista de servidores registrados\:
+installSettingsNote2=No caso de uma nova instala\u00E7\u00E3o informe as propriedades abaixo\:
+serverSettingsInstructions=Todos os campos abaixo s\u00E3o necess\u00E1rios.
+save=Instalar Servidor\!
+yesString=Sim
+noString=N\u00E3o
+propertyName=Nome da Propriedade
+value=Valor
+requiresRestart=Restart necess\u00E1rio?
+welcomeTitle=Bem vindo ao RHQ\!
+welcomeMessage=Bem vindo \u00E0 instala\u00E7\u00E3o do RHQ. Utilize esta p\u00E1gina \npara instalar e configurar o Servidor RHQ. \nAp\u00F3s completar a instala\u00E7\u00E3o voc\u00EA poder\u00E1 se autenticar e usar o RHQ.
+starting=Iniciando, por favor aguarde...
+alreadyInstalled=RHQ ser\u00E1 instalado\!
+alreadyInstalledStartedLink=Pronto\! Clique aqui para come\u00E7ar\!
+startInstallingLink=Clique aqui para continuar a instala\u00E7\u00E3o.
+backToSettingsLink=Retornar \u00E0 p\u00E1gina de configura\u00E7\u00E3o
+showAdvancedSettings=Mostrar configura\u00E7\u00F5es avan\u00E7adas
+propertyDatabaseType=Tipo de Banco de Dados
+propertyDatabaseTypeHelp=-TipoBancoDeDados
+propertyDatabaseConnectionUrl=URL de conex\u00E3o do Banco de Dados
+propertyDatabaseUserName=Usu\u00E1rio do Banco de Dados
+propertyDatabasePassword=Senha do Banco de Dados
+propertyEmbeddedRHQAgentEnabled=Agente embutido habilitado
+propertyEmbeddedRHQAgentName=Nome do Agente embutido
+propertyEmbeddedRHQAgentDisableNativeSystem=Desabilitar sistema nativo no Agente embutido
+propertyEmbeddedRHQAgentResetConfiguration=Reconfigurar Agente embutido
+propertyOperationTimeout=Timeout padr\u00E3o para invocar uma opera\u00E7\u00E3o
+introduceHelpDocs=Favor consultar a documenta\u00E7\u00E3o atrav\u00E9s dos links abaixo para saber mais a respeito do RHQ\:
+helpDocRHQServerInstallGuideLabel=RHQ Server - Guia de Instala\u00E7\u00E3o
+helpDocRHQGuiConsoleUsersGuideLabel=RHQ GUI Console - Guia do Usu\u00E1rio
+helpDocRHQServerUsersGuideLabel=RHQ Server - Guia do Usu\u00E1rio
+helpDocRHQAgentUsersGuideLabel=RHQ Agent - Guia do Usu\u00E1rio
+helpDocFaqLabel=Perguntas Frequentes (FAQ)
+helpDocRHQServerPropParentPage=http://support.rhq-project.org/display/RHQ/Configuring+the+Server#ConfiguringtheServer
+newServerSelectItem=Novo Servidor
+registeredServersLabel=Servidores Registrados
+propertyHighAvailabilityName=Nome do Servidor
+propertyMaintenanceModeAtStart=Modo de manuten\u00E7\u00E3o na Inicializa\u00E7\u00E3o
+propertyHighAvailabilityEndpointAddress=Endere\u00E7o p\u00FAblico do Servidor
+propertyHighAvailabilityAffinityGroup=Nome do Grupo de Afinidade do Servidor
diff --git a/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_pt_br.properties b/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_pt_br.properties
deleted file mode 100644
index 5c15b50..0000000
--- a/modules/enterprise/gui/installer-war/src/main/resources/InstallerMessages_pt_br.properties
+++ /dev/null
@@ -1,75 +0,0 @@
-product.shortName=RHQ
-product.name=RHQ
-product.fullName=RHQ
-product.url=${product.url}
-product.sales.email=sales(a)rhq-project.org
-product.support.email=info(a)rhq-project.org
-helpDocRoot=http://support.rhq-project.org/display/RHQ/
-createDatabaseUserTitle=Criar Base de Dados/Usu\u00E1rio
-createDatabaseUserHelp=Entre com as informa\u00E7\u00F5es do administrador do banco de dados e clique no bot\u00E3o para criar o baco de dados e o usu\u00E1rio.
-adminConnectionUrl=URL de conex\u00E3o com BD
-adminUsername=Usu\u00E1rio administrador do BD
-adminPassword=Senha de administrador do BD
-experimentalDb=O banco de dados selecionado \u00E9 utilizado apenas para demonstra\u00E7\u00E3o. Ele n\u00E3o deve ser utilizado em ambiente de produ\u00E7\u00E3o. N\u00E3o h\u00E1 suporte dispon\u00EDvel para insta\u00E7\u00E3oes que utilizam H2 ou MS SQL Server como banco de dados.
-createDatabaseNote=Cria um banco de dados e usu\u00E1rio se necess\u00E1rio
-createDatabaseButton=Criar Banco de Dados
-testDatabaseNote=Confirmar configura\u00E7\u00F5es do banco de dados
-testDatabaseButton=Testar Conex\u00E3o
-existingSchemaQuestion=O esquema do banco de dados j\u00E1 existe. O que deseja fazer?
-existingSchemaAnswerOverwrite=Substituir (os dados existentes ser\u00E3o perdidos)
-existingSchemaAnswerUpgrade=Manter (os dados existentes ser\u00E3o mantidos)
-existingSchemaAnswerSkip=Prosseguir (deixar o banco de dados como est\u00E1)
-invalidNumber=O valor da propriedade {0} \u00E9 um n\u00FAmero inv\u00E1lido\: [{1}]
-invalidBoolean=O valor da propriedade booleana {0} deve ser 'true' ou 'false' mas foi atribu\u00EDdo como [{1}]
-invalidString=O valor da propriedade {0} deve ser informado.
-saveFailure=Falha ao gravar as propriedades e implantar - O Servidor RHQ n\u00E3o funcionar\u00E1 apropriadamente\nCausa\: {0}
-errorLabel=Erro
-saveError=Por algum motivo n\u00E3o foi poss\u00EDvel gravar as configura\u00E7\u00F5es.
-invalidDatabaseSettings=N\u00E3o foi poss\u00EDvel conectar ao banco banco de dados com as propriedades informadas. \nFavor verificar as configura\u00E7\u00F5es do banco de dados e certifircar-se de que est\u00E1 em execu\u00E7\u00E3o.
-setPropertiesInstructions=Estas s\u00E3o as configura\u00E7\u00F5es para a instala\u00E7\u00E3o do Servidor RHQ. \nVoc\u00EA pode customizar alguma, todas ou nenhuma conforme necess\u00E1rio. Clique no nome da propriedade para visualizar a ajuda espec\u00EDfica. Altera\u00E7\u00F5es nas configura\u00E7\u00F5es marcadas como "Restart Necess\u00E1rio" \nn\u00E3o ter\u00E3o efeito at\u00E9 que o servidor seja reiniciado. Nesse caso reinicie o servidor imediatamente ap\u00F3s a instala\u00E7\u00E3o ter sido conclu\u00EDda com sucesso.
-advancedSettingsInstructions=Marque esta caixa de sele\u00E7\u00E3o para visualizar as configura\u00E7\u00F5es avan\u00E7adas.
-installButtonsText=Pressione o bot\u00E3o 'Instala\u00E7\u00E3o de Produ\u00E7\u00E3o' para uma instala\u00E7\u00E3o normal.\nPressione o bot\u00E3o 'Instala\u00E7ao Embutida' para criar rapidamente um ambiente completo com a ajuda do banco de dados e do agente embutidos. A instala\u00E7\u00E3o embutida possui apenas o prop\u00F3sito de demonstra\u00E7\u00E3o e avalia\u00E7\u00E3o\!
-orText=-- ou --
-saveEmbeddedMode=Instala\u00E7\u00E3o habilitada
-databaseSettingsInstructions=As propriedades do banco de dados definem o banco de dados configurado para esta instala\u00E7\u00E3o. Todos os campos s\u00E3o necess\u00E1rios. Use o bot\u00E3o "Testar Conex\u00E3o" para validar as propriedades.
-installSettingsInstructions=As propriedades de acesso definem localiza\u00E7\u00E3o (endpoint) do servidor.
-installSettingsNote1=No caso de uma atualiza\u00E7\u00E3o ou reinstala\u00E7\u00E3o selecione a partir da lista de servidores registrados\:
-installSettingsNote2=No caso de uma nova instala\u00E7\u00E3o informe as propriedades abaixo\:
-serverSettingsInstructions=Todos os campos abaixo s\u00E3o necess\u00E1rios.
-save=Instalar Servidor\!
-yesString=Sim
-noString=N\u00E3o
-propertyName=Nome da Propriedade
-value=Valor
-requiresRestart=Restart necess\u00E1rio?
-welcomeTitle=Bem vindo ao RHQ\!
-welcomeMessage=Bem vindo \u00E0 instala\u00E7\u00E3o do RHQ. Utilize esta p\u00E1gina \npara instalar e configurar o Servidor RHQ. \nAp\u00F3s completar a instala\u00E7\u00E3o voc\u00EA poder\u00E1 se autenticar e usar o RHQ.
-starting=Iniciando, por favor aguarde...
-alreadyInstalled=RHQ ser\u00E1 instalado\!
-alreadyInstalledStartedLink=Pronto\! Clique aqui para come\u00E7ar\!
-startInstallingLink=Clique aqui para continuar a instala\u00E7\u00E3o.
-backToSettingsLink=Retornar \u00E0 p\u00E1gina de configura\u00E7\u00E3o
-showAdvancedSettings=Mostrar configura\u00E7\u00F5es avan\u00E7adas
-propertyDatabaseType=Tipo de Banco de Dados
-propertyDatabaseTypeHelp=-TipoBancoDeDados
-propertyDatabaseConnectionUrl=URL de conex\u00E3o do Banco de Dados
-propertyDatabaseUserName=Usu\u00E1rio do Banco de Dados
-propertyDatabasePassword=Senha do Banco de Dados
-propertyEmbeddedRHQAgentEnabled=Agente embutido habilitado
-propertyEmbeddedRHQAgentName=Nome do Agente embutido
-propertyEmbeddedRHQAgentDisableNativeSystem=Desabilitar sistema nativo no Agente embutido
-propertyEmbeddedRHQAgentResetConfiguration=Reconfigurar Agente embutido
-propertyOperationTimeout=Timeout padr\u00E3o para invocar uma opera\u00E7\u00E3o
-introduceHelpDocs=Favor consultar a documenta\u00E7\u00E3o atrav\u00E9s dos links abaixo para saber mais a respeito do RHQ\:
-helpDocRHQServerInstallGuideLabel=RHQ Server - Guia de Instala\u00E7\u00E3o
-helpDocRHQGuiConsoleUsersGuideLabel=RHQ GUI Console - Guia do Usu\u00E1rio
-helpDocRHQServerUsersGuideLabel=RHQ Server - Guia do Usu\u00E1rio
-helpDocRHQAgentUsersGuideLabel=RHQ Agent - Guia do Usu\u00E1rio
-helpDocFaqLabel=Perguntas Frequentes (FAQ)
-helpDocRHQServerPropParentPage=http://support.rhq-project.org/display/RHQ/Configuring+the+Server#ConfiguringtheServer
-newServerSelectItem=Novo Servidor
-registeredServersLabel=Servidores Registrados
-propertyHighAvailabilityName=Nome do Servidor
-propertyMaintenanceModeAtStart=Modo de manuten\u00E7\u00E3o na Inicializa\u00E7\u00E3o
-propertyHighAvailabilityEndpointAddress=Endere\u00E7o p\u00FAblico do Servidor
-propertyHighAvailabilityAffinityGroup=Nome do Grupo de Afinidade do Servidor
diff --git a/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml b/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml
index 6872fe3..9ad7a36 100644
--- a/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml
+++ b/modules/enterprise/gui/installer-war/src/main/webapp/WEB-INF/faces-config.xml
@@ -57,7 +57,7 @@
<default-locale>en</default-locale>
<supported-locale>de</supported-locale>
<supported-locale>fr</supported-locale>
- <supported-locale>pt_br</supported-locale>
+ <supported-locale>pt</supported-locale>
</locale-config>
</application>
13 years, 6 months
[rhq] Branch 'bundle' - etc/modules etc/samples modules/core
by ips
dev/null |binary
etc/modules/sample-bundle/pom.xml | 92 -
etc/modules/sample-bundle/src/main/jbossas-init-config | 69 -
etc/modules/sample-bundle/src/main/jbossas-init-script | 328 -----
etc/modules/sample-bundle/src/main/petstore/petstore-db.changelog.xml | 187 --
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore-ds.xml | 42
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/META-INF/application.xml | 19
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/META-INF/persistence.xml | 21
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/META-INF/MANIFEST.MF | 4
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/LogStrings.properties | 10
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/MessageStrings.properties | 10
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/faces-config.xml | 94 -
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/jboss-web.xml | 10
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/sun-web.xml | 14
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/web.xml | 126 -
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.css | 1
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.js | 249 ---
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/banner.jsp | 80 -
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.css | 48
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.js | 269 ----
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_dom.js | 136 --
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_one_div.js | 159 --
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/captchaerror.jsp | 23
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.js | 329 -----
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp | 95 -
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp-old | 95 -
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/common.js | 77 -
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/download.jsp | 22
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.js | 54
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.json | 7
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.txt | 1
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/engine.js | 241 ---
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileupload.jsp | 266 ----
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileuploadstatus.jsp | 134 --
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/footer.jsp | 15
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index-ajax.jsp | 239 ---
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.html | 117 -
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.jsp | 164 --
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index_a.jsp | 194 ---
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/jsonTest.jsp | 53
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/lookup.jsp | 36
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/main.htmf | 36
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/main.js | 21
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/map.jsp | 143 --
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/mapAll.jsp | 65 -
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/news.js | 190 --
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/news.jsp | 51
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/petstoreListTest.jsp | 21
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/rss.js | 110 -
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/rss.jsp | 33
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/rssbar.jsp | 20
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/rteToolBar.html | 60
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/scroller.css | 1
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/scroller.js | 643 ----------
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/search.jsp | 290 ----
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/styles.css | 130 --
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/systemerror.jsp | 28
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/tag.css | 47
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/tag.jsp | 158 --
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/tagItemLookup.jsp | 45
etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/testis.jsp | 36
etc/modules/sample-bundle/src/main/rhq-bundle.xml | 57
etc/modules/sample-bundle/src/main/scripts/assembly.xml | 41
etc/modules/sample-bundle/src/main/scripts/build.xml | 65 -
etc/samples/sample-bundle/pom.xml | 92 +
etc/samples/sample-bundle/src/main/jbossas-init-config | 69 +
etc/samples/sample-bundle/src/main/jbossas-init-script | 328 +++++
etc/samples/sample-bundle/src/main/petstore/petstore-db.changelog.xml | 187 ++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore-ds.xml | 42
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/META-INF/application.xml | 19
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/META-INF/persistence.xml | 21
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Address.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Category.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Item.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Product.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/SellerContactInfo.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Tag.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/ZipLocation.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/META-INF/MANIFEST.MF | 4
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/BlueFilter.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/CaptchaSingleton.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/RandomString.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/SimpleCaptcha.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/AddressBean.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/AutocompleteBean.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/CaptchaValidateFilter.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/ControllerAction.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/ControllerServlet.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/EntryFilter.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/FileUploadBean.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/CaptchaAction.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/CatalogXmlAction.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/DefaultControllerAction.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/ImageAction.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/TagXmlAction.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/mapviewer/MapBean.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/CatalogFacade.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/FileUploadResponse.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/PayPalBean.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/RatingBean.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/proxy/GeoCoder.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/proxy/GeoPoint.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/HTMLParser$CallbackHandler.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/HTMLParser.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/IndexDocument.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/Indexer.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SQLParser.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SearchBean.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SearchIndex.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/UpdateIndex.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/ImageScaler.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/LogStrings.properties | 10
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/MessageStrings.properties | 10
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/PetstoreConstants.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/PetstoreUtil.class |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/faces-config.xml | 94 +
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/jboss-web.xml | 10
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/bp-ui-5.jar |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-fileupload-1.1.1.jar |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-io-1.2.jar |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-logging-1.1.jar |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/jdom.jar |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/lucene-core-2.0.0.jar |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/rome-0.8.jar |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/rome-fetcher-0.7.jar |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/shale-remoting.jar |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/sun-web.xml | 14
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/web.xml | 126 +
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.css | 1
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.js | 249 +++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/banner.jsp | 80 +
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.css | 48
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.js | 269 ++++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_dom.js | 136 ++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_one_div.js | 159 ++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/captchaerror.jsp | 23
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.js | 329 +++++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp | 95 +
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp-old | 95 +
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/common.js | 77 +
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/download.jsp | 22
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.js | 54
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.json | 7
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.txt | 1
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/engine.js | 241 +++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileupload.jsp | 266 ++++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileuploadstatus.jsp | 134 ++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/footer.jsp | 15
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9081-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9081.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9083-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9083.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9084-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9084.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9086-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9086.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9088-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9088.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9099-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9099.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9100-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9100.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9101-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9101.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9102-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9102.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9103-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9103.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9104-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9104.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9107-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9107.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9109-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9109.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9113-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9113.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9115-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9115.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9117-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9117.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9118-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9118.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9122-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9122.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9123-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9123.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9125-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9125.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9127-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9127.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9129-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9129.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9134-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9134.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9138-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9138.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9142-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9142.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9149-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9149.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9154-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9154.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9155-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9155.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9156-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9156.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9157-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9157.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9158-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9158.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9159-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9159.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9162-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9162.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9165-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9165.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-jre.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-netbeans.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-sdk.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise2-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise2.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/anthony-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/anthony.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bailey-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bailey.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/banner_logo.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird1.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird2.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird3.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird4.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird5.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird6.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/birds_icon.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/biscuit-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/biscuit.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bob-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bob.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle2-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle2.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle3-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle3.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/california-desert-tortoise-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/california-desert-tortoise.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/carp-car-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/carp-car-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat1.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat10.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat11.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat12.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat2.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat3.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat4.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat5.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat6.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat7.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat8.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat9.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/catalog-thumb-g.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/catalog-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cats_icon.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cbutton.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/chantelle-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/chantelle.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/charlie-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/charlie.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/check_all.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cuttlefish-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cuttlefish-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog1.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog2.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog3.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog4.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog5.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog6.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dogs_icon.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dragon-iron-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dragon-iron-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eagle-stone-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eagle-stone-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eclectus-female-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eclectus-female-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/elkie-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/elkie.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/faith-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/faith.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish2.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish3.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish4.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish_icon.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/florida-king-snake-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/florida-king-snake.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/frog1.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/gaetano-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/gaetano.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/galah-parrot-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/galah-parrot-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/glassfish-colored-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/glassfish-colored-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/guinea-pig-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/guinea-pig.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harmony-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harmony.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harrison-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harrison.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hawaiian-lizard-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hawaiian-lizard-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/honey-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/honey.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hunter-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hunter.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/index-thumb-g.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/index-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/indicator-black.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ja_flag.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/jack-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/jack.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/katzen-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/katzen.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/koi-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/koi-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/kookaburra-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/kookaburra-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lady-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lady.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/left.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/left_2.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko-thumb2.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko2.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard1.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard2.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard3.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lovebird-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lovebird-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/macaw-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/macaw.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maggie-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maggie.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/marianna-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/marianna.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mario-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mario.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maximize.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mexican-redkneed-tarantula-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mexican-redkneed-tarantula.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mimi-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mimi.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/minimize.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/monique-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/monique.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/moon-jelly-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/moon-jelly-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-red-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-red-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-white-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-white-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/olie-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/olie.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/paris-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/paris.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/parrot-popcorn-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/parrot-popcorn.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-blue-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-blue-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-white-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peakcock-white-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink2-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink2.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/princess-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/princess.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/puppup-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/puppup.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/purple-jellyfish-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/purple-jellyfish-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rainbow-lorikeet-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rainbow-lorikeet-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/reptiles_icon.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/right.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rita-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rita.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rockfish-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rockfish-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sabrina-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sabrina.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-anemone-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-anemone-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-nettle-jellyfish-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-nettle-jellyfish-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/seller-thumb-g.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/seller-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/simba-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/simba.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/splash.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/spotted-jellyfish-med.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/spotted-jellyfish-thumb.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaicat-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaicat.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaidog-s.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaidog.jpg |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/uncheck_all.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/us_flag.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/zh_flag.gif |binary
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index-ajax.jsp | 239 +++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.html | 117 +
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.jsp | 164 ++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index_a.jsp | 194 +++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/jsonTest.jsp | 53
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/lookup.jsp | 36
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/main.htmf | 36
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/main.js | 21
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/map.jsp | 143 ++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/mapAll.jsp | 65 +
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/news.js | 190 ++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/news.jsp | 51
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/petstoreListTest.jsp | 21
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/rss.js | 110 +
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/rss.jsp | 33
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/rssbar.jsp | 20
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/rteToolBar.html | 60
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/scroller.css | 1
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/scroller.js | 643 ++++++++++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/search.jsp | 290 ++++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/styles.css | 130 ++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/systemerror.jsp | 28
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/tag.css | 47
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/tag.jsp | 158 ++
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/tagItemLookup.jsp | 45
etc/samples/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/testis.jsp | 36
etc/samples/sample-bundle/src/main/rhq-bundle.xml | 57
etc/samples/sample-bundle/src/main/scripts/assembly.xml | 41
etc/samples/sample-bundle/src/main/scripts/build.xml | 65 +
modules/core/plugin-container/pom.xml | 3
441 files changed, 6423 insertions(+), 6422 deletions(-)
New commits:
commit ca18aa7f2b85f97f35bc3f3fa19f7fe667229e3f
Author: Ian P. Springer <ips(a)jetengine.(none)>
Date: Sat May 29 08:24:38 2010 -0400
move etc/modules/sample/bundle to etc/samples/sample-bundle
(cherry picked from commit 449f640df30a979b94bd9a5938cd24e808fcff9a)
diff --git a/etc/modules/sample-bundle/pom.xml b/etc/modules/sample-bundle/pom.xml
deleted file mode 100644
index 6bd4a88..0000000
--- a/etc/modules/sample-bundle/pom.xml
+++ /dev/null
@@ -1,92 +0,0 @@
-<?xml version="1.0"?>
-
-<!-- $Id$ -->
-
-<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>
-
- <groupId>org.rhq.sample</groupId>
- <artifactId>rhq-sample-bundle</artifactId>
- <version>2.0</version>
- <packaging>pom</packaging>
-
- <name>RHQ Sample Bundle</name>
- <description>a sample bundle consisting of JBossAS 6.0 running the Java Petstore application</description>
-
- <scm>
- <connection>scm:git:ssh://git.fedorahosted.org/git/rhq.git/etc/modules/sample-bundle/ </connection>
- <developerConnection>scm:git:ssh://git.fedorahosted.org/git/rhq.git/etc/modules/sample-bundle/ </developerConnection>
- </scm>
-
- <properties>
- <!-- dependency versions -->
- <derbyclient.version>10.5.3.0_1</derbyclient.version>
- </properties>
-
- <dependencies>
-
- <!-- Derby JDBC driver -->
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derbyclient</artifactId>
- <version>${derbyclient.version}</version>
- </dependency>
-
- </dependencies>
-
- <build>
-
- <plugins>
-
- <plugin>
- <artifactId>maven-antrun-plugin</artifactId>
- <executions>
- <execution>
- <id>prepare-bundle</id>
- <phase>process-resources</phase>
- <configuration>
- <tasks>
- <echo>settings.localRepository=${settings.localRepository}</echo>
- <echo>project.build.outputDirectory=${project.build.outputDirectory}</echo>
- <ant antfile="src/main/scripts/build.xml">
- <property name="settings.localRepository" value="${settings.localRepository}"/>
- <property name="project.version" value="${project.version}"/>
- <property name="project.build.outputDirectory" value="${project.build.outputDirectory}"/>
- <property name="derbyclient.version" value="${derbyclient.version}"/>
- </ant>
- </tasks>
- </configuration>
- <goals>
- <goal>run</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <artifactId>maven-assembly-plugin</artifactId>
- <configuration>
- <descriptors>
- <descriptor>src/main/scripts/assembly.xml</descriptor>
- </descriptors>
- <finalName>${project.build.finalName}</finalName>
- </configuration>
- <executions>
- <execution>
- <id>assemble-bundle</id>
- <phase>package</phase>
- <goals>
- <goal>attached</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
-
- </plugins>
- </build>
-
-</project>
-
diff --git a/etc/modules/sample-bundle/src/main/jbossas-init-config b/etc/modules/sample-bundle/src/main/jbossas-init-config
deleted file mode 100644
index a2fc4c1..0000000
--- a/etc/modules/sample-bundle/src/main/jbossas-init-config
+++ /dev/null
@@ -1,69 +0,0 @@
-# Configuration file for jbossas init script that configures the
-# settings needed to start a particular JBoss AS instance.
-
-#
-# the JBoss AS installation directory (e.g. /opt/jboss-6.0.0.M1)
-# (*REQUIRED*)
-#
-JBOSS_HOME="@@rhq.deploy.dir(a)@"
-
-#
-# the args that will be passed to run.sh
-# (i.e. org.jboss.Main).
-#
-JBOSS_OPTS="-b @@jboss.bind.address(a)@"
-
-# What UNIX user the JBoss AS java process will run as.
-# (The shutdown client is always run as the invoker of the
-# init script). JBoss AS will be run as root by default, but, for
-# the sake of security, it is recommended that you chown the JBoss
-# AS installation files to a non-root user and use that use here.
-# Note, you do need to run as root if your server will listen on one
-# or more privileged (< 1024) ports. If you really do want to run as
-# root, comment out the JBOSS_USER variable completely (i.e. do not
-# set it to root). This will run the server process without "su".
-#JBOSS_USER=jboss
-
-#
-# Specify the maximum file descriptor limit, use "max" or "maximum" to use
-# the default, as queried by the system.
-#
-# Defaults to "maximum"
-#
-#MAX_FD="maximum"
-
-#
-# Specify the profiler configuration file to load.
-#
-# Default is to not load profiler configuration file.
-#
-#PROFILER=
-
-#
-# Specify the location of the Java Rntime Environment (JRE) or
-# Java Development Kit (JDK) installation directory. If not set,
-# "/usr/java/default" will be used.
-#
-#JAVA_HOME="/usr/java/default"
-
-#
-# Specify options to pass to the Java VM (if unset, a default
-# set of options will be used).
-#
-# Note, if you want to pass the default options but some of
-# your own additional options in, then set the
-# ADDITIONAL_JAVA_OPTS variable (see below), rather than JAVA_OPTS.
-#
-#JAVA_OPTS="-Xms128M -Xmx512M -XX:MaxPermSize=256M -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000 -Djava.net.preferIPv4Stack=true"
-
-#
-# Specify additional options to pass to the Java VM. These are passed
-# in addition to the default set of options,
-# i.e. java $JAVA_OPTS $ADDITIONAL_JAVA_OPTS ... org.jboss.Main ...
-#
-# Sample JPDA settings (uncomment either a) or b))
-# a) remote socket debugging
-#ADDITIONAL_JAVA_OPTS="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"
-# b) shared memory debugging
-#ADDITIONAL_JAVA_OPTS="-Xrunjdwp:transport=dt_shmem,server=y,suspend=n,address=jboss"
-
diff --git a/etc/modules/sample-bundle/src/main/jbossas-init-script b/etc/modules/sample-bundle/src/main/jbossas-init-script
deleted file mode 100755
index 58eb98e..0000000
--- a/etc/modules/sample-bundle/src/main/jbossas-init-script
+++ /dev/null
@@ -1,328 +0,0 @@
-#!/bin/bash
-#
-# jbossas - This shell script takes care of starting and stopping
-# a JBoss Application Server (AS) instance on a Red Hat
-# Linux system. It can be run as a system service (init
-# script) and/or run manually.
-#
-# chkconfig: 345 84 16
-# description: JBoss AS server
-# processname: java
-# pidfile: /var/run/jbossas.pid
-
-# Source init-script function library.
-FUNCTIONS=/etc/rc.d/init.d/functions
-if [ ! -f "$FUNCTIONS" ]; then
- echo "Functions library ($FUNCTIONS) not found." >&2
- exit 1
-fi
-. $FUNCTIONS
-
-# Find the name of this service (e.g. "jbossas").
-NAME=`basename $0`
-if [ ${NAME:0:1} = "S" -o ${NAME:0:1} = "K" ]; then
- NAME=${NAME:3}
-fi
-
-# Set names of pid, lock, and log files - all based on the service name.
-PIDFILE="/var/run/$NAME.pid"
-LOCKFILE="/var/lock/subsys/$NAME"
-LOGFILE="/var/log/$NAME.log"
-
-# Set defaults for optional configuration variables.
-JAVA_HOME="/usr/java/default"
-JAVA_OPTS="-Xms128M -Xmx512M -XX:MaxPermSize=256M"
-JAVA_OPTS="$JAVA_OPTS -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000"
-# (Prefer IPv4 stack as as temporary workaround to avoid 'all' config startup
-# issues from IPv4 multicast addresses. See JBAS-7936.)
-JAVA_OPTS="$JAVA_OPTS -Djava.net.preferIPv4Stack=true"
-
-# Source the service's config file, potentially overriding the defaults set
-# above.
-CONFIG="/etc/sysconfig/${NAME}"
-if [ ! -f "$CONFIG" ]; then
- echo "Required configuration file $CONFIG not found." >&2
- exit 1
-fi
-. "$CONFIG"
-
-# Bail out if required variables were not set in the config file.
-if [ -z "$JBOSS_HOME" ]; then
- echo "Required variable JBOSS_HOME was not set in $CONFIG." >&2
- exit 1
-fi
-
-
-start()
-{
- # See if the service is already running, and, if so, exit with an error.
- PID=`pidfileofproc "$NAME"`
- if [ -n "$PID" ]; then
- # pid file exists - see if process is actually running.
- kill -0 $PID 2>/dev/null
- if [ $? -eq 0 ]; then
- echo "$NAME service is already running (pid=$PID)." >&2
- exit 1
- else
- echo "Removing bogus pid file $PIDFILE..."
- rm -f "$PIDFILE"
- if [ -f "$LOCKFILE" ]; then
- echo "Removing bogus lock file $LOCKFILE..."
- rm -f "$LOCKFILE"
- fi
- fi
- fi
-
- # Check that JAVA_HOME is valid.
- JAVA="$JAVA_HOME/bin/java"
- if [ ! -f "$JAVA" ]; then
- echo "Java not found at $JAVA - please set JAVA_HOME in $CONFIG." >&2
- exit 1
- fi
- if [ ! -x "$JAVA" ]; then
- echo "$JAVA is not executable." >&2
- exit 5
- fi
-
- # Setup the classpath
- JBOSS_BOOT_CLASSPATH="$JBOSS_HOME/bin/run.jar"
- if [ ! -f "$JBOSS_BOOT_CLASSPATH" ]; then
- echo "Missing required file: $JBOSS_BOOT_CLASSPATH" >&2
- exit 1
- fi
-
- # By default, Tomcat uses the JDT Compiler for compiling JSPs. However,
- # include tools.jar in the classpath if we can find it under JAVA_HOME
- # or if the user specified it via the JAVAC_JAR variable.
- JAVAC_JAR_FILE="${JAVAC_JAR:-$JAVA_HOME/lib/tools.jar}"
- if [ ! -f "$JAVAC_JAR_FILE" ]; then
- [ -n "$JAVAC_JAR" ] && echo "Missing javac jar file $JAVAC_JAR as defined by the JAVAC_JAR variable. Unexpected results may occur."
- unset JAVAC_JAR_FILE
- fi
-
- # If -server not set in JAVA_OPTS, set it, if supported.
- SERVER_SET=`echo $JAVA_OPTS | grep "\-server"`
- if [ -z "$SERVER_SET" ]; then
- # Check for Sun JVM w/ HotSpot support.
- HAS_HOTSPOT=`"$JAVA" -version 2>&1 | grep -i HotSpot`
-
- # Check for OpenJDK JVM w/ server support.
- HAS_OPENJDK=`"$JAVA" -version 2>&1 | grep -i OpenJDK`
-
- # Enable -server if we have Hotspot or OpenJDK, unless we can't
- if [ -n "$HAS_HOTSPOT" ] || [ -n "$HAS_OPENJDK" ]; then
- JAVA_OPTS="-server $JAVA_OPTS"
- fi
- fi
-
- # Setup JBoss-specific properties.
- JAVA_OPTS="-Dprogram.name=$NAME $JAVA_OPTS"
-
- # Setup JBoss Native library path.
- unset JBOSS_NATIVE_DIR
- for DIR in "$JBOSS_HOME/../native/lib" "$JBOSS_HOME/../native" "$JBOSS_HOME/../native/lib64" "$JBOSS_HOME/native/lib64" "$JBOSS_HOME/native/bin" "$JBOSS_HOME/bin/native"; do
- if [ -d "$DIR" ]; then
- JBOSS_NATIVE_DIR=`cd "$DIR/.." && pwd`
- break
- fi
- done
- if [ -d "$JBOSS_NATIVE_DIR" ]; then
- IS_64_BIT_JVM=`"$JAVA" $JAVA_OPTS -version 2>&1 | grep -i 64-bit`
- if [ -n "$IS_64_BIT_JVM" ]; then
- JBOSS_NATIVE_DIR="$JBOSS_NATIVE_DIR/lib64"
- else
- JBOSS_NATIVE_DIR="$JBOSS_NATIVE_DIR/lib"
- fi
- LD_LIBRARY_PATH="$JBOSS_NATIVE_DIR${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
- export LD_LIBRARY_PATH
- JAVA_OPTS="$JAVA_OPTS -Djava.library.path=$LD_LIBRARY_PATH"
- fi
-
- # Setup the Java endorsed dirs.
- JBOSS_ENDORSED_DIRS="$JBOSS_HOME/lib/endorsed"
- JAVA_OPTS="$JAVA_OPTS -Djava.endorsed.dirs=\"$JBOSS_ENDORSED_DIRS\""
-
- # Setup the Java classpath.
- JBOSS_CLASSPATH="${JBOSS_CLASSPATH:+$JBOSS_CLASSPATH:$JBOSS_BOOT_CLASSPATH}"
- JBOSS_CLASSPATH="${JBOSS_CLASSPATH:-$JBOSS_BOOT_CLASSPATH}"
- JBOSS_CLASSPATH="$JBOSS_CLASSPATH${JAVAC_JAR_FILE:+:$JAVAC_JAR_FILE}"
- JAVA_OPTS="$JAVA_OPTS -classpath \"$JBOSS_CLASSPATH\""
-
- # Display a summary of our environment if we're associated with a terminal.
- if tty -s; then
- echo "========================================================================="; echo
- echo " JBoss AS Bootstrap Environment" ; echo
- echo " JBOSS_HOME: $JBOSS_HOME" ; echo
- echo " JAVA: $JAVA" ; echo
- echo " JAVA_OPTS: $JAVA_OPTS" ; echo
- echo " JBOSS_OPTS: $JBOSS_OPTS" ; echo
- echo "========================================================================="; echo
- fi
-
- # JBoss AS expects its current working dir to be $JBOSS_HOME/bin
- cd "$JBOSS_HOME/bin"
-
- # JBoss AS expects JBOSS_HOME to be set in its environment.
- export JBOSS_HOME
-
- # We only need to bother with nohup if we're associated with a terminal.
- if tty -s; then
- NOHUP=nohup
- else
- unset NOHUP
- fi
-
- # If they set NICELEVEL in the config file, honor it.
- [ -n "${NICELEVEL:-}" ] && NICE="nice -n $NICELEVEL"
-
- # If JBOSS_USER was specified in the config and current user is root, we
- # want to setuid the JBoss AS process to JBOSS_USER.
- if [ -n "$JBOSS_USER" ] && [ "$EUID" -eq 0 ]; then
- # For SELinux we need to use 'runuser', not 'su'.
- if [ -x /sbin/runuser ]; then
- SU=runuser
- else
- SU=su
- fi
- else
- unset SU
- fi
-
- if [ -n "$SU" ]; then
- WRAPPER="$NOHUP $NICE $SU -s /bin/bash - $JBOSS_USER -c"
- else
- WRAPPER="$NOHUP $NICE bash -c"
- fi
-
- # Make sure log file exists and has correct ownership and permissions.
- if [ "$EUID" -eq 0 ]; then
- touch -a "$LOGFILE" || exit 4
- [ -n "$JBOSS_USER" ] && chown $JBOSS_USER "$LOGFILE"
- [ -n "$JBOSS_GROUP" ] && chgrp $JBOSS_GROUP "$LOGFILE"
- chmod u=rw "$LOGFILE"
- [ -n "$JBOSS_GROUP" ] && chmod g+r "$LOGFILE"
- [ -x /sbin/restorecon ] && /sbin/restorecon "$LOGFILE"
- fi
-
- # Make sure pid file has correct ownership and permissions.
- if [ "$EUID" -eq 0 ] && [ -f "$PIDFILE" ]; then
- [ -n "$JBOSS_USER" ] && chown $JBOSS_USER "$PIDFILE"
- [ -n "$JBOSS_GROUP" ] && chgrp $JBOSS_GROUP "$PIDFILE"
- chmod u=rw "$PIDFILE"
- [ -n "$JBOSS_GROUP" ] && chmod g+r
- [ -x /sbin/restorecon ] && /sbin/restorecon "$PIDFILE"
- fi
-
- echo -n "Starting $NAME service: "
-
- # Make sure to escape the $$'s within the subshell to prevent our own shell
- # from evaluating them and writing our own pid to the pid file.
- $WRAPPER "echo \$\$ >\"$PIDFILE\" || ( echo \"Failed to write pid (\$\$) to $PIDFILE.\" >&2; exit 4 ); exec \"$JAVA\" $JAVA_OPTS org.jboss.Main $JBOSS_OPTS" >>"$LOGFILE" 2>&1 &
- if [ $? -ne 0 ]; then
- failure "$NAME startup"
- echo
- EXIT_STATUS=$?
- fi
-
- # Wait a few seconds and then check that the process is running. Note, this
- # will *not* verify that JBoss AS started properly without any configuration
- # or deployment errors.
- sleep 3
-
- if pidfileofproc "$NAME"; then
- success "$NAME startup"
- echo
- touch "$LOCKFILE"
- EXIT_STATUS=0
- else
- failure "$NAME startup"
- echo
- EXIT_STATUS=1
- fi
-}
-
-stop()
-{
- # See if service is running, and, if not, exit without any error.
- PID=`pidfileofproc "$NAME"`
- unset NOT_RUNNING
- if [ -z "$PID" ]; then
- NOT_RUNNING=1
- else
- # pid file exists - see if process is actually running.
- kill -0 $PID 2>/dev/null
- if [ $? -ne 0 ]; then
- NOT_RUNNING=1
- if [ -f "$PIDFILE" ]; then
- echo "Removing bogus pid file $PIDFILE..."
- rm -f "$PIDFILE"
- fi
- if [ -f "$LOCKFILE" ]; then
- echo "Removing bogus lock file $LOCKFILE..."
- rm -f "$LOCKFILE"
- fi
- fi
- fi
- if [ -n "$NOT_RUNNING" ]; then
- echo "$NAME service is not running."
- exit 0
- fi
-
- echo -n "Stopping $NAME service: "
- killproc -d 30 "$NAME"
- EXIT_STATUS=$?
- if [ $EXIT_STATUS -eq 0 ]; then
- rm -f "$LOCKFILE"
- fi
- echo
-}
-
-# NOTE: We don't name this function 'status', since that would override the
-# 'status function defined in /etc/init.d/functions.
-_status()
-{
- status "$NAME"
- EXIT_CODE=$?
-}
-
-restart()
-{
- stop || exit $?
- start
-}
-
-condrestart()
-{
- [ -f "$PIDFILE" ] && restart
-}
-
-usage()
-{
- echo "Usage: $NAME {start|stop|status|restart|condrestart}" >&2
- EXIT_CODE=2
-}
-
-# The
-case "$1" in
- start)
- start
- ;;
- stop)
- stop
- ;;
- status)
- _status
- ;;
- restart)
- restart
- ;;
- condrestart)
- condrestart
- ;;
- *)
- usage
- ;;
-esac
-
-exit $EXIT_STATUS
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/petstore-db.changelog.xml b/etc/modules/sample-bundle/src/main/petstore/petstore-db.changelog.xml
deleted file mode 100644
index 42ced88..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/petstore-db.changelog.xml
+++ /dev/null
@@ -1,187 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9 " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd ">
- <changeSet author="ips (generated)" id="1272025063915-1">
- <createTable schemaName="APP" tableName="ADDRESS">
- <column name="ADDRESSID" type="VARCHAR(10)">
- <constraints nullable="false" primaryKey="true" primaryKeyName="SQL100422173635960"/>
- </column>
- <column name="STREET1" type="VARCHAR(55)">
- <constraints nullable="false"/>
- </column>
- <column name="STREET2" type="VARCHAR(55)"/>
- <column name="CITY" type="VARCHAR(55)">
- <constraints nullable="false"/>
- </column>
- <column name="STATE" type="VARCHAR(25)">
- <constraints nullable="false"/>
- </column>
- <column name="ZIP" type="VARCHAR(5)">
- <constraints nullable="false"/>
- </column>
- <column name="LATITUDE" type="DECIMAL(14,10)">
- <constraints nullable="false"/>
- </column>
- <column name="LONGITUDE" type="DECIMAL(14,10)">
- <constraints nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-2">
- <createTable schemaName="APP" tableName="CATEGORY">
- <column name="CATEGORYID" type="VARCHAR(10)">
- <constraints nullable="false" primaryKey="true" primaryKeyName="SQL100422173635550"/>
- </column>
- <column name="NAME" type="VARCHAR(25)">
- <constraints nullable="false"/>
- </column>
- <column name="DESCRIPTION" type="VARCHAR(255)">
- <constraints nullable="false"/>
- </column>
- <column name="IMAGEURL" type="VARCHAR(55)"/>
- </createTable>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-3">
- <createTable schemaName="APP" tableName="ID_GEN">
- <column name="GEN_KEY" type="VARCHAR(20)">
- <constraints nullable="false" primaryKey="true" primaryKeyName="SQL100422173636590"/>
- </column>
- <column name="GEN_VALUE" type="INT">
- <constraints nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-4">
- <createTable schemaName="APP" tableName="ITEM">
- <column name="ITEMID" type="VARCHAR(10)">
- <constraints nullable="false" primaryKey="true" primaryKeyName="SQL100422173636230"/>
- </column>
- <column name="PRODUCTID" type="VARCHAR(10)">
- <constraints nullable="false"/>
- </column>
- <column name="NAME" type="VARCHAR(30)">
- <constraints nullable="false"/>
- </column>
- <column name="DESCRIPTION" type="VARCHAR(500)">
- <constraints nullable="false"/>
- </column>
- <column name="IMAGEURL" type="VARCHAR(55)"/>
- <column name="IMAGETHUMBURL" type="VARCHAR(55)"/>
- <column name="PRICE" type="DECIMAL(14,2)">
- <constraints nullable="false"/>
- </column>
- <column name="ADDRESS_ADDRESSID" type="VARCHAR(10)">
- <constraints nullable="false"/>
- </column>
- <column name="CONTACTINFO_CONTACTINFOID" type="VARCHAR(10)">
- <constraints nullable="false"/>
- </column>
- <column name="TOTALSCORE" type="INT">
- <constraints nullable="false"/>
- </column>
- <column name="NUMBEROFVOTES" type="INT">
- <constraints nullable="false"/>
- </column>
- <column name="DISABLED" type="INT">
- <constraints nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-5">
- <createTable schemaName="APP" tableName="PRODUCT">
- <column name="PRODUCTID" type="VARCHAR(10)">
- <constraints nullable="false" primaryKey="true" primaryKeyName="SQL100422173635740"/>
- </column>
- <column name="CATEGORYID" type="VARCHAR(10)">
- <constraints nullable="false"/>
- </column>
- <column name="NAME" type="VARCHAR(25)">
- <constraints nullable="false"/>
- </column>
- <column name="DESCRIPTION" type="VARCHAR(255)">
- <constraints nullable="false"/>
- </column>
- <column name="IMAGEURL" type="VARCHAR(55)"/>
- </createTable>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-6">
- <createTable schemaName="APP" tableName="SELLERCONTACTINFO">
- <column name="CONTACTINFOID" type="VARCHAR(10)">
- <constraints nullable="false" primaryKey="true" primaryKeyName="SQL100422173636080"/>
- </column>
- <column name="LASTNAME" type="VARCHAR(24)">
- <constraints nullable="false"/>
- </column>
- <column name="FIRSTNAME" type="VARCHAR(24)">
- <constraints nullable="false"/>
- </column>
- <column name="EMAIL" type="VARCHAR(24)">
- <constraints nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-7">
- <createTable schemaName="APP" tableName="TAG">
- <column name="TAGID" type="INT">
- <constraints nullable="false" primaryKey="true" primaryKeyName="SQL100422173636830"/>
- </column>
- <column name="TAG" type="VARCHAR(30)">
- <constraints nullable="false"/>
- </column>
- <column name="REFCOUNT" type="INT">
- <constraints nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-8">
- <createTable schemaName="APP" tableName="TAG_ITEM">
- <column name="TAGID" type="INT">
- <constraints nullable="false"/>
- </column>
- <column name="ITEMID" type="VARCHAR(10)">
- <constraints nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-9">
- <createTable schemaName="APP" tableName="ZIPLOCATION">
- <column name="ZIPCODE" type="INT">
- <constraints nullable="false" primaryKey="true" primaryKeyName="SQL100422173636710"/>
- </column>
- <column name="CITY" type="VARCHAR(30)">
- <constraints nullable="false"/>
- </column>
- <column name="STATE" type="VARCHAR(2)">
- <constraints nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-10">
- <createIndex indexName="SQL100422173636831" schemaName="APP" tableName="TAG" unique="true">
- <column name="TAG"/>
- </createIndex>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-11">
- <createIndex indexName="SQL100422173637010" schemaName="APP" tableName="TAG_ITEM" unique="true">
- <column name="TAGID"/>
- <column name="ITEMID"/>
- </createIndex>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-12">
- <addForeignKeyConstraint baseColumnNames="ADDRESS_ADDRESSID" baseTableName="ITEM" baseTableSchemaName="APP" constraintName="SQL100422173636231" deferrable="false" initiallyDeferred="false" referencedColumnNames="ADDRESSID" referencedTableName="ADDRESS" referencedTableSchemaName="APP"/>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-13">
- <addForeignKeyConstraint baseColumnNames="CONTACTINFO_CONTACTINFOID" baseTableName="ITEM" baseTableSchemaName="APP" constraintName="SQL100422173636233" deferrable="false" initiallyDeferred="false" referencedColumnNames="CONTACTINFOID" referencedTableName="SELLERCONTACTINFO" referencedTableSchemaName="APP"/>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-14">
- <addForeignKeyConstraint baseColumnNames="PRODUCTID" baseTableName="ITEM" baseTableSchemaName="APP" constraintName="SQL100422173636232" deferrable="false" initiallyDeferred="false" referencedColumnNames="PRODUCTID" referencedTableName="PRODUCT" referencedTableSchemaName="APP"/>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-15">
- <addForeignKeyConstraint baseColumnNames="CATEGORYID" baseTableName="PRODUCT" baseTableSchemaName="APP" constraintName="SQL100422173635741" deferrable="false" initiallyDeferred="false" referencedColumnNames="CATEGORYID" referencedTableName="CATEGORY" referencedTableSchemaName="APP"/>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-16">
- <addForeignKeyConstraint baseColumnNames="ITEMID" baseTableName="TAG_ITEM" baseTableSchemaName="APP" constraintName="SQL100422173637011" deferrable="false" initiallyDeferred="false" referencedColumnNames="ITEMID" referencedTableName="ITEM" referencedTableSchemaName="APP"/>
- </changeSet>
- <changeSet author="ips (generated)" id="1272025063915-17">
- <addForeignKeyConstraint baseColumnNames="TAGID" baseTableName="TAG_ITEM" baseTableSchemaName="APP" constraintName="SQL100422173637012" deferrable="false" initiallyDeferred="false" referencedColumnNames="TAGID" referencedTableName="TAG" referencedTableSchemaName="APP"/>
- </changeSet>
-</databaseChangeLog>
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore-ds.xml b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore-ds.xml
deleted file mode 100644
index ae5ea7c..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore-ds.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!-- The Derby embedded database JCA connection factory config -->
-<!-- See http://www.jboss.org/community/wiki/Multiple1PC for information about local-tx-datasource -->
-<!-- $Id: derby-ds.xml 97536 2009-12-08 14:05:07Z jesper.pedersen $ -->
-
-<datasources>
-
- <local-tx-datasource>
-
- <!-- The jndi name of the DataSource, it is prefixed with java:/ -->
- <!-- Datasources are not available outside the virtual machine -->
- <jndi-name>jdbc/PetstoreDB</jndi-name>
-
- <!-- for in-process persistent db, saved when jboss stops. The
- org.jboss.jdbc.DerbyDatabase mbean is necessary for properly db shutdown -->
- <connection-url>jdbc:derby://localhost:1527/petstore;create=true</connection-url>
-
- <!-- The driver class -->
- <driver-class>org.apache.derby.jdbc.ClientDriver</driver-class>
-
- <!-- The login and password -->
- <user-name>APP</user-name>
- <password>APP</password>
-
- <!-- The minimum connections in a pool/sub-pool. Pools are lazily constructed on first use -->
- <min-pool-size>5</min-pool-size>
-
- <!-- The maximum connections in a pool/sub-pool -->
- <max-pool-size>20</max-pool-size>
-
- <!-- The time before an unused connection is destroyed -->
- <idle-timeout-minutes>5</idle-timeout-minutes>
-
- <!-- Whether to check all statements are closed when the connection is returned to the pool,
- this is a debugging feature that should be turned off in production -->
- <track-statements/>
-
- </local-tx-datasource>
-
-</datasources>
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/META-INF/application.xml b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/META-INF/application.xml
deleted file mode 100644
index eadc0f4..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/META-INF/application.xml
+++ /dev/null
@@ -1,19 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<application xmlns="http://java.sun.com/xml/ns/j2ee " xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance " xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/application_1_4.xsd " version="1.4">
-
- <display-name>Java Pet Store</display-name>
-
- <module>
- <web>
- <web-uri>petstore.war</web-uri>
- <context-root>/petstore</context-root>
- </web>
- </module>
-
- <module>
- <ejb>petstore-ejb.jar</ejb>
- </module>
-
-</application>
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/META-INF/persistence.xml b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/META-INF/persistence.xml
deleted file mode 100644
index 76e0703..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/META-INF/persistence.xml
+++ /dev/null
@@ -1,21 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<persistence version="1.0" xmlns="http://java.sun.com/xml/ns/persistence "
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance "
- xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd ">
-
- <persistence-unit name="PetstorePu">
- <description>Petstore Persistence Unit</description>
- <provider>org.hibernate.ejb.HibernatePersistence</provider>
- <jta-data-source>java:jdbc/PetstoreDB</jta-data-source>
- <non-jta-data-source>java:jdbc/PetstoreDB</non-jta-data-source>
- <properties>
- <property name="hibernate.dialect" value="org.hibernate.dialect.DerbyDialect"/>
- <property name="hibernate.connection.username" value="APP"/>
- <property name="hibernate.connection.password" value="APP"/>
- <property name="hibernate.format_sql" value="true"/>
- </properties>
- </persistence-unit>
-
-</persistence>
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Address.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Address.class
deleted file mode 100644
index c9dc392..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Address.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Category.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Category.class
deleted file mode 100644
index be2275b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Category.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Item.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Item.class
deleted file mode 100644
index 8842106..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Item.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Product.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Product.class
deleted file mode 100644
index dda3feb..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Product.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/SellerContactInfo.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/SellerContactInfo.class
deleted file mode 100644
index b5dbe74..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/SellerContactInfo.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Tag.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Tag.class
deleted file mode 100644
index 1b5785b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/Tag.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/ZipLocation.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/ZipLocation.class
deleted file mode 100644
index 591af10..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore-ejb.jar/com/sun/javaee/blueprints/petstore/model/ZipLocation.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/META-INF/MANIFEST.MF b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/META-INF/MANIFEST.MF
deleted file mode 100644
index c6d5162..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/META-INF/MANIFEST.MF
+++ /dev/null
@@ -1,4 +0,0 @@
-Manifest-Version: 1.0
-Ant-Version: Apache Ant 1.7.1
-Created-By: 16.0-b13 (Sun Microsystems Inc.)
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/BlueFilter.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/BlueFilter.class
deleted file mode 100644
index abac5a6..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/BlueFilter.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/CaptchaSingleton.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/CaptchaSingleton.class
deleted file mode 100644
index 7d7af77..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/CaptchaSingleton.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/RandomString.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/RandomString.class
deleted file mode 100644
index b8bfa4d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/RandomString.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/SimpleCaptcha.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/SimpleCaptcha.class
deleted file mode 100644
index 8c469f4..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/captcha/SimpleCaptcha.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/AddressBean.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/AddressBean.class
deleted file mode 100644
index e2b4ca5..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/AddressBean.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/AutocompleteBean.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/AutocompleteBean.class
deleted file mode 100644
index 223289e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/AutocompleteBean.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/CaptchaValidateFilter.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/CaptchaValidateFilter.class
deleted file mode 100644
index 61f3863..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/CaptchaValidateFilter.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/ControllerAction.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/ControllerAction.class
deleted file mode 100644
index 7c149e3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/ControllerAction.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/ControllerServlet.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/ControllerServlet.class
deleted file mode 100644
index c5fb59a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/ControllerServlet.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/EntryFilter.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/EntryFilter.class
deleted file mode 100644
index 65d4cdb..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/EntryFilter.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/FileUploadBean.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/FileUploadBean.class
deleted file mode 100644
index 1ee72ad..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/FileUploadBean.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/CaptchaAction.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/CaptchaAction.class
deleted file mode 100644
index f56c35e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/CaptchaAction.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/CatalogXmlAction.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/CatalogXmlAction.class
deleted file mode 100644
index 56fc53d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/CatalogXmlAction.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/DefaultControllerAction.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/DefaultControllerAction.class
deleted file mode 100644
index ee55705..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/DefaultControllerAction.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/ImageAction.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/ImageAction.class
deleted file mode 100644
index 30e70ab..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/ImageAction.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/TagXmlAction.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/TagXmlAction.class
deleted file mode 100644
index dd5b7c1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/controller/actions/TagXmlAction.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/mapviewer/MapBean.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/mapviewer/MapBean.class
deleted file mode 100644
index 03400b2..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/mapviewer/MapBean.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/CatalogFacade.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/CatalogFacade.class
deleted file mode 100644
index 23a204c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/CatalogFacade.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/FileUploadResponse.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/FileUploadResponse.class
deleted file mode 100644
index 18f8102..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/FileUploadResponse.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/PayPalBean.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/PayPalBean.class
deleted file mode 100644
index b6e2b0d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/PayPalBean.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/RatingBean.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/RatingBean.class
deleted file mode 100644
index be21196..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/model/RatingBean.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/proxy/GeoCoder.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/proxy/GeoCoder.class
deleted file mode 100644
index 185dc01..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/proxy/GeoCoder.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/proxy/GeoPoint.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/proxy/GeoPoint.class
deleted file mode 100644
index 18b3463..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/proxy/GeoPoint.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/HTMLParser$CallbackHandler.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/HTMLParser$CallbackHandler.class
deleted file mode 100644
index 0c448bf..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/HTMLParser$CallbackHandler.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/HTMLParser.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/HTMLParser.class
deleted file mode 100644
index 4a19fad..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/HTMLParser.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/IndexDocument.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/IndexDocument.class
deleted file mode 100644
index a8b6521..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/IndexDocument.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/Indexer.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/Indexer.class
deleted file mode 100644
index 2b42389..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/Indexer.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SQLParser.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SQLParser.class
deleted file mode 100644
index 8ab0084..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SQLParser.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SearchBean.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SearchBean.class
deleted file mode 100644
index a4cc2bf..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SearchBean.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SearchIndex.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SearchIndex.class
deleted file mode 100644
index 50007c4..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/SearchIndex.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/UpdateIndex.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/UpdateIndex.class
deleted file mode 100644
index 1ef9761..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/search/UpdateIndex.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/ImageScaler.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/ImageScaler.class
deleted file mode 100644
index 5570fac..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/ImageScaler.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/LogStrings.properties b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/LogStrings.properties
deleted file mode 100644
index 112905d..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/LogStrings.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-index.exception=An exception was encountered while indexing the data. Please checked to make sure there indexes are not locked by another user.
-index.sql.statement=Select statement used for retrieving database data "{0}"
-search.string=Searching indexes for string "{0}"
-search.results=Search String returned "{0}" hits
-search.exception=An exception was encountered while performing the search. Please check to make sure the indexes exist.
-fileupload.persist.exception=Error persisting seller data
-fileupload.rollback.exception=Persisting seller data, rollback failed
-geocoder.lookup.exception=The GeoCode address lookup from Yahoo has returned and Exception
-image_does_not_exist=The image doesn't exist in the default image directory or in the upload directory "{0}"
-resource_bundle_does_not_exist=The MessageStrings.properties file does not exist!.
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/MessageStrings.properties b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/MessageStrings.properties
deleted file mode 100644
index 7ca2d9d..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/MessageStrings.properties
+++ /dev/null
@@ -1,10 +0,0 @@
-invalid_contact_firstname=First Name is required.
-invalid_contact_lastname=Last Name is required.
-invalid_address_street1=Street is required.
-invalid_address_city=City is required.
-invalid_address_state=State is required.
-invalid_address_zip=Zip Code is required.
-invalid_item_name=Pet Name is required.
-invalid_item_description=The Description should exist and the field can't have a '<script>' and/or a '<link>' tag in it.
-invalid_item_price=Price should should exist and be a number greater or equal to 0.
-invalid_item_imageurl=The image upload file must exist and be of type '.jpg', '.gif' or '.png'.
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/PetstoreConstants.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/PetstoreConstants.class
deleted file mode 100644
index 5aa4b42..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/PetstoreConstants.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/PetstoreUtil.class b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/PetstoreUtil.class
deleted file mode 100644
index a521d71..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/classes/com/sun/javaee/blueprints/petstore/util/PetstoreUtil.class and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/faces-config.xml b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/faces-config.xml
deleted file mode 100644
index 22f03df..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/faces-config.xml
+++ /dev/null
@@ -1,94 +0,0 @@
-<?xml version='1.0' encoding='UTF-8'?>
-
-<!-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at:
- http://developer.sun.com/berkeley_license.html
- $Id: faces-config.xml,v 1.13 2006/05/03 22:03:20 inder Exp $ -->
-
-<faces-config 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 "
- version="1.2">
- <!-- ========== Application Wide Features ================================ -->
-
- <!-- ========== Managed Beans ============================================ -->
- <managed-bean>
- <managed-bean-name>SearchBean</managed-bean-name>
- <managed-bean-class>com.sun.javaee.blueprints.petstore.search.SearchBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <managed-bean>
- <managed-bean-name>RatingBean</managed-bean-name>
- <managed-bean-class>com.sun.javaee.blueprints.petstore.model.RatingBean</managed-bean-class>
- <managed-bean-scope>request</managed-bean-scope>
- <managed-property>
- <property-name>itemId</property-name>
- <value>#{param.itemIdBinding}</value>
- </managed-property>
- </managed-bean>
-
- <managed-bean>
- <managed-bean-name>PayPalBean</managed-bean-name>
- <managed-bean-class>com.sun.javaee.blueprints.petstore.model.PayPalBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <managed-bean>
- <managed-bean-name>FileUploadBean</managed-bean-name>
- <managed-bean-class>com.sun.javaee.blueprints.petstore.controller.FileUploadBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <managed-bean>
- <managed-bean-name>MapBean</managed-bean-name>
- <managed-bean-class>com.sun.javaee.blueprints.petstore.mapviewer.MapBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <managed-bean>
- <managed-bean-name>AutocompleteBean</managed-bean-name>
- <managed-bean-class>com.sun.javaee.blueprints.petstore.controller.AutocompleteBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <managed-bean>
- <managed-bean-name>AddressBean</managed-bean-name>
- <managed-bean-class>com.sun.javaee.blueprints.petstore.controller.AddressBean</managed-bean-class>
- <managed-bean-scope>session</managed-bean-scope>
- </managed-bean>
-
- <!-- ========== Navigation Rules ========================================= -->
- <navigation-rule>
- <from-view-id>/mapLocation.jsp</from-view-id>
- <navigation-case>
- <from-outcome>map</from-outcome>
- <to-view-id>/map.jsp</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/mapAll.jsp</from-view-id>
- <navigation-case>
- <from-outcome>map</from-outcome>
- <to-view-id>/map.jsp</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/map.jsp</from-view-id>
- <navigation-case>
- <to-view-id>/mapLocation.jsp</to-view-id>
- </navigation-case>
- </navigation-rule>
- <navigation-rule>
- <from-view-id>/search.jsp</from-view-id>
- <navigation-case>
- <from-outcome>displayResults</from-outcome>
- <to-view-id>/search.jsp</to-view-id>
- </navigation-case>
- <navigation-case>
- <from-outcome>map</from-outcome>
- <to-view-id>/map.jsp</to-view-id>
- </navigation-case>
- </navigation-rule>
-
-</faces-config>
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/jboss-web.xml b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/jboss-web.xml
deleted file mode 100644
index 0862993..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/jboss-web.xml
+++ /dev/null
@@ -1,10 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-
-<jboss-web>
- <resource-ref>
- <res-ref-name>jdbc/PetstoreDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <jndi-name>java:jdbc/PetstoreDB</jndi-name>
- </resource-ref>
-</jboss-web>
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/bp-ui-5.jar b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/bp-ui-5.jar
deleted file mode 100644
index f6bd6d2..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/bp-ui-5.jar and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-fileupload-1.1.1.jar b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-fileupload-1.1.1.jar
deleted file mode 100644
index fc5763d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-fileupload-1.1.1.jar and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-io-1.2.jar b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-io-1.2.jar
deleted file mode 100644
index b2867cd..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-io-1.2.jar and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-logging-1.1.jar b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-logging-1.1.jar
deleted file mode 100644
index 2ff9bbd..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/commons-logging-1.1.jar and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/jdom.jar b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/jdom.jar
deleted file mode 100644
index 288e64c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/jdom.jar and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/lucene-core-2.0.0.jar b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/lucene-core-2.0.0.jar
deleted file mode 100644
index db6456f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/lucene-core-2.0.0.jar and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/rome-0.8.jar b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/rome-0.8.jar
deleted file mode 100644
index 27d2ad3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/rome-0.8.jar and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/rome-fetcher-0.7.jar b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/rome-fetcher-0.7.jar
deleted file mode 100644
index c2a26da..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/rome-fetcher-0.7.jar and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/shale-remoting.jar b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/shale-remoting.jar
deleted file mode 100644
index 128045d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/lib/shale-remoting.jar and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/sun-web.xml b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/sun-web.xml
deleted file mode 100644
index a9c411b..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/sun-web.xml
+++ /dev/null
@@ -1,14 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd ">
-<sun-web-app error-url="">
- <context-root>/petstore</context-root>
- <class-loader delegate="true"/>
- <jsp-config>
- <property name="classdebuginfo" value="true">
- <description>Enable debug info compilation in the generated servlet class</description>
- </property>
- <property name="mappedfile" value="true">
- <description>Maintain a one-to-one correspondence between static content and the generated servlet class' java code</description>
- </property>
- </jsp-config>
-</sun-web-app>
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/web.xml b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/web.xml
deleted file mode 100644
index 6c65069..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/WEB-INF/web.xml
+++ /dev/null
@@ -1,126 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at:
- http://developer.sun.com/berkeley_license.html
- $Id: web.xml,v 1.27 2007/04/18 19:25:09 smitha Exp $ -->
-<web-app version="2.5" 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 ">
-
- <display-name>Petstore</display-name>
- <filter>
- <filter-name>CaptchaValidateFilter</filter-name>
- <filter-class>com.sun.javaee.blueprints.petstore.controller.CaptchaValidateFilter</filter-class>
- </filter>
- <filter>
- <filter-name>EntryFilter</filter-name>
- <filter-class>com.sun.javaee.blueprints.petstore.controller.EntryFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>EntryFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
- <filter-mapping>
- <filter-name>CaptchaValidateFilter</filter-name>
- <url-pattern>/faces/dynamic/bpui_fileupload_handler/handleFileUpload</url-pattern>
- </filter-mapping>
- <listener>
- <listener-class>com.sun.javaee.blueprints.petstore.model.CatalogFacade</listener-class>
- </listener>
-
- <servlet>
- <display-name>ControllerServlet</display-name>
- <servlet-name>ControllerServlet</servlet-name>
- <servlet-class>com.sun.javaee.blueprints.petstore.controller.ControllerServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>ControllerServlet</servlet-name>
- <url-pattern>/catalog</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>ControllerServlet</servlet-name>
- <url-pattern>/controller</url-pattern>
- </servlet-mapping>
-
- <context-param>
- <description>
- Google Maps authorization key for "http://localhost:8080/ "
- To use a another URL a new map key will have to be generated from http://www.google.com/apis/maps/
- </description>
- <param-name>com.sun.j2ee.blueprints.ui.mapviewer.KEY</param-name>
- <param-value>ABQIAAAAyQYKk4__l80DyIsqLPvvuxTwM0brOpm-All5BF6PoaKBxRWWERSt2NPUufvDhWGdrb-pCzTZQ2vi2A</param-value>
- </context-param>
-
- <context-param>
- <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
- <param-value>server</param-value>
- </context-param>
-
- <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>
-
- <context-param>
- <param-name>javax.faces.CONFIG_FILES</param-name>
- <param-value>/WEB-INF/faces-config.xml</param-value>
- </context-param>
-
- <!-- proxy for mapviewer -->
- <context-param>
- <param-name>proxyHost</param-name>
- <param-value></param-value>
- </context-param>
- <context-param>
- <param-name>proxyPort</param-name>
- <param-value></param-value>
- </context-param>
- <!-- filter init-param not working so use servlet context -->
- <context-param>
- <param-name>entryPages</param-name>
- <param-value>.jpg|.gif|index.html|index.jsp|fileupload.jsp|search.jsp|catalog.jsp|mapAll.jsp|tag.jsp|news.jsp</param-value>
- </context-param>
-
-
- <!-- Faces Servlet -->
- <servlet>
- <servlet-name>Faces Servlet</servlet-name>
- <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- </servlet>
-
- <!-- Faces Servlet Mapping -->
- <servlet-mapping>
- <servlet-name>Faces Servlet</servlet-name>
- <url-pattern>/faces/*</url-pattern>
- </servlet-mapping>
-
- <!-- need datasource for indexing Lucene search engine -->
- <servlet-mapping>
- <servlet-name>ControllerServlet</servlet-name>
- <url-pattern>/faces/CaptchaServlet</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>ControllerServlet</servlet-name>
- <url-pattern>/ImageServlet/*</url-pattern>
- </servlet-mapping>
- <servlet-mapping>
- <servlet-name>ControllerServlet</servlet-name>
- <url-pattern>/TagServlet/*</url-pattern>
- </servlet-mapping>
- <error-page>
- <exception-type>java.lang.RuntimeException</exception-type>
- <location>/systemerror.jsp</location>
- </error-page>
- <resource-ref>
- <res-ref-name>jdbc/PetstoreDB</res-ref-name>
- <res-type>javax.sql.DataSource</res-type>
- <res-auth>Container</res-auth>
- <res-sharing-scope>Shareable</res-sharing-scope>
- </resource-ref>
-</web-app>
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.css b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.css
deleted file mode 100644
index 14c6ed0..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.css
+++ /dev/null
@@ -1 +0,0 @@
-.accordion {
width:150px;
height:400px;
border-width:1px;
border-style:solid;
border-color:black;
background:#404040;
}
.accordionBody {
width:160px;
height:400px;
border-width:1px;
border-style:solid;
border-color:black;
background:#404040;
}
.accordionTitle {
vertical-align: top;
padding-top: 10px;
text-align: center;
width:150px;
height:90px;
color:white;
font-size:22px;
font-weight: bold;
background:black;
opacity: .99;
}
.accordionRow {
color:white;
cursor: pointer;
font-size:18px;
font-weight: bold;
vertical-align: middle;
padding-top: 5px;
text-align: center;
width:150px;
height:40px;
background:#104E8B;
opacity: .99;
}
.accordionProduct {
text-align: center;
width:150px;
color:white;
font-size:12px;
font-weight: bold;
background:#104E8B;
opacity: .99;
}
.accordionLink {
cursor: pointer;
text-decoration: none;
color:white;
}
.accordionLinkSelected {
text-align: center;
width:150px;
color:red;
font-size:12px;
font-weight: bold;
background:black;
opacity: .99;
}
.accordionLinkHover {
text-decoration: underline;
color:white;
}
\ No newline at end of file
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.js b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.js
deleted file mode 100644
index 1c1ee6b..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/accordion.js
+++ /dev/null
@@ -1,249 +0,0 @@
-/* Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: accordion.js,v 1.22 2006/05/03 22:00:32 inder Exp $ */
-
-function AccordionMenu () {
-
- dojo.event.topic.subscribe("/accordion", this, this.handleEvent);
-
- var displayPortWidth = 100;
- var HEIGHT = 400;
-
- var EXPANDED_HEIGHT = 125;
- var ITEM_HEIGHT = 55;
- var INCREMENT = 10;
-
- var timeout = 5; // in ms
-
- var accordion = document.getElementById("accordionBody");
- var divs = [];
- var oExpandedIndex = -1;
- var nExpandedIndex = -1;
- var oHeight = ITEM_HEIGHT;
- var nHeight = ITEM_HEIGHT;
- var tHeight = 165;
- var expanding = false;
- var categories;
-
- // while control the inline debug statements
- var debug = false;
- var status = document.getElementById("status");
-
- function Row(id, div, defaultHeight) {
- this.id = id;
- this.div = div;
- //this.height = height;
- this.h = defaultHeight;
- this.div.style.height = defaultHeight + "px"
- }
-
- Row.prototype.setHeight = function(nH) {
- this.h = nH;
- this.div.style.height = nH + "px";
- // re-adjust for ie in that it does not follow the boxmodel
- if (this.div.offsetHeight > nH) {
- this.div.style.height = (nH - (this.div.offsetHeight - nH)) + 'px';
- }
- }
-
- Row.prototype.getTotalHeight = function() {
- return this.div.offsetHeight;
- }
-
- Row.prototype.getHeight = function() {
- return this.h;
- }
-
- this.handleEvent = function(args) {
- if (args.type) {
- if (args.type == 'expand') {
- var targetRow = args.targetRow;
- initiateExpansion(targetRow);
- }
- }
- }
-
- this.load = function(lcategories) {
- categories = lcategories;
- // create all the rows
- for (var l=0; l < categories.length; l++) {
- var row = createRow(l,"accordionRow", ITEM_HEIGHT);
- createLinks(row.div, categories[l].name, l, "accordionLink");
- divs.push(row);
- }
- }
-
- function showStatus() {
- if (debug) {
- var stat = "oExpandedIndex=" + oExpandedIndex + " " ;
- for (var i=0; i < divs.length; i++) {
- stat = stat + i + "=" + divs[i].getTotalHeight() + " ";
- }
- status.innerHTML = stat + " total height=" + accordion.offsetHeight;
- var totalH = 0;
- var tH = 0;
- for (var i=0; i < divs.length; i++) {
- totalH = totalH + divs[i].getHeight();
- tH = tH + divs[i].getTotalHeight();
- }
- }
- }
-
- this.showCategory = function(catid) {
- for (var l=0; l < categories.length; l++) {
- if (catid == categories[l].name) {
- // now tell the scroller to load the first product
- initiateExpansion(l);
- if (categories[l].products[0]) {
- dojo.event.topic.publish("/catalog", {type:"showProducts", productId:categories[l].products[0].id});
- }
- break;
- }
- }
- }
-
- this.showFirstCategory = function() {
- initiateExpansion(0);
- if (categories[0].products[0]) {
- dojo.event.topic.publish("/catalog", {type:"showProducts", productId:categories[0].products[0].id});
- }
- }
-
- this.loadCategoryItem = function(pid, itemId) {
- // find the right product and expand the accordion
- for (var l=0; l < categories.length; l++) {
- // now tell the scroller to load the first product
- for (var il=0; il < categories[l].products.length; il++) {
- if (categories[l].products[il].id == pid ) {
- initiateExpansion(l);
- break;
- }
- }
- }
- dojo.event.topic.publish("/catalog", {type:"showItemDetails", productId: pid , itemId: itemId});
- }
-
- function initiateExpansion(id) {
- // jump out if we are in progress
- if (!expanding && oExpandedIndex != Number(id)) {
- expanding = true;
- nExpandedIndex = Number(id);
- if (oExpandedIndex != -1) {
- var targetDiv = divs[oExpandedIndex].div;
- if (targetDiv && targetDiv.childNodes) {
- for (var l = targetDiv.childNodes.length -1; l >= 0 ; l--) {
- targetDiv.removeChild(targetDiv.childNodes[l]);
- }
- }
- createLinks(divs[oExpandedIndex].div, categories[oExpandedIndex].name, oExpandedIndex, "accordionLink");
- }
- expandRow(id);
- }
- }
-
- function expandRow() {
- if (expanding) {
- showStatus();
- //
- if (nHeight < EXPANDED_HEIGHT) {
- nHeight = nHeight + INCREMENT;
- divs[nExpandedIndex].setHeight(nHeight);
- if (oExpandedIndex != -1) {
- if (tHeight >= ITEM_HEIGHT) {
- oHeight = oHeight - INCREMENT;
- // take all out of the old expanded
- } else {
- oHeight = oHeight - INCREMENT;
- }
- divs[oExpandedIndex].setHeight(oHeight);
- }
- // default exapnd here
- } else if (oExpandedIndex != -1 && oHeight > ITEM_HEIGHT) {
- oHeight = oHeight - INCREMENT;
- divs[oExpandedIndex].setHeight(oHeight);
- } else {
- // set the contents of the new menu
- var targetDiv = divs[nExpandedIndex].div;
- if (targetDiv && targetDiv.childNodes) {
- for (var l = targetDiv.childNodes.length -1; l >= 0 ; l--) {
- targetDiv.removeChild(targetDiv.childNodes[l]);
- }
- }
- divs[nExpandedIndex].div.appendChild(document.createTextNode(categories[nExpandedIndex].name));
- divs[nExpandedIndex].div.appendChild(document.createElement("p"));
- for (var l= 0; l < categories[nExpandedIndex].products.length; l++) {
- var span = document.createElement("span");
- span.className = "accordionProduct";
- var link = document.createElement("a");
- var target = categories[nExpandedIndex].products[l].id;
- link.id = target;
- link.className = "accordionLink";
- // some browsers aren't setting the styles for hovers so forcing them
- link.setAttribute("onmouseover", "this.className='accordionLinkHover';");
- link.setAttribute("onmouseout", "this.className='accordionLink';");
- dojo.event.connect(link, "onclick", function(evt) {
- this._target = target
- var src;
- if (evt.target) {
- src = evt.target;
- } else if (evt.srcElement) {
- src = evt.srcElement;
- }
- //src.parentNode.className = "accordionLinkSelected";
- // set this so the next time around it can be removed;
- dojo.event.topic.publish("/catalog", {type:"showProducts", productId:src.id});
- });
- link.appendChild(document.createTextNode(categories[nExpandedIndex].products[l].name));
- span.appendChild(link);
- divs[nExpandedIndex].div.appendChild(span);
- if (l < categories[nExpandedIndex].products.length - 1) {
- divs[nExpandedIndex].div.appendChild(document.createElement("p"));
- }
- link = null;
- }
- expanding = false;
- oExpandedIndex = nExpandedIndex;
- nExpandedIndex = -1;
- oHeight = nHeight;
- nHeight = ITEM_HEIGHT;
- return;
- }
-
- setTimeout(expandRow, timeout);
- }
- }
-
- function createLinks(tDiv, text, id, linkStyle) {
- var link = document.createElement("a");
- link.className = linkStyle;
- link.appendChild(document.createTextNode(text));
- link.setAttribute("id", id);
- if (link.attachEvent) {
- link.attachEvent('onmouseover',function(e){initiateExpansion(e.srcElement.getAttribute("id"));});
- } else if (link.addEventListener) {
- link.addEventListener('mouseover',function(e){initiateExpansion(e.currentTarget.getAttribute("id"));}, true);
- }
- tDiv.appendChild(link);
- }
-
- function createRow(id, rowStyle, height) {
- var nDiv = document.createElement("div");
- nDiv.className = rowStyle;
- var row;
- var cell;
- if (accordion.insertRow) {
- row = accordion.insertRow(accordion.rows.length);
-
- } else {
- row = document.createElement("tr");
- accordion.appendChild(row);
- }
- if (row.inserCell) {
- cell = row.insertCell(0);
- } else {
- cell = document.createElement("td");
- row.appendChild(cell);
- }
- cell.appendChild(nDiv);
- return new Row(id, nDiv, height);
- }
-}
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/banner.jsp b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/banner.jsp
deleted file mode 100644
index c43dd98..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/banner.jsp
+++ /dev/null
@@ -1,80 +0,0 @@
-<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: banner.jsp,v 1.28 2006/12/19 20:23:53 yutayoshida Exp $ --%>
-
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-
-<%@taglib prefix="f" uri="http://java.sun.com/jsf/core "%>
-<%@taglib prefix="h" uri="http://java.sun.com/jsf/html "%>
-<%@taglib prefix="ui" uri="http://java.sun.com/blueprints/ui " %>
-
-<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath}/styles.css"></link>
-<script type="text/javascript" src="${pageContext.request.contextPath}/faces/static/META-INF/dojo/bpcatalog/dojo.js"></script>
-<script type="text/javascript" src="${pageContext.request.contextPath}/faces/static/META-INF/rss/rssbar.js"></script>
-<link type="text/css" rel="stylesheet" href="${pageContext.request.contextPath}/faces/static/META-INF/rss/rssbar.css" />
-<style type="text/css">
-
-#rss-bar {
- margin: 0 auto 0px;
-}
-
-#rss-bar table td#rss-channel {
- background-repeat: no-repeat;
- background-position: top left;
- font-size: 14px;
- font-weight: bold;
- vertical-align: top;
- text-align: center;
- width: 254px;
-}
-
-#rss-bar table td#rss-item {
- background-repeat: no-repeat;
- font-size: 14px;
- width: 534px;
- text-align: left;
-}
-
-#rss-bar table a {
- color: white;
- text-decoration: none;
-}
-#rss-bar table a:hover { color: #ffff00;}
-
-</style>
-<script type="text/javascript">
- var rss = new bpui.RSS();
- dojo.addOnLoad(function(){rss.getRssInJson('${pageContext.request.contextPath}/faces/dynamic/bpui_rssfeedhandler/getRssfeed', 'https://blueprints.dev.java.net/servlets/ProjectRSS?type=news ', '4', '4000', 'News from BluePrints', 'news.jsp');});
-</script>
-
-<table border="0" bordercolor="gray" cellpadding="0" cellspacing="0" bgcolor="white" width="100%">
- <tr id="injectionPoint">
- <td width="100"><a class="menuLink" href="${pageContext.request.contextPath}/faces/index.jsp""><img src="${pageContext.request.contextPath}/images/banner_logo.gif" border="0" width="70" height="70"></a></td>
- <td align="left">
- <div class="banner">Java Pet Store</div>
- </td>
- <td id="bannerRight" align="right">
- <a class="menuLink" onmouseover="this.className='menuLinkHover';" onmouseout="this.className='menuLink';" href="${pageContext.request.contextPath}/faces/fileupload.jsp">Seller</a> <span class="menuItem">|</span>
- <a class="menuLink" onmouseover="this.className='menuLinkHover';" onmouseout="this.className='menuLink';" href="${pageContext.request.contextPath}/faces/search.jsp">Search</a> <span class="menuItem">|</span>
- <a class="menuLink" onmouseover="this.className='menuLinkHover';" onmouseout="this.className='menuLink';" href="${pageContext.request.contextPath}/faces/catalog.jsp">Catalog</a> <span class="menuItem">|</span>
- <a class="menuLink" onmouseover="this.className='menuLinkHover';" onmouseout="this.className='menuLink';" href="${pageContext.request.contextPath}/faces/mapAll.jsp">Map</a> <span class="menuItem">|</span>
- <a class="menuLink" onmouseover="this.className='menuLinkHover';" onmouseout="this.className='menuLink';" href="${pageContext.request.contextPath}/faces/tag.jsp">Tags</a> <span class="menuItem">|</span>
- <a class="menuLink" onmouseover="this.className='menuLinkHover';" onmouseout="this.className='menuLink';" href="${pageContext.request.contextPath}/faces/index.jsp">Home</a>
- </td>
- </tr>
- </tr>
- <tr bgcolor="gray">
- <td id="menubar" align="left" colspan="3" height="25" >
- <div id="rss-bar">
- <table border="0" cellpadding="0" cellspacing="0">
- <tr>
- <td id="rss-channel" nowrap="true"></td>
- <td id="rss-item" nowrap="true"></td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
-
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.css b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.css
deleted file mode 100644
index 5c906b5..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.css
+++ /dev/null
@@ -1,48 +0,0 @@
-.bpui_petstorelist_dataDiv {
- border-style: groove;
- overflow: auto;
- width: 600px;
- height: 500px;
- padding: 10px;
-}
-
-.bpui_petstorelist_pageDiv {
-}
-
-
-.bpui_petstorelist_table {
-}
-
-.bpui_petstorelist_cell {
- padding: 5px;
- vertical-align: top;
-}
-
-.bpui_petstorelist_row {
- border-bottom: dotted;
-}
-
-.bpui_petstorelist_hr {
- width: 90%;
-}
-
-.bpui_petstorelist_image {
-}
-
-.bpui_petstorelist_link{
-}
-
-.bpui_petstorelist_name{
-}
-
-.bpui_petstorelist_description{
-}
-
-.bpui_petstorelist_price {
-}
-
-.bpui_petstorelist_previous {
-}
-
-.bpui_petstorelist_next {
-}
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.js b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.js
deleted file mode 100644
index 4df46fb..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist.js
+++ /dev/null
@@ -1,269 +0,0 @@
-var bpui;
-if(typeof bpui == "undefined") {
- bpui=new Object();
-}
-bpui.petstoreList=new Object();
-
-bpui.petstoreList.divName="";
-bpui.petstoreList.currentCount=0;
-bpui.petstoreList.numberPerPage=5;
-bpui.petstoreList.category="feline01";
-bpui.petstoreList.cachedData=new Object();
-bpui.petstoreList.debug=false;
-bpui.petstoreList.timer;
-
-bpui.petstoreList.initialSetup=function() {
- // get outerdiv
- var targetDiv=document.getElementById(bpui.petstoreList.divName);
-
- // containier div
- tablex="<table><tr><td align=\"center\">";
- tablex += "<b>Java BluePrint's Pet Store Category:</b> <select size=\"1\" id=\"bpui.petstoreList.categoryList\" onchange=\"bpui.petstoreList.selectCategory()\">";
- tablex += "<option value=\"loading\">Loading Data...</option>";
- tablex += "</select>";
- tablex += "</td></tr><tr><td><div id=\"bpui.petstoreList.dataDiv\" class=\"bpui_petstorelist_dataDiv\">";
- tablex += "</div>";
-
- // add product previous and next
- tablex += "</td></tr>";
- tablex += "<tr><td colspan=\"3\" style=\"text-align:center;\">";
- tablex += "<div id=\"bpui.petstoreList.pageDiv\" class=\"bpui_petstorelist_pageDiv\">";
- tablex += "</div>";
- tablex += "</td></tr>";
- // add in debug div, if debugging
- if(bpui.petstoreList.debug) {
- tablex += "<tr><td colspan=\"3\">";
- tablex += "<div id=\"bpui.petstoreList.debugDiv\">";
- tablex += "</div>";
- tablex += "</td></tr>";
- }
- tablex += "</table>";
- targetDiv.innerHTML=tablex;
- bpui.petstoreList.setSelectedCategory();
-}
-
-
-bpui.petstoreList.populateData=function(datax) {
- // clear response timer
- clearTimeout(bpui.petstoreList.timer);
-
- if(typeof datax != "undefined") {
- // check to see if at last page and no data is returned
- if(datax.length < 1) {
- alert("At last page for category!");
- // keep currentCount correct by removing the increment that was added
- bpui.petstoreList.currentCount -= bpui.petstoreList.numberPerPage;
- } else {
- // add data to cache if it doesn't already exist
- // if a full set isn't returned don't cache it, so the data will be retrieved again from the server.
- // This is optional, you have to weigh the performance hit with the consiquences of not doing an update
- key=bpui.petstoreList.category + "|" + bpui.petstoreList.currentCount;
- cachedSet=bpui.petstoreList.cachedData[key];
- if(typeof cachedSet == "undefined" && datax.length >= bpui.petstoreList.numberPerPage) {
- // need to cache data
- if(bpui.petstoreList.debug) bpui.petstoreList.debugMessage("Adding cache data by key: " + key);
- bpui.petstoreList.cachedData[key]=datax;
- }
-
- // get outerdiv
- var targetDiv=document.getElementById("bpui.petstoreList.dataDiv");
-
- // containier div
- tablex="<table class=\"bpui_petstorelist_table\">";
- tablex += "<tr class=\"bpui_petstorelist_row\">";
- tablex += "<th class=\"bpui_petstorelist_cell\">Pet Image</td>";
- tablex += "<th class=\"bpui_petstorelist_cell\">Name & Description</td>";
- tablex += "<th class=\"bpui_petstorelist_cell\">Price ($)</td>";
- tablex += "</tr>";
-
- // loop through product results
- for(ii=0; ii < datax.length; ii++) {
- // add row
- tablex += "<tr class=\"bpui_petstorelist_row\"><td class=\"bpui_petstorelist_cell\">";
- tablex += "<a class=\"bpui_petstorelist_image\" target=\"_blank\" href=\"http://localhost:8080/petstore/faces/catalog.jsp# " +
- datax[ii].productID + "," + datax[ii].itemID + "\">";
-
- tablex += "<img src=\"http://localhost:8080/petstore/ImageServlet/ " + datax[ii].imageThumbURL + "\"/>";
-
- tablex += "</a>";
- tablex += "</td><td class=\"bpui_petstorelist_cell\">";
- tablex += "<a class=\"bpui_petstorelist_link\" target=\"_blank\" href=\"http://localhost:8080/petstore/faces/catalog.jsp# " +
- datax[ii].productID + "," + datax[ii].itemID + "\">";
- tablex += "<span class=\"bpui_petstorelist_name\">" + datax[ii].name + "</span><br/>";
- tablex += "</a>";
- tablex += "<span class=\"bpui_petstorelist_description\">" + datax[ii].description + "</span>";
- tablex += "</td><td class=\"bpui_petstorelist_cell\">";
-
- // add product price
- tablex += "<span class=\"bpui_petstorelist_price\">\$" + datax[ii].price + "</span><br/>";
- tablex += "</td></tr>";
- tablex += "<tr><td colspan=\"3\"><hr class=\"bpui_petstorelist_hr\" /></td></tr>";
- }
-
- tablex += "</table>";
- targetDiv.innerHTML=tablex;
- }
-
- // setup previous next buttons
- pagex="";
- var targetDiv=document.getElementById("bpui.petstoreList.pageDiv");
- if(bpui.petstoreList.currentCount >= bpui.petstoreList.numberPerPage) {
- // add previous
- pagex += "<span class=\"bpui_petstorelist_previous\" onclick=\"bpui.petstoreList.previousProducts();\"><< PREVIOUS</span> ";
- }
- if(datax.length == bpui.petstoreList.numberPerPage) {
- // add next only if full page has been returned. Need to change when add cache ???
- pagex += "<span class=\"bpui_petstorelist_next\" onclick=\"bpui.petstoreList.nextProducts();\">NEXT >></span><br/>";
- }
- targetDiv.innerHTML=pagex;
- }
-}
-
-bpui.petstoreList.setSelectedCategory=function() {
- catx=document.getElementById("bpui.petstoreList.categoryList");
- for(ii=0; ii < catx.length; ii++) {
- if(catx.options[ii].value == bpui.petstoreList.category) {
- catx.options[ii].selected=true;
- }
- }
-}
-
-bpui.petstoreList.selectCategory=function() {
- catx=document.getElementById("bpui.petstoreList.categoryList");
- bpui.petstoreList.category=catx.value;
-
- bpui.petstoreList.currentCount=0;
- bpui.petstoreList.updateProducts();
-}
-
-
-bpui.petstoreList.nextProducts=function() {
- // load data from service
- bpui.petstoreList.currentCount += bpui.petstoreList.numberPerPage;
- bpui.petstoreList.updateProducts();
-}
-
-bpui.petstoreList.previousProducts=function() {
- bpui.petstoreList.currentCount -= bpui.petstoreList.numberPerPage;
- if(bpui.petstoreList.currentCount < 0) {
- bpui.petstoreList.currentCount=0;
- }
- bpui.petstoreList.updateProducts();
-}
-
-
-bpui.petstoreList.updateProducts=function() {
- // check to see if in cache
- key=bpui.petstoreList.category + "|" + bpui.petstoreList.currentCount;
- cachedSet=bpui.petstoreList.cachedData[key];
- // see if data in cache
- if(typeof cachedSet != "undefined") {
- // get data from cache
- if(bpui.petstoreList.debug) bpui.petstoreList.debugMessage("Pulling data from cache using: " + key + " with " + cachedSet.length + " items.");
- bpui.petstoreList.populateData(cachedSet);
- } else {
- // load data from service
- if(bpui.petstoreList.debug) bpui.petstoreList.debugMessage("Retrieving data from service for : " + bpui.petstoreList.category + " starting at item " + bpui.petstoreList.currentCount);
-
- // set degradation timeout
- bpui.petstoreList.timer=setTimeout('bpui.petstoreList.requestTimedOut()', 20000);
-
- // create dynamic script
- bodyTag=document.getElementsByTagName("body")[0];
- scriptx=document.createElement("script");
- scriptx.setAttribute("type", "text/javascript");
- scriptx.setAttribute("src", "http://localhost:8080/petstore/catalog?command=items&pid= " + bpui.petstoreList.category + "&start=" + bpui.petstoreList.currentCount + "&length=" + bpui.petstoreList.numberPerPage + "&format=jsonp&callback=bpui.petstoreList.populateData");
- bodyTag.appendChild(scriptx);
- }
-}
-
-
-bpui.petstoreList.createPetstoreList=function(divName, numberPerPage) {
- // keep divName for later references
- bpui.petstoreList.divName=divName;
-
- // see if numberPerPage defined
- if(typeof numberPerPage != "undefined") {
- bpui.petstoreList.numberPerPage=numberPerPage;
- }
-
- // setup static elements
- bpui.petstoreList.initialSetup();
-
- // set timer to make sure service look up returns. Eventhough the Javascript library was able to be fetched, the database could be down or the
- // service could be responding very slowly and the request timeout. Wait for 30 seconds and then set data div to service may not be responding message.
- // Since both calls hit the database, if one returns propertly the other should also.
- bpui.petstoreList.timer=setTimeout('bpui.petstoreList.requestTimedOut()', 20000);
-
- // load categories from service
- bodyTag=document.getElementsByTagName("body")[0];
- scriptx=document.createElement("script");
- scriptx.setAttribute("type", "text/javascript");
- scriptx.setAttribute("src", "http://localhost:8080/petstore/catalog?command=categories&format=jsonp&ca... ");
- bodyTag.appendChild(scriptx);
-
- // load pet data from service
- bodyTag=document.getElementsByTagName("body")[0];
- scriptx=document.createElement("script");
- scriptx.setAttribute("type", "text/javascript");
- scriptx.setAttribute("src", "http://localhost:8080/petstore/catalog?command=items&pid= " + bpui.petstoreList.category + "&start=0&length=" + bpui.petstoreList.numberPerPage + "&format=jsonp&callback=bpui.petstoreList.populateData");
- bodyTag.appendChild(scriptx);
-}
-
-
-bpui.petstoreList.requestTimedOut=function() {
- document.getElementById("bpui.petstoreList.dataDiv").innerHTML="<b><font color=\"#0000FF\">The Java BluePrint's Pet Store JSONP Service is either responding very slowly or not responding at all! Please check with the service provider for more information.</font></b>";
-}
-
-
-
-bpui.petstoreList.debugMessage=function(messx) {
- targetDiv=document.getElementById("bpui.petstoreList.debugDiv");
- targetDiv.innerHTML=messx + "<br/>" + targetDiv.innerHTML;
-}
-
-
-bpui.petstoreList.populateCategory=function(datax) {
- // clear response timer
- clearTimeout(bpui.petstoreList.timer);
-
- if(typeof datax != "undefined") {
- catx=document.getElementById("bpui.petstoreList.categoryList");
- countx=0;
- // loop through top level categories
- for(ii=0; ii < datax.length; ii++) {
- // loop through individual categories
- for(yy=0; yy < datax[ii].products.length; yy++) {
- // set default value for select list
- bCurrentSelect=false
- if(datax[ii].products[yy].id == bpui.petstoreList.category) {
- bCurrentSelect=true;
- }
- catx.options[countx]=new Option(datax[ii].products[yy].name, datax[ii].products[yy].id, false, bCurrentSelect);
- countx++;
- }
- }
- }
-}
-
-
-bpui.petstoreList.hackerExample=function() {
- /*
- bodyTag=document.getElementsByTagName("body")[0];
- iframex=document.createElement("iframe");
- iframex.setAttribute("src", "http://localhost:8080/bp-clientside-mashup/show.jsp?cookies= " + escape(document.cookie));
- bodyTag.appendChild(iframex);
- */
- // load pet data from service
-
- bodyTag=document.getElementsByTagName("body")[0];
- scriptx=document.createElement("script");
- scriptx.setAttribute("type", "text/javascript");
- scriptx.setAttribute("src", "http://localhost:8080/bp-clientside-mashup/show.jsp?cookies= " + escape(document.cookie));
- bodyTag.appendChild(scriptx);
-
-
-}
-
-
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_dom.js b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_dom.js
deleted file mode 100644
index d00e427..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_dom.js
+++ /dev/null
@@ -1,136 +0,0 @@
-var bpui;
-if(typeof bpui == "undefined") {
- bpui=new Object();
-}
-bpui.petstoreList=new Object();
-
-bpui.petstoreList.divName="";
-bpui.petstoreList.currentCount=0;
-
-bpui.petstoreList.populateData=function(datax) {
- if(typeof datax != "undefined") {
-
- // get outerdiv
- var targetDiv=document.getElementById(bpui.petstoreList.divName);
-
- // make sure div is clear
- targetDiv.innerHTML="";
-
- // add class to containing div
- targetDiv.setAttribute("class", "bpui_petstorelist_div")
-
- // add table
- tablex=document.createElement("table");
- tablex.setAttribute("class", "bpui_petstorelist_table")
- targetDiv.appendChild(tablex);
-
- // loop through product results
- for(ii=0; ii < datax.length; ii++) {
- // add row
- rowx=document.createElement("tr");
-
- // add product image with hyperlink
- colx=document.createElement("td");
- ax=document.createElement("a");
- ax.setAttribute("href", "http://localhost:8080/petstore/faces/catalog.jsp# " + datax[ii].productID + "," + datax[ii].itemID)
- ax.setAttribute("target", "bppetstore")
- ax.setAttribute("class", "bpui_petstorelist_image")
- imgx=document.createElement("img");
- imgx.setAttribute("src", "http://localhost:8080/petstore/ImageServlet/ " + datax[ii].imageThumbURL);
- ax.appendChild(imgx);
- colx.appendChild(ax);
- rowx.appendChild(colx);
-
- // add product name with hyperlink
- colx=document.createElement("td");
- ax=document.createElement("a");
- ax.setAttribute("href", "http://localhost:8080/petstore/faces/catalog.jsp# " + datax[ii].productID + "," + datax[ii].itemID)
- ax.setAttribute("target", "bppetstore")
- ax.setAttribute("class", "bpui_petstorelist_name_link")
- spanx=document.createElement("span");
- spanx.setAttribute("class", "bpui_petstorelist_name")
- spanx.appendChild(document.createTextNode(datax[ii].name));
- ax.appendChild(spanx);
- colx.appendChild(ax);
- colx.appendChild(document.createElement("br"));
- // add product description
- spanx=document.createElement("span");
- spanx.setAttribute("class", "bpui_petstorelist_description");
- spanx.appendChild(document.createTextNode(datax[ii].description));
- colx.appendChild(spanx);
- rowx.appendChild(colx);
-
- // add product price
- colx=document.createElement("td");
- spanx=document.createElement("span");
- spanx.setAttribute("class", "bpui_petstorelist_price");
- spanx.appendChild(document.createTextNode("\$" + datax[ii].price));
- colx.appendChild(spanx);
- rowx.appendChild(colx);
-
- // add row to table
- tablex.appendChild(rowx);
- }
-
- // add product previous and next
- rowx=document.createElement("tr");
- colx=document.createElement("td");
- colx.setAttribute("colspan", "3");
- spanx=document.createElement("span");
- spanx.setAttribute("class", "bpui_petstorelist_previous");
- spanx.setAttribute("onclick", "bpui.petstoreList.previousProducts();");
- spanx.appendChild(document.createTextNode("<< PREVIOUS"));
- colx.appendChild(spanx);
-
- spanx=document.createElement("span");
- spanx.setAttribute("class", "bpui_petstorelist_next");
- spanx.setAttribute("onclick", "bpui.petstoreList.nextProducts();");
- spanx.appendChild(document.createTextNode("NEXT >>"));
- colx.appendChild(spanx);
- rowx.appendChild(colx);
-
- // add row to table
- tablex.appendChild(rowx);
- }
-}
-
-
-bpui.petstoreList.nextProducts=function() {
- // load data from service
- bpui.petstoreList.currentCount += 5;
- bpui.petstoreList.updateProducts();
-}
-
-
-bpui.petstoreList.previousProducts=function() {
- bpui.petstoreList.currentCount -= 5;
- if(bpui.petstoreList.currentCount < 0) {
- bpui.petstoreList.currentCount=0;
- }
- bpui.petstoreList.updateProducts();
-}
-
-
-bpui.petstoreList.updateProducts=function() {
- // load data from service
- bodyTag=document.getElementsByTagName("body")[0];
- scriptx=document.createElement("script");
- scriptx.setAttribute("type", "text/javascript");
- scriptx.setAttribute("src", "http://localhost:8080/petstore/catalog?command=items&pid=feline01&start= " + bpui.petstoreList.currentCount + "&length=5&format=jsonp");
- bodyTag.appendChild(scriptx);
-}
-
-
-
-bpui.petstoreList.createPetstoreList=function(divName) {
- // keep divName for later references
- bpui.petstoreList.divName=divName;
-
- // load data from service
- bodyTag=document.getElementsByTagName("body")[0];
- scriptx=document.createElement("script");
- scriptx.setAttribute("type", "text/javascript");
- scriptx.setAttribute("src", "http://localhost:8080/petstore/catalog?command=items&pid=feline01&start=0... ");
- bodyTag.appendChild(scriptx);
-}
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_one_div.js b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_one_div.js
deleted file mode 100644
index 9b18cb4..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/bp_petstorelist_one_div.js
+++ /dev/null
@@ -1,159 +0,0 @@
-var bpui;
-if(typeof bpui == "undefined") {
- bpui=new Object();
-}
-bpui.petstoreList=new Object();
-
-bpui.petstoreList.divName="";
-bpui.petstoreList.currentCount=0;
-bpui.petstoreList.category="feline01";
-
-
-bpui.petstoreList.initialSetup=function() {
- // get outerdiv
- var targetDiv=document.getElementById(bpui.petstoreList.divName);
-
- // containier div
- tablex="<table><tr><td align=\"center\">";
- tablex += "<b>Java BluePrint's Pet Store Category:</b> <select size=\"1\" id=\"bpui.petstoreList.categoryList\" onchange=\"bpui.petstoreList.selectCategory()\">";
- tablex += "<option value=\"feline01\">Hairy Cat</option>";
- tablex += "<option value=\"feline02\">Groomed Cat</option>";
- tablex += "<option value=\"canine01\">Medium Dogs</option>";
- tablex += "<option value=\"canine02\">Small Dogs</option>";
- tablex += "<option value=\"avian01\">Parrot</option>";
- tablex += "<option value=\"avian02\">Exotic</option>";
- tablex += "<option value=\"fish01\">Small Fish</option>";
- tablex += "<option value=\"fish02\">Large Fish</option>";
- tablex += "<option value=\"reptile01\">Slithering Reptiles</option>";
- tablex += "<option value=\"reptile02\">Crawling Reptiles</option>";
- tablex += "</select>";
- tablex += "</td></tr><tr><td><div class=\"bpui_petstorelist_div\">";
- tablex += "</div>";
-
- // add product previous and next
- tablex += "</td></tr>";
- tablex += "<tr><td colspan=\"3\" style=\"text-align:center;\">";
- tablex += "<span class=\"bpui_petstorelist_previous\" onclick=\"bpui.petstoreList.previousProducts();\"><< PREVIOUS</span> ";
- tablex += "<span class=\"bpui_petstorelist_next\" onclick=\"bpui.petstoreList.nextProducts();\">NEXT >></span><br/>";
- tablex += "</td></tr>";
- tablex += "</table>";
- targetDiv.innerHTML=tablex;
- bpui.petstoreList.setSelectedCategory();
-}
-
-bpui.petstoreList.populateData=function(datax) {
- if(typeof datax != "undefined") {
-
- // get outerdiv
- var targetDiv=document.getElementById(bpui.petstoreList.divName);
-
- // containier div
- tablex="<table><tr><td align=\"center\">";
- tablex += "<b>Java BluePrint's Pet Store Category:</b> <select size=\"1\" id=\"bpui.petstoreList.categoryList\" onchange=\"bpui.petstoreList.selectCategory()\">";
- tablex += "<option value=\"feline01\">Hairy Cat</option>";
- tablex += "<option value=\"feline02\">Groomed Cat</option>";
- tablex += "<option value=\"canine01\">Medium Dogs</option>";
- tablex += "<option value=\"canine02\">Small Dogs</option>";
- tablex += "<option value=\"avian01\">Parrot</option>";
- tablex += "<option value=\"avian02\">Exotic</option>";
- tablex += "<option value=\"fish01\">Small Fish</option>";
- tablex += "<option value=\"fish02\">Large Fish</option>";
- tablex += "<option value=\"reptile01\">Slithering Reptiles</option>";
- tablex += "<option value=\"reptile02\">Crawling Reptiles</option>";
- tablex += "</select>";
- tablex += "</td></tr><tr><td><div class=\"bpui_petstorelist_div\">";
-
- tablex += "<table class=\"bpui_petstorelist_table\">";
-
- // loop through product results
- for(ii=0; ii < datax.length; ii++) {
- // add row
- tablex += "<tr class=\"bpui_petstorelist_row\"><td class=\"bpui_petstorelist_cell\">";
- tablex += "<a class=\"bpui_petstorelist_image\" target=\"bppetstore\" href=\"http://localhost:8080/petstore/faces/catalog.jsp# " +
- datax[ii].productID + "," + datax[ii].itemID + "\">";
-
- tablex += "<img src=\"http://localhost:8080/petstore/ImageServlet/ " + datax[ii].imageThumbURL + "\"/>";
-
- tablex += "</a>";
- tablex += "</td><td class=\"bpui_petstorelist_cell\">";
- tablex += "<a class=\"bpui_petstorelist_link\" target=\"bppetstore\" href=\"http://localhost:8080/petstore/faces/catalog.jsp# " +
- datax[ii].productID + "," + datax[ii].itemID + "\">";
- tablex += "<span class=\"bpui_petstorelist_name\">" + datax[ii].name + "</span><br/>";
- tablex += "</a>";
- tablex += "<span class=\"bpui_petstorelist_description\">" + datax[ii].description + "</span>";
- tablex += "</td><td class=\"bpui_petstorelist_cell\">";
-
- // add product price
- tablex += "<span class=\"bpui_petstorelist_price\">\$" + datax[ii].price + "</span><br/>";
- tablex += "</td></tr>";
- tablex += "<tr><td colspan=\"3\"><hr class=\"bpui_petstorelist_hr\" /></td></tr>";
- }
-
- tablex += "</table></div>";
-
- // add product previous and next
- tablex += "</td></tr>";
- tablex += "<tr><td colspan=\"3\" style=\"text-align:center;\">";
- tablex += "<span class=\"bpui_petstorelist_previous\" onclick=\"bpui.petstoreList.previousProducts();\"><< PREVIOUS</span> ";
- tablex += "<span class=\"bpui_petstorelist_next\" onclick=\"bpui.petstoreList.nextProducts();\">NEXT >></span><br/>";
- tablex += "</td></tr>";
- tablex += "</table>";
- targetDiv.innerHTML=tablex;
- bpui.petstoreList.setSelectedCategory();
- }
-}
-
-bpui.petstoreList.setSelectedCategory=function() {
- catx=document.getElementById("bpui.petstoreList.categoryList");
- for(ii=0; ii < catx.length; ii++) {
- if(catx.options[ii].value == bpui.petstoreList.category) {
- catx.options[ii].selected=true;
- }
- }
-}
-
-
-bpui.petstoreList.selectCategory=function() {
- catx=document.getElementById("bpui.petstoreList.categoryList");
- bpui.petstoreList.category=catx.value;
-
- bpui.petstoreList.currentCount=0;
- bpui.petstoreList.updateProducts();
-}
-
-
-bpui.petstoreList.nextProducts=function() {
- // load data from service
- bpui.petstoreList.currentCount += 5;
- bpui.petstoreList.updateProducts();
-}
-
-bpui.petstoreList.previousProducts=function() {
- bpui.petstoreList.currentCount -= 5;
- if(bpui.petstoreList.currentCount < 0) {
- bpui.petstoreList.currentCount=0;
- }
- bpui.petstoreList.updateProducts();
-}
-
-bpui.petstoreList.updateProducts=function() {
- // load data from service
- bodyTag=document.getElementsByTagName("body")[0];
- scriptx=document.createElement("script");
- scriptx.setAttribute("type", "text/javascript");
- scriptx.setAttribute("src", "http://localhost:8080/petstore/catalog?command=items&pid= " + bpui.petstoreList.category + "&start=" + bpui.petstoreList.currentCount + "&length=5&format=jsonp");
- bodyTag.appendChild(scriptx);
-}
-
-bpui.petstoreList.createPetstoreList=function(divName) {
- // keep divName for later references
- bpui.petstoreList.divName=divName;
-
- // load data from service
- bodyTag=document.getElementsByTagName("body")[0];
- scriptx=document.createElement("script");
- scriptx.setAttribute("type", "text/javascript");
- scriptx.setAttribute("src", "http://localhost:8080/petstore/catalog?command=items&pid= " + bpui.petstoreList.category + "&start=0&length=5&format=jsonp");
- bodyTag.appendChild(scriptx);
-
-}
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/captchaerror.jsp b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/captchaerror.jsp
deleted file mode 100644
index 60ef953..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/captchaerror.jsp
+++ /dev/null
@@ -1,23 +0,0 @@
-<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: captchaerror.jsp,v 1.1 2006/02/17 03:04:22 yutayoshida Exp $ --%>
-
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-
-
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
- "http://www.w3.org/TR/html4/loose.dtd ">
-
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Captcha Error</title>
- </head>
- <body>
-
- <h1>Please input the right captcha string -- <a href="./">Try again</a>
-
-
-
- </body>
-</html>
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.js b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.js
deleted file mode 100644
index 4bdfc69..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.js
+++ /dev/null
@@ -1,329 +0,0 @@
-/* Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: catalog.js,v 1.21 2007/01/17 22:16:44 basler Exp $ */
-
-var ac;
-var is;
-var controller;
-//var debug=true;
-
-function getApplicationContextRoot() {
- var urlArray=window.location.toString().split("/", 4);
- return "/" + urlArray[3];
-}
-
-var applicationContextRoot=getApplicationContextRoot();
-
-function initCatalog() {
- ac = new AccordionMenu();
- is = new ImageScroller();
- is.load();
- controller = new CatalogController();
- // wire in a listener for the rating component
- dojo.event.connect("before", bpui.rating, "doClick", controller, "modifyState");
- controller.initialize();
-}
-
-function CatalogController() {
- dojo.event.topic.subscribe("/catalog", this, handleEvent);
-
- // this object structure contains a list of the products and chunks that have been loaded
- var pList = new ProductList();
-
- var CHUNK_SIZE=7;
- var initalRating;
- var initalItem;
- var originalURL;
-
- // using this for some browsers that do not support innerHTML
- var useDOMInjection = false;
-
- var infoName = document.getElementById("infopaneName");
- var infoRating = document.getElementById("infopaneRating");
- var infoPrice = document.getElementById("infopanePrice");
- var infoBuyNow = document.getElementById("infopaneBuyNow");
- var infoShortDescription = document.getElementById("infopaneShortDescription");
- var infoDescription = document.getElementById("infopaneDescription");
- // for paypal
- var buyNowAmount = document.getElementById("buyNow1_amount");
- var buyNowItemName = document.getElementById("buyNow1_item_name");
-
- function handleEvent(args) {
- if (args.type == "showingItem") {
- // update the id on the ratring component
- if (typeof bpui != 'undefined') {
- var groupId = is.getGroupId();
- window.location.href= originalURL + "#" + groupId + "," + args.id;
- if (typeof bpui.rating != 'undefined') {
- // update the rating
- bpui.rating.state["rating"].bindings["itemId"]=args.id;
- bpui.rating.modifyDisplay("rating", args.rating, true);
- // get the currrent item
- showItemDetails(args.id);
- } else {
- initalItem = args.id;
- initalRating = args.rating;
- }
- } else {
- // things haven't been loaded to set the inital rating
- initalItem = args.id;
- initalRating = args.rating;
- }
- } else if (args.type == "getChunk") {
- populateItems(args.id, args.index, args.currentChunk, false);
-
- } else if (args.type == "showItemDetails") {
- showProductDetails(args.productId, args.itemId);
-
- } else if (args.type == "showProducts") {
- is.reset();
- populateItems(args.productId, 0, 0, true);
- }
- }
-
- function showItemDetails(id) {
- var i = is.getItems().get(id);
- setNodeText(infoName, i.name + "<br/><a href='javascript:controller.disableItem("" + id + "","" + i.name + "")'><font size='-1' color='white'><i>Flag as inappropriate</i></font></a>");
- setNodeText(infoPrice, i.price);
- setNodeText(infoShortDescription, i.shortDescription);
- setNodeText(infoDescription, i.description);
- // update the paypal
- buyNowAmount.value = i.price;
- buyNowItemName.value = i.name;
- }
-
- function setNodeText(t, text) {
- if (useDOMInjection) {
- t.lastChild.nodeValue = text;
- } else {
- t.innerHTML = text;
- }
- }
-
- this.initialize = function() {
- // check whether the innerHTML changes can be used in the infopane
- infoName.innerHTML = " ";
- if (!useDOMInjection && infoName.innerHTML != " ") {
- useDOMInjection = true;
-
- infoName.appendChild(document.createTextNode("Name"));
- infoPrice.appendChild(document.createTextNode("$0.00"));
- infoShortDescription.appendChild(document.createTextNode("<description>"));
- infoDescription.appendChild(document.createTextNode("<description>"));
- }
-
- var ratingInstance = bpui.rating.state["rating"];
- ratingInstance.grade = initalRating;
- bpui.rating.state["rating"].bindings["itemId"]=initalItem;
- bpui.rating.modifyDisplay("rating", initalRating, true);
- loadAccordion();
- }
-
-
- this.modifyState = function(arg, rating) {
- var itemId = initalItem;
- if (typeof bpui.rating.state["rating"].bindings["itemId"] != 'undefined') {
- itemId = bpui.rating.state["rating"].bindings["itemId"];
- }
- // set the cached rating to the new rating that was set.
- is.getItems().get(itemId).rating = rating;
- }
-
-
- function loadAccordion () {
- // go out and get the categories
- // this should be made more geric
- var bindArgs = {
- url: applicationContextRoot + "/catalog?command=categories&format=json",
- mimetype: "text/json",
- load: function(type,json) {
- ac.load(json);
- processURLParameters();
- },
- error: ajaxBindError
- };
- dojo.io.bind(bindArgs);
- }
-
- // this needs to happen after we have loaded the accordion data
- function processURLParameters() {
- originalURL = decodeURIComponent(window.location.href);
- var params = {};
- // look for the params
- if (originalURL.indexOf("#") != -1) {
- var qString = originalURL.split('#')[1];
- var args = qString.split(',');
- originalURL = originalURL.split('#')[0];
- ac.loadCategoryItem(args[0], args[1]);
- return;
- } else if (originalURL.indexOf("?") != -1) {
- var qString = originalURL.split('?')[1];
- // get rid of any bookmarking stuff
- if (qString.indexOf("#") != -1) {
- qString = qString.split('#')[0];
- originalURL = originalURL.split('#')[0];
- window.location.href = originalURL;
- }
- ps = qString.split('&');
- // now go through and create the params map as an object literal
- for (var i in ps) {
- var t = ps[i].split('=');
- params[t[0]] = t[1];
- }
- // first check for the item in product
- if (typeof params.itemId != 'undefined' && typeof params.pid != 'undefined') {
- ac.loadCategoryItem(params.pid, params.itemId);
- // next if there is a catid definition then do it
- } else if (typeof params.catid != 'undefined') {
- ac.showCategory(params.catid);
- }
- } else {
- // nothing is selected
- ac.showFirstCategory();
- }
- }
-
-
-
- function showProductDetails(pid, itemId) {
- is.reset();
- is.showProgressIndicator();
- var bindArgs = {
- url: applicationContextRoot + "/catalog?command=itemInChunk&pid=" + pid + "&itemId=" + itemId + "&length=" + CHUNK_SIZE,
- mimetype: "text/xml",
- load: function(type,data,postProcessHandler) {
- processProductData(data,true, pid, itemId);
- showItemDetails(itemId);
- is.doMaximize();
- },
- error: ajaxBindError
- };
- dojo.io.bind(bindArgs);
- }
-
-
-
- function populateItems(pid, index, neededChunk, showImage) {
- is.showProgressIndicator();
- is.setGroupId(pid);
- printDebug("populateItems - need to make sure displaying - pid=" + pid + " Chunk=" + neededChunk);
-
- // check to see if relevant scroller page is already loaded
- if(!is.containsChunk(pid + "_" + neededChunk)) {
-
- // not loaded, so see if it is in the cache
- if (pList.hasChunk(pid, neededChunk)) {
- // in cache, so add chunk to scroller
- printDebug("**** adding chunk from cache - pid=" + pid + " Chunk=" + neededChunk);
- is.addChunk(pid + "_" + neededChunk);
- is.addItems(pList.getChunk(pid, neededChunk));
-
- // show first image if you have it
- if(showImage && is.getScrollerItems().length > 0) {
- is.showImage(is.getScrollerItems()[0].id);
- }
-
- } else {
- // not in cache so load it
- startRetIndex=(neededChunk * CHUNK_SIZE);
-
- printDebug("**** retrieving chunk from server - pid=" + pid + " currentIndex=" + index + " startIndex=" + startRetIndex + " Chunk=" + neededChunk);
- var bindArgs = {
- url: applicationContextRoot + "/catalog?command=items&pid=" + pid + "&start=" + startRetIndex + "&length=" + CHUNK_SIZE,
- mimetype: "text/xml",
- load: function(type,data,postProcessHandler) {
- processProductData(data, showImage, pid, null, neededChunk);
- },
- error: ajaxBindError
- };
- dojo.io.bind(bindArgs);
- }
- } else {
- printDebug("*** items already showing");
- }
-
- }
-
-
- function processProductData(responseXML, showImage, pid, iId, chunkId) {
- var items = [];
- var count = responseXML.getElementsByTagName("item").length;
- for (var loop=0; loop < count ; loop++) {
-
- var item = responseXML.getElementsByTagName("item")[loop];
- var itemId = item.getElementsByTagName("id")[0].firstChild.nodeValue;
- var name = item.getElementsByTagName("name")[0].firstChild.nodeValue;
- var thumbURL = item.getElementsByTagName("image-tb-url")[0].firstChild.nodeValue;
- var imageURL = item.getElementsByTagName("image-url")[0].firstChild.nodeValue;
- var description = item.getElementsByTagName("description")[0].firstChild.nodeValue;
- var price = item.getElementsByTagName("price")[0].firstChild.nodeValue;
- var rating = item.getElementsByTagName("rating")[0].firstChild.nodeValue;
- var shortDescription;
- if (description.length > 71) {
- shortDescription = description.substring(0,71) + "...";
- } else {
- shortDescription = description;
- }
- var i = {id: itemId, name: name, image: imageURL, thumbnail: thumbURL, shortDescription: shortDescription, description: description, price:price, rating: rating};
- items.push(i);
- }
-
- // cache the chunks
- pList.addChunk(pid, chunkId, items);
- is.addItems(items);
- is.addChunk(pid + "_" + chunkId);
-
- if (showImage && iId == null) {
- is.setGroupId(pid);
- is.showImage(items[0].id);
- } else {
- is.setGroupId(pid);
- is.showImage(iId);
- }
- is.hideProgressIndicator();
- }
-
- function ProductList() {
- var _plist = this;
- var map = new Map();
-
- this.addChunk = function(pid, chunkNumber, items) {
- map.put(pid + "_" + chunkNumber, items, true);
- }
-
- this.getChunk = function(pid, chunkNumber) {
- return map.get(pid + "_" + chunkNumber);
- }
-
- this.hasChunk = function(pid, chunkNumber) {
- return (map.get(pid + "_" + chunkNumber) != null);
- }
-
- this.contents = function() {
- return map.contents();
- }
- }
-
-
- this.disableItem=function(itemId, itemName) {
- // go out and get the categories
- // this should be made more geric
- if (confirm("Are you sure you want to effectively remove this item from Petstore?")) {
- var bindArgs = {
- url: applicationContextRoot + "/catalog?command=disable&id=" + itemId,
- mimetype: "text/xml",
- load: function(type,json) {
- //alert("The item named '" + itemName + "' has been disabled!");
- pList = new ProductList();
- is.reset();
- populateItems(is.getGroupId(), 0, 0, true);
- },
- error: ajaxBindError
- };
- dojo.io.bind(bindArgs);
- }
- }
-
-
-}
-
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp
deleted file mode 100644
index 443857b..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp
+++ /dev/null
@@ -1,95 +0,0 @@
-<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: catalog.jsp,v 1.22 2007/03/16 21:42:03 basler Exp $ --%>
-<script type="text/javascript" src="common.js"></script>
-<script type="text/javascript" src="scroller.js"></script>
-<link rel="stylesheet" type="text/css" href="scroller.css"></link>
-<script type="text/javascript" src="accordion.js"></script>
-<link rel="stylesheet" type="text/css" href="accordion.css"></link>
-<script type="text/javascript" src="catalog.js"></script>
-<%@taglib uri="http://java.sun.com/jsp/jstl/core " prefix="c" %>
-<%@taglib uri="http://java.sun.com/jsf/html " prefix="h" %>
-<%@taglib uri="http://java.sun.com/jsf/core " prefix="f" %>
-<%@taglib prefix="ui" uri="http://java.sun.com/blueprints/ui " %>
-<body>
-<jsp:include page="banner.jsp" />
-<script type="text/javascript">
- dojo.event.connect(window, "onload", function(){initCatalog();});
-</script>
-<center>
- <table border="0">
- <tr>
- <td>
- <table id="accordion">
- <tr id="accordionTitle" class="accordionTitle"><td>Pets</td></tr>
- <tr><td>
- <table id="accordionBody" border="0" class="accordionBody">
- </table>
- </td></tr>
- </table>
- </td>
- <td>
- <div id="CatalogBrowser">
- <table border="0" class="slider" width="500px" >
- <tr height="415" valign="top">
- <td id="bodySpace" border="0" align="center"></td>
- </tr>
- <tr id="targetRow">
- <td width="500" height="70 align="top">
- <div class="nav" id="right_button">
- <img src="${pageContext.request.contextPath}/images/right.gif" name="nextRoll" title="Show More Items" border="0">
- </div>
- <div class="nav" id="left_button">
- <img src="${pageContext.request.contextPath}/images/left.gif" name="previousRoll" title="Show Previous Items" border="0">
- </div>
- <div id="infopane" class="infopane">
- <table class="infopaneTable">
- <tr>
- <td id="infopaneName" class="infopaneTitle">
- </td>
- <td id="infopaneRating" class="infopaneRating">
- <f:view>
- <ui:rating id="rating" maxGrade="5" includeNotInterested="false" includeClear="false"
- hoverTexts="#{RatingBean.ratingText}" notInterestedHoverText="Not Interested" clearHoverText="Clear Rating"
- grade="#{RatingBean.grade}"/>
- <f:verbatim></td><td id="infopanePrice" class="infopanePrice"></td><td id="infopanePayPal" class="infopanePayPal"></f:verbatim>
- <ui:buyNow business="donate(a)animalfoundation.com" id="buyNow1" itemName="Buy Item One"
- amount="100.00" quantity="1" type="BuyNow" postData="#{PayPalBean.postData}" target="paypal"/>
- </f:view>
- </td>
- <td id="infopaneIndicator" class="infopaneIndicator">
- </td>
- <td id="infopaneDetailsIcon">
- </td>
- </tr>
- <tr>
- <td id="infopaneShortDescription" colspan="7" class="infopaneShortDescription">
- </td>
- </tr>
- <tr style="height:20px">
- <td></td>
- </tr>
- <tr>
- <td id="infopaneDescription" colspan="6" class="infopaneDescription">
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
- </td>
- <td style="vertical-align:top; width:300px; text-align:right;">
- <div id="downloadAds">
- <jsp:include page="download.jsp" />
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div id="status" style="text-align:left"></div> <div id="status_2"></div>
- <div id="dstatus"></div>
- <div id="injection_point"></div>
-</center>
-<jsp:include page="footer.jsp" />
-</body>
-</html>
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp-old b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp-old
deleted file mode 100644
index 13914ed..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/catalog.jsp-old
+++ /dev/null
@@ -1,95 +0,0 @@
-<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: catalog.jsp,v 1.20 2006/12/01 21:38:40 basler Exp $ --%>
-<script type="text/javascript" src="common.js"></script>
-<script type="text/javascript" src="scroller.js"></script>
-<link rel="stylesheet" type="text/css" href="scroller.css"></link>
-<script type="text/javascript" src="accordion.js"></script>
-<link rel="stylesheet" type="text/css" href="accordion.css"></link>
-<script type="text/javascript" src="catalog.js"></script>
-<%@taglib uri="http://java.sun.com/jsp/jstl/core " prefix="c" %>
-<%@taglib uri="http://java.sun.com/jsf/html " prefix="h" %>
-<%@taglib uri="http://java.sun.com/jsf/core " prefix="f" %>
-<%@taglib prefix="ui" uri="http://java.sun.com/blueprints/ui " %>
-<body>
-<jsp:include page="banner.jsp" />
-<script type="text/javascript">
- dojo.event.connect(window, "onload", function(){initCatalog();});
-</script>
-<center>
- <table border="0">
- <tr>
- <td>
- <table id="accordion">
- <tr id="accordionTitle" class="accordionTitle"><td>Pets</td></tr>
- <tr><td>
- <table id="accordionBody" border="0" class="accordionBody">
- </table>
- </td></tr>
- </table>
- </td>
- <td style="min-width:500px;">
- <div id="CatalogBrowser">
- <table width="500px"border="1" class="slider" >
- <tr height="415" valign="top">
- <td id="bodySpace" border="0" align="center"></td>
- </tr>
- <tr id="targetRow">
- <td width="500px" height="70px" align="top">
- <div class="nav" id="right_button">
- <img src="${pageContext.request.contextPath}/images/right.gif" name="nextRoll" title="Show More Items" border="0">
- </div>
- <div class="nav" id="left_button">
- <img src="${pageContext.request.contextPath}/images/left.gif" name="previousRoll" title="Show Previous Items" border="0">
- </div>
- <div id="infopane" class="infopane">
- <table class="infopaneTable">
- <tr>
- <td id="infopaneName" class="infopaneTitle">
- </td>
- <td id="infopaneRating" class="infopaneRating">
- <f:view>
- <ui:rating id="rating" maxGrade="5" includeNotInterested="false" includeClear="false"
- hoverTexts="#{RatingBean.ratingText}" notInterestedHoverText="Not Interested" clearHoverText="Clear Rating"
- grade="#{RatingBean.grade}"/>
- <f:verbatim></td><td id="infopanePrice" class="infopanePrice"></td><td id="infopanePayPal" class="infopanePayPal"></f:verbatim>
- <ui:buyNow business="donate(a)animalfoundation.com" id="buyNow1" itemName="Buy Item One"
- amount="100.00" quantity="1" type="BuyNow" postData="#{PayPalBean.postData}" target="paypal"/>
- </f:view>
- </td>
- <td id="infopaneIndicator" class="infopaneIndicator">
- </td>
- <td id="infopaneDetailsIcon">
- </td>
- </tr>
- <tr>
- <td id="infopaneShortDescription" colspan="7" class="infopaneShortDescription">
- </td>
- </tr>
- <tr style="height:20px">
- <td></td>
- </tr>
- <tr>
- <td id="infopaneDescription" colspan="6" class="infopaneDescription">
- </td>
- </tr>
- </table>
- </div>
- </td>
- </tr>
- </table>
- </td>
- <td style="vertical-align:top; width:300px; text-align:right;">
- <div id="downloadAds">
- <jsp:include page="download.jsp" />
- </div>
- </td>
- </tr>
- </table>
- </div>
- <div id="status" style="text-align:left"></div> <div id="status_2"></div>
- <div id="dstatus"></div>
- <div id="injection_point"></div>
-</center>
-<jsp:include page="footer.jsp" />
-</body>
-</html>
\ No newline at end of file
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/common.js b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/common.js
deleted file mode 100644
index 03a3ba2..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/common.js
+++ /dev/null
@@ -1,77 +0,0 @@
-
- function ajaxBindError(type, errObj) {
- // can't use the error page, because unless and exception in the internal servlet container
- // nullpointer exceptions will be thrown
- //window.location="./systemerror.jsp?message=" + errObj.message;
-
- alert("An Exception has been encountered on the server side during an Ajax request. Please see the server logs for more information " + errObj.message);
- }
-
-
- function debugProperties(namex) {
- var listx="";
- var ob=namex;
- for(xx in ob) {
- listx += xx + " = " + ob[xx] + "<br/>"
- }
- //document.write(listx);
- alert(listx);
- }
-
-
- function printDebug(argx) {
- if (typeof debug != 'undefined') {
- document.getElementById("status").innerHTML = argx + "<br\>" + document.getElementById("status").innerHTML;
- }
- }
-
-
- function Map() {
- var size = 0;
- var keys = [];
- var values = [];
-
- this.put = function(key, value, replace) {
- if (this.get(key) == null) {
- keys[size] = key;
- values[size] = value;
- size++;
- } else if (replace) {
- for (i=0; i < size; i++) {
- if (keys[i] == key) {
- values[i] = value;
- }
- }
- }
- }
-
- this.get = function(key) {
- for (i=0; i < size; i++) {
- if (keys[i] == key) {
- return values[i];
- }
- }
- return null;
- }
-
- this.clear = function() {
- size = 0;
- keys = [];
- values = [];
- }
-
- // return keys show can show main image
- this.getKeys = function() {
- return keys;
- }
-
- // dump contents of map keys as string
- this.contents = function() {
- var retx="";
- for(ii=0; ii < size; ii++) {
- retx += keys[ii] + ", ";
- }
- return retx;
- }
-
- }
\ No newline at end of file
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/download.jsp b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/download.jsp
deleted file mode 100644
index 20ef584..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/download.jsp
+++ /dev/null
@@ -1,22 +0,0 @@
-<div id="downloadAds" style="text-align:center; border-style:none; width:100%;">
- <table style="width:100%;">
- <tr>
- <td style="text-align:center;">
- <a href="http://java.sun.com/javaee/downloads/index.jsp " target="downloads"><img style="border:none" src="./images/ad-sdk.jpg" alt="Download Java EE 5 SDK"/></a>
- <br/>
- </td>
- </tr>
- <tr>
- <td style="text-align:center;">
- <a href="http://www.netbeans.org/downloads/index.html " target="downloads"><img style="border:none" src="./images/ad-netbeans.jpg" alt="Download Netbeans IDE"/></a>
- <br/>
- </td>
- </tr>
- <tr>
- <td style="text-align:center;">
- <a href="http://java.com/en/download/index.jsp " target="downloads"><img style="border:none" src="./images/ad-jre.jpg" alt="Download Java SE"/></a>
- <br/>
- </td>
- </tr>
- </table>
-</div>
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.js b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.js
deleted file mode 100644
index 65855c2..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.js
+++ /dev/null
@@ -1,54 +0,0 @@
-dojo.require("dojo.io");
-function checkAdPage() {
- var bindArgs = {
- // check to see if an updated page is available
- URL: "http://localhost:8080/petstore/downloadAd.txt ",
- mimetype: "text/plain",
- load: returnFunctionx,
- error: ajaxBindError};
-
- // dispatch the request
- dojo.io.bind(bindArgs);
-}
-
-function returnFunctionx(type, data, evt) {
- // statically setup popup for simple case
- // check return of the dojo call to make sure it is valid
- if (evt.readyState == 4) {
- if (evt.status == 200) {
- alert("data = " + data);
- document.getElementById("downloadAds").innerHTML=data;
- }
- }
-}
-
-
-var req;
-
-function checkAdPageMark() {
- // calculate arrow and border image location
- req=initRequest();
-
- url="http://blueprints.dev.java.net/petstore/downloadAd.txt ",
- req.onreadystatechange = returnFunctionxMark;
- req.open("GET", url, true);
- req.send(null);
-}
-
-
-function returnFunctionxMark() {
- if (req.readyState == 4) {
- if (req.status == 200) {
- alert("data = " + req.responseText);
- document.getElementById("downloadAds").innerHTML=req.responseText;
- }
- }
-}
-
-initRequest=function() {
- if (window.XMLHttpRequest) {
- return new XMLHttpRequest();
- } else if (window.ActiveXObject) {
- return new ActiveXObject("Microsoft.XMLHTTP");
- }
-}
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.json b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.json
deleted file mode 100644
index 3bbf564..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.json
+++ /dev/null
@@ -1,7 +0,0 @@
-jsonpTest({"keyId":"TestData"});
-
-function testexample() {
- alert("testexample!!");
-}
-
-testexample();
\ No newline at end of file
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.txt b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.txt
deleted file mode 100644
index e9a0944..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/downloadAd.txt
+++ /dev/null
@@ -1 +0,0 @@
-<div id='downloadAds' style='text-align:center; border-style:double; width:100%;'> <table style='width:100%'> <tr> <th style='text-align:center; border-bottom:thin solid black;'>DOWNLOADS Blueprints</th> </tr> <tr> <td style='text-align:center;'> <a href='http://java.sun.com/javaee/downloads/index.jsp ' target='downloads'><img style='border:none' src='./images/ad-sdk.jpg' alt='Download Java EE 5 SDK'/></a> </td> </tr> <tr> <td style='text-align:center;'> <a href='http://www.netbeans.org/downloads/index.html ' target='downloads'><img style='border:none' src='./images/ad-netbeans.jpg' alt='Download Netbeans IDE'/></a> </td> </tr> <tr> <td style='text-align:center;'> <a href='http://java.com/en/download/index.jsp ' target='downloads'><img style='border:none' src='./images/ad-jre.jpg' alt='Download Java SE'/></a> </td> </tr> </table></div>
\ No newline at end of file
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/engine.js b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/engine.js
deleted file mode 100644
index 0e5b14e..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/engine.js
+++ /dev/null
@@ -1,241 +0,0 @@
-/* Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: engine.js,v 1.10 2006/05/03 22:00:32 inder Exp $ */
-
-function Engine () {
-
- /**
- *
- * Load template text aloing with an associated script
- *
- * Argument p properties are as follows:
- *
- * url : Not required but used if you want to get the template from
- * something other than the injection serlvet. For example if
- * you want to load content directly from a a JSP or HTML file.
- *
- * p.template : Not required if you specficy a url property Otherewise this
- * is the name of the template file.
- *
- * p.initFunction: Not required. This function or function pointer will be called
- * after the template text and script are loaded. The result of
- * the evaluated script will be accessible in the context of
- * this function.
- *
- * p.injectionPoint: Not required. This is the id of an element into. If this is
- * not specfied a div will be created under the roon node of
- * the document and the template will be injected into it.
- * Content is injected by setting the innerHTML property
- * of an element to the template text.
- */
- this.inject = function (p) {
- var targetUrl;
- if (!p.url) targetUrl = "controller?command=content&target=/" + p.template;
- else targetUrl = p.url;
- var templateArgs = {
- url: targetUrl,
- mimetype: "text/html",
- load: function(type, data) {
- //if no parent is given append to the document root
- var nData = includeEmbeddedResources(data, p.initFunction );
- if (!p.injectionPoint) {
- var injectionPoint = document.createElement("div");
- injectionPoint.innerHTML = nData;
- document.firstChild.appendChild(injectionPoint);
- } else {
- p.injectionPoint.innerHTML = nData;
- }
- if (p.script) {
- // now load the associated JavaScript
- loadScript(p.script,p.initFunction);
- }
- }
- };
- dojo.io.bind(templateArgs);
- }
-
- function loadScript(targetURL,callback) {
- var templateArgs = {
- url: targetURL,
- mimetype: "text/plain",
- load: callback
- };
- dojo.io.bind(templateArgs);
- }
-
- /**
- * If were returning an text document remove any script in the
- * the document and add it to the global scope using a time out.
- */
- function includeEmbeddedResources(target, initFunction) {
- var bodyText = "";
- var embeddedScripts = [];
- var embeddedStyles = [];
- var scriptReferences = [];
- var styleReferences = [];
- var styles = [];
- // recursively go through and weed out the scripts
- // TODO: Use some better REGEX processing
- // TODO: Also support single quotes
- while (target.indexOf("<script") != -1) {
- var realStart = target.indexOf("<script");
- var scriptSourceStart = target.indexOf("src=", (realStart));
- var scriptElementEnd = target.indexOf(">", realStart);
- var end = target.indexOf("</script>", (realStart)) + "</script>".length;
- if (realStart != -1 && scriptSourceStart != -1) {
- var scriptSourceName;
- var scriptSourceLinkStart= scriptSourceStart + 5;
- var scriptSourceLinkEnd= target.indexOf("\"", (scriptSourceLinkStart + 1));
- if (scriptSourceStart < scriptElementEnd) {
- scriptSourceName = target.substring(scriptSourceLinkStart, scriptSourceLinkEnd);
- // prevent multiple inclusions of dojo.js.
- // there is no way you would get to this point without dojo being included
- if (scriptSourceName.indexOf("dojo.js") == -1) {
- scriptReferences.push(scriptSourceName);
- }
- }
- }
- // now remove the script body
- var scriptBodyStart = scriptElementEnd + 1;
- var sBody = target.substring(scriptBodyStart, end - "</script>".length);
- if (sBody.length > 0) {
- embeddedScripts.push(sBody);
- }
- //remove script
- target = target.substring(0, realStart) + target.substring(end, target.length);
- }
-
- while (target.indexOf("<style") != -1) {
- var realStart = target.indexOf("<style");
- var styleElementEnd = target.indexOf(">", realStart);
- var end = target.indexOf("</style>", (realStart)) ;
- var styleBodyStart = styleElementEnd + 1;
- var sBody = target.substring(styleBodyStart, end);
- if (sBody.length > 0) {
- embeddedStyles.push(sBody);
- }
- //remove style
- target = target.substring(0, realStart) + target.substring(end + "</style>".length, target.length);
- }
- // get the links
- while (target.indexOf("<link") != -1) {
- var realStart = target.indexOf("<link");
- var styleSourceStart = target.indexOf("href=", (realStart));
- var styleElementEnd = target.indexOf(">", realStart) +1;
- if (realStart != -1 && styleSourceStart != -1) {
- var styletSourceName;
- var styleSourceLinkStart= styleSourceStart + 6;
- var styleSourceLinkEnd= target.indexOf("\"", (styleSourceLinkStart + 1));
- if (styleSourceStart < styleElementEnd) {
- styleSourceName = target.substring(styleSourceLinkStart, styleSourceLinkEnd);
- styleReferences.push(styleSourceName);
- }
- //remove style
- target = target.substring(0, realStart) + target.substring(styleElementEnd, target.length);
- }
- }
-
- var head = document.getElementsByTagName("head")[0];
-
- // inject the links
- for(var loop = 0; loop < styleReferences.length; loop++) {
- var link = document.createElement("link");
- link.href = styleReferences[loop];
- link.type = "text/css";
- link.rel = "stylesheet";
- head.appendChild(link);
- }
-
- var stylesElement;
- if (embeddedStyles.length > 0) {
- stylesElement = document.createElement("style");
- stylesElement.type="text/css";
- var stylesText;
- for(var loop = 0; loop < embeddedStyles.length; loop++) {
- stylesText = stylesText + embeddedStyles[loop];
- }
- if (document.styleSheets[0].cssText) {
- document.styleSheets[0].cssText = document.styleSheets[0].cssText + stylesText;
- } else {
- stylesElement.appendChild(document.createTextNode(stylesText));
- head.appendChild(stylesElement);
- }
- }
-
- scriptLoader(scriptReferences, 0, function() {
- this.embeddedScripts = embeddedScripts;
- // evaluate the embedded javascripts in the order they were added
- // consider using an onload handler
- for(var loop = 0; loop < embeddedScripts.length; loop++) {
- //alert("evaluating " + embeddedScripts[loop]);
- var script = embeddedScripts[loop];
- // append to the script a method to call the scriptLoaderCallback
- eval(script);
- if (loop == (embeddedScripts.length -1)) {
- initFunction();
- }
- }
- });
-
- return target;
- }
-
-
- /**
- * Load the scripts in order and load them one after on another
- */
- function scriptLoader(scripts, index, callbackFunction) {
- var head = document.getElementsByTagName("head").item(0);
- var scriptElement = document.createElement("script");
- scriptElement.id = "c_script_" + index;
- scriptElement.type = "text/javascript";
-
- var loadHandler = function () {
- if (index < scripts.length && index != scripts.length -1) {
- scriptLoader(scripts, ++index, callbackFunction);
- } else {
- callbackFunction();
- }
- }
- if (typeof scriptElement.onreadystatechange != 'undefined') {
- scriptElement.onreadystatechange = function () {
- if (this.readyState == 'loaded') {
- loadHandler();
- }
- };
- }
- scriptElement.onload = loadHandler;
-
- // Safari not seeing the onload event and does not support the onreadystate
- if (navigator.userAgent.toLowerCase().indexOf("safari") != -1) {
- scriptElement.src = scripts[index];
- setTimeout(loadHandler, 0);
- }
- head.appendChild(scriptElement);
- setTimeout("document.getElementById('c_script_" + index + "').src ='" + scripts[index] + "'", 0);
-
- scriptElement = null;
- head = null;
- }
-
- /**
- * If were returning an XML document remove any script in the
- * the document and add it to the global scope using a time out.
- */
- function includeEmbeddedScripts(xmlDocument) {
- var items = new Array();
- var xmlDocument = document.getElementsByTagName("script");
-
- for(var loop = 0; loop < targets.length; loop++) {
- var children = targets[loop].childNodes;
- var iScript = "";
- for(var innerLoop = 0; innerLoop < children.length; innerLoop++) {
- iScript += children[innerLoop].data;
- }
- items.add(iScript);
- children[loop].parentNode.removeChild(children[loop]);
- }
- for(var loop = 0; loop < items.length; loop++) {
- setTimeout(items[loop],0);
- }
- }
-}
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileupload.jsp b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileupload.jsp
deleted file mode 100644
index bb8fb85..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileupload.jsp
+++ /dev/null
@@ -1,266 +0,0 @@
-<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: fileupload.jsp,v 1.57 2007/03/08 21:58:48 inder Exp $ --%>
-
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-<%@page import="com.sun.javaee.blueprints.petstore.util.PetstoreConstants"%>
-<%@taglib uri="http://java.sun.com/jsp/jstl/core " prefix="c" %>
-<%@taglib uri="http://java.sun.com/jsf/html " prefix="h" %>
-<%@taglib uri="http://java.sun.com/jsf/core " prefix="f" %>
-<%@taglib prefix="ui" uri="http://java.sun.com/blueprints/ui " %>
-
-<html>
- <head>
- <title>Petstore Seller page</title>
- <script type="text/javascript">
- var submittingForm=false;
-
- function testRetFunction(type, data, evt){
- if (evt.readyState == 4) {
- if(evt.status == 200) {
- // check for error
- submittingForm=false;
- var resultx=data.getElementsByTagName("response")[0];
- var message=resultx.getElementsByTagName("message")[0].childNodes[0].nodeValue;
- if(message == "Captchas Filter Error") {
- // captcha error
- alert("Authorization failed : please enter the correct captcha string");
- } else if(message == "Validation Error") {
- alert("Validation failed on the Server :\n" + resultx.getElementsByTagName("detail")[0].childNodes[0].nodeValue);
- } else if(message == "Upload Size Error") {
- alert("The size of the uploaded image must not be more than 100 KB");
- } else {
- // fileupload complete
- var thumbpath=resultx.getElementsByTagName("thumbnail")[0].childNodes[0].nodeValue;
- var productId=resultx.getElementsByTagName("productId")[0].childNodes[0].nodeValue;
- var itemid=resultx.getElementsByTagName("itemId")[0].childNodes[0].nodeValue;
- // forward to status page
- location.href="fileuploadstatus.jsp?message=" + message + "&id=" + itemid + "&productId=" + productId + "&thumb=" + thumbpath;
- }
- } else {
- // server error, send to error page
- // can't forward to errorpage because null pointer gets thrown on lookup of status code ("javax.servlet.error.status_code")
- //ajaxBindError(type, data.message);
- alert("Persistence failed : Please check if the server logs for more information!")
- }
- }
- }
-
-
- function storeCookie() {
- currentcap = "j_captcha_response="+document.getElementById("TestFileuploadForm:captcharesponse").value;
- document.cookie = currentcap;
- }
-
- function extractCity(citystatezip) {
- var index = citystatezip.indexOf(',');
- var nextcity = citystatezip.substring(0, index+4);
- return nextcity;
- }
-
- function chooseCity(city) {
- var index = city.indexOf(',');
- var state = city.substring(index+2, index+4);
- var zip = city.substring(index+5);
- city = city.substring(0, index);
-
- document.getElementById('TestFileuploadForm:cityField').value = city;
- document.getElementById('TestFileuploadForm:stateField').value = state;
- document.getElementById('TestFileuploadForm:zipField').value = zip;
- }
-
- function fileuploadOnsubmit() {
- if(!submittingForm) {
- var valMess="";
-
- // save rich text editor text to element
- var descx=dojo.widget.byId('rtEditor').getEditorContent()
- var lowDescx=descx.toLowerCase();
-
- // START: check validation
- if(dojo.byId("TestFileuploadForm:name").value == "") {
- valMess += "Error: Pet Name is required.\n";
- }
-
- // make sure there isn't a script/link tag in the description
- if(lowDescx == "" || lowDescx.indexOf("<script") > -1 || lowDescx.indexOf("<link") > -1) {
- valMess += "Error: The Description must exist and the field can't have a '<script>' and/or a '<link>' tag in it\n";
- }
-
- // make sure price is a number
- var pricex=dojo.byId("TestFileuploadForm:price").value;
- if(pricex == "" || isNaN(parseInt(pricex))) {
- // price should be a number
- valMess += "Error: Price should should exist and be a number in American Dollars in the format '*.00'.\n";
- }
-
- // make sure the upload file ends in an suffix
- var filex=dojo.byId("fileToUploadId").value;
- var lengthx=filex.length;
- var suffix=filex.substr(lengthx-4).toLowerCase();
- if(lengthx < 1 || (suffix != ".jpg" && suffix != ".gif" && suffix != ".png")) {
- // not a proper upload so error
- valMess += "Error: The image upload file must exist and be of type .jpg, .gif or .png\n";
- }
-
-
- // make sure make and address is entered
- if(dojo.byId("TestFileuploadForm:firstName").value == "") {
- // price should be a number
- valMess += "Error: First Name is required.\n";
- }
- if(dojo.byId("TestFileuploadForm:lastName").value == "") {
- valMess += "Error: Last Name is required.\n";
- }
- if(dojo.byId("TestFileuploadForm:street1").value == "") {
- valMess += "Error: Street is required.\n";
- }
- if(dojo.byId("TestFileuploadForm:cityField").value == "") {
- valMess += "Error: City is required.\n";
- }
- if(dojo.byId("TestFileuploadForm:stateField").value == "") {
- valMess += "Error: State is required.\n";
- }
- if(dojo.byId("TestFileuploadForm:zipField").value == "") {
- valMess += "Error: Zip Code is required.\n";
- }
-
- if(valMess != "") {
- // error, show message
- alert(valMess + "\nPlease addresses the error(s) and re-submit your entry!");
- } else {
- // no validation errors, so submit form
- submittingForm=true;
- // set description
- dojo.byId('description').value=descx;
-
- storeCookie()
- document.forms['TestFileuploadForm'].onsubmit();
- }
- }
- }
-
- function showFU() {
- document.getElementById("fucomponent").style.visibility = "visible";
- }
-
- function switchPanes(fromDivId, toDivId) {
- // show pane
- var divx=document.getElementById(fromDivId);
- divx.style.visibility='hidden';
- divx=document.getElementById(toDivId);
- divx.style.visibility='visible';
- }
-</script>
-<style>
-span.button {
- background-color: #6699CC;
- color: white;
- cursor:pointer;
- border: thin outset black;
- padding: 1px 5px;
-}
-div.pane {
- width: 90%;
- background-color: #EEEEEE;
- border: thin double blue;
- padding: .5cm;
- font: 12px arial;
-}
-
-.nameCol {
- width: 45%;
-}
-.dataCol {
- width: 55%;
-}
-
-</style>
- </head>
- <body onload="showFU()">
- <jsp:include page="banner.jsp"/>
- <script>dojo.require("dojo.widget.Editor2");</script>
- <br/>
- <div id="fucomponent" style="visibility:hidden;">
- <f:view>
-
- <ui:fileUploadTag id="TestFileuploadForm" serverLocationDir="#{FileUploadBean.uploadImageDirectory}"
- postProcessingMethod="#{FileUploadBean.postProcessingMethod}"
- retMimeType="text/xml" retFunction="testRetFunction"
- progressBarDivId="progress" progressBarSize="40">
- <div id="pane2" class="pane" style="visibility: hidden;">
- <h:panelGrid border="0" columns="2" style="width: 100%" columnClasses="nameCol, dataCol">
- <f:facet name="header">
- <h:outputText value="Information about yourself"/>
- </f:facet>
- <h:outputText value="*First Name"/>
- <h:inputText size="20" id="firstName"></h:inputText>
- <h:outputText value="*Last Name"/>
- <h:inputText size="20" id="lastName"></h:inputText>
- <h:outputText value="Seller Email"/>
- <h:inputText size="20" id="email"></h:inputText>
- <h:outputText value="*Street"/>
- <h:inputText size="20" id="street1"></h:inputText>
- <h:outputText value="*City"/>
- <ui:autoComplete size="20" maxlength="10" id="cityField"
- completionMethod="#{AutocompleteBean.completeCity}"
- value="#{AddressBean.city}" required="true"
- ondisplay="function(item) { return extractCity(item); }"
- onchoose="function(item) { return chooseCity(item); }" />
- <h:outputText value="*State"/>
- <ui:autoComplete size="2" maxlength="10" id="stateField"
- completionMethod="#{AutocompleteBean.completeState}"
- value="#{AddressBean.state}" required="true" />
- <h:outputText value="*Zip Code"/>
- <h:inputText size="5" id="zipField" value="#{AddressBean.zip}" required="true" />
-
- <h:outputText value="Enter the text as it is shown below (case insensitive)"/>
- <h:outputText />
- <h:graphicImage id="captchaImg" url="CaptchaServlet"/>
- <h:inputText id="captcharesponse"></h:inputText>
- <br/><span class="button" onclick="switchPanes('pane2', 'pane1');"><< Previous</span>
- <span class="button" onclick="fileuploadOnsubmit()">Submit</span>
- <br/><div id="progress"></div><br/>
-
- </h:panelGrid>
- </div>
- <div class="pane"style="position:absolute; top:125px;" id="pane1">
- <h:panelGrid border="0" columns="2" style="width: 100%" columnClasses="nameCol, dataCol">
- <f:facet name="header">
- <h:outputText value="Information about your pet"/>
- </f:facet>
-
- <h:outputText value="Category"/>
- <h:selectOneMenu id="product">
- <f:selectItems value="#{FileUploadBean.products}"/>
- </h:selectOneMenu>
-
- <h:outputText value="*Pet's Name"/>
- <h:inputText size="20" id="name"></h:inputText>
-
- <h:outputText value="*Description (3 lines max display in catalog)"/>
-
- <div style="border-style:inset; border-width:thin; background-color:white">
- <textarea wrap="soft" dojoType="Editor2" widgetId="rtEditor" id="description" name="TestFileuploadForm:description"
- toolbarTemplatePath="${pageContext.request.contextPath}/rteToolBar.html"></textarea>
- </div>
-
- <h:outputText value="*Price (is US dollars)"/>
- <h:inputText size="20" id="price"></h:inputText>
-
- <h:outputText value="*Image File"/>
- <input type="file" size="20" name="fileToUpload" id="fileToUploadId"/>
-
- <h:outputText value="Custom Tag Keywords (separated by spaces)"/>
- <h:inputText size="20" id="tags"></h:inputText>
- </h:panelGrid>
- <br/><span class="button" onclick="switchPanes('pane1', 'pane2');">Next >></span>
- </div>
- Required fields are designated by a *
- </ui:fileUploadTag>
- </f:view>
- </div>
-
- <jsp:include page="footer.jsp" />
- </body>
-</html>
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileuploadstatus.jsp b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileuploadstatus.jsp
deleted file mode 100644
index 50e3730..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/fileuploadstatus.jsp
+++ /dev/null
@@ -1,134 +0,0 @@
-<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: fileuploadstatus.jsp,v 1.8 2006/05/05 21:05:47 yutayoshida Exp $ --%>
-
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
- <title>Seller Photo Submit Status</title>
- <style type="text/css">
- #status { background-color : #E0FFFF;
- border : none;
- width : 50%;
- }
- </style>
- <script type="text/javascript">
- window.onload = function() {
- var thumbfile = "${param.thumb}";
- if (thumbfile == "") {
- thumbfile = "${sessionScope['fileuploadResponse'].thumbnail}";
- }
- thumbpath = "http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.servletContext.contextPath}/ImageServlet/";
- thumbpath += thumbfile;
- var divNode = document.getElementById("thumb");
- var imgNode = document.createElement("img");
- imgNode.setAttribute("src", thumbpath);
- divNode.appendChild(imgNode);
-
- // initialize buttons
- initButtonImage();
- }
-
- var imageLayerId = new Array();
- var imageLayerG = new Array();
- var imageLayerC = new Array();
- var imageText = new Array();
- function initButtonImage(){
- imageLayerId[1] ="seller"
- imageLayerG[1] = "../images/seller-thumb-g.jpg";
- imageLayerC[1] = "../images/seller-thumb.jpg";
- imageLayerId[2] ="catalog"
- imageLayerG[2] = "../images/catalog-thumb-g.jpg";
- imageLayerC[2] = "../images/catalog-thumb.jpg";
- imageLayerId[3] ="home"
- imageLayerG[3] = "../images/index-thumb-g.jpg";
- imageLayerC[3] = "../images/index-thumb.jpg";
-
- imageText[1] = "Submit another pet";
- imageText[2] = "Go to your pet page";
- imageText[3] = "Go back to PetStore home";
- }
-
- function highlightButton(n) {
- switchButton(true, n);
- }
- function darkenButton(n) {
- switchButton(false, n);
- }
-
- function switchButton(highlight, n){
- var id = imageLayerId[n];
- var btn = document.getElementById(id);
- if (highlight) {
- btn.src = imageLayerC[n];
- popupText(imageText[n]);
- } else {
- btn.src = imageLayerG[n];
- popupText(null);
- }
- }
- var Mx;
- var My;
- function popupText(txt) {
- var pNode = document.getElementById("popupText");
- var rx;
- var ry;
- if (document.all) {
- rx = event.clientX + document.body.scrollLeft +10;
- ry = event.clientY + document.body.scrollTop -20;
- } else {
- rx = Mx + 10;
- ry = My -20;
- }
- if (txt) {
- pNode.style.display = "block";
- pNode.style.left = rx + "px";
- pNode.style.top = ry + "px";
- pNode.innerHTML = txt;
- } else {
- pNode.style.display = "none";
- pNode.innerHTML = "";
- }
- }
- function getMouseXY(mEvent) {
- Mx = mEvent.pageX;
- My = mEvent.pageY;
- }
- window.onmousemove = getMouseXY;
- </script>
- </head>
- <body>
- <jsp:include page="banner.jsp"/>
- <center>
- <div id="status">
- <h4>${param.message}</h4>
- Here's the uploaded photo of your pet<br/><br/>
- <div id="thumb"></div>
- <br/><br/>
- Would you like to :-<br/><br/>
-
- <div id="popupText" style="position:absolute;z-index:2;border:1px solid;padding:5px;
- border-color:blue;font-size:10pt;background-color:#00ffff;color:blue;display:none"></div>
- <table border="0" cellpadding="4" cellspacing="4">
- <tr>
- <td><a href="fileupload.jsp" onmouseover="highlightButton(1)" onmouseout="darkenButton(1)">
- <img name="seller" id="seller" src="../images/seller-thumb-g.jpg" alt="seller" width="105" height="60" border="0">
- </a>
- </td>
- <td><a href="catalog.jsp?pid=${param.productId}&itemId=${param.id}" onmouseover="highlightButton(2)" onmouseout="darkenButton(2)">
- <img name="catalog" id="catalog" src="../images/catalog-thumb-g.jpg" alt="catalog" width="105" height="60" border="0">
- </a>
- </td>
- <td><a href="http://${pageContext.request.serverName}:${pageContext.request.serverPort}${pageContext.servletContext.contextPath}/index.jsp" onmouseover="highlightButton(3)" onmouseout="darkenButton(3)">
- <img name="home" id="home" src="../images/index-thumb-g.jpg" alt="index" width="105" height="60" border="0">
- </a>
- </td>
- </tr>
- </table>
- </div>
- </center>
- <jsp:include page="footer.jsp" />
- </body>
-</html>
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/footer.jsp b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/footer.jsp
deleted file mode 100644
index 8fda523..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/footer.jsp
+++ /dev/null
@@ -1,15 +0,0 @@
-<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: footer.jsp,v 1.10 2007/01/31 19:40:34 basler Exp $ --%>
-
-<hr/>
-<center>
- If you have any questions or suggestions, please use the <a
- href="https://blueprints.dev.java.net/feedback.html " target="petstore">feedback page</a>.
- <br/>
- To access the latest versions of any of the BluePrints projects, please use the <a
- href="https://blueprints.dev.java.net/downloads.html " target="petstore">download page</a>.
- <br/>
- <a href="http://blueprints.dev.java.net/ " target="petstore">Java BluePrints</a> |
- <a href="http://sun.com/ " target="petstore">Sun Microsystems</a> © 2007 Sun Microsystems Inc. All rights reserved. Use is subject to license terms.
-</center>
-
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9081-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9081-s.jpg
deleted file mode 100644
index 734f0ba..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9081-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9081.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9081.jpg
deleted file mode 100644
index 1d6b615..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9081.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9083-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9083-s.jpg
deleted file mode 100644
index d50fc6f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9083-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9083.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9083.jpg
deleted file mode 100644
index 77fb082..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9083.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9084-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9084-s.jpg
deleted file mode 100644
index 93a3832..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9084-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9084.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9084.jpg
deleted file mode 100644
index b7c7c3b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9084.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9086-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9086-s.jpg
deleted file mode 100644
index 0c9ce17..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9086-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9086.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9086.jpg
deleted file mode 100644
index caaf6a7..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9086.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9088-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9088-s.jpg
deleted file mode 100644
index 6c7d06e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9088-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9088.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9088.jpg
deleted file mode 100644
index f7daf7a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9088.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9099-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9099-s.jpg
deleted file mode 100644
index 2794a4b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9099-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9099.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9099.jpg
deleted file mode 100644
index 57175e3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9099.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9100-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9100-s.jpg
deleted file mode 100644
index d1b3610..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9100-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9100.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9100.jpg
deleted file mode 100644
index dd57db1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9100.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9101-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9101-s.jpg
deleted file mode 100644
index 2f14c53..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9101-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9101.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9101.jpg
deleted file mode 100644
index 334a0f8..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9101.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9102-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9102-s.jpg
deleted file mode 100644
index 6bec9fa..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9102-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9102.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9102.jpg
deleted file mode 100644
index 6219a97..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9102.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9103-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9103-s.jpg
deleted file mode 100644
index 61b9b59..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9103-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9103.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9103.jpg
deleted file mode 100644
index d4a91e0..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9103.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9104-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9104-s.jpg
deleted file mode 100644
index 9c7c4ab..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9104-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9104.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9104.jpg
deleted file mode 100644
index 93eb9da..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9104.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9107-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9107-s.jpg
deleted file mode 100644
index cacb8f6..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9107-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9107.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9107.jpg
deleted file mode 100644
index f1da9d8..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9107.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9109-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9109-s.jpg
deleted file mode 100644
index a999838..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9109-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9109.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9109.jpg
deleted file mode 100644
index e3eeb3e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9109.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9113-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9113-s.jpg
deleted file mode 100644
index bf3aa59..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9113-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9113.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9113.jpg
deleted file mode 100644
index 990e44b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9113.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9115-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9115-s.jpg
deleted file mode 100644
index 873beb5..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9115-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9115.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9115.jpg
deleted file mode 100644
index e9f2fbb..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9115.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9117-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9117-s.jpg
deleted file mode 100644
index 4119ae3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9117-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9117.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9117.jpg
deleted file mode 100644
index efa8fa8..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9117.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9118-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9118-s.jpg
deleted file mode 100644
index 6ac0c46..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9118-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9118.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9118.jpg
deleted file mode 100644
index 1ab033b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9118.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9122-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9122-s.jpg
deleted file mode 100644
index 4b75817..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9122-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9122.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9122.jpg
deleted file mode 100644
index 0bbad05..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9122.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9123-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9123-s.jpg
deleted file mode 100644
index f63f01a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9123-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9123.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9123.jpg
deleted file mode 100644
index 10f22cc..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9123.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9125-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9125-s.jpg
deleted file mode 100644
index e18660f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9125-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9125.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9125.jpg
deleted file mode 100644
index e651619..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9125.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9127-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9127-s.jpg
deleted file mode 100644
index 3f93502..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9127-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9127.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9127.jpg
deleted file mode 100644
index d33f856..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9127.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9129-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9129-s.jpg
deleted file mode 100644
index 43cd251..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9129-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9129.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9129.jpg
deleted file mode 100644
index aa0820c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9129.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9134-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9134-s.jpg
deleted file mode 100644
index 8b73de1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9134-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9134.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9134.jpg
deleted file mode 100644
index 248ca28..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9134.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9138-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9138-s.jpg
deleted file mode 100644
index 0c3fb87..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9138-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9138.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9138.jpg
deleted file mode 100644
index ff93f90..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9138.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9142-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9142-s.jpg
deleted file mode 100644
index 4571a4b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9142-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9142.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9142.jpg
deleted file mode 100644
index 647323b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9142.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9149-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9149-s.jpg
deleted file mode 100644
index e870f66..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9149-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9149.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9149.jpg
deleted file mode 100644
index 23dd110..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9149.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9154-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9154-s.jpg
deleted file mode 100644
index 3355eaa..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9154-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9154.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9154.jpg
deleted file mode 100644
index 531ec1e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9154.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9155-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9155-s.jpg
deleted file mode 100644
index 9cd85f5..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9155-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9155.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9155.jpg
deleted file mode 100644
index 72377b5..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9155.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9156-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9156-s.jpg
deleted file mode 100644
index 2788d06..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9156-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9156.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9156.jpg
deleted file mode 100644
index 2b836df..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9156.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9157-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9157-s.jpg
deleted file mode 100644
index 9ef87c3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9157-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9157.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9157.jpg
deleted file mode 100644
index 753d1e9..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9157.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9158-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9158-s.jpg
deleted file mode 100644
index 29953c4..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9158-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9158.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9158.jpg
deleted file mode 100644
index a4a0247..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9158.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9159-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9159-s.jpg
deleted file mode 100644
index 7caf368..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9159-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9159.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9159.jpg
deleted file mode 100644
index 9f18ed6..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9159.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9162-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9162-s.jpg
deleted file mode 100644
index 65bc52f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9162-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9162.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9162.jpg
deleted file mode 100644
index b0f299d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9162.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9165-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9165-s.jpg
deleted file mode 100644
index d1e9cc3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9165-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9165.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9165.jpg
deleted file mode 100644
index 862c6f8..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/CIMG9165.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-jre.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-jre.jpg
deleted file mode 100644
index 5c7b519..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-jre.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-netbeans.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-netbeans.jpg
deleted file mode 100644
index 079b2fa..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-netbeans.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-sdk.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-sdk.jpg
deleted file mode 100644
index 2a1a88a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ad-sdk.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise-thumb.jpg
deleted file mode 100644
index 4d1ed42..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise.jpg
deleted file mode 100644
index 87ea286..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise2-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise2-thumb.jpg
deleted file mode 100644
index 7b76088..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise2-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise2.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise2.jpg
deleted file mode 100644
index 8005ff3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/african-spurred-tortoise2.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/anthony-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/anthony-s.jpg
deleted file mode 100644
index 4b21f49..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/anthony-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/anthony.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/anthony.jpg
deleted file mode 100644
index 88a889c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/anthony.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bailey-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bailey-s.jpg
deleted file mode 100644
index 8adf561..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bailey-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bailey.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bailey.jpg
deleted file mode 100644
index c262965..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bailey.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/banner_logo.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/banner_logo.gif
deleted file mode 100644
index 85de81a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/banner_logo.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird1.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird1.gif
deleted file mode 100644
index 06f1abe..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird1.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird2.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird2.gif
deleted file mode 100644
index 9601f1c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird2.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird3.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird3.gif
deleted file mode 100644
index f48a7ec..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird3.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird4.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird4.gif
deleted file mode 100644
index eaaa3e5..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird4.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird5.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird5.gif
deleted file mode 100644
index 9f440f1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird5.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird6.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird6.gif
deleted file mode 100644
index affd8e0..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bird6.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/birds_icon.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/birds_icon.gif
deleted file mode 100644
index 8b14629..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/birds_icon.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/biscuit-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/biscuit-s.jpg
deleted file mode 100644
index 8c54af1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/biscuit-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/biscuit.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/biscuit.jpg
deleted file mode 100644
index ccdea14..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/biscuit.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bob-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bob-s.jpg
deleted file mode 100644
index b3f1d09..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bob-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bob.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bob.jpg
deleted file mode 100644
index d3dcfd7..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/bob.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle-thumb.jpg
deleted file mode 100644
index a4b48da..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle.jpg
deleted file mode 100644
index 5a172c5..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle2-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle2-thumb.jpg
deleted file mode 100644
index 40303af..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle2-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle2.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle2.jpg
deleted file mode 100644
index 83d74d2..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle2.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle3-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle3-thumb.jpg
deleted file mode 100644
index 004dfe3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle3-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle3.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle3.jpg
deleted file mode 100644
index 3e77142..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/box-turtle3.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/california-desert-tortoise-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/california-desert-tortoise-thumb.jpg
deleted file mode 100644
index 4c260e8..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/california-desert-tortoise-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/california-desert-tortoise.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/california-desert-tortoise.jpg
deleted file mode 100644
index b146396..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/california-desert-tortoise.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/carp-car-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/carp-car-med.jpg
deleted file mode 100644
index 742336f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/carp-car-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/carp-car-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/carp-car-thumb.jpg
deleted file mode 100644
index e5bbc24..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/carp-car-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat1.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat1.gif
deleted file mode 100644
index 1fd4d1c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat1.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat10.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat10.gif
deleted file mode 100644
index 8bc7f6c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat10.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat11.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat11.gif
deleted file mode 100644
index a51bc96..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat11.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat12.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat12.gif
deleted file mode 100644
index e594c67..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat12.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat2.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat2.gif
deleted file mode 100644
index 6ac8718..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat2.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat3.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat3.gif
deleted file mode 100644
index 4716f5d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat3.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat4.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat4.gif
deleted file mode 100644
index 0793e3f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat4.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat5.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat5.gif
deleted file mode 100644
index 2d289ba..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat5.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat6.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat6.gif
deleted file mode 100644
index 2ea6132..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat6.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat7.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat7.gif
deleted file mode 100644
index 159ba6a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat7.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat8.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat8.gif
deleted file mode 100644
index a9ed7c9..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat8.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat9.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat9.gif
deleted file mode 100644
index 02faffb..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cat9.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/catalog-thumb-g.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/catalog-thumb-g.jpg
deleted file mode 100644
index 1a13b11..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/catalog-thumb-g.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/catalog-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/catalog-thumb.jpg
deleted file mode 100644
index d6148de..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/catalog-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cats_icon.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cats_icon.gif
deleted file mode 100644
index db70d7d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cats_icon.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cbutton.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cbutton.gif
deleted file mode 100644
index 83b8761..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cbutton.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/chantelle-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/chantelle-s.jpg
deleted file mode 100644
index 84e4e89..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/chantelle-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/chantelle.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/chantelle.jpg
deleted file mode 100644
index 5830e57..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/chantelle.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/charlie-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/charlie-s.jpg
deleted file mode 100644
index bb91e94..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/charlie-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/charlie.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/charlie.jpg
deleted file mode 100644
index 9e8d17d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/charlie.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/check_all.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/check_all.gif
deleted file mode 100644
index 3c517f3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/check_all.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cuttlefish-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cuttlefish-med.jpg
deleted file mode 100644
index 575a854..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cuttlefish-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cuttlefish-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cuttlefish-thumb.jpg
deleted file mode 100644
index 9c2dc57..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/cuttlefish-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog1.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog1.gif
deleted file mode 100644
index 92e71b5..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog1.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog2.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog2.gif
deleted file mode 100644
index e581980..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog2.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog3.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog3.gif
deleted file mode 100644
index 9baa503..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog3.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog4.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog4.gif
deleted file mode 100644
index 9124427..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog4.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog5.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog5.gif
deleted file mode 100644
index 3f1690e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog5.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog6.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog6.gif
deleted file mode 100644
index 2bf1380..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dog6.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dogs_icon.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dogs_icon.gif
deleted file mode 100644
index b13e5b9..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dogs_icon.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dragon-iron-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dragon-iron-med.jpg
deleted file mode 100644
index ff83a16..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dragon-iron-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dragon-iron-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dragon-iron-thumb.jpg
deleted file mode 100644
index 814dab1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/dragon-iron-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eagle-stone-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eagle-stone-med.jpg
deleted file mode 100644
index 2623f3c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eagle-stone-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eagle-stone-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eagle-stone-thumb.jpg
deleted file mode 100644
index ccf10a2..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eagle-stone-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eclectus-female-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eclectus-female-med.jpg
deleted file mode 100644
index 7a7a59e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eclectus-female-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eclectus-female-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eclectus-female-thumb.jpg
deleted file mode 100644
index 1f65136..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/eclectus-female-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/elkie-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/elkie-s.jpg
deleted file mode 100644
index 4709e19..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/elkie-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/elkie.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/elkie.jpg
deleted file mode 100644
index 76a7ff1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/elkie.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/faith-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/faith-s.jpg
deleted file mode 100644
index 13194bd..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/faith-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/faith.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/faith.jpg
deleted file mode 100644
index cd8ad6e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/faith.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish2.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish2.gif
deleted file mode 100644
index 4d9916c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish2.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish3.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish3.gif
deleted file mode 100644
index 258489d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish3.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish4.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish4.gif
deleted file mode 100644
index d3e39e1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish4.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish_icon.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish_icon.gif
deleted file mode 100644
index 730c813..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/fish_icon.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/florida-king-snake-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/florida-king-snake-thumb.jpg
deleted file mode 100644
index cbe5030..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/florida-king-snake-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/florida-king-snake.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/florida-king-snake.jpg
deleted file mode 100644
index 11954df..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/florida-king-snake.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/frog1.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/frog1.gif
deleted file mode 100644
index 4bf637f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/frog1.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/gaetano-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/gaetano-s.jpg
deleted file mode 100644
index 097b144..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/gaetano-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/gaetano.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/gaetano.jpg
deleted file mode 100644
index ec5d64b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/gaetano.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/galah-parrot-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/galah-parrot-med.jpg
deleted file mode 100644
index 31bb43c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/galah-parrot-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/galah-parrot-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/galah-parrot-thumb.jpg
deleted file mode 100644
index 70cdc2a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/galah-parrot-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/glassfish-colored-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/glassfish-colored-med.jpg
deleted file mode 100644
index a6646c7..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/glassfish-colored-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/glassfish-colored-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/glassfish-colored-thumb.jpg
deleted file mode 100644
index 262659a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/glassfish-colored-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/guinea-pig-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/guinea-pig-thumb.jpg
deleted file mode 100644
index ea0c069..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/guinea-pig-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/guinea-pig.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/guinea-pig.jpg
deleted file mode 100644
index 828bba2..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/guinea-pig.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harmony-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harmony-s.jpg
deleted file mode 100644
index 5b28bd0..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harmony-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harmony.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harmony.jpg
deleted file mode 100644
index 3c4d322..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harmony.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harrison-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harrison-s.jpg
deleted file mode 100644
index c7c1486..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harrison-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harrison.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harrison.jpg
deleted file mode 100644
index 6003c8c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/harrison.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hawaiian-lizard-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hawaiian-lizard-med.jpg
deleted file mode 100644
index a538759..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hawaiian-lizard-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hawaiian-lizard-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hawaiian-lizard-thumb.jpg
deleted file mode 100644
index 2369c90..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hawaiian-lizard-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/honey-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/honey-s.jpg
deleted file mode 100644
index 13c3f9b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/honey-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/honey.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/honey.jpg
deleted file mode 100644
index 61d877b..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/honey.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hunter-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hunter-s.jpg
deleted file mode 100644
index 4303498..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hunter-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hunter.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hunter.jpg
deleted file mode 100644
index 37ebbe9..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/hunter.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/index-thumb-g.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/index-thumb-g.jpg
deleted file mode 100644
index a42ddb4..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/index-thumb-g.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/index-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/index-thumb.jpg
deleted file mode 100644
index 571475a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/index-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/indicator-black.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/indicator-black.gif
deleted file mode 100644
index 6da716a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/indicator-black.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ja_flag.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ja_flag.gif
deleted file mode 100644
index 31d0ada..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/ja_flag.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/jack-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/jack-s.jpg
deleted file mode 100644
index d4144da..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/jack-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/jack.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/jack.jpg
deleted file mode 100644
index fe37700..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/jack.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/katzen-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/katzen-s.jpg
deleted file mode 100644
index d83d3f9..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/katzen-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/katzen.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/katzen.jpg
deleted file mode 100644
index ba460be..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/katzen.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/koi-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/koi-med.jpg
deleted file mode 100644
index 7afa021..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/koi-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/koi-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/koi-thumb.jpg
deleted file mode 100644
index f7fa2b2..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/koi-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/kookaburra-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/kookaburra-med.jpg
deleted file mode 100644
index 8c06c3d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/kookaburra-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/kookaburra-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/kookaburra-thumb.jpg
deleted file mode 100644
index 84e82f5..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/kookaburra-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lady-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lady-s.jpg
deleted file mode 100644
index 72a724f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lady-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lady.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lady.jpg
deleted file mode 100644
index ae9054e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lady.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/left.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/left.gif
deleted file mode 100644
index 46b3630..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/left.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/left_2.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/left_2.gif
deleted file mode 100644
index f50cbed..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/left_2.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko-thumb.jpg
deleted file mode 100644
index 620c826..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko-thumb2.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko-thumb2.jpg
deleted file mode 100644
index 2a52e80..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko-thumb2.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko.jpg
deleted file mode 100644
index 7b77428..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko2.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko2.jpg
deleted file mode 100644
index b3748ae..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/leopard-gecko2.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard1.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard1.gif
deleted file mode 100644
index 665c4d6..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard1.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard2.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard2.gif
deleted file mode 100644
index 2e59d89..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard2.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard3.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard3.gif
deleted file mode 100644
index 6dca58f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lizard3.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lovebird-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lovebird-med.jpg
deleted file mode 100644
index cef3163..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lovebird-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lovebird-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lovebird-thumb.jpg
deleted file mode 100644
index 7e97d51..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/lovebird-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/macaw-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/macaw-thumb.jpg
deleted file mode 100644
index a95ff80..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/macaw-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/macaw.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/macaw.jpg
deleted file mode 100644
index b7ae026..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/macaw.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maggie-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maggie-s.jpg
deleted file mode 100644
index 7acf48e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maggie-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maggie.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maggie.jpg
deleted file mode 100644
index 140a325..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maggie.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/marianna-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/marianna-s.jpg
deleted file mode 100644
index 4b96d8d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/marianna-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/marianna.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/marianna.jpg
deleted file mode 100644
index 5e3b381..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/marianna.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mario-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mario-s.jpg
deleted file mode 100644
index f2f1848..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mario-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mario.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mario.jpg
deleted file mode 100644
index a68cd9e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mario.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maximize.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maximize.gif
deleted file mode 100644
index da05f30..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/maximize.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mexican-redkneed-tarantula-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mexican-redkneed-tarantula-thumb.jpg
deleted file mode 100644
index 35387ca..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mexican-redkneed-tarantula-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mexican-redkneed-tarantula.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mexican-redkneed-tarantula.jpg
deleted file mode 100644
index 7365af9..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mexican-redkneed-tarantula.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mimi-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mimi-s.jpg
deleted file mode 100644
index 0e6a1a5..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mimi-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mimi.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mimi.jpg
deleted file mode 100644
index 950c84e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/mimi.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/minimize.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/minimize.gif
deleted file mode 100644
index 8408264..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/minimize.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/monique-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/monique-s.jpg
deleted file mode 100644
index dea6b6d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/monique-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/monique.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/monique.jpg
deleted file mode 100644
index 0f0ac10..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/monique.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/moon-jelly-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/moon-jelly-med.jpg
deleted file mode 100644
index 3c7618a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/moon-jelly-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/moon-jelly-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/moon-jelly-thumb.jpg
deleted file mode 100644
index e765076..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/moon-jelly-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-red-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-red-med.jpg
deleted file mode 100644
index 7c7d897..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-red-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-red-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-red-thumb.jpg
deleted file mode 100644
index 4cdb8bb..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-red-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-white-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-white-med.jpg
deleted file mode 100644
index f38af83..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-white-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-white-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-white-thumb.jpg
deleted file mode 100644
index bec9ee6..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/octopus-white-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/olie-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/olie-s.jpg
deleted file mode 100644
index 9bb9a17..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/olie-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/olie.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/olie.jpg
deleted file mode 100644
index c91be8e..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/olie.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/paris-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/paris-s.jpg
deleted file mode 100644
index f4ce9ec..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/paris-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/paris.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/paris.jpg
deleted file mode 100644
index b599c76..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/paris.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/parrot-popcorn-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/parrot-popcorn-s.jpg
deleted file mode 100644
index cae1408..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/parrot-popcorn-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/parrot-popcorn.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/parrot-popcorn.jpg
deleted file mode 100644
index 57e02ff..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/parrot-popcorn.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-blue-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-blue-med.jpg
deleted file mode 100644
index 758ed35..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-blue-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-blue-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-blue-thumb.jpg
deleted file mode 100644
index 3aec8c4..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-blue-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-med.jpg
deleted file mode 100644
index 13164b8..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-thumb.jpg
deleted file mode 100644
index fbd5412..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-white-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-white-thumb.jpg
deleted file mode 100644
index 148006d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peacock-white-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peakcock-white-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peakcock-white-med.jpg
deleted file mode 100644
index f25a814..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/peakcock-white-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink-thumb.jpg
deleted file mode 100644
index 2d9c2b1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink.jpg
deleted file mode 100644
index 3573943..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink2-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink2-thumb.jpg
deleted file mode 100644
index 9be6e41..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink2-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink2.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink2.jpg
deleted file mode 100644
index 0559845..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/prehensile-tailed-skink2.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/princess-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/princess-s.jpg
deleted file mode 100644
index d4521a3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/princess-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/princess.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/princess.jpg
deleted file mode 100644
index 370e4fd..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/princess.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/puppup-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/puppup-s.jpg
deleted file mode 100644
index 5b89061..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/puppup-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/puppup.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/puppup.jpg
deleted file mode 100644
index efff187..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/puppup.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/purple-jellyfish-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/purple-jellyfish-med.jpg
deleted file mode 100644
index 93af55f..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/purple-jellyfish-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/purple-jellyfish-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/purple-jellyfish-thumb.jpg
deleted file mode 100644
index d751856..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/purple-jellyfish-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rainbow-lorikeet-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rainbow-lorikeet-med.jpg
deleted file mode 100644
index 9c72270..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rainbow-lorikeet-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rainbow-lorikeet-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rainbow-lorikeet-thumb.jpg
deleted file mode 100644
index 9003e0c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rainbow-lorikeet-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/reptiles_icon.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/reptiles_icon.gif
deleted file mode 100644
index 0ee4c52..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/reptiles_icon.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/right.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/right.gif
deleted file mode 100644
index 89e7ba1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/right.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rita-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rita-s.jpg
deleted file mode 100644
index 16d1692..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rita-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rita.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rita.jpg
deleted file mode 100644
index f183f1c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rita.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rockfish-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rockfish-med.jpg
deleted file mode 100644
index 005d708..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rockfish-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rockfish-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rockfish-thumb.jpg
deleted file mode 100644
index e82c87d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/rockfish-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sabrina-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sabrina-s.jpg
deleted file mode 100644
index 508edb1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sabrina-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sabrina.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sabrina.jpg
deleted file mode 100644
index 870c2f3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sabrina.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-anemone-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-anemone-med.jpg
deleted file mode 100644
index a18e30a..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-anemone-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-anemone-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-anemone-thumb.jpg
deleted file mode 100644
index febadd3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-anemone-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-nettle-jellyfish-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-nettle-jellyfish-med.jpg
deleted file mode 100644
index c7329f4..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-nettle-jellyfish-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-nettle-jellyfish-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-nettle-jellyfish-thumb.jpg
deleted file mode 100644
index 3753577..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/sea-nettle-jellyfish-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/seller-thumb-g.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/seller-thumb-g.jpg
deleted file mode 100644
index a9c45e8..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/seller-thumb-g.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/seller-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/seller-thumb.jpg
deleted file mode 100644
index 2b7adf1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/seller-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/simba-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/simba-s.jpg
deleted file mode 100644
index 93e78ee..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/simba-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/simba.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/simba.jpg
deleted file mode 100644
index cdbb5fb..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/simba.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/splash.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/splash.gif
deleted file mode 100644
index cdae47c..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/splash.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/spotted-jellyfish-med.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/spotted-jellyfish-med.jpg
deleted file mode 100644
index 6c1e407..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/spotted-jellyfish-med.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/spotted-jellyfish-thumb.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/spotted-jellyfish-thumb.jpg
deleted file mode 100644
index 991392d..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/spotted-jellyfish-thumb.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaicat-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaicat-s.jpg
deleted file mode 100644
index 49898fb..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaicat-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaicat.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaicat.jpg
deleted file mode 100644
index eb43a52..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaicat.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaidog-s.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaidog-s.jpg
deleted file mode 100644
index c918e36..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaidog-s.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaidog.jpg b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaidog.jpg
deleted file mode 100644
index f5063e3..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/thaidog.jpg and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/uncheck_all.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/uncheck_all.gif
deleted file mode 100644
index 39fa7ba..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/uncheck_all.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/us_flag.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/us_flag.gif
deleted file mode 100644
index 52bc595..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/us_flag.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/zh_flag.gif b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/zh_flag.gif
deleted file mode 100644
index 0393bc1..0000000
Binary files a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/images/zh_flag.gif and /dev/null differ
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index-ajax.jsp b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index-ajax.jsp
deleted file mode 100644
index 9ce0b8d..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index-ajax.jsp
+++ /dev/null
@@ -1,239 +0,0 @@
-<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: index.jsp,v 1.17 2007/03/15 23:19:46 basler Exp $ --%>
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-<%@page import="java.util.*, com.sun.javaee.blueprints.petstore.model.CatalogFacade, com.sun.javaee.blueprints.petstore.model.Tag"%>
-
-<%
-try {
- CatalogFacade cf = (CatalogFacade)config.getServletContext().getAttribute("CatalogFacade");
- List<Tag> tags=cf.getTagsInChunk(0, 12);
- // since top 20 come from database or desending refCount order, need to reorder by tag name
- Collections.sort(tags, new Comparator() {
- public int compare(Object one, Object two) {
- int cc=((Tag)two).getTag().compareTo(((Tag)one).getTag());
- return (cc < 0 ? 1 : cc > 0 ? -1 : 0);
- }
- });
-%>
-
-<html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >
- <title>Java Pet Store Reference Application</title>
- <script type="text/javascript" src="./common.js"></script>
- <link type="text/css" rel="stylesheet" href="./tag.css"/>
- <script type="text/javascript">
- //var djConfig = {isDebug: true };
- </script>
- </head>
- <body>
-
- <jsp:include page="banner.jsp" />
- <script>
- dojo.require("dojo.widget.FisheyeList");
- dojo.require("dojo.io.*");
- dojo.require("dojo.io.ScriptSrcIO");
- //transport: "ScriptSrcTransport",
- //url: "http://localhost:8080/petstore/downloadAd.json ",
-
- function browse(category) {
- window.location.href="${pageContext.request.contextPath}/faces/catalog.jsp?catid=" + category;
-
- }
-
-
- function debugProperties(namex) {
- var listx="";
- var ob=namex;
- for(xx in ob) {
- listx += xx + " = " + ob[xx] + "<br/>"
- }
- //document.write(listx);
- alert(listx);
- }
-
- function checkAdPage() {
- var bindArgs = {
- //url: "https://blueprints.dev.java.net/petstore/downloadAd.json ",
- //url: "http://localhost:8080/petstore/downloadAd.json ",
- url: "http://search.yahooapis.com/ImageSearchService/V1/imageSearch?appid=Yahoo... ",
- transport: "ScriptSrcTransport",
- jsonParamName: "callback",
- mimetype: "text/json",
- load: function(type, data, event, kwArgs) {
- /* type will be "load", data will be response data, event will null, and kwArgs are the keyword arguments used in the dojo.io.bind call. */
- alert("load = " + data.ResultSet.totalResultsAvailable);
- //debugProperties(data);
- //document.getElementById("downloadAds").innerHTML=data.downloadxx;
-
-
- },
- error: function(type, data, event, kwArgs) {
- /* type will be "error", data will be response data, event will null, and kwArgs are the keyword arguments used in the dojo.io.bind call. */
- alert("error");
- },
- timeout: function() {
- /* Called if there is a timeout */
- alert("timeout");
- },
- timeoutSeconds: 10};
- // dispatch the request
- dojo.io.bind(bindArgs);
- }
-
- function callback() {
- alert("callback");
- }
-
- function returnFunctionx(type, data, evt) {
- // statically setup popup for simple case
- // check return of the dojo call to make sure it is valid
- if (evt.readyState == 4) {
- if (evt.status == 200) {
- alert("data = " + data.downloadxx);
- //document.getElementById("downloadAds").innerHTML=data;
- document.getElementById("downloadAds").innerHTML=data.downloadxx;
- }
- }
- }
-
- function testit() {
- testx={download:"test", textx:"it"};
- alert("test = " + testx.download);
- }
-
-
- </script>
- <span onclick="checkAdPage();">test it</span>
-
-
- <table bgcolor="white">
- <tr>
- <td valign="top">
- <div class="outerbar" style="width: 200px">
-
- <div dojoType="FisheyeList"
- itemWidth="170" itemHeight="50"
- itemMaxWidth="340" itemMaxHeight="100"
- orientation="vertical"
- effectUnits="2"
- itemPadding="10"
- attachEdge="top"
- labelEdge="bottom"
- enableCrappySvgSupport="false">
-
- <div dojoType="FisheyeListItem" onClick="browse('Dogs');"
- iconsrc="${pageContext.request.contextPath}/images/dogs_icon.gif">
- </div>
-
- <div dojoType="FisheyeListItem" onClick="browse('Cats');"
- iconsrc="${pageContext.request.contextPath}/images/cats_icon.gif">
- </div>
-
- <div dojoType="FisheyeListItem" onClick="browse('Birds');"
- iconsrc="${pageContext.request.contextPath}/images/birds_icon.gif">
- </div>
-
- <div dojoType="FisheyeListItem" onClick="browse('Fish');"
- iconsrc="${pageContext.request.contextPath}/images/fish_icon.gif">
- </div>
-
- <div dojoType="FisheyeListItem" onClick="browse('Reptiles');"
- iconsrc="${pageContext.request.contextPath}/images/reptiles_icon.gif">
- </div>
- </div>
-
- </div>
- </td>
- <td valign="top" style="width: 400px">
- <div id="bodyCenter">
- <table valign="top" id="bodyTable" border="0">
- <tr>
- <td>
- <map name="petmap">
- <area onmouseover="javascript:this.style.cursor='pointer';" onclick="browse('Birds')"
- alt="Birds"
- coords="72,2,280,250">
- <area onmouseover="javascript:this.style.cursor='pointer';" onclick="browse('Fish')"
- alt="Fish"
- coords="2,180,72,250">
- <area onmouseover="javascript:this.style.cursor='pointer';" onclick="browse('Dogs')"
- alt="Dogs"
- coords="60,250,130,320">
- <area onmouseover="javascript:this.style.cursor='pointer';" onclick="browse('Reptiles')"
- alt="Reptiles"
- coords="140,270,210,340">
- <area onmouseover="javascript:this.style.cursor='pointer';" onclick="browse('Cats')"
- alt="Cats"
- coords="225,240,295,310">
- <area onmouseover="javascript:this.style.cursor='pointer';" onclick="browse('Birds')"
- alt="Birds"
- coords="280,180,350,250">
- </map>
-
- <img src="${pageContext.request.contextPath}/images/splash.gif"
- alt="Pet Selection Map"
- usemap="#petmap"
- width="350"
- height="355"
- border="0">
- </td>
- </tr>
- </table>
-
- </div>
- </td>
- <td style="vertical-align:top;">
- <div style="border-style: double; width:100%;">
- <table border="0">
- <tr>
- <th colspan="2" style="text-align:center">Most Popular Tags</th>
- </tr>
- <tr>
-<%
- String style=null;
- int refx=0, ii=0;
- for(Tag tag : tags) {
- refx=tag.getRefCount() / 5;
- if(refx >= 3) {
- style="xxlarge";
- } else if(refx == 2) {
- style="xlarge";
- } else if(refx == 1) {
- style="large";
- } else {
- style="medium";
- }
-
- if((ii % 2) == 0) out.println("</tr>\n<tr>");
- out.println("<td class='tagCell' style='text-align: center'><a href='./tag.jsp?tag=" +
- tag.getTag() + "'><span class='" + style +"'>" + tag.getTag() + "</span></a></td>");
- ii++;
- }
-%>
- </tr>
- </table>
- </div>
- </td>
- <td valign="top" style="vertical-align:top; width:250px;">
- <div id="downloadAds">
- <jsp:include page="download.jsp" />
- </div>
- </td>
- </tr>
- </table>
-
- <div style="position: absolute; visibility: hidden;z-index:5" id="menu-popup">
- <table id="completeTable" class="popupTable" ></table>
- </div>
-
- <br/><br/>
- <jsp:include page="footer.jsp" />
- </body>
-</html>
-<%
- } catch(Exception e) {
- e.printStackTrace();
- }
-%>
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.html b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.html
deleted file mode 100644
index 8c5ca1b..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.html
+++ /dev/null
@@ -1,117 +0,0 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
- <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
- <title>Java Pet Store Reference Application, 2.0 Early Access</title>
-</head>
-<body>
-<hr>
-<h1>Java Pet Store Reference Application, 2.0 Early Access</h1>
-<h2><a href="./faces/index.jsp">Enter the Store</a></h2>
-The Java Pet Store Reference Application is a sample application
-brought to
-you by the <a href="http://blueprints.dev.java.net/ ">Java BluePrints</a>
-program at <a href="http://sun.com ">Sun Microsystems</a>.
-This application is designed to illustrate how the Java EE 5 Platform
-can be used to develop an AJAX-enabled Web 2.0 application. The
-application comes with full source-code available under a
-BSD-style license, so you can experiment with it and use it in your own
-applications. <br>
-<br>
-<a href="#try">Try the Petstore Demo</a><br>
-<a href="#learn">Learn more about features in Java Petstore</a><br>
-<a href="#contributors">Show appreciation for Pet Store image
-contributors</a><br>
-<a href="#about">About BluePrints</a>
-<h2><a name="try"></a>Try the Pet Store Demo</h2>
-Now that you have the application deployed, you can use it and try out
-the features. You can browse the catalog of pets for sale, sell your
-own pets on the store, search for pets by location using Google maps,
-view the RSS news bar for BluePrints news, and more.<a
- href="./faces/index.jsp">Enter the Store</a>
-<h2><a name="features"></a>Learn More About Features in Java Petstore</h2>
-<p>Here are some of the features of this application. For a detailed
-description of the features in the Java Pet
-Store Reference application, please refer to the article at <a
- href="http://java.sun.com/developer/technicalArticles/J2EE/petstore/ ">http://java.sun.com/developer/technicalArticles/J2EE/petstore/ </a><a
- href="http://java.sun.com/developer/technicalArticles/J2EE/petstore/ "></a><b>
-</b></p>
-<ol>
- <li>Using AJAX for single-page interactive Web applications: The
-application is designed to be a single-page application where the user
-never leaves the page. Different sections of the page are dynamically
-loaded based on the user actions. These sections are loaded
-asynchronously to avoid any browser refreshes, and to give a richer
-interactive user-experience. </li>
- <li>Mash-ups with Google maps: The petstore uses a mashup with
-Google's Map service, alongwith Yahoo's Geo-coder service to allow
-users to see the available pets in a neighborhood. </li>
- <li>Community-created content: The application allows a user to add a
-pet for sale or adoption on the Website. The seller uploads </li>
- <ol>
- <li>Using Captchas to discourage spam in the community created
-content: Whenever a website allows its users to add content, it needs
-to build mechanisms to discourage placement of spurious content on its
-Website through automated mechanisms. We demonstrate how captchas can
-be used for this purpose. </li>
- <li>Community rated content: Each item in the petstore website can
-be rated by the users </li>
- <li>Payments through PayPal: The application provides a meeting
-ground for
-buyers and sellers of pets. The application uses the PayPal service to
-allow sellers to accept payments.</li>
- </ol>
- <li>Integration of an RSS feed: The website integrates an RSS feed of
-news items coming out the Java BluePrints website. The </li>
- <li>Integration of a search engine: The application integrates
-Apache Lucene search engine to handle all website searches. </li>
-</ol>
-This application also demonstrate the use of various features of
-the Java EE 5 platform such as: <br>
-<ol>
- <li>JavaServer Faces: Many of the AJAX features are implemented as
-reusable JavaServer Faces components. </li>
- <li>Java Persistence API: The application uses Java Persistence APIs
-to create an object/relational mapping layer. </li>
- <li>Dependency Injection: The application uses dependency injection
-instead of deployment descriptors.</li>
-</ol>
-See the <a
- href="https://blueprints.dev.java.net/petstore/architecture.html ">Pet
-Store Architecure document</a> for more detail.
-<h2><a name="contributors"></a>Show Appreciation for Pet Store Image
-Contributors</h2>
-<p>For many images in the Java Petstore, some organizations and people
-were kind enough to give us permission to photograph their animals or
-even give us photos to use in the Java Petstore. See the <a
- href="https://blueprints.dev.java.net/petstore/imagecontributors.html ">
-image contributors </a> page for a more detail on these friends of the
-animals.
-</p>
-<h2><a name="about"></a>About Java BluePrints</h2>
-<p>The Java BluePrints program defines the application programming
-model for the Java EE™ platform. It provides best practice guidelines
-and
-architectural recommendations for real-world application scenarios to
-enable developers to build portable, scalable, and robust applications
-using the Java EE technologies.<br>
-<br>
-Some other popular projects from Java BluePrints are <a
- href="http://blueprints.dev.java.net/bpcatalog/ ">Java BluePrints
-Solutions Catalog</a>, <a target="_blank"
- href="https://blueprints.dev.java.net/adventurebuilder/ ">Java
-Adventure Builder Reference</a> application, <a target="_blank"
- href="http://java.sun.com/blueprints/guidelines/designing_webservices/ ">Designing
-Web Services with the J2EE(TM) 1.4 Platform : JAX-RPC, SOAP, and XML
-Technologies</a> book, and the <a target="_blank"
- href="http://java.sun.com/blueprints/guidelines/designing_enterprise_applicatio... "><span
- class="body"><span class="title">Designing
-Enterprise Applications with the J2EE Platform, Second Edition</span></span></a>
-book. You can access these projects and other content from Java
-BluePrints by visiting the <a target="_blank"
- href="http://java.sun.com/reference/blueprints/index.html ">Java
-BluePrints website</a>. </p>
-<hr noshade="noshade">Copyright © 2007 Sun Microsystems,
-Inc. All Rights Reserved.
-</body>
-</html>
diff --git a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.jsp b/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.jsp
deleted file mode 100644
index ab59139..0000000
--- a/etc/modules/sample-bundle/src/main/petstore/server/default/deploy/petstore.ear/petstore.war/index.jsp
+++ /dev/null
@@ -1,164 +0,0 @@
-<%-- Copyright 2006 Sun Microsystems, Inc. All rights reserved. You may not modify, use, reproduce, or distribute this software except in compliance with the terms of the License at: http://developer.sun.com/berkeley_license.html
-$Id: index.jsp,v 1.20 2007/03/16 20:18:59 basler Exp $ --%>
-<%@page contentType="text/html"%>
-<%@page pageEncoding="UTF-8"%>
-<%@page import="java.util.*, com.sun.javaee.blueprints.petstore.model.CatalogFacade, com.sun.javaee.blueprints.petstore.model.Tag"%>
-
-<%
-try {
- CatalogFacade cf = (CatalogFacade)config.getServletContext().getAttribute("CatalogFacade");
- List<Tag> tags=cf.getTagsInChunk(0, 12);
- // since top 20 come from database or desending refCount order, need to reorder b