gatein SVN: r1662 - in portal/trunk: component/common/src/main/java/org/exoplatform/commons/management and 6 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-02-12 09:47:27 -0500 (Fri, 12 Feb 2010)
New Revision: 1662
Added:
portal/trunk/component/common/src/main/java/org/exoplatform/commons/management/
portal/trunk/component/common/src/main/java/org/exoplatform/commons/management/Rest.java
Removed:
portal/trunk/component/management/src/main/java/org/exoplatform/management/Rest.java
Modified:
portal/trunk/component/management/pom.xml
portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResource.java
portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateService.java
portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateStatisticService.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java
portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticService.java
Log:
secure the rest management to people in the /platform/administrators group
Copied: portal/trunk/component/common/src/main/java/org/exoplatform/commons/management/Rest.java (from rev 1660, portal/trunk/component/management/src/main/java/org/exoplatform/management/Rest.java)
===================================================================
--- portal/trunk/component/common/src/main/java/org/exoplatform/commons/management/Rest.java (rev 0)
+++ portal/trunk/component/common/src/main/java/org/exoplatform/commons/management/Rest.java 2010-02-12 14:47:27 UTC (rev 1662)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.commons.management;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target(ElementType.TYPE)
+public @interface Rest
+{
+
+ String value();
+
+}
Modified: portal/trunk/component/management/pom.xml
===================================================================
--- portal/trunk/component/management/pom.xml 2010-02-12 11:58:08 UTC (rev 1661)
+++ portal/trunk/component/management/pom.xml 2010-02-12 14:47:27 UTC (rev 1662)
@@ -33,7 +33,7 @@
<dependency>
<groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.component.common</artifactId>
+ <artifactId>exo.portal.component.portal</artifactId>
<version>3.0.0-CR01-SNAPSHOT</version>
</dependency>
Deleted: portal/trunk/component/management/src/main/java/org/exoplatform/management/Rest.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/Rest.java 2010-02-12 11:58:08 UTC (rev 1661)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/Rest.java 2010-02-12 14:47:27 UTC (rev 1662)
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2009 eXo Platform SAS.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software 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
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
- */
-
-package org.exoplatform.management;
-
-import java.lang.annotation.ElementType;
-import java.lang.annotation.Retention;
-import java.lang.annotation.RetentionPolicy;
-import java.lang.annotation.Target;
-
-/**
- * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
- * @version $Revision$
- */
-(a)Retention(RetentionPolicy.RUNTIME)
-(a)Target(ElementType.TYPE)
-public @interface Rest
-{
-
- String value();
-
-}
Modified: portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java 2010-02-12 11:58:08 UTC (rev 1661)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java 2010-02-12 14:47:27 UTC (rev 1662)
@@ -19,10 +19,12 @@
package org.exoplatform.management;
+import org.exoplatform.commons.management.Rest;
import org.exoplatform.management.data.RestResource;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.management.spi.ManagedResource;
import org.exoplatform.management.spi.ManagementProvider;
+import org.exoplatform.portal.config.UserACL;
import org.exoplatform.services.rest.resource.ResourceContainer;
import javax.ws.rs.GET;
@@ -30,6 +32,7 @@
import javax.ws.rs.PathParam;
import javax.ws.rs.Produces;
import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
@@ -49,15 +52,26 @@
/** . */
private final Map<ResourceKey, RestResource> resourceMap = new HashMap<ResourceKey, RestResource>();
- public RestManagementProvider(ExoContainerContext context)
+ /** . */
+ private final UserACL acl;
+
+ public RestManagementProvider(ExoContainerContext context, UserACL acl)
{
this.context = context;
+ this.acl = acl;
}
@GET
@Produces(MediaType.APPLICATION_JSON)
- public ValueWrapper list()
+ public Object list()
{
+ // Apply security here
+ if (!acl.hasPermission("*:/platform/administrators"))
+ {
+ return Response.status(Response.Status.FORBIDDEN);
+ }
+
+ //
List<String> list = new ArrayList<String>();
for (RestResource mr : resourceMap.values())
{
@@ -67,8 +81,15 @@
}
@Path("{resource}")
- public RestResource dispatch(@PathParam("resource") String resourceName)
+ public Object dispatch(@PathParam("resource") String resourceName)
{
+ // Apply security here
+ if (!acl.hasPermission("*:/platform/administrators"))
+ {
+ return Response.status(Response.Status.FORBIDDEN);
+ }
+
+ //
return resourceMap.get(new ResourceKey(resourceName));
}
Modified: portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResource.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResource.java 2010-02-12 11:58:08 UTC (rev 1661)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResource.java 2010-02-12 14:47:27 UTC (rev 1662)
@@ -172,6 +172,7 @@
/**
* Try to invoke a method with matching parameters from the query string
*
+ * @param methodName the method name to invoke
* @param info the uri info
* @param impact the expected impact
* @return a suitable response
Modified: portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java
===================================================================
--- portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-02-12 11:58:08 UTC (rev 1661)
+++ portal/trunk/component/portal/src/main/java/org/exoplatform/portal/resource/SkinService.java 2010-02-12 14:47:27 UTC (rev 1662)
@@ -19,6 +19,7 @@
package org.exoplatform.portal.resource;
+import org.exoplatform.commons.management.Rest;
import org.exoplatform.commons.utils.PropertyManager;
import org.exoplatform.commons.utils.Safe;
import org.exoplatform.container.ExoContainerContext;
@@ -58,7 +59,7 @@
@NameTemplate({@Property(key = "view", value = "portal"), @Property(key = "service", value = "management"),
@Property(key = "type", value = "skin")})
@ManagedDescription("Skin service")
-// @Rest("skinservice")
+@Rest("skinservice")
public class SkinService implements Startable
{
Modified: portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateService.java
===================================================================
--- portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateService.java 2010-02-12 11:58:08 UTC (rev 1661)
+++ portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateService.java 2010-02-12 14:47:27 UTC (rev 1662)
@@ -22,6 +22,7 @@
import groovy.lang.Writable;
import groovy.text.Template;
+import org.exoplatform.commons.management.Rest;
import org.exoplatform.commons.utils.IOUtil;
import org.exoplatform.container.xml.InitParams;
import org.exoplatform.groovyscript.GroovyTemplate;
@@ -47,7 +48,7 @@
@NameTemplate({@Property(key = "view", value = "portal"), @Property(key = "service", value = "management"),
@Property(key = "type", value = "template")})
@ManagedDescription("Template management service")
-// @Rest("templateservice")
+@Rest("templateservice")
public class TemplateService
{
Modified: portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateStatisticService.java
===================================================================
--- portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateStatisticService.java 2010-02-12 11:58:08 UTC (rev 1661)
+++ portal/trunk/component/scripting/src/main/java/org/exoplatform/groovyscript/text/TemplateStatisticService.java 2010-02-12 14:47:27 UTC (rev 1662)
@@ -19,6 +19,7 @@
package org.exoplatform.groovyscript.text;
+import org.exoplatform.commons.management.Rest;
import org.exoplatform.management.annotations.Impact;
import org.exoplatform.management.annotations.ImpactType;
import org.exoplatform.management.annotations.Managed;
@@ -48,7 +49,7 @@
@Property(key = "view", value = "portal"),
@Property(key = "service", value = "statistic"),
@Property(key = "type", value = "template")})
-// @Rest("templatestatistics")
+@Rest("templatestatistics")
public class TemplateStatisticService
{
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java 2010-02-12 11:58:08 UTC (rev 1661)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/ApplicationStatisticService.java 2010-02-12 14:47:27 UTC (rev 1662)
@@ -19,6 +19,7 @@
package org.exoplatform.portal.application;
+import org.exoplatform.commons.management.Rest;
import org.exoplatform.management.annotations.Impact;
import org.exoplatform.management.annotations.ImpactType;
import org.exoplatform.management.annotations.Managed;
@@ -45,7 +46,7 @@
@Property(key = "view", value = "portal"),
@Property(key = "service", value = "statistic"),
@Property(key = "type", value = "application")})
-// @Rest("applicationstatistic")
+@Rest("applicationstatistic")
public class ApplicationStatisticService implements Startable
{
Modified: portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticService.java
===================================================================
--- portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticService.java 2010-02-12 11:58:08 UTC (rev 1661)
+++ portal/trunk/webui/portal/src/main/java/org/exoplatform/portal/application/PortalStatisticService.java 2010-02-12 14:47:27 UTC (rev 1662)
@@ -19,6 +19,7 @@
package org.exoplatform.portal.application;
+import org.exoplatform.commons.management.Rest;
import org.exoplatform.management.annotations.Impact;
import org.exoplatform.management.annotations.ImpactType;
import org.exoplatform.management.annotations.Managed;
@@ -43,7 +44,7 @@
@Property(key = "view", value = "portal"),
@Property(key = "service", value = "statistic"),
@Property(key = "type", value = "portal")})
-// @Rest("portalstatistic")
+@Rest("portalstatistic")
public class PortalStatisticService implements Startable
{
14 years, 11 months
gatein SVN: r1661 - in components/wsrp/trunk/admin-gui/src/main: webapp/WEB-INF and 6 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-02-12 06:58:08 -0500 (Fri, 12 Feb 2010)
New Revision: 1661
Modified:
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ManagedBean.java
components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ResourceBean.java
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/webui.taglib.xml
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/xhtml/blueHeaderBar.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/xhtml/commandLink.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/web.xml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmDeleteConsumer.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmEraseRegistration.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/error.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/confirmPropDeletion.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producerTemplate.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/styles/basestyles.css
components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css
Log:
- Re-formatted code...
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ManagedBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ManagedBean.java 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ManagedBean.java 2010-02-12 11:58:08 UTC (rev 1661)
@@ -248,6 +248,7 @@
/**
* Default action: returns to outcome specified by {@link #setCancelOutcome(String)}
+ *
* @return
*/
public String cancel()
Modified: components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ResourceBean.java
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ResourceBean.java 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ResourceBean.java 2010-02-12 11:58:08 UTC (rev 1661)
@@ -1,25 +1,25 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2010, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software 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 *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
package org.gatein.wsrp.admin.ui;
import javax.faces.context.FacesContext;
@@ -35,62 +35,78 @@
public class ResourceBean implements Map<String, String>
{
- public void clear() {
- }
+ public void clear()
+ {
+ }
- public boolean containsKey(Object key) {
- return true;
- }
+ public boolean containsKey(Object key)
+ {
+ return true;
+ }
- public boolean containsValue(Object value) {
- return true;
- }
+ public boolean containsValue(Object value)
+ {
+ return true;
+ }
- public Set<Entry<String, String>> entrySet() {
- return Collections.emptySet();
- }
+ public Set<Entry<String, String>> entrySet()
+ {
+ return Collections.emptySet();
+ }
- public String get(Object key) {
+ public String get(Object key)
+ {
FacesContext facesContext = FacesContext.getCurrentInstance();
String url = null;
- if(null == key){
+ if (null == key)
+ {
url = null;
- } else if(null != facesContext){
+ }
+ else if (null != facesContext)
+ {
url = facesContext.getApplication().getViewHandler().getResourceURL(facesContext, key.toString());
url = facesContext.getExternalContext().encodeResourceURL(url);
- } else {
+ }
+ else
+ {
url = key.toString();
}
- return url;
- }
+ return url;
+ }
- public boolean isEmpty() {
- return false;
- }
+ public boolean isEmpty()
+ {
+ return false;
+ }
- public Set<String> keySet() {
- return Collections.emptySet();
- }
+ public Set<String> keySet()
+ {
+ return Collections.emptySet();
+ }
- public String put(String key, String value) {
- return null;
- }
+ public String put(String key, String value)
+ {
+ return null;
+ }
- public void putAll(Map<? extends String, ? extends String> t) {
- }
+ public void putAll(Map<? extends String, ? extends String> t)
+ {
+ }
- public String remove(Object key) {
- return null;
- }
+ public String remove(Object key)
+ {
+ return null;
+ }
- public int size() {
- return 0;
- }
+ public int size()
+ {
+ return 0;
+ }
- public Collection<String> values() {
- return Collections.emptySet();
- }
+ public Collection<String> values()
+ {
+ return Collections.emptySet();
+ }
-
}
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/webui.taglib.xml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/webui.taglib.xml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/webui.taglib.xml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -1,21 +1,44 @@
<?xml version="1.0"?>
+<!--
+ ~ JBoss, a division of Red Hat
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
+ ~ contributors as indicated by the @authors tag. See the
+ ~ copyright.txt in the distribution for a full listing of
+ ~ individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software 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
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
<!DOCTYPE facelet-taglib PUBLIC
- "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
- "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
+ "-//Sun Microsystems, Inc.//DTD Facelet Taglib 1.0//EN"
+ "http://java.sun.com/dtd/facelet-taglib_1_0.dtd">
<facelet-taglib>
<namespace>http://jboss.org/gatein</namespace>
<tag>
- <tag-name>commandButton</tag-name>
- <source>xhtml/commandButton.xhtml</source>
- </tag>
+ <tag-name>commandButton</tag-name>
+ <source>xhtml/commandButton.xhtml</source>
+ </tag>
- <tag>
- <tag-name>commandLink</tag-name>
- <source>xhtml/commandLink.xhtml</source>
- </tag>
+ <tag>
+ <tag-name>commandLink</tag-name>
+ <source>xhtml/commandLink.xhtml</source>
+ </tag>
- <tag>
- <tag-name>blueHeaderBar</tag-name>
- <source>xhtml/blueHeaderBar.xhtml</source>
- </tag>
+ <tag>
+ <tag-name>blueHeaderBar</tag-name>
+ <source>xhtml/blueHeaderBar.xhtml</source>
+ </tag>
</facelet-taglib>
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/xhtml/blueHeaderBar.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/xhtml/blueHeaderBar.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/xhtml/blueHeaderBar.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -22,21 +22,21 @@
-->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:c="http://java.sun.com/jstl/core">
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core">
- <div class="UIBarStyle">
- <div class="BarStyle2">
- <div class="LeftBar">
- <div class="RightBar">
- <div class="MiddleBar">
- <ui:insert/>
- </div>
- </div>
- </div>
- </div>
+ <div class="UIBarStyle">
+ <div class="BarStyle2">
+ <div class="LeftBar">
+ <div class="RightBar">
+ <div class="MiddleBar">
+ <ui:insert/>
+ </div>
</div>
+ </div>
+ </div>
+ </div>
</ui:composition>
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/xhtml/commandLink.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/xhtml/commandLink.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/tags/xhtml/commandLink.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -22,23 +22,24 @@
-->
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
- xmlns:f="http://java.sun.com/jsf/core"
- xmlns:ui="http://java.sun.com/jsf/facelets"
- xmlns:h="http://java.sun.com/jsf/html"
- xmlns:c="http://java.sun.com/jstl/core">
+ xmlns:f="http://java.sun.com/jsf/core"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:c="http://java.sun.com/jstl/core">
-<table class="ActionContainer">
- <tr>
- <td>
+ <table class="ActionContainer">
+ <tr>
+ <td>
<div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <h:commandLink id="#{id}" action="#{actionString}" value="#{value}" title="#{title}" immediate="#{immediate}"/>
- </div>
- </div>
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="#{id}" action="#{actionString}" value="#{value}" title="#{title}"
+ immediate="#{immediate}"/>
+ </div>
+ </div>
</div>
- </td>
- </tr>
-</table>
+ </td>
+ </tr>
+ </table>
</ui:composition>
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/web.xml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/web.xml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/WEB-INF/web.xml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
~ contributors as indicated by the @authors tag. See the
~ copyright.txt in the distribution for a full listing of
~ individual contributors.
@@ -57,10 +57,10 @@
<param-value>server</param-value>
</context-param>
- <context-param>
- <param-name>facelets.LIBRARIES</param-name>
- <param-value>/WEB-INF/tags/webui.taglib.xml</param-value>
- </context-param>
+ <context-param>
+ <param-name>facelets.LIBRARIES</param-name>
+ <param-value>/WEB-INF/tags/webui.taglib.xml</param-value>
+ </context-param>
<servlet>
<servlet-name>FacesServlet</servlet-name>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmDeleteConsumer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmDeleteConsumer.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmDeleteConsumer.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -25,7 +25,6 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
- xmlns:jbp="http://www.jboss.org/portal"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:webui="http://jboss.org/gatein">
@@ -59,7 +58,7 @@
<div class="ButtonRight">
<div class="ButtonMiddle">
<h:commandLink id="destroy-link" action="#{consumersMgr.destroyConsumer}"
- value="#{i18n.confirm_delete_consumer_submit}">
+ value="#{i18n.confirm_delete_consumer_submit}">
<f:param name="id" value="#{consumersMgr.selectedConsumer.producerId}"/>
</h:commandLink>
</div>
@@ -71,7 +70,7 @@
<div class="ButtonRight">
<div class="ButtonMiddle">
<h:commandLink id="cancel-link" action="#{consumersMgr.listConsumers}"
- value="#{i18n.confirm_delete_consumer_cancel}"/>
+ value="#{i18n.confirm_delete_consumer_cancel}"/>
</div>
</div>
</div>
@@ -81,16 +80,16 @@
<ui:remove><webui:commandButton id="destroy-link"
- action="destroyConsumer"
- backingBean="#{consumersMgr}"
- value="#{i18n.confirm_delete_consumer_submit}">
+ action="destroyConsumer"
+ backingBean="#{consumersMgr}"
+ value="#{i18n.confirm_delete_consumer_submit}">
<f:param name="id" value="#{consumersMgr.selectedConsumer.producerId}"/>
</webui:commandButton>
- <webui:commandButton id="cancel-link"
- action="listConsumers"
- backingBean="#{consumersMgr}"
- value="#{i18n.confirm_delete_consumer_cancel}"/></ui:remove>
+ <webui:commandButton id="cancel-link"
+ action="listConsumers"
+ backingBean="#{consumersMgr}"
+ value="#{i18n.confirm_delete_consumer_cancel}"/></ui:remove>
</h:form>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmEraseRegistration.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmEraseRegistration.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmEraseRegistration.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -25,7 +25,6 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
- xmlns:jbp="http://www.jboss.org/portal"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:webui="http://jboss.org/gatein">
@@ -59,7 +58,7 @@
<div class="ButtonRight">
<div class="ButtonMiddle">
<h:commandLink id="submit" action="#{consumer.eraseLocalRegistration}"
- value="#{i18n.confirm_delete_registration_submit}"/>
+ value="#{i18n.confirm_delete_registration_submit}"/>
</div>
</div>
</div>
@@ -69,7 +68,7 @@
<div class="ButtonRight">
<div class="ButtonMiddle">
<h:commandLink id="cancel" action="#{consumer.cancel}"
- value="#{i18n.confirm_delete_registration_cancel}"/>
+ value="#{i18n.confirm_delete_registration_cancel}"/>
</div>
</div>
</div>
@@ -78,12 +77,12 @@
</table>
<ui:remove><webui:commandButton id="submit" value="#{i18n.confirm_delete_registration_submit}"
- action="eraseLocalRegistration"
- backingBean="#{consumer}"/>
+ action="eraseLocalRegistration"
+ backingBean="#{consumer}"/>
- <webui:commandButton id="cancel" value="#{i18n.confirm_delete_registration_cancel}"
- backingBean="#{consumer}"
- action="cancel"/></ui:remove>
+ <webui:commandButton id="cancel" value="#{i18n.confirm_delete_registration_cancel}"
+ backingBean="#{consumer}"
+ action="cancel"/></ui:remove>
</h:form>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -83,19 +83,20 @@
label="Consumer Name" required="true"/>  
<table class="ActionContainer">
- <tr>
- <td>
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <h:commandLink id="createConsumerButton" action="#{consumersMgr.createConsumer}"
- value="#{i18n.consumers_create_submit}"/>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </table>
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="createConsumerButton"
+ action="#{consumersMgr.createConsumer}"
+ value="#{i18n.consumers_create_submit}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
<ui:remove>
<webui:commandButton id="createConsumerButton"
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -97,22 +97,22 @@
<h:form>
<table class="ActionContainer">
- <tr>
- <td>
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <h:commandLink id="reloadConsumersButton" action="#{consumersMgr.reload}"
- value="#{i18n.consumers_table_reload}"/>
- </div>
- </div>
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="reloadConsumersButton" action="#{consumersMgr.reload}"
+ value="#{i18n.consumers_table_reload}"/>
</div>
- </td>
- </tr>
- </table>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
<ui:remove><webui:commandButton id="reloadConsumersButton" value="#{i18n.consumers_table_reload}"
- action="reload"
- backingBean="#{consumersMgr}"/></ui:remove>
+ action="reload"
+ backingBean="#{consumersMgr}"/></ui:remove>
</h:form>
</ui:define>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -129,21 +129,22 @@
</c:otherwise>
</c:choose>
<table class="ActionContainer">
- <tr>
- <td>
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <h:commandLink id="modify-reg-link" action="#{consumer.modifyRegistration}"
- value="#{i18n.edit_consumer_registration_modify}"
- title="#{i18n.edit_consumer_registration_modify_title}"
- rendered="#{consumer.registrationLocallyModified}"/>
- </div>
- </div>
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="modify-reg-link"
+ action="#{consumer.modifyRegistration}"
+ value="#{i18n.edit_consumer_registration_modify}"
+ title="#{i18n.edit_consumer_registration_modify_title}"
+ rendered="#{consumer.registrationLocallyModified}"/>
</div>
- </td>
- </tr>
- </table>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
<ui:remove><webui:commandButton action="modifyRegistration"
backingBean="#{consumer}"
id="modify-reg-link"
@@ -191,20 +192,21 @@
</c:choose>
<table class="ActionContainer">
- <tr>
- <td>
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <h:commandLink id="edit-reg-link" action="#{consumer.modifyRegistration}"
- value="#{i18n.edit_consumer_registration_modify}"
- title="#{i18n.edit_consumer_registration_modify_title}"/>
- </div>
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="edit-reg-link"
+ action="#{consumer.modifyRegistration}"
+ value="#{i18n.edit_consumer_registration_modify}"
+ title="#{i18n.edit_consumer_registration_modify_title}"/>
</div>
</div>
- </td>
- </tr>
- </table>
+ </div>
+ </td>
+ </tr>
+ </table>
<ui:remove><webui:commandButton action="modifyRegistration"
backingBean="#{consumer}"
id="edit-reg-link"
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/error.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/error.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/error.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -9,7 +9,7 @@
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
- ~
+ ~
~ This software 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
@@ -28,6 +28,6 @@
xmlns:c="http://java.sun.com/jstl/core"
xmlns:webui="http://jboss.org/gatein">
<ui:define name="content">
- An Error Has Occured.
+ An Error Has Occured.
</ui:define>
</ui:decorate>
\ No newline at end of file
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/confirmPropDeletion.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/confirmPropDeletion.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/confirmPropDeletion.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -25,7 +25,6 @@
xmlns:ui="http://java.sun.com/jsf/facelets"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:f="http://java.sun.com/jsf/core"
- xmlns:jbp="http://www.jboss.org/portal"
xmlns:c="http://java.sun.com/jstl/core"
xmlns:webui="http://jboss.org/gatein">
@@ -59,7 +58,7 @@
<div class="ButtonRight">
<div class="ButtonMiddle">
<h:commandLink id="confirm-delete" action="#{producer.deleteRegistrationProperty}"
- value="#{i18n.confirm_delete_reg_property_submit}"/>
+ value="#{i18n.confirm_delete_reg_property_submit}"/>
</div>
</div>
</div>
@@ -69,7 +68,7 @@
<div class="ButtonRight">
<div class="ButtonMiddle">
<h:commandLink id="cancel-delete" action="#{producer.cancel}"
- value="#{i18n.confirm_delete_reg_property_cancel}"/>
+ value="#{i18n.confirm_delete_reg_property_cancel}"/>
</div>
</div>
</div>
@@ -77,12 +76,12 @@
</tr>
</table>
<ui:remove><webui:commandButton id="confirm-delete" value="#{i18n.confirm_delete_reg_property_submit}"
- action="deleteRegistrationProperty"
- backingBean="#{producer}"/>
+ action="deleteRegistrationProperty"
+ backingBean="#{producer}"/>
- <webui:commandButton id="cancel-delete" value="#{i18n.confirm_delete_reg_property_cancel}"
- backingBean="#{producer}"
- action="cancel"/></ui:remove>
+ <webui:commandButton id="cancel-delete" value="#{i18n.confirm_delete_reg_property_cancel}"
+ backingBean="#{producer}"
+ action="cancel"/></ui:remove>
</h:form>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -67,22 +67,23 @@
<div class="add-prop-container">
<div class="add-prop-button">
<table class="ActionContainer">
- <tr>
- <td>
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <h:commandLink id="add-reg-prop" action="#{producer.addRegistrationProperty}"
- value="#{i18n.producer_config_add_reg_prop}"/>
- </div>
- </div>
- </div>
- </td>
- </tr>
- </table>
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="add-reg-prop"
+ action="#{producer.addRegistrationProperty}"
+ value="#{i18n.producer_config_add_reg_prop}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
<ui:remove><webui:commandButton id="add-reg-prop" action="addRegistrationProperty"
- backingBean="#{producer}"
- value="#{i18n.producer_config_add_reg_prop}"/>
+ backingBean="#{producer}"
+ value="#{i18n.producer_config_add_reg_prop}"/>
</ui:remove>
</div>
</div>
@@ -144,7 +145,7 @@
<div class="ButtonRight">
<div class="ButtonMiddle">
<h:commandLink id="reg-save" action="#{producer.save}"
- value="#{i18n.producer_config_save}"/>
+ value="#{i18n.producer_config_save}"/>
</div>
</div>
</div>
@@ -154,7 +155,7 @@
<div class="ButtonRight">
<div class="ButtonMiddle">
<h:commandLink id="reg-reload" action="#{producer.reloadConfiguration}"
- value="#{i18n.producer_config_cancel}"/>
+ value="#{i18n.producer_config_cancel}"/>
</div>
</div>
</div>
@@ -162,12 +163,12 @@
</tr>
</table>
<ui:remove><webui:commandButton id="reg-save" action="save"
- backingBean="#{producer}"
- value="#{i18n.producer_config_save}"/>
+ backingBean="#{producer}"
+ value="#{i18n.producer_config_save}"/>
- <webui:commandButton id="reg-reload" action="reloadConfiguration"
- backingBean="#{producer}"
- value="#{i18n.producer_config_cancel}"/></ui:remove>
+ <webui:commandButton id="reg-reload" action="reloadConfiguration"
+ backingBean="#{producer}"
+ value="#{i18n.producer_config_cancel}"/></ui:remove>
</h:panelGroup>
</h:panelGrid>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producerTemplate.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producerTemplate.xhtml 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producerTemplate.xhtml 2010-02-12 11:58:08 UTC (rev 1661)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
~ contributors as indicated by the @authors tag. See the
~ copyright.txt in the distribution for a full listing of
~ individual contributors.
@@ -31,33 +31,38 @@
<h:form id="producer-temp-form" styleClass="producer-temp-form">
<div class="TabsContainer">
- <table class="TabsActionContainer"><tr><td>
- <div class="UITab GrayTabStyle">
- <div class="NormalTab">
- <div class="LeftTab">
- <div class="RightTab">
- <div class="MiddleTab">
- <h:commandLink id="consumersTab" action="consumers" value="#{i18n.nav_tabs_consumers}"/>
- </div>
+ <table class="TabsActionContainer">
+ <tr>
+ <td>
+ <div class="UITab GrayTabStyle">
+ <div class="NormalTab">
+ <div class="LeftTab">
+ <div class="RightTab">
+ <div class="MiddleTab">
+ <h:commandLink id="consumersTab" action="consumers"
+ value="#{i18n.nav_tabs_consumers}"/>
+ </div>
+ </div>
+ </div>
</div>
- </div>
- </div>
- </div>
- </td><td>
- <div class="UITab GrayTabStyle">
- <div class="SelectedTab">
- <div class="LeftTab">
- <div class="RightTab">
- <div class="MiddleTab">
- #{i18n.nav_tabs_producer_config}
- </div>
+ </div>
+ </td>
+ <td>
+ <div class="UITab GrayTabStyle">
+ <div class="SelectedTab">
+ <div class="LeftTab">
+ <div class="RightTab">
+ <div class="MiddleTab">
+ #{i18n.nav_tabs_producer_config}
+ </div>
+ </div>
+ </div>
</div>
- </div>
- </div>
- </div>
- </td>
- </tr></table>
- </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ </div>
</h:form>
</ui:define>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/styles/basestyles.css
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/styles/basestyles.css 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/styles/basestyles.css 2010-02-12 11:58:08 UTC (rev 1661)
@@ -1,3 +1,26 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
.zero {
margin: 0;
padding: 0;
@@ -86,7 +109,7 @@
}
.bold {
- font-weight: bold;
+ font-weight: bold;
}
.dotted-blue-border {
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css 2010-02-12 10:39:33 UTC (rev 1660)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/styles/style.css 2010-02-12 11:58:08 UTC (rev 1661)
@@ -1,11 +1,34 @@
+/*
+ * JBoss, a division of Red Hat
+ * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * contributors as indicated by the @authors tag. See the
+ * copyright.txt in the distribution for a full listing of
+ * individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
@import url(basestyles.css);
.wsrp-consumers-ui {
- padding: 10px;
+ padding: 10px;
}
+
.wsrp-consumers-ui table {
- border: 0;
- /*border-collapse: separate;*/
+ border: 0; /*border-collapse: separate;*/
}
.wsrp-consumers-ui form {
14 years, 11 months
gatein SVN: r1660 - in portal/trunk: component/common and 12 other directories.
by do-not-reply@jboss.org
Author: julien_viet
Date: 2010-02-12 05:39:33 -0500 (Fri, 12 Feb 2010)
New Revision: 1660
Added:
portal/trunk/component/management/
portal/trunk/component/management/pom.xml
portal/trunk/component/management/src/
portal/trunk/component/management/src/main/
portal/trunk/component/management/src/main/java/
portal/trunk/component/management/src/main/java/org/
portal/trunk/component/management/src/main/java/org/exoplatform/
portal/trunk/component/management/src/main/java/org/exoplatform/management/
portal/trunk/component/management/src/main/java/org/exoplatform/management/ResourceKey.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/Rest.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/ValueWrapper.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/data/
portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResource.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceMethod.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceMethodParameter.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceProperty.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/
portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/GetterInvoker.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/MethodInvoker.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/NoSuchMethodInvoker.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/SetterInvoker.java
portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/SimpleMethodInvoker.java
portal/trunk/component/management/src/main/resources/
portal/trunk/component/management/src/test/
portal/trunk/component/management/src/test/java/
portal/trunk/component/management/src/test/resources/
Modified:
portal/trunk/component/common/pom.xml
portal/trunk/component/pom.xml
portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
Log:
GTNPORTAL-639 : Rest management connector
Modified: portal/trunk/component/common/pom.xml
===================================================================
--- portal/trunk/component/common/pom.xml 2010-02-12 09:44:54 UTC (rev 1659)
+++ portal/trunk/component/common/pom.xml 2010-02-12 10:39:33 UTC (rev 1660)
@@ -63,10 +63,6 @@
<groupId>org.chromattic</groupId>
<artifactId>chromattic.spi</artifactId>
</dependency>
- <dependency>
- <groupId>org.exoplatform.ws</groupId>
- <artifactId>exo.ws.rest.core</artifactId>
- </dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
Added: portal/trunk/component/management/pom.xml
===================================================================
--- portal/trunk/component/management/pom.xml (rev 0)
+++ portal/trunk/component/management/pom.xml 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,50 @@
+<!--
+ ~ Copyright (C) 2009 eXo Platform SAS.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software 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
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+<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">
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component</artifactId>
+ <version>3.0.0-CR01-SNAPSHOT</version>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <artifactId>exo.portal.component.management</artifactId>
+ <packaging>jar</packaging>
+ <name>GateIn Portal Component Management</name>
+
+ <dependencies>
+
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.component.common</artifactId>
+ <version>3.0.0-CR01-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.commons</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.ws</groupId>
+ <artifactId>exo.ws.rest.core</artifactId>
+ </dependency>
+
+ </dependencies>
+</project>
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/ResourceKey.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/ResourceKey.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/ResourceKey.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,61 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public final class ResourceKey
+{
+
+ /** . */
+ private final String name;
+
+ public ResourceKey(String name)
+ {
+ if (name == null)
+ {
+ throw new NullPointerException();
+ }
+ this.name = name;
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return name.hashCode();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ if (obj == this)
+ {
+ return true;
+ }
+ if (obj instanceof ResourceKey)
+ {
+ ResourceKey that = (ResourceKey)obj;
+ return name.equals(that.name);
+ }
+ return false;
+ }
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/Rest.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/Rest.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/Rest.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,38 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+(a)Retention(RetentionPolicy.RUNTIME)
+(a)Target(ElementType.TYPE)
+public @interface Rest
+{
+
+ String value();
+
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/RestManagementProvider.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,101 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management;
+
+import org.exoplatform.management.data.RestResource;
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.management.spi.ManagedResource;
+import org.exoplatform.management.spi.ManagementProvider;
+import org.exoplatform.services.rest.resource.ResourceContainer;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+@Path("management")
+public class RestManagementProvider implements ResourceContainer, ManagementProvider
+{
+
+ /** . */
+ private final ExoContainerContext context;
+
+ /** . */
+ private final Map<ResourceKey, RestResource> resourceMap = new HashMap<ResourceKey, RestResource>();
+
+ public RestManagementProvider(ExoContainerContext context)
+ {
+ this.context = context;
+ }
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public ValueWrapper list()
+ {
+ List<String> list = new ArrayList<String>();
+ for (RestResource mr : resourceMap.values())
+ {
+ list.add(mr.getName());
+ }
+ return ValueWrapper.wrap(list);
+ }
+
+ @Path("{resource}")
+ public RestResource dispatch(@PathParam("resource") String resourceName)
+ {
+ return resourceMap.get(new ResourceKey(resourceName));
+ }
+
+ // ManagementProvider implementation ********************************************************************************
+
+ public Object manage(ManagedResource managedResource)
+ {
+ Object resource = managedResource.getResource();
+
+ //
+ Rest annotation = resource.getClass().getAnnotation(Rest.class);
+
+ //
+ if (annotation != null)
+ {
+ String name = annotation.value();
+ ResourceKey key = new ResourceKey(name);
+ resourceMap.put(key, new RestResource(name, managedResource));
+ return key;
+ }
+
+ //
+ return null;
+ }
+
+ public void unmanage(Object key)
+ {
+ resourceMap.remove(key);
+ }
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/ValueWrapper.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/ValueWrapper.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/ValueWrapper.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management;
+
+/**
+ * Temporary class until eXo JSON marshaller supports non java bean objects.
+ *
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class ValueWrapper<T>
+{
+
+ public static <T> ValueWrapper<T> wrap(T value)
+ {
+ return new ValueWrapper<T>(value);
+ }
+
+ /** . */
+ private final T value;
+
+ public ValueWrapper(T value)
+ {
+ this.value = value;
+ }
+
+ public T getValue()
+ {
+ return value;
+ }
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResource.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResource.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResource.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,239 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management.data;
+
+import org.exoplatform.management.ValueWrapper;
+import org.exoplatform.management.invocation.MethodInvoker;
+import org.exoplatform.management.annotations.ImpactType;
+import org.exoplatform.management.spi.ManagedMethodMetaData;
+import org.exoplatform.management.spi.ManagedPropertyMetaData;
+import org.exoplatform.management.spi.ManagedResource;
+import org.exoplatform.management.spi.ManagedTypeMetaData;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Context;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.MultivaluedMap;
+import javax.ws.rs.core.Response;
+import javax.ws.rs.core.UriInfo;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class RestResource
+{
+
+ /** . */
+ final Map<String, RestResourceProperty> properties;
+
+ /** . */
+ private final List<RestResourceMethod> methods;
+
+ /** . */
+ private final ManagedResource managedResource;
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private final String description;
+
+ public RestResource(String name, ManagedResource managedResource)
+ {
+ ManagedTypeMetaData managedType = managedResource.getMetaData();
+
+ //
+ HashMap<String, RestResourceProperty> properties = new HashMap<String, RestResourceProperty>();
+ for (ManagedPropertyMetaData managedProperty : managedType.getProperties()) {
+ RestResourceProperty resourceProperty = new RestResourceProperty(managedProperty);
+ properties.put(resourceProperty.getName(), resourceProperty);
+ }
+
+ //
+ List<RestResourceMethod> methods = new ArrayList<RestResourceMethod>();
+ for (ManagedMethodMetaData managedMethod : managedType.getMethods()) {
+ RestResourceMethod resourceMethod = new RestResourceMethod(managedMethod);
+ methods.add(resourceMethod);
+ }
+
+ //
+ this.name = name;
+ this.description = managedType.getDescription();
+ this.managedResource = managedResource;
+ this.properties = Collections.unmodifiableMap(properties);
+ this.methods = methods;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getDescription()
+ {
+ return description;
+ }
+
+ public Collection<RestResourceProperty> getProperties()
+ {
+ return properties.values();
+ }
+
+ public Collection<RestResourceMethod> getMethods()
+ {
+ return methods;
+ }
+
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ public RestResource get()
+ {
+ return this;
+ }
+
+ @GET
+ @Path("{name}")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Object get(@Context UriInfo info, @PathParam("name") String name)
+ {
+ // Try first to get a property
+ RestResourceProperty property = properties.get(name);
+ if (property != null)
+ {
+ MethodInvoker getter = property.getGetterInvoker();
+ if (getter != null)
+ {
+ return safeInvoke(getter, info.getQueryParameters());
+ }
+ }
+
+ //
+ return tryInvoke(name, info, ImpactType.READ);
+ }
+
+ @PUT
+ @Path("{name}")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Object put(@Context UriInfo info, @PathParam("name") String name)
+ {
+ // Try first to get a property
+ RestResourceProperty property = properties.get(name);
+ if (property != null)
+ {
+ MethodInvoker setter = property.getSetterInvoker();
+ if (setter != null)
+ {
+ return safeInvoke(setter, info.getQueryParameters());
+ }
+ }
+
+ //
+ return tryInvoke(name, info, ImpactType.IDEMPOTENT_WRITE);
+ }
+
+ @POST
+ @Path("{name}")
+ @Produces(MediaType.APPLICATION_JSON)
+ public Object post(@Context UriInfo info, @PathParam("name") String name)
+ {
+ return tryInvoke(name, info, ImpactType.WRITE);
+ }
+
+ /**
+ * Try to invoke a method with matching parameters from the query string
+ *
+ * @param info the uri info
+ * @param impact the expected impact
+ * @return a suitable response
+ */
+ private Object tryInvoke(String methodName, UriInfo info, ImpactType impact)
+ {
+ MultivaluedMap<String, String> parameters = info.getQueryParameters();
+
+ //
+ RestResourceMethod method = lookupMethod(methodName, parameters.keySet(), impact);
+
+ //
+ if (method != null)
+ {
+ MethodInvoker invoker = method.getMethodInvoker();
+ return safeInvoke(invoker, parameters);
+ }
+
+ //
+ return null;
+ }
+
+ private RestResourceMethod lookupMethod(String methodName, Set<String> argNames, ImpactType impact)
+ {
+ for (RestResourceMethod method : methods)
+ {
+ if (method.getName().equals(methodName) && method.metaData.getImpact() == impact && method.parameterNames.equals(argNames))
+ {
+ return method;
+ }
+ }
+ return null;
+ }
+
+ /**
+ * Invoke safely a method.
+ *
+ * @param invoker the method to invoke
+ * @param argMap the arguments
+ * @return the ok response or an object returned by the method wrapped by {@link ValueWrapper}
+ */
+ private Object safeInvoke(MethodInvoker invoker, Map<String, List<String>> argMap)
+ {
+ Object resource = managedResource.getResource();
+
+ //
+ managedResource.beforeInvoke(resource);
+
+ //
+ try
+ {
+ Object ret = invoker.invoke(resource, argMap);
+ return ret == null ? Response.ok() : ValueWrapper.wrap(ret);
+ }
+ catch (Exception e)
+ {
+ e.printStackTrace();
+ return Response.serverError();
+ }
+ finally
+ {
+ managedResource.afterInvoke(resource);
+ }
+ }
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceMethod.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceMethod.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceMethod.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,113 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management.data;
+
+import org.exoplatform.management.invocation.MethodInvoker;
+import org.exoplatform.management.invocation.SimpleMethodInvoker;
+import org.exoplatform.management.spi.ManagedMethodMetaData;
+import org.exoplatform.management.spi.ManagedMethodParameterMetaData;
+
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Set;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class RestResourceMethod
+{
+
+ /** . */
+ final ManagedMethodMetaData metaData;
+
+ /** . */
+ final List<RestResourceMethodParameter> parameters;
+
+ /** . */
+ final Set<String> parameterNames;
+
+ /** . */
+ final MethodInvoker methodInvoker;
+
+ public RestResourceMethod(ManagedMethodMetaData metaData)
+ {
+ List<RestResourceMethodParameter> parameters = new ArrayList<RestResourceMethodParameter>();
+ Set<String> parameterNames = new HashSet<String>();
+ for (ManagedMethodParameterMetaData parameterMD : metaData.getParameters())
+ {
+ parameters.add(new RestResourceMethodParameter(parameterMD));
+ parameterNames.add(parameterMD.getName());
+ }
+
+ //
+ this.metaData = metaData;
+ this.parameterNames = Collections.unmodifiableSet(parameterNames);
+ this.parameters = Collections.unmodifiableList(parameters);
+ this.methodInvoker = new SimpleMethodInvoker(metaData.getMethod())
+ {
+ @Override
+ protected String getArgumentName(int index)
+ {
+ RestResourceMethodParameter param = RestResourceMethod.this.parameters.get(index);
+ return param != null ? param.getName() : null;
+ }
+ };
+ }
+
+ public String getName()
+ {
+ return metaData.getName();
+ }
+
+ public String getMethod()
+ {
+ switch (metaData.getImpact())
+ {
+ case READ:
+ return "get";
+ case WRITE:
+ return "post";
+ case IDEMPOTENT_WRITE:
+ return "put";
+ default:
+ throw new AssertionError();
+ }
+ }
+
+ public String getDescription()
+ {
+ return metaData.getDescription();
+ }
+
+ public List<RestResourceMethodParameter> getParameters()
+ {
+ return parameters;
+ }
+
+ // Internal *********************************************************************************************************
+
+ MethodInvoker getMethodInvoker()
+ {
+ return methodInvoker;
+ }
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceMethodParameter.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceMethodParameter.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceMethodParameter.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management.data;
+
+import org.exoplatform.management.spi.ManagedMethodParameterMetaData;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class RestResourceMethodParameter
+{
+
+ /** . */
+ final ManagedMethodParameterMetaData metaData;
+
+ public RestResourceMethodParameter(ManagedMethodParameterMetaData metaData)
+ {
+ this.metaData = metaData;
+ }
+
+ public String getName()
+ {
+ return metaData.getName();
+ }
+
+ public String getDescription()
+ {
+ return metaData.getDescription();
+ }
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceProperty.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceProperty.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/data/RestResourceProperty.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management.data;
+
+import org.exoplatform.management.invocation.GetterInvoker;
+import org.exoplatform.management.invocation.MethodInvoker;
+import org.exoplatform.management.invocation.NoSuchMethodInvoker;
+import org.exoplatform.management.invocation.SetterInvoker;
+import org.exoplatform.management.spi.ManagedPropertyMetaData;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class RestResourceProperty
+{
+
+ /** . */
+ final ManagedPropertyMetaData metaData;
+
+ /** . */
+ private final MethodInvoker setterInvoker;
+
+ /** . */
+ private final MethodInvoker getterInvoker;
+
+ public RestResourceProperty(ManagedPropertyMetaData metaData)
+ {
+ Method getter = metaData.getGetter();
+ MethodInvoker getterInvoker = getter != null ? new GetterInvoker(getter) : new NoSuchMethodInvoker();
+
+ //
+ Method setter = metaData.getSetter();
+ MethodInvoker setterInvoker = setter != null ? new SetterInvoker(setter) : new NoSuchMethodInvoker();
+
+ //
+ this.metaData = metaData;
+ this.setterInvoker = setterInvoker;
+ this.getterInvoker = getterInvoker;
+ }
+
+ public String getName()
+ {
+ return metaData.getName();
+ }
+
+ public String getDescription()
+ {
+ return metaData.getDescription();
+ }
+
+ // Internal *********************************************************************************************************
+
+ MethodInvoker getSetterInvoker()
+ {
+ return setterInvoker;
+ }
+
+ MethodInvoker getGetterInvoker()
+ {
+ return getterInvoker;
+ }
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/GetterInvoker.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/GetterInvoker.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/GetterInvoker.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management.invocation;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class GetterInvoker extends SimpleMethodInvoker
+{
+
+ public GetterInvoker(Method method)
+ {
+ super(method);
+ }
+
+ @Override
+ protected String getArgumentName(int index)
+ {
+ throw new IndexOutOfBoundsException();
+ }
+}
\ No newline at end of file
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/MethodInvoker.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/MethodInvoker.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/MethodInvoker.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management.invocation;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public interface MethodInvoker
+{
+
+ Object invoke(Object o, Map<String, List<String>> argMap) throws IllegalAccessException, InvocationTargetException;
+
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/NoSuchMethodInvoker.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/NoSuchMethodInvoker.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/NoSuchMethodInvoker.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management.invocation;
+
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class NoSuchMethodInvoker implements MethodInvoker
+{
+ public Object invoke(Object o, Map<String, List<String>> argMap) throws IllegalAccessException, InvocationTargetException
+ {
+ throw new UnsupportedOperationException();
+ }
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/SetterInvoker.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/SetterInvoker.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/SetterInvoker.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,48 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management.invocation;
+
+import java.lang.reflect.Method;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public class SetterInvoker extends SimpleMethodInvoker
+{
+
+ public SetterInvoker(Method method)
+ {
+ super(method);
+ }
+
+ @Override
+ protected String getArgumentName(int index)
+ {
+ if (index == 0)
+ {
+ return "value";
+ }
+ else
+ {
+ throw new IndexOutOfBoundsException();
+ }
+ }
+}
Added: portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/SimpleMethodInvoker.java
===================================================================
--- portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/SimpleMethodInvoker.java (rev 0)
+++ portal/trunk/component/management/src/main/java/org/exoplatform/management/invocation/SimpleMethodInvoker.java 2010-02-12 10:39:33 UTC (rev 1660)
@@ -0,0 +1,82 @@
+/*
+ * Copyright (C) 2009 eXo Platform SAS.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software 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
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.exoplatform.management.invocation;
+
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
+ * @version $Revision$
+ */
+public abstract class SimpleMethodInvoker implements MethodInvoker
+{
+
+ /** The method we invoke. */
+ private final Method method;
+
+ public SimpleMethodInvoker(Method method)
+ {
+ if (method == null)
+ {
+ throw new NullPointerException();
+ }
+
+ //
+ this.method = method;
+ }
+
+ public Object invoke(Object o, Map<String, List<String>> argMap) throws IllegalAccessException, InvocationTargetException
+ {
+ Class[] paramTypes = method.getParameterTypes();
+ Object[] args = new Object[paramTypes.length];
+ for (int i = 0;i < paramTypes.length;i++)
+ {
+ String argName = getArgumentName(i);
+ List<String> argValues = argMap.get(argName);
+ Class paramType = paramTypes[i];
+ Object arg;
+ if (paramType.isPrimitive())
+ {
+ throw new UnsupportedOperationException("Todo " + paramType);
+ }
+ else if (paramType.isArray())
+ {
+ throw new UnsupportedOperationException("Todo " + paramType);
+ }
+ else if (paramType == String.class)
+ {
+ arg = (argValues != null && argValues.size() > 0) ? argValues.get(0) : null;
+ }
+ else
+ {
+ throw new UnsupportedOperationException("Todo " + paramType);
+ }
+ args[i] = arg;
+ }
+
+ //
+ return method.invoke(o, args);
+ }
+
+ protected abstract String getArgumentName(int index);
+}
\ No newline at end of file
Modified: portal/trunk/component/pom.xml
===================================================================
--- portal/trunk/component/pom.xml 2010-02-12 09:44:54 UTC (rev 1659)
+++ portal/trunk/component/pom.xml 2010-02-12 10:39:33 UTC (rev 1660)
@@ -45,6 +45,7 @@
<module>portal</module>
<module>web</module>
<module>scripting</module>
+ <module>management</module>
<module>identity</module>
<module>dashboard</module>
</modules>
Modified: portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js
===================================================================
--- portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2010-02-12 09:44:54 UTC (rev 1659)
+++ portal/trunk/packaging/module/src/main/javascript/portal.packaging.module.js 2010-02-12 10:39:33 UTC (rev 1660)
@@ -97,6 +97,9 @@
addDependency(new Project("rhino", "js", "jar", rhinoVersion)).
addDependency(new Project("org.codehaus.groovy", "groovy-all", "jar", groovyVersion));
+ module.component.management =
+ new Project("org.exoplatform.portal", "exo.portal.component.management", "jar", module.version);
+
module.component.web =
new Project("org.exoplatform.portal", "exo.portal.component.web", "jar", module.version).
addDependency(module.component.scripting);
@@ -146,6 +149,7 @@
module.webui.portal =
new Project("org.exoplatform.portal", "exo.portal.webui.portal", "jar", module.version).
addDependency(module.component.common).
+ addDependency(module.component.management).
addDependency(module.component.resources).
addDependency(module.component.identity).
addDependency(module.component.pc).
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2010-02-12 09:44:54 UTC (rev 1659)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/common/common-configuration.xml 2010-02-12 10:39:33 UTC (rev 1660)
@@ -130,4 +130,9 @@
<type>org.exoplatform.portal.application.ResourceBundleDelegateImpl</type>
</component>
+ <component>
+ <key>org.exoplatform.management.RestManagementProvider</key>
+ <type>org.exoplatform.management.RestManagementProvider</type>
+ </component>
+
</configuration>
14 years, 11 months
gatein SVN: r1659 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-02-12 04:44:54 -0500 (Fri, 12 Feb 2010)
New Revision: 1659
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java
Log:
- A little bit more helpful than throwing an NPE?\226?\128?\166
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java 2010-02-12 09:03:11 UTC (rev 1658)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/services/SOAPServiceFactory.java 2010-02-12 09:44:54 UTC (rev 1659)
@@ -250,6 +250,7 @@
{
try
{
+ ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(wsdlDefinitionURL, "WSDL URL", "SOAPServiceFactory");
URI wsdlURL = new URI(wsdlDefinitionURL);
Service service = Service.create(wsdlURL.toURL(), SERVICE);
14 years, 11 months
gatein SVN: r1658 - components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-02-12 04:03:11 -0500 (Fri, 12 Feb 2010)
New Revision: 1658
Modified:
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
Log:
- Started encapsulating fields that might get removed.
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2010-02-12 09:01:49 UTC (rev 1657)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2010-02-12 09:03:11 UTC (rev 1658)
@@ -367,7 +367,7 @@
{
ServiceDescription serviceDescription;
- if (isModifyRegistrationRequired)
+ if (isModifyRegistrationRequired())
{
return new RefreshResult(RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED);
}
@@ -427,7 +427,7 @@
if (registrationResult.hasIssues())
{
// if the registration validation has issues, we need to modify our local information
- isModifyRegistrationRequired = true;
+ setModifyRegistrationRequired(true);
setActiveAndSave(false);
}
else
@@ -1090,7 +1090,7 @@
persistentRegistrationInfo.setRegistrationValidInternalState();
// registration is not modified anymore :)
- isModifyRegistrationRequired = false;
+ setModifyRegistrationRequired(false);
// update state
persistentRegistrationInfo.setRegistrationState(registrationState.value);
Modified: components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java
===================================================================
--- components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java 2010-02-12 09:01:49 UTC (rev 1657)
+++ components/wsrp/trunk/consumer/src/main/java/org/gatein/wsrp/consumer/RegistrationInfo.java 2010-02-12 09:03:11 UTC (rev 1658)
@@ -317,7 +317,7 @@
prop = new RegistrationProperty(name, value, WSRPUtils.toString(Locale.getDefault()), this);
getOrCreateRegistrationPropertiesMap(false).put(name, prop);
setModifiedSinceLastRefresh(true);
- modifyRegistrationNeeded = true;
+ setModifyRegistrationNeeded(true);
}
return prop;
@@ -332,7 +332,7 @@
throw new IllegalArgumentException("Cannot remove inexistent registration property '" + name + "'");
}
setModifiedSinceLastRefresh(true);
- modifyRegistrationNeeded = true;
+ setModifyRegistrationNeeded(true);
}
private Map<String, RegistrationProperty> getOrCreateRegistrationPropertiesMap(boolean forceCreate)
@@ -433,7 +433,7 @@
result.setRegistrationProperties(new HashMap<String, RegistrationProperty>(persistentRegistrationProperties));
}
setModifiedSinceLastRefresh(false);
- modifyRegistrationNeeded = false;
+ setModifyRegistrationNeeded(false);
if (serviceDescription.isRequiresRegistration())
{
@@ -600,7 +600,7 @@
if (persistentRegistrationHandle != null)
{
result.setStatus(RefreshResult.Status.MODIFY_REGISTRATION_REQUIRED);
- modifyRegistrationNeeded = true;
+ setModifyRegistrationNeeded(true);
}
else
{
@@ -670,7 +670,7 @@
consistentWithProducerExpectations = Boolean.TRUE; // since we have a registration context, we're consistent with the Producer
requiresRegistration = Boolean.TRUE; // we know we require registration
setModifiedSinceLastRefresh(false); // our state is clean :)
- modifyRegistrationNeeded = false;
+ setModifyRegistrationNeeded(false);
}
public RegistrationContext getRegistrationContext()
@@ -706,9 +706,14 @@
public void propertyValueChanged(RegistrationProperty property, Object oldValue, Object newValue)
{
setModifiedSinceLastRefresh(true);
- modifyRegistrationNeeded = true;
+ setModifyRegistrationNeeded(true);
}
+ private void setModifyRegistrationNeeded(boolean modifyRegistrationNeeded)
+ {
+ this.modifyRegistrationNeeded = modifyRegistrationNeeded;
+ }
+
public class RegistrationRefreshResult extends RefreshResult
{
private Map<String, RegistrationProperty> registrationProperties;
14 years, 11 months
gatein SVN: r1657 - in components/wsrp/trunk/admin-gui/src/main/webapp/jsf: producer and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2010-02-12 04:01:49 -0500 (Fri, 12 Feb 2010)
New Revision: 1657
Modified:
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmDeleteConsumer.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmEraseRegistration.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/confirmPropDeletion.xhtml
components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
Log:
- Removed usage of webui:commandButton for now as its behavior is erratic. No time to investigate why right now?\226?\128?\166 :(
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmDeleteConsumer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmDeleteConsumer.xhtml 2010-02-12 08:01:39 UTC (rev 1656)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmDeleteConsumer.xhtml 2010-02-12 09:01:49 UTC (rev 1657)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
~ contributors as indicated by the @authors tag. See the
~ copyright.txt in the distribution for a full listing of
~ individual contributors.
@@ -52,18 +52,45 @@
<p class="portlet-class">#{i18n.confirm_detete_consumer_proceed}</p>
<h:form id="confirm-delete-form">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="destroy-link" action="#{consumersMgr.destroyConsumer}"
+ value="#{i18n.confirm_delete_consumer_submit}">
+ <f:param name="id" value="#{consumersMgr.selectedConsumer.producerId}"/>
+ </h:commandLink>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="cancel-link" action="#{consumersMgr.listConsumers}"
+ value="#{i18n.confirm_delete_consumer_cancel}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
- <webui:commandButton id="destroy-link"
- action="destroyConsumer"
- backingBean="#{consumersMgr}"
- value="#{i18n.confirm_delete_consumer_submit}">
- <f:param name="id" value="#{consumersMgr.selectedConsumer.producerId}"/>
- </webui:commandButton>
- <webui:commandButton id="cancel-link"
- action="listConsumers"
- backingBean="#{consumersMgr}"
- value="#{i18n.confirm_delete_consumer_cancel}"/>
+ <ui:remove><webui:commandButton id="destroy-link"
+ action="destroyConsumer"
+ backingBean="#{consumersMgr}"
+ value="#{i18n.confirm_delete_consumer_submit}">
+ <f:param name="id" value="#{consumersMgr.selectedConsumer.producerId}"/>
+ </webui:commandButton>
+
+ <webui:commandButton id="cancel-link"
+ action="listConsumers"
+ backingBean="#{consumersMgr}"
+ value="#{i18n.confirm_delete_consumer_cancel}"/></ui:remove>
</h:form>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmEraseRegistration.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmEraseRegistration.xhtml 2010-02-12 08:01:39 UTC (rev 1656)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/confirmEraseRegistration.xhtml 2010-02-12 09:01:49 UTC (rev 1657)
@@ -52,14 +52,38 @@
<p class="portlet-class">#{i18n.confirm_delete_registration_proceed}</p>
<h:form id="confirm-erase-form">
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="submit" action="#{consumer.eraseLocalRegistration}"
+ value="#{i18n.confirm_delete_registration_submit}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="cancel" action="#{consumer.cancel}"
+ value="#{i18n.confirm_delete_registration_cancel}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
- <webui:commandButton id="submit" value="#{i18n.confirm_delete_registration_submit}"
+ <ui:remove><webui:commandButton id="submit" value="#{i18n.confirm_delete_registration_submit}"
action="eraseLocalRegistration"
backingBean="#{consumer}"/>
<webui:commandButton id="cancel" value="#{i18n.confirm_delete_registration_cancel}"
backingBean="#{consumer}"
- action="cancel"/>
+ action="cancel"/></ui:remove>
</h:form>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml 2010-02-12 08:01:39 UTC (rev 1656)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumerTemplate.xhtml 2010-02-12 09:01:49 UTC (rev 1657)
@@ -82,13 +82,26 @@
styleClass="portlet-form-input-field"
label="Consumer Name" required="true"/>  
- <webui:commandButton id="createConsumerButton"
- action="createConsumer"
- backingBean="#{consumersMgr}"
- value="#{i18n.consumers_create_submit}"/>
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="createConsumerButton" action="#{consumersMgr.createConsumer}"
+ value="#{i18n.consumers_create_submit}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
-
<ui:remove>
+ <webui:commandButton id="createConsumerButton"
+ action="createConsumer"
+ backingBean="#{consumersMgr}"
+ value="#{i18n.consumers_create_submit}"/>
<h:message for="consumerName" errorClass="portlet-msg-error"/>
</ui:remove>
</h:form>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml 2010-02-12 08:01:39 UTC (rev 1656)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/consumers.xhtml 2010-02-12 09:01:49 UTC (rev 1657)
@@ -96,10 +96,23 @@
</h:form>
<h:form>
-
- <webui:commandButton id="createConsumerButton" value="#{i18n.consumers_table_reload}"
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="reloadConsumersButton" action="#{consumersMgr.reload}"
+ value="#{i18n.consumers_table_reload}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <ui:remove><webui:commandButton id="reloadConsumersButton" value="#{i18n.consumers_table_reload}"
action="reload"
- backingBean="#{consumersMgr}"/>
+ backingBean="#{consumersMgr}"/></ui:remove>
</h:form>
</ui:define>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2010-02-12 08:01:39 UTC (rev 1656)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/consumers/editConsumer.xhtml 2010-02-12 09:01:49 UTC (rev 1657)
@@ -102,23 +102,55 @@
</h:dataTable>
- <webui:commandButton action="update"
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="cons-update-link" action="#{consumer.update}"
+ value="#{i18n.edit_consumer_registration_update_props}"
+ rendered="#{consumer.registered}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+
+ <ui:remove><webui:commandButton action="update"
backingBean="#{consumer}"
id="cons-update-link"
value="#{i18n.edit_consumer_registration_update_props}"
- rendered="registered"/>
+ rendered="registered"/></ui:remove>
</c:when>
<c:otherwise>
#{i18n.edit_consumer_registration_no_props}
</c:otherwise>
</c:choose>
- <webui:commandButton action="modifyRegistration"
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="modify-reg-link" action="#{consumer.modifyRegistration}"
+ value="#{i18n.edit_consumer_registration_modify}"
+ title="#{i18n.edit_consumer_registration_modify_title}"
+ rendered="#{consumer.registrationLocallyModified}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <ui:remove><webui:commandButton action="modifyRegistration"
backingBean="#{consumer}"
id="modify-reg-link"
rendered="registrationLocallyModified"
value="#{i18n.edit_consumer_registration_modify}"
title="#{i18n.edit_consumer_registration_modify_title}"/>
-
+ </ui:remove>
<br style="clear:both;"/>
</h:panelGroup>
@@ -158,11 +190,26 @@
</c:otherwise>
</c:choose>
- <webui:commandButton action="modifyRegistration"
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="edit-reg-link" action="#{consumer.modifyRegistration}"
+ value="#{i18n.edit_consumer_registration_modify}"
+ title="#{i18n.edit_consumer_registration_modify_title}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <ui:remove><webui:commandButton action="modifyRegistration"
backingBean="#{consumer}"
id="edit-reg-link"
value="#{i18n.edit_consumer_registration_modify}"
- title="#{i18n.edit_consumer_registration_modify_title}"/>
+ title="#{i18n.edit_consumer_registration_modify_title}"/></ui:remove>
<br style="clear:both;"/>
</h:panelGroup>
@@ -181,10 +228,25 @@
#{i18n.edit_consumer_registration_context_handle}
<h:outputText value="#{consumer.producerInfo.registrationInfo.registrationHandle}"/>
- <webui:commandButton id="erase-cons-link" action="confirmEraseRegistration"
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="erase-cons-link" action="confirmEraseRegistration"
+ value="#{i18n.edit_consumer_registration_context_erase}"
+ title="#{i18n.edit_consumer_registration_context_erase_title}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <ui:remove><webui:commandButton id="erase-cons-link" action="confirmEraseRegistration"
backingBean="#{consumer}"
value="#{i18n.edit_consumer_registration_context_erase}"
- title="#{i18n.edit_consumer_registration_context_erase_title}"/>
+ title="#{i18n.edit_consumer_registration_context_erase_title}"/></ui:remove>
</td>
</tr>
@@ -193,14 +255,31 @@
<tr>
<th/>
<td class="portlet-section-buttonrow">
- <webui:commandButton action="refreshConsumer"
- backingBean="#{consumer}"
- id="refresh-cons-link"
- value="#{i18n.edit_consumer_refresh}"
- title="#{i18n.edit_consumer_refresh_title}"/>
-
- <webui:commandButton id="list-cons-link-two" action="listConsumers" backingBean="#{consumersMgr}"
- value="#{i18n.edit_consumer_cancel}"/>
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="refresh-cons-link" action="#{consumer.refreshConsumer}"
+ value="#{i18n.edit_consumer_refresh}"
+ title="#{i18n.edit_consumer_refresh_title}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="list-cons-link" action="#{consumersMgr.listConsumers}"
+ value="#{i18n.edit_consumer_cancel}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
</td>
</tr>
</table>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/confirmPropDeletion.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/confirmPropDeletion.xhtml 2010-02-12 08:01:39 UTC (rev 1656)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/confirmPropDeletion.xhtml 2010-02-12 09:01:49 UTC (rev 1657)
@@ -52,13 +52,37 @@
<p class="portlet-class">#{i18n.confirm_delete_reg_property_proceed}</p>
<h:form id="confirm-prop-del-form">
- <webui:commandButton id="confirm-delete" value="#{i18n.confirm_delete_reg_property_submit}"
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="confirm-delete" action="#{producer.deleteRegistrationProperty}"
+ value="#{i18n.confirm_delete_reg_property_submit}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="cancel-delete" action="#{producer.cancel}"
+ value="#{i18n.confirm_delete_reg_property_cancel}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <ui:remove><webui:commandButton id="confirm-delete" value="#{i18n.confirm_delete_reg_property_submit}"
action="deleteRegistrationProperty"
backingBean="#{producer}"/>
<webui:commandButton id="cancel-delete" value="#{i18n.confirm_delete_reg_property_cancel}"
backingBean="#{producer}"
- action="cancel"/>
+ action="cancel"/></ui:remove>
</h:form>
</div>
</div>
Modified: components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml
===================================================================
--- components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2010-02-12 08:01:39 UTC (rev 1656)
+++ components/wsrp/trunk/admin-gui/src/main/webapp/jsf/producer/producer.xhtml 2010-02-12 09:01:49 UTC (rev 1657)
@@ -1,6 +1,6 @@
<!--
~ JBoss, a division of Red Hat
- ~ Copyright 2009, Red Hat Middleware, LLC, and individual
+ ~ Copyright 2010, Red Hat Middleware, LLC, and individual
~ contributors as indicated by the @authors tag. See the
~ copyright.txt in the distribution for a full listing of
~ individual contributors.
@@ -59,16 +59,32 @@
</h:panelGroup>
<h:outputText value=" " rendered="#{producer.registrationRequired}"/>
- <f:subview rendered="#{producer.registrationRequired}">
+ <f:subview id="producer-registration" rendered="#{producer.registrationRequired}">
<webui:blueHeaderBar>
<div class="full-width float-left bold">
#{i18n.producer_config_reg_props}
<div class="add-prop-container">
<div class="add-prop-button">
- <webui:commandButton id="add-reg-prop" action="addRegistrationProperty"
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="add-reg-prop" action="#{producer.addRegistrationProperty}"
+ value="#{i18n.producer_config_add_reg_prop}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <ui:remove><webui:commandButton id="add-reg-prop" action="addRegistrationProperty"
backingBean="#{producer}"
- value="#{i18n.producer_config_add_reg_prop}"/></div>
+ value="#{i18n.producer_config_add_reg_prop}"/>
+ </ui:remove>
+ </div>
</div>
</div>
@@ -121,13 +137,37 @@
<h:outputText value=" "/>
<h:panelGroup styleClass="portlet-section-buttonrow">
- <webui:commandButton id="reg-save" action="save"
+ <table class="ActionContainer">
+ <tr>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="reg-save" action="#{producer.save}"
+ value="#{i18n.producer_config_save}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ <td>
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <h:commandLink id="reg-reload" action="#{producer.reloadConfiguration}"
+ value="#{i18n.producer_config_cancel}"/>
+ </div>
+ </div>
+ </div>
+ </td>
+ </tr>
+ </table>
+ <ui:remove><webui:commandButton id="reg-save" action="save"
backingBean="#{producer}"
value="#{i18n.producer_config_save}"/>
<webui:commandButton id="reg-reload" action="reloadConfiguration"
backingBean="#{producer}"
- value="#{i18n.producer_config_cancel}"/>
+ value="#{i18n.producer_config_cancel}"/></ui:remove>
</h:panelGroup>
</h:panelGrid>
14 years, 11 months
gatein SVN: r1656 - in portal/trunk: component/identity/src/main/java/org/exoplatform/services/organization/idm and 2 other directories.
by do-not-reply@jboss.org
Author: bdaw
Date: 2010-02-12 03:01:39 -0500 (Fri, 12 Feb 2010)
New Revision: 1656
Added:
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml
Modified:
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IDMUserListAccess.java
portal/trunk/pom.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/organization-configuration.xml
portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml
Log:
- PLIDM 1.1.0.Beta4
- Better mapping of IDM types
- First draft of active directory example config
Modified: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2010-02-12 06:15:20 UTC (rev 1655)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/GroupDAOImpl.java 2010-02-12 08:01:39 UTC (rev 1656)
@@ -355,7 +355,23 @@
{
if (!group.equals(root))
{
- exoGroups.add(convertGroup(group));
+ Group g = convertGroup(group);
+
+ // If membership of mapped types is forced then we need to exclude those that are not direct child
+ if (orgService.getConfiguration().isForceMembershipOfMappedTypes())
+ {
+ String id = g.getParentId();
+ if ((parent == null && id == null)
+ || (id != null && id.equals(parent.getId())))
+ {
+ exoGroups.add(g);
+ continue;
+ }
+ }
+ else
+ {
+ exoGroups.add(g);
+ }
}
}
@@ -560,14 +576,17 @@
log.info("Identity operation error: ", e);
}
- if (parents.size() > 1)
- {
- throw new IllegalStateException("Group has more than one parent: " + jbidGroup.getName());
- }
- if (parents.size() == 0)
+ if (parents.size() == 0 || parents.size() > 1)
{
+ if (parents.size() > 1)
+ {
+ log.info("PLIDM Group has more than one parent: " + jbidGroup.getName() + "; Will try to use parent path " +
+ "defined by type mappings or just place it under root /");
+ }
+
+
String id = orgService.getConfiguration().getParentId(jbidGroup.getGroupType());
if (id != null && orgService.getConfiguration().isForceMembershipOfMappedTypes())
Modified: portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IDMUserListAccess.java
===================================================================
--- portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IDMUserListAccess.java 2010-02-12 06:15:20 UTC (rev 1655)
+++ portal/trunk/component/identity/src/main/java/org/exoplatform/services/organization/idm/IDMUserListAccess.java 2010-02-12 08:01:39 UTC (rev 1656)
@@ -21,6 +21,7 @@
import org.exoplatform.commons.utils.ListAccess;
import org.exoplatform.services.organization.User;
+import org.picketlink.idm.api.SortOrder;
import org.picketlink.idm.api.query.UserQuery;
import org.picketlink.idm.api.query.UserQueryBuilder;
@@ -54,7 +55,7 @@
public User[] load(int index, int length) throws Exception, IllegalArgumentException
{
userQueryBuilder.page(index, length);
- UserQuery query = userQueryBuilder.createQuery();
+ UserQuery query = userQueryBuilder.sort(SortOrder.ASCENDING).createQuery();
List<org.picketlink.idm.api.User> users = idmService.getIdentitySession().list(query);
User[] exoUsers = new User[users.size()];
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2010-02-12 06:15:20 UTC (rev 1655)
+++ portal/trunk/pom.xml 2010-02-12 08:01:39 UTC (rev 1656)
@@ -47,7 +47,7 @@
<org.gatein.common.version>2.0.0-CR03</org.gatein.common.version>
<org.gatein.wci.version>2.0.0-CR02</org.gatein.wci.version>
<org.gatein.pc.version>2.1.0-CR02</org.gatein.pc.version>
- <org.picketlink.idm>1.1.0.Beta3</org.picketlink.idm>
+ <org.picketlink.idm>1.1.0.Beta4</org.picketlink.idm>
<org.gatein.wsrp.version>1.0.0-Beta06</org.gatein.wsrp.version>
<org.gatein.mop.version>1.0.0-Beta16</org.gatein.mop.version>
<org.slf4j.version>1.5.6</org.slf4j.version>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2010-02-12 06:15:20 UTC (rev 1655)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/idm-configuration.xml 2010-02-12 08:01:39 UTC (rev 1656)
@@ -60,6 +60,9 @@
<!--ACME LDAP Example-->
<!--<value>war:/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml</value>-->
+
+ <!--MSAD Read Only LDAP Example-->
+ <!--<value>war:/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml</value>-->
</value-param>
<value-param>
<name>portalRealm</name>
@@ -141,6 +144,14 @@
<value><string>acme_ou_type</string></value>
</entry>
-->
+
+ <!-- Uncomment for MSAD ReadOnly LDAP example -->
+ <!--
+ <entry>
+ <key><string>/acme/roles/*</string></key>
+ <value><string>msad_roles_type</string></value>
+ </entry>
+ -->
</map>
</field>
<!-- If this option is used then each Membership created with MembrshipType that is
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/organization-configuration.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/organization-configuration.xml 2010-02-12 06:15:20 UTC (rev 1655)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/organization-configuration.xml 2010-02-12 08:01:39 UTC (rev 1656)
@@ -35,7 +35,7 @@
<value-param>
<name>checkDatabaseAlgorithm</name>
<description>check database</description>
- <value>empty</value>
+ <value>entry</value>
</value-param>
<value-param>
<name>printInformation</name>
Modified: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml 2010-02-12 06:15:20 UTC (rev 1655)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml 2010-02-12 08:01:39 UTC (rev 1656)
@@ -230,15 +230,6 @@
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
</attribute>
- <attribute>
- <name>email</name>
- <mapping>mail</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- <isUnique>true</isUnique>
- </attribute>
</attributes>
<options>
<option>
@@ -306,15 +297,6 @@
<isMultivalued>false</isMultivalued>
<isReadOnly>false</isReadOnly>
</attribute>
- <attribute>
- <name>email</name>
- <mapping>mail</mapping>
- <type>text</type>
- <isRequired>false</isRequired>
- <isMultivalued>false</isMultivalued>
- <isReadOnly>false</isReadOnly>
- <isUnique>true</isUnique>
- </attribute>
</attributes>
<options>
<option>
Copied: portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml (from rev 1621, portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-ldap-acme-config.xml)
===================================================================
--- portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml (rev 0)
+++ portal/trunk/web/portal/src/main/webapp/WEB-INF/conf/organization/picketlink-idm/examples/picketlink-idm-msad-readonly-config.xml 2010-02-12 08:01:39 UTC (rev 1656)
@@ -0,0 +1,326 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+
+ Copyright (C) 2009 eXo Platform SAS.
+
+ This is free software; you can redistribute it and/or modify it
+ under the terms of the GNU Lesser General Public License as
+ published by the Free Software Foundation; either version 2.1 of
+ the License, or (at your option) any later version.
+
+ This software 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
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with this software; if not, write to the Free
+ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+
+-->
+
+<jboss-identity xmlns="urn:picketlink:idm:config:v1_0_0_ga"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="urn:picketlink:idm:config:v1_0_0_ga identity-config.xsd">
+ <realms>
+ <realm>
+ <id>realm</id>
+ <repository-id-ref>PortalRepository</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ <realm>
+ <id>realm_portal</id>
+ <repository-id-ref>PortalRepository</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ <realm>
+ <id>realm_sample-portal</id>
+ <repository-id-ref>SamplePortalRepository</repository-id-ref>
+ <identity-type-mappings>
+ <user-mapping>USER</user-mapping>
+ </identity-type-mappings>
+ </realm>
+ </realms>
+ <repositories>
+ <repository>
+ <id>PortalRepository</id>
+ <class>org.picketlink.idm.impl.repository.FallbackIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>HibernateStore</default-identity-store-id>
+ <default-attribute-store-id>HibernateStore</default-attribute-store-id>
+ <identity-store-mappings>
+ <identity-store-mapping>
+ <identity-store-id>PortalLDAPStore</identity-store-id>
+ <identity-object-types>
+ <identity-object-type>USER</identity-object-type>
+ <identity-object-type>msad_roles_type</identity-object-type>
+ </identity-object-types>
+ <options>
+ <option>
+ <name>readOnly</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store-mapping>
+ </identity-store-mappings>
+ <options>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ </options>
+ </repository>
+ <repository>
+ <id>SamplePortalRepository</id>
+ <class>org.picketlink.idm.impl.repository.WrapperIdentityStoreRepository</class>
+ <external-config/>
+ <default-identity-store-id>HibernateStore</default-identity-store-id>
+ <default-attribute-store-id>HibernateStore</default-attribute-store-id>
+ </repository>
+ </repositories>
+ <stores>
+ <attribute-stores/>
+ <identity-stores>
+ <identity-store>
+ <id>HibernateStore</id>
+ <class>org.picketlink.idm.impl.store.hibernate.HibernateIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+ <relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ <relationship-type>JBOSS_IDENTITY_ROLE</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>USER</name>
+ <relationships/>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes/>
+ <options/>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+ <name>hibernateSessionFactoryRegistryName</name>
+ <value>hibernateSessionFactory</value>
+ </option>
+ <option>
+ <name>populateRelationshipTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>populateIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedIdentityObjectTypes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowNotDefinedAttributes</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>isRealmAware</name>
+ <value>true</value>
+ </option>
+ </options>
+ </identity-store>
+ <identity-store>
+ <id>PortalLDAPStore</id>
+ <class>org.picketlink.idm.impl.store.ldap.LDAPIdentityStoreImpl</class>
+ <external-config/>
+ <supported-relationship-types>
+ <relationship-type>JBOSS_IDENTITY_MEMBERSHIP</relationship-type>
+ </supported-relationship-types>
+ <supported-identity-object-types>
+ <identity-object-type>
+ <name>USER</name>
+ <relationships/>
+ <credentials>
+ <credential-type>PASSWORD</credential-type>
+ </credentials>
+ <attributes>
+ <attribute>
+ <name>firstName</name>
+ <mapping>givenName</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ </attribute>
+ <attribute>
+ <name>lastName</name>
+ <mapping>sn</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ </attribute>
+ <attribute>
+ <name>email</name>
+ <mapping>mail</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ <isUnique>true</isUnique>
+ </attribute>
+ </attributes>
+ <options>
+ <option>
+ <name>idAttributeName</name>
+ <value>sAMAccountName</value>
+ </option>
+ <option>
+ <name>entrySearchFilter</name>
+ <value><![CDATA[(&(sAMAccountName={0})(objectClass=User))]]></value>
+ </option>
+ <option>
+ <name>passwordAttributeName</name>
+ <value>unicodePwd</value>
+ </option>
+ <option>
+ <name>enclosePasswordWith</name>
+ <value>"</value>
+ </option>
+ <option>
+ <name>passwordEncoding</name>
+ <value>UTF-16LE</value>
+ </option>
+ <option>
+ <name>ctxDNs</name>
+ <value>CN=Users,DC=test,DC=domain</value>
+ </option>
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>createEntryAttributeValues</name>
+ <value>objectClass=top</value>
+ <value>objectClass=inetOrgPerson</value>
+ <value>sn= </value>
+ <value>userAccountControl=514</value>
+ <!--<value>cn= </value>-->
+ </option>
+ <option>
+ <name>passwordUpdateAttributeValues</name>
+ <value>userAccountControl=512</value>
+ </option>
+ </options>
+ </identity-object-type>
+ <identity-object-type>
+ <name>msad_roles_type</name>
+ <relationships>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>USER</identity-object-type-ref>
+ </relationship>
+ <relationship>
+ <relationship-type-ref>JBOSS_IDENTITY_MEMBERSHIP</relationship-type-ref>
+ <identity-object-type-ref>msad_roles_type</identity-object-type-ref>
+ </relationship>
+ </relationships>
+ <credentials/>
+ <attributes>
+ <attribute>
+ <name>label</name>
+ <mapping>cn</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>true</isReadOnly>
+ </attribute>
+ <attribute>
+ <name>description</name>
+ <mapping>description</mapping>
+ <type>text</type>
+ <isRequired>false</isRequired>
+ <isMultivalued>false</isMultivalued>
+ <isReadOnly>false</isReadOnly>
+ </attribute>
+ </attributes>
+ <options>
+ <option>
+ <name>idAttributeName</name>
+ <value>cn</value>
+ </option>
+ <option>
+ <name>ctxDNs</name>
+ <value>CN=Users,DC=test,DC=domain</value>
+ </option>
+ <option>
+ <name>entrySearchFilter</name>
+ <value><![CDATA[(&(sAMAccountName={0})(objectClass=group))]]></value>
+ </option>
+ <option>
+ <name>allowCreateEntry</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>parentMembershipAttributeName</name>
+ <value>member</value>
+ </option>
+ <option>
+ <name>isParentMembershipAttributeDN</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>allowEmptyMemberships</name>
+ <value>true</value>
+ </option>
+ <option>
+ <name>createEntryAttributeValues</name>
+ <value>objectClass=top</value>
+ <value>objectClass=group</value>
+ <value>groupType=8</value>
+ </option>
+ </options>
+ </identity-object-type>
+ </supported-identity-object-types>
+ <options>
+ <option>
+ <name>providerURL</name>
+ <value>ldap://192.168.0.12:389</value>
+ </option>
+ <!--<option>-->
+ <!--<name>providerURL</name>-->
+ <!--<value>ldaps://msad-host:636</value>-->
+ <!--</option>-->
+ <option>
+ <name>adminDN</name>
+ <value>TEST\Administrator</value>
+ </option>
+ <option>
+ <name>adminPassword</name>
+ <value>!Q@W3e4r</value>
+ </option>
+ <option>
+ <name>authenticationMethod</name>
+ <value>simple</value>
+ </option>
+ <!--<option>-->
+ <!--<name>customSystemProperties</name>-->
+ <!--<value>javax.net.ssl.trustStore=/home/root/msad.truststore</value>-->
+ <!--<value>javax.net.ssl.trustStorePassword=password</value>-->
+ <!--</option>-->
+ <option>
+ <name>searchTimeLimit</name>
+ <value>10000</value>
+ </option>
+ <option>
+ <name>createMissingContexts</name>
+ <value>false</value>
+ </option>
+ </options>
+ </identity-store>
+ </identity-stores>
+ </stores>
+</jboss-identity>
\ No newline at end of file
14 years, 11 months
gatein SVN: r1655 - portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2010-02-12 01:15:20 -0500 (Fri, 12 Feb 2010)
New Revision: 1655
Modified:
portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
Log:
GTNPORTAL-509: Recorded SniffTests with Generator
* Improved Timeout message
Modified: portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-02-12 04:08:07 UTC (rev 1654)
+++ portal/trunk/testsuite/selenium-snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java 2010-02-12 06:15:20 UTC (rev 1655)
@@ -254,7 +254,7 @@
sb.append("\", selenium.getTitle());\n");
} else if (param1.equals("waitForElementNotPresent") || param1.equals("waitForTextNotPresent")) {
sb.append("for (int second = 0;; second++) {\n");
- sb.append("if (second >= 30) fail(\"timeout\");\n");
+ sb.append(getTimeoutMessage(param1));
sb.append("try {\nif (!selenium.isElementPresent(\"");
sb.append(param2);
sb.append("\"))\n break;\n }\n catch (Exception e) {}\n");
@@ -262,7 +262,7 @@
sb.append("}\n");
} else if (param1.equals("waitForElementPresent")) {
sb.append("for (int second = 0;; second++) {\n");
- sb.append("if (second >= 30) fail(\"timeout\");\n");
+ sb.append(getTimeoutMessage(param1));
sb.append("try {\n if (selenium.isElementPresent(\"");
sb.append(param2);
sb.append("\")) \nbreak; }\n catch (Exception e) {}\n");
@@ -270,7 +270,7 @@
sb.append("}\n");
} else if (param1.equals("waitForTextPresent")) {
sb.append("for (int second = 0;; second++) {\n");
- sb.append("if (second >= 30) fail(\"timeout\");\n");
+ sb.append(getTimeoutMessage(param1));
sb.append("try {\n if (selenium.isTextPresent(\"");
sb.append(param2);
sb.append("\")) \nbreak; }\n catch (Exception e) {}\n");
@@ -278,7 +278,7 @@
sb.append("}\n");
} else if (param1.equals("waitForTable")) {
sb.append("for (int second = 0;; second++) {\n");
- sb.append("if (second >= 30) fail(\"timeout\");\n");
+ sb.append(getTimeoutMessage(param1));
sb.append("try {\n");
sb.append("if (StringPool.BLANK.equals(selenium.getTable(\"");
sb.append(param2);
@@ -305,7 +305,7 @@
sb.append("\");\n");
} else if (param1.equals("waitForConfirmation")) {
sb.append("for (int second = 0;; second++) {\n");
- sb.append("if (second >= 30) fail(\"timeout\");\n");
+ sb.append(getTimeoutMessage(param1));
sb.append("try {\n");
sb.append("if (selenium.getConfirmation().equals(\"");
sb.append(param2);
@@ -365,7 +365,7 @@
sb.append("selenium.deleteCookie(\"").append(param2).append("\",\"").append(param3).append("\");\n");
} else if (param1.equals("waitForText")) {
sb.append("for (int second = 0;; second++) {\n");
- sb.append("if (second >= 30) fail(\"timeout\");\n");
+ sb.append(getTimeoutMessage(param1));
sb.append("try {\nif (selenium.isElementPresent(\"");
sb.append(param2);
sb.append("\"))\n break;\n }\n catch (Exception e) {}\n");
@@ -400,6 +400,10 @@
sb.append("}\n\n");
}
+ private String getTimeoutMessage(String param1) {
+ return "if (second >= 30) fail(\"" +param1+" reached a timeout.\");\n";
+ }
+
public static void writeFile(String file, String content) throws IOException {
System.out.println("[INFO] Writing file : " + file);
FileUtils.writeStringToFile(new File(file), content);
14 years, 11 months
gatein SVN: r1654 - portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace.
by do-not-reply@jboss.org
Author: mwringe
Date: 2010-02-11 23:08:07 -0500 (Thu, 11 Feb 2010)
New Revision: 1654
Modified:
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl
portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplicationChildren.gtmpl
Log:
Move the javascript to the UIPortalApplicationChildren since it needs to be at the end of the page for the javascript to work properly.
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl 2010-02-12 03:35:04 UTC (rev 1653)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplication.gtmpl 2010-02-12 04:08:07 UTC (rev 1654)
@@ -106,12 +106,6 @@
rcontext.getJavascriptManager().addOnLoadJavascript('eXo.core.DOMUtil.hideElements');
//rcontext.getJavascriptManager().addOnResizeJavascript('eXo.core.UIMaskLayer.resizeMaskLayer');
%>
- <script type="text/javascript">
- <%=rcontext.getJavascriptManager().getJavascript()%>
- eXo.core.Browser.onLoad();
- <%=rcontext.getJavascriptManager().getCustomizedOnLoadScript();%>
- <%if(canKeepState && uicomponent.isSessionOpen) {%> eXo.session.itvInit() ;<%}%>
- </script>
<div class="$uicomponent.skin" id="UIPortalApplication" style="!height: 100%;">
Modified: portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplicationChildren.gtmpl
===================================================================
--- portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplicationChildren.gtmpl 2010-02-12 03:35:04 UTC (rev 1653)
+++ portal/trunk/web/portal/src/main/webapp/groovy/portal/webui/workspace/UIPortalApplicationChildren.gtmpl 2010-02-12 04:08:07 UTC (rev 1654)
@@ -1,4 +1,34 @@
+<%
+ import org.exoplatform.portal.application.PortalRequestContext ;
+ import org.exoplatform.webui.core.UIComponent;
+ import java.util.Iterator;
+ import org.exoplatform.portal.webui.portal.UIPortal ;
+ import org.exoplatform.portal.config.model.PortalProperties ;
+
+ def rcontext = _ctx.getRequestContext() ;
+ String docBase = rcontext.getRequestContextPath() ;
+ String skin = uicomponent.getSkin();
+ def portalSkins = uicomponent.getPortalSkins() ;
+ def portletSkins = uicomponent.getPortletSkins() ;
+ def scriptsPaths = uicomponent.getJavascriptURLs();
+ def lang = uicomponent.getLocale().getLanguage();
+ def title = rcontext.getTitle();
+ def metaInformation = rcontext.getMetaInformation();
+%>
+
+ <%
+ UIPortal portal = uicomponent.findFirstComponentOfType(UIPortal.class);
+ String sessionAliveLevel = (portal == null ? null : portal.sessionAlive) ;
+ boolean canKeepState = sessionAliveLevel == null ? false : !sessionAliveLevel.equals(PortalProperties.SESSION_NEVER) ;
+ %>
+
<%uicomponent.renderChildren();%>
</div>
+ <script type="text/javascript">
+ <%=rcontext.getJavascriptManager().getJavascript()%>
+ eXo.core.Browser.onLoad();
+ <%=rcontext.getJavascriptManager().getCustomizedOnLoadScript();%>
+ <%if(canKeepState && uicomponent.isSessionOpen) {%> eXo.session.itvInit() ;<%}%>
+ </script>
</body>
</html>
14 years, 11 months
gatein SVN: r1653 - portal/trunk/testsuite/selenium-snifftests/src/eclipse.
by do-not-reply@jboss.org
Author: dbaeli
Date: 2010-02-11 22:35:04 -0500 (Thu, 11 Feb 2010)
New Revision: 1653
Added:
portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-GenerateSniffTests.launch
portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-StartSeleniumServer.launch
Removed:
portal/trunk/testsuite/selenium-snifftests/src/eclipse/generate Tests.launch
portal/trunk/testsuite/selenium-snifftests/src/eclipse/start Selenium Server.launch
Log:
GTNPORTAL-509: Recorded SniffTests with Generator
* Clearer names for eclipse launch commands
Added: portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-GenerateSniffTests.launch
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-GenerateSniffTests.launch (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-GenerateSniffTests.launch 2010-02-12 03:35:04 UTC (rev 1653)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/exo.portal.selenium.snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="1"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.CONSIDER_INHERITED_MAIN" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.exoplatform.portal.selenium.SeleniumTestCaseGenerator"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/suite target/generated/test"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="exo.portal.selenium.snifftests"/>
+</launchConfiguration>
Property changes on: portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-GenerateSniffTests.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Added: portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-StartSeleniumServer.launch
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-StartSeleniumServer.launch (rev 0)
+++ portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-StartSeleniumServer.launch 2010-02-12 03:35:04 UTC (rev 1653)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
+<listEntry value="/exo.portal.selenium.snifftests"/>
+</listAttribute>
+<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
+<listEntry value="4"/>
+</listAttribute>
+<booleanAttribute key="org.eclipse.jdt.debug.ui.CONSIDER_INHERITED_MAIN" value="true"/>
+<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.openqa.selenium.server.SeleniumServer"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-userExtensions ${project_loc}/src/suite/user-extensions.js"/>
+<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="exo.portal.selenium.snifftests"/>
+</launchConfiguration>
Property changes on: portal/trunk/testsuite/selenium-snifftests/src/eclipse/gatein-selenium-StartSeleniumServer.launch
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted: portal/trunk/testsuite/selenium-snifftests/src/eclipse/generate Tests.launch
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/eclipse/generate Tests.launch 2010-02-12 03:22:00 UTC (rev 1652)
+++ portal/trunk/testsuite/selenium-snifftests/src/eclipse/generate Tests.launch 2010-02-12 03:35:04 UTC (rev 1653)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/exo.portal.selenium.snifftests/src/main/java/org/exoplatform/portal/selenium/SeleniumTestCaseGenerator.java"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="1"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.CONSIDER_INHERITED_MAIN" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.exoplatform.portal.selenium.SeleniumTestCaseGenerator"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="src/suite target/generated/test"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="exo.portal.selenium.snifftests"/>
-</launchConfiguration>
Deleted: portal/trunk/testsuite/selenium-snifftests/src/eclipse/start Selenium Server.launch
===================================================================
--- portal/trunk/testsuite/selenium-snifftests/src/eclipse/start Selenium Server.launch 2010-02-12 03:22:00 UTC (rev 1652)
+++ portal/trunk/testsuite/selenium-snifftests/src/eclipse/start Selenium Server.launch 2010-02-12 03:35:04 UTC (rev 1653)
@@ -1,13 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<launchConfiguration type="org.eclipse.jdt.launching.localJavaApplication">
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_PATHS">
-<listEntry value="/exo.portal.selenium.snifftests"/>
-</listAttribute>
-<listAttribute key="org.eclipse.debug.core.MAPPED_RESOURCE_TYPES">
-<listEntry value="4"/>
-</listAttribute>
-<booleanAttribute key="org.eclipse.jdt.debug.ui.CONSIDER_INHERITED_MAIN" value="true"/>
-<stringAttribute key="org.eclipse.jdt.launching.MAIN_TYPE" value="org.openqa.selenium.server.SeleniumServer"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROGRAM_ARGUMENTS" value="-userExtensions ${project_loc}/src/suite/user-extensions.js"/>
-<stringAttribute key="org.eclipse.jdt.launching.PROJECT_ATTR" value="exo.portal.selenium.snifftests"/>
-</launchConfiguration>
14 years, 11 months