gatein SVN: r7384 - in epp/portal/branches/EPP_5_2_Branch/wsrp-integration: extension-component/src/main/java/org/gatein/integration/wsrp/jcr and 3 other directories.
by do-not-reply@jboss.org
Author: theute
Date: 2011-09-13 11:10:00 -0400 (Tue, 13 Sep 2011)
New Revision: 7384
Removed:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/consumers-configuration-nodetypes.xml
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/migration-nodetypes.xml
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-configuration-nodetypes.xml
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-pc-nodetypes.xml
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-registrations-nodetypes.xml
Modified:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/jcr/JCRPersister.java
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/JBoss5WSSServiceIntegration.java
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/test/java/org/gatein/integration/wsrp/structure/MOPConsumerStructureProviderTestCase.java
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml
Log:
- Adapted JCRPersister to changes in WSRP
- GTNWSRP-196: moved nodetype configuration files to WSRP module
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6323,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
Modified: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/jcr/JCRPersister.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/jcr/JCRPersister.java 2011-09-13 14:49:59 UTC (rev 7383)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/jcr/JCRPersister.java 2011-09-13 15:10:00 UTC (rev 7384)
@@ -31,11 +31,12 @@
import org.chromattic.spi.jcr.SessionLifeCycle;
import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.component.ComponentRequestLifecycle;
import org.exoplatform.services.jcr.RepositoryService;
import org.exoplatform.services.jcr.core.ManageableRepository;
import org.exoplatform.services.jcr.ext.common.SessionProvider;
import org.gatein.common.util.ParameterValidation;
-import org.gatein.wsrp.jcr.ChromatticPersister;
+import org.gatein.wsrp.jcr.BaseChromatticPersister;
import org.gatein.wsrp.jcr.mapping.BaseMapping;
import javax.jcr.Credentials;
@@ -51,26 +52,16 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
*/
-public class JCRPersister implements ChromatticPersister
+public class JCRPersister extends BaseChromatticPersister
{
- private Chromattic chrome;
- public static final String WSRP_WORKSPACE_NAME = "wsrp-system";
- public static final String PORTLET_STATES_WORKSPACE_NAME = "pc-system";
- private static final String REPOSITORY_NAME = "repository";
- private String workspaceName;
- private Map<Class, Class<? extends BaseMapping>> modelToMapping;
-
- private ThreadLocal<ChromatticSession> sessionHolder = new ThreadLocal<ChromatticSession>();
-
public JCRPersister(ExoContainer container, String workspaceName)
{
- this.workspaceName = workspaceName;
+ super(workspaceName);
}
- public void initializeBuilderFor(List<Class> mappingClasses) throws Exception
+ @Override
+ protected void setBuilderOptions(ChromatticBuilder builder)
{
- ChromatticBuilder builder = ChromatticBuilder.create();
- builder.setOptionValue(ChromatticBuilder.INSTRUMENTOR_CLASSNAME, "org.chromattic.apt.InstrumentorImpl");
if (PORTLET_STATES_WORKSPACE_NAME.equals(workspaceName))
{
builder.setOptionValue(ChromatticBuilder.SESSION_LIFECYCLE_CLASSNAME, PortletStatesSessionLifeCycle.class.getName());
@@ -83,95 +74,8 @@
{
throw new IllegalArgumentException("Unknown workspace name: '" + workspaceName + "'");
}
-
- modelToMapping = new HashMap<Class, Class<? extends BaseMapping>>(mappingClasses.size());
- for (Class mappingClass : mappingClasses)
- {
- if (BaseMapping.class.isAssignableFrom(mappingClass))
- {
- Type[] interfaces = mappingClass.getGenericInterfaces();
- if (ParameterValidation.existsAndIsNotEmpty(interfaces))
- {
- Class type = (Class)((ParameterizedType)interfaces[0]).getActualTypeArguments()[0];
- modelToMapping.put(type, mappingClass);
- }
- }
- builder.add(mappingClass);
- }
-
- chrome = builder.build();
}
- public ChromatticSession getSession()
- {
- ChromatticSession chromatticSession = sessionHolder.get();
- if (chromatticSession == null)
- {
- ChromatticSession session = chrome.openSession();
- sessionHolder.set(session);
- return session;
- }
- else
- {
- return chromatticSession;
- }
- }
-
- public void closeSession(boolean save)
- {
- ChromatticSession session = getOpenedSessionOrFail();
- if (save)
- {
- synchronized (this)
- {
- session.save();
- }
- }
- session.close();
- sessionHolder.set(null);
- }
-
- private ChromatticSession getOpenedSessionOrFail()
- {
- ChromatticSession session = sessionHolder.get();
- if (session == null)
- {
- throw new IllegalStateException("Cannot close the session as it hasn't been opened first!");
- }
- return session;
- }
-
- public synchronized void save()
- {
- getOpenedSessionOrFail().save();
- }
-
- public <T> boolean delete(T toDelete, org.gatein.wsrp.jcr.StoresByPathManager<T> manager)
- {
- Class<? extends Object> modelClass = toDelete.getClass();
- Class<? extends BaseMapping> baseMappingClass = modelToMapping.get(modelClass);
- if (baseMappingClass == null)
- {
- throw new IllegalArgumentException("Cannot find a mapping class for " + modelClass.getName());
- }
-
- ChromatticSession session = getSession();
-
- Object old = session.findByPath(baseMappingClass, manager.getChildPath(toDelete));
-
- if (old != null)
- {
- session.remove(old);
- closeSession(true);
- return true;
- }
- else
- {
- closeSession(false);
- return false;
- }
- }
-
public static class WSRPSessionLifeCycle implements SessionLifeCycle
{
private ManageableRepository repository;
Modified: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/JBoss5WSSServiceIntegration.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/JBoss5WSSServiceIntegration.java 2011-09-13 14:49:59 UTC (rev 7383)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/wss/JBoss5WSSServiceIntegration.java 2011-09-13 15:10:00 UTC (rev 7384)
@@ -24,8 +24,8 @@
import org.gatein.wsrp.wss.WebServiceSecurityFactory;
import org.picocontainer.Startable;
+import org.wsrp.wss.jboss5.handlers.consumer.JBWSSecurityHandlerWrapper;
import org.wsrp.wss.jboss5.handlers.consumer.WSSecurityCredentialHandler;
-import org.wsrp.wss.jboss5.handlers.consumer.JBWSSecurityHandlerWrapper;
/**
* @author <a href="mailto:mwringe@redhat.com">Matt Wringe</a>
Modified: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/test/java/org/gatein/integration/wsrp/structure/MOPConsumerStructureProviderTestCase.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/test/java/org/gatein/integration/wsrp/structure/MOPConsumerStructureProviderTestCase.java 2011-09-13 14:49:59 UTC (rev 7383)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/test/java/org/gatein/integration/wsrp/structure/MOPConsumerStructureProviderTestCase.java 2011-09-13 15:10:00 UTC (rev 7384)
@@ -47,8 +47,7 @@
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
*/
-public class
- MOPConsumerStructureProviderTestCase extends TestCase
+public class MOPConsumerStructureProviderTestCase extends TestCase
{
private MOPConsumerStructureProvider provider;
private PortalStructureAccess structureAccess;
Deleted: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/consumers-configuration-nodetypes.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/consumers-configuration-nodetypes.xml 2011-09-13 14:49:59 UTC (rev 7383)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/consumers-configuration-nodetypes.xml 2011-09-13 15:10:00 UTC (rev 7384)
@@ -1,191 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
- ~ JBoss, a division of Red Hat
- ~ Copyright 2011, 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.
- -->
-
-<nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
- xmlns:jcr="http://www.jcp.org/jcr/1.0">
-
- <nodeType name="wsrp:producerinfos" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:producerinfo" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:producerinfo</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:producerinfo" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="producerid" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="cache" requiredType="Integer" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="active" requiredType="boolean" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="endpoint" defaultPrimaryType="wsrp:endpointinfo" autoCreated="true"
- mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:endpointinfo</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- <childNodeDefinition name="registration" defaultPrimaryType="wsrp:registrationinfo" autoCreated="true"
- mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:registrationinfo</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:endpointinfo" isMixin="false" hasOrderableChildNodes="false" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="wsdlurl" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="timeout" requiredType="Integer" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="enablewss" requiredType="boolean" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:registrationinfo" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="consumername" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="handle" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="state" requiredType="Binary" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:registrationproperty" autoCreated="false"
- mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:registrationproperty</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:registrationproperty" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="name" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="value" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="status" requiredType="Integer" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="description" defaultPrimaryType="" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:registrationpropertydescription</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:registrationpropertydescription" isMixin="false" hasOrderableChildNodes="true"
- primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="name" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="type" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="description" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="hint" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="label" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- </nodeType>
-
-</nodeTypes>
Deleted: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/migration-nodetypes.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/migration-nodetypes.xml 2011-09-13 14:49:59 UTC (rev 7383)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/migration-nodetypes.xml 2011-09-13 15:10:00 UTC (rev 7384)
@@ -1,114 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
- ~ JBoss, a division of Red Hat
- ~ Copyright 2011, 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.
- -->
-
-<nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
- xmlns:jcr="http://www.jcp.org/jcr/1.0">
-
- <nodeType name="wsrp:exportinfos" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:exportinfo" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:exportinfo</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:exportinfo" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="exporttime" requiredType="Long" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="expirationtime" requiredType="Long" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="exportcontext" requiredType="Binary" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:exportedstate" autoCreated="false"
- mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:exportedstate</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:exporterror" autoCreated="false"
- mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:exporterror</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:exportedstate" isMixin="false" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="handle" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="state" requiredType="Binary" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:exporterror" isMixin="false" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="errorcode" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="handles" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- </nodeType>
-</nodeTypes>
Deleted: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-configuration-nodetypes.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-configuration-nodetypes.xml 2011-09-13 14:49:59 UTC (rev 7383)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-configuration-nodetypes.xml 2011-09-13 15:10:00 UTC (rev 7384)
@@ -1,141 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
- ~ JBoss, a division of Red Hat
- ~ Copyright 2011, 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.
- -->
-
-<nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
- xmlns:jcr="http://www.jcp.org/jcr/1.0">
-
- <nodeType name="wsrp:producerconfiguration" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="strictmode" requiredType="boolean" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="registrationrequirements" defaultPrimaryType="wsrp:registrationrequirements"
- autoCreated="true" mandatory="false" onParentVersion="COPY" protected="false"
- sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:registrationrequirements</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:registrationrequirements" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="registrationrequired" requiredType="boolean" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="registrationrequiredforfulldescription" requiredType="boolean" autoCreated="false"
- mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="policyclassname" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="validatorclassname" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:registrationpropertydescription" autoCreated="false"
- mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:registrationpropertydescription</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:registrationproperty" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="value" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="status" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="description" defaultPrimaryType="" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:registrationpropertydescription</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:registrationpropertydescription" isMixin="false" hasOrderableChildNodes="true"
- primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="name" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="type" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="description" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="hint" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="label" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- </nodeType>
-
-</nodeTypes>
Deleted: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-pc-nodetypes.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-pc-nodetypes.xml 2011-09-13 14:49:59 UTC (rev 7383)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-pc-nodetypes.xml 2011-09-13 15:10:00 UTC (rev 7384)
@@ -1,86 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- ~ JBoss, a division of Red Hat
- ~ Copyright 2011, 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.
- -->
-
-<nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
- xmlns:jcr="http://www.jcp.org/jcr/1.0">
- <nodeType name="pc:producerstates" isMixin="false" hasOrderableChildNodes="false">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions/>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>pc:statecontext</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="pc:statecontext" isMixin="false" hasOrderableChildNodes="false">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="id" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="state" defaultPrimaryType="pc:state" autoCreated="true" mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>pc:state</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="pc:state" isMixin="false" hasOrderableChildNodes="false">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="pc:portletid" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="pc:terminationtime" requiredType="Date" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="*" requiredType="undefined" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions/>
- </nodeType>
-
-</nodeTypes>
Deleted: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-registrations-nodetypes.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-registrations-nodetypes.xml 2011-09-13 14:49:59 UTC (rev 7383)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/producer-registrations-nodetypes.xml 2011-09-13 15:10:00 UTC (rev 7384)
@@ -1,198 +0,0 @@
-<?xml version="1.0" encoding="ISO-8859-1"?>
-
-<!--
- ~ JBoss, a division of Red Hat
- ~ Copyright 2011, 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.
- -->
-
-<nodeTypes xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0"
- xmlns:jcr="http://www.jcp.org/jcr/1.0">
-
- <nodeType name="wsrp:consumersandgroups" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:consumer"
- autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
- sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:consumer</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:consumergroup"
- autoCreated="false" mandatory="false" onParentVersion="COPY" protected="false"
- sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:consumergroup</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:consumer" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="name" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="id" requiredType="String" autoCreated="false"
- mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="consumeragent" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="status" requiredType="String"
- autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="group" requiredType="Path" autoCreated="false" mandatory="false"
- onParentVersion="COPY"
- protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:registration" autoCreated="false"
- mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:registration</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- <childNodeDefinition name="capabilities" defaultPrimaryType="wsrp:consumercapabilities" autoCreated="true"
- mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:consumercapabilities</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:registration" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="status" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="registrationhandle" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="portlethandles" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="true">
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="properties" defaultPrimaryType="wsrp:registrationproperties" autoCreated="false"
- mandatory="false" onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:registrationproperties</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:registrationproperties" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <!-- residual properties so that we can store an arbritrary number of registration properties -->
- <propertyDefinitions>
- <propertyDefinition name="*" requiredType="undefined" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:consumergroup" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="name" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="status" requiredType="String"
- autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- <childNodeDefinitions>
- <childNodeDefinition name="*" defaultPrimaryType="wsrp:consumer" autoCreated="false"
- mandatory="false"
- onParentVersion="COPY" protected="false" sameNameSiblings="false">
- <requiredPrimaryTypes>
- <requiredPrimaryType>wsrp:consumer</requiredPrimaryType>
- </requiredPrimaryTypes>
- </childNodeDefinition>
- </childNodeDefinitions>
- </nodeType>
-
- <nodeType name="wsrp:consumercapabilities" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
- <supertypes>
- <supertype>nt:base</supertype>
- <supertype>mix:referenceable</supertype>
- </supertypes>
- <propertyDefinitions>
- <propertyDefinition name="modes" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="true">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="windowstates" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="true">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="userscopes" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="true">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="userprofiledata" requiredType="String" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="true">
- <valueConstraints/>
- </propertyDefinition>
- <propertyDefinition name="supportsgetmethod" requiredType="boolean" autoCreated="false" mandatory="false"
- onParentVersion="COPY" protected="false" multiple="false">
- <valueConstraints/>
- </propertyDefinition>
- </propertyDefinitions>
- </nodeType>
-
-</nodeTypes>
Modified: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml 2011-09-13 14:49:59 UTC (rev 7383)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml 2011-09-13 15:10:00 UTC (rev 7384)
@@ -66,11 +66,11 @@
<values-param>
<name>autoCreatedInNewRepository</name>
<description>Node types configuration file</description>
- <value>war:/conf/wsrp/consumers-configuration-nodetypes.xml</value>
- <value>war:/conf/wsrp/producer-configuration-nodetypes.xml</value>
- <value>war:/conf/wsrp/producer-registrations-nodetypes.xml</value>
- <value>war:/conf/wsrp/producer-pc-nodetypes.xml</value>
- <value>war:/conf/wsrp/migration-nodetypes.xml</value>
+ <value>jar:/conf/nodetypes/consumers-configuration-nodetypes.xml</value>
+ <value>jar:/conf/nodetypes/producer-configuration-nodetypes.xml</value>
+ <value>jar:/conf/nodetypes/producer-registrations-nodetypes.xml</value>
+ <value>jar:/conf/nodetypes/producer-pc-nodetypes.xml</value>
+ <value>jar:/conf/nodetypes/migration-nodetypes.xml</value>
</values-param>
</init-params>
</component-plugin>
@@ -186,41 +186,4 @@
</component-plugin>
</external-component-plugins>
-
- <!--<external-component-plugins>
- <target-component>org.exoplatform.commons.chromattic.ChromatticManager</target-component>
- <component-plugin>
- <name>chromattic</name>
- <set-method>addLifeCycle</set-method>
- <type>org.exoplatform.commons.chromattic.ChromatticLifeCycle</type>
- <init-params>
- <value-param>
- <name>domain-name</name>
- <value>wsrp</value>
- </value-param>
- <value-param>
- <name>workspace-name</name>
- <value>wsrp-system</value>
- </value-param>
- <values-param>
- <name>entities</name>
- <value>org.gatein.integration.wsrp.state.mapping.RegistrationPropertyDescriptionMapping</value>
- <value>org.gatein.integration.wsrp.state.consumer.mapping.ProducerInfoMapping</value>
- <value>org.gatein.integration.wsrp.state.consumer.mapping.ProducerInfosMapping</value>
- <value>org.gatein.integration.wsrp.state.consumer.mapping.RegistrationInfoMapping</value>
- <value>org.gatein.integration.wsrp.state.consumer.mapping.RegistrationPropertyMapping</value>
- <value>org.gatein.integration.wsrp.state.consumer.mapping.EndpointInfoMapping</value>
- <value>org.gatein.integration.wsrp.state.producer.configuration.mapping.ProducerConfigurationMapping</value>
- <value>org.gatein.integration.wsrp.state.producer.configuration.mapping.RegistrationRequirementsMapping</value>
- <value>org.gatein.integration.wsrp.state.producer.registrations.mapping.ConsumerCapabilitiesMapping</value>
- <value>org.gatein.integration.wsrp.state.producer.registrations.mapping.ConsumerGroupMapping</value>
- <value>org.gatein.integration.wsrp.state.producer.registrations.mapping.ConsumerMapping</value>
- <value>org.gatein.integration.wsrp.state.producer.registrations.mapping.ConsumersAndGroupsMapping</value>
- <value>org.gatein.integration.wsrp.state.producer.registrations.mapping.RegistrationMapping</value>
- <value>org.gatein.integration.wsrp.state.producer.registrations.mapping.RegistrationPropertiesMapping</value>
- </values-param>
- </init-params>
- </component-plugin>
- </external-component-plugins>-->
-
</configuration>
13 years, 3 months
gatein SVN: r7383 - epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure.
by do-not-reply@jboss.org
Author: theute
Date: 2011-09-13 10:49:59 -0400 (Tue, 13 Sep 2011)
New Revision: 7383
Modified:
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java
Log:
JBEPP-899: Save session instead of closing it
Modified: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java 2011-09-13 13:55:51 UTC (rev 7382)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-component/src/main/java/org/gatein/integration/wsrp/structure/MOPPortalStructureAccess.java 2011-09-13 14:49:59 UTC (rev 7383)
@@ -91,7 +91,7 @@
session.scheduleForEviction(new PageKey("portal", page.getSite().getName(), page.getName()));
// save
- session.close(true);
+ session.save();
}
public Page getPageFrom(org.exoplatform.portal.config.model.Page portalPage)
13 years, 3 months
gatein SVN: r7382 - in components/wsrp/branches/clustering/admin-gui/src: main/webapp/WEB-INF and 1 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-13 09:55:51 -0400 (Tue, 13 Sep 2011)
New Revision: 7382
Modified:
components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/BeanContext.java
components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java
components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ManagedBean.java
components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
components/wsrp/branches/clustering/admin-gui/src/test/java/org/gatein/wsrp/admin/ui/BeanContextTestCase.java
components/wsrp/branches/clustering/admin-gui/src/test/java/org/gatein/wsrp/admin/ui/ConsumerBeanTestCase.java
Log:
- More progress on clustering the admin UI:
+ Marked objects as Serializable where needed.
+ Added to retrieve transient beans when they haven't been set as this isn't done by PortletBridge if the beans are not replicated (which is quite annoying).
+ Removed ConsumerRegistry property on ConsumerBean by retrieving it from ConsumerManagerBean instance.
+ Added ability to resolve beans from name on BeanContext.
+ Still need to work on Producer configuration.
Modified: components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/BeanContext.java
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/BeanContext.java 2011-09-13 11:54:01 UTC (rev 7381)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/BeanContext.java 2011-09-13 13:55:51 UTC (rev 7382)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, 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.
@@ -27,6 +27,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.Serializable;
import java.text.MessageFormat;
import java.util.Locale;
import java.util.Map;
@@ -38,7 +39,7 @@
* @version $Revision: 13374 $
* @since 2.6
*/
-public abstract class BeanContext
+public abstract class BeanContext implements Serializable
{
protected final static Logger log = LoggerFactory.getLogger(BeanContext.class);
@@ -192,7 +193,8 @@
/**
* Removes the object identified by the specified name(s) from the session. For a JSF backed implementation, this
- * will allow for the object/bean (defined as session-scoped in <code>faces-config.xml</code>) to be recreated by JSF
+ * will allow for the object/bean (defined as session-scoped in <code>faces-config.xml</code>) to be recreated by
+ * JSF
* when needed.
*
* @param name name of the object to be removed
@@ -257,7 +259,8 @@
* @param expectedClass expected class of the object
* @param <T> type of the object to be retrieved
* @return the session object associated with the specified name
- * @throws IllegalArgumentException if the value associated with the specified name is not <code>null</code> and does
+ * @throws IllegalArgumentException if the value associated with the specified name is not <code>null</code> and
+ * does
* not match the specified expected class
*/
public <T> T getFromSession(String name, Class<T> expectedClass)
@@ -275,12 +278,18 @@
* at runtime
* @param <T> the type of the object to be retrieved
* @return the value associated with the specified name
- * @throws IllegalArgumentException if the value associated with the specified name is not <code>null</code> and does
+ * @throws IllegalArgumentException if the value associated with the specified name is not <code>null</code> and
+ * does
* not match the specified expected class
*/
private <T> T getFromSession(String name, Class<T> expectedClass, Map<String, Object> sessionMap, String errorMessage)
{
Object result = sessionMap.get(name);
+ return checkObject(result, expectedClass, errorMessage);
+ }
+
+ protected <T> T checkObject(Object result, Class<T> expectedClass, String errorMessage)
+ {
if (result != null && !expectedClass.isAssignableFrom(result.getClass()))
{
throw new IllegalArgumentException(errorMessage.replace(CURRENT_PLACEHOLDER, result.toString()));
@@ -288,4 +297,6 @@
return expectedClass.cast(result);
}
+
+ public abstract <T> T findBean(String name, Class<T> type);
}
Modified: components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2011-09-13 11:54:01 UTC (rev 7381)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2011-09-13 13:55:51 UTC (rev 7382)
@@ -47,6 +47,7 @@
import javax.faces.model.ListDataModel;
import javax.faces.model.SelectItem;
import javax.xml.namespace.QName;
+import java.io.Serializable;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.ArrayList;
@@ -63,11 +64,10 @@
* @version $Revision: 12865 $
* @since 2.6
*/
-public class ConsumerBean extends ManagedBean
+public class ConsumerBean extends ManagedBean implements Serializable
{
public static final SelectablePortletToHandleFunction SELECTABLE_TO_HANDLE = new SelectablePortletToHandleFunction();
private transient WSRPConsumer consumer;
- private transient ConsumerRegistry registry;
private transient ConsumerManagerBean manager;
private boolean modified;
private String wsdl;
@@ -92,11 +92,6 @@
private DataModel existingExports;
private ExportInfoDisplay currentExport;
- public void setRegistry(ConsumerRegistry registry)
- {
- this.registry = registry;
- }
-
public void setManager(ConsumerManagerBean manager)
{
this.manager = manager;
@@ -155,7 +150,7 @@
// if we don't have an id, try to get it from the ConsumerManagerBean
if (id == null)
{
- id = manager.getSelectedId();
+ id = getManager().getSelectedId();
}
// if it's still null, output an error
@@ -406,7 +401,7 @@
// if the registration is locally modified, bypass the refresh as it will not yield a proper result
if (!isRegistrationLocallyModified())
{
- manager.refresh(consumer);
+ getManager().refresh(consumer);
}
else
{
@@ -533,7 +528,7 @@
public ConsumerRegistry getRegistry()
{
- return registry;
+ return getManager().getRegistry();
}
public DataModel getPortlets()
@@ -778,6 +773,15 @@
this.consumer = consumer;
}
+ public ConsumerManagerBean getManager()
+ {
+ if (manager == null)
+ {
+ manager = beanContext.getFromSession("consumersMgr", ConsumerManagerBean.class);
+ }
+ return manager;
+ }
+
public static class SelectablePortletHandle implements Comparable<SelectablePortletHandle>
{
private String handle;
@@ -979,12 +983,12 @@
public static class FailedPortletsDisplay
{
private QName errorCode;
- private List<String> faiedPortlets;
+ private List<String> faliedPortlets;
public FailedPortletsDisplay(QName errorCode, List<String> failedPortlets)
{
this.errorCode = errorCode;
- this.faiedPortlets = failedPortlets;
+ this.faliedPortlets = failedPortlets;
}
public QName getErrorCode()
@@ -994,7 +998,7 @@
public List<String> getFailedPortlets()
{
- return faiedPortlets;
+ return faliedPortlets;
}
}
Modified: components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2011-09-13 11:54:01 UTC (rev 7381)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2011-09-13 13:55:51 UTC (rev 7382)
@@ -68,6 +68,12 @@
public ConsumerRegistry getRegistry()
{
+ // if the registry is not set, get it from the application scope
+ if (registry == null)
+ {
+ registry = beanContext.findBean("ConsumerRegistry", ConsumerRegistry.class);
+ }
+
return registry;
}
Modified: components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java 2011-09-13 11:54:01 UTC (rev 7381)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/JSFBeanContext.java 2011-09-13 13:55:51 UTC (rev 7382)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, 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.
@@ -32,6 +32,7 @@
import javax.faces.context.FacesContext;
import javax.portlet.PortletRequest;
import javax.servlet.http.HttpServletRequest;
+import java.io.Serializable;
import java.util.Locale;
import java.util.Map;
@@ -40,7 +41,7 @@
* @version $Revision: 13413 $
* @since 2.6
*/
-public class JSFBeanContext extends BeanContext
+public class JSFBeanContext extends BeanContext implements Serializable
{
public String getParameter(String key)
{
@@ -58,6 +59,14 @@
return JSFBeanContext.getSessionMap(FacesContext.getCurrentInstance());
}
+ @Override
+ public <T> T findBean(String name, Class<T> type)
+ {
+ final FacesContext facesContext = FacesContext.getCurrentInstance();
+ final Object candidate = facesContext.getApplication().evaluateExpressionGet(facesContext, "#{" + name + "}", type);
+ return checkObject(candidate, type, "Bean named '" + name + "' is not of type '" + type.getSimpleName() + "'");
+ }
+
public static Map<String, Object> getSessionMap(FacesContext facesContext)
{
return facesContext.getExternalContext().getSessionMap();
Modified: components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ManagedBean.java
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ManagedBean.java 2011-09-13 11:54:01 UTC (rev 7381)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ManagedBean.java 2011-09-13 13:55:51 UTC (rev 7382)
@@ -27,6 +27,7 @@
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
+import java.io.Serializable;
import java.util.regex.Pattern;
@@ -35,11 +36,11 @@
* @version $Revision: 13413 $
* @since 2.6
*/
-public abstract class ManagedBean
+public abstract class ManagedBean implements Serializable
{
protected transient Logger log = LoggerFactory.getLogger(getClass());
- protected transient BeanContext beanContext;
+ protected BeanContext beanContext;
private String cancelOutcome;
@@ -47,7 +48,7 @@
public static final String INVALID_PATH = "INVALID_PATH_ERROR";
public static final String DUPLICATE = "DUPLICATE_ERROR";
- public static interface PropertyValidator
+ public static interface PropertyValidator extends Serializable
{
boolean checkForDuplicates();
Modified: components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2011-09-13 11:54:01 UTC (rev 7381)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ProducerBean.java 2011-09-13 13:55:51 UTC (rev 7382)
@@ -48,13 +48,13 @@
*/
public class ProducerBean extends ManagedBean
{
- private ProducerConfigurationService configurationService;
+ private transient ProducerConfigurationService configurationService;
private String policyClassName;
private String validatorClassName;
private static final String PROPERTY = "property";
private static final String PRODUCER = "producer";
private String selectedProp;
- private LocalProducerConfiguration localProducerConfiguration;
+ private transient LocalProducerConfiguration localProducerConfiguration;
public ProducerConfigurationService getConfigurationService()
{
Modified: components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/faces-config.xml
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2011-09-13 11:54:01 UTC (rev 7381)
+++ components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/faces-config.xml 2011-09-13 13:55:51 UTC (rev 7382)
@@ -93,11 +93,6 @@
<value>#{beanContext}</value>
</managed-property>
<managed-property>
- <property-name>registry</property-name>
- <property-class>org.gatein.wsrp.consumer.registry.ConsumerRegistry</property-class>
- <value>#{applicationScope.ConsumerRegistry}</value>
- </managed-property>
- <managed-property>
<property-name>id</property-name>
<value>#{sessionScope.consumerId}</value>
</managed-property>
Modified: components/wsrp/branches/clustering/admin-gui/src/test/java/org/gatein/wsrp/admin/ui/BeanContextTestCase.java
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/test/java/org/gatein/wsrp/admin/ui/BeanContextTestCase.java 2011-09-13 11:54:01 UTC (rev 7381)
+++ components/wsrp/branches/clustering/admin-gui/src/test/java/org/gatein/wsrp/admin/ui/BeanContextTestCase.java 2011-09-13 13:55:51 UTC (rev 7382)
@@ -1,24 +1,25 @@
/*
-* JBoss, a division of Red Hat
-* Copyright 2008, 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 2011, 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;
@@ -115,5 +116,11 @@
{
throw new UnsupportedOperationException();
}
+
+ @Override
+ public <T> T findBean(String name, Class<T> type)
+ {
+ throw new UnsupportedOperationException();
+ }
}
}
Modified: components/wsrp/branches/clustering/admin-gui/src/test/java/org/gatein/wsrp/admin/ui/ConsumerBeanTestCase.java
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/test/java/org/gatein/wsrp/admin/ui/ConsumerBeanTestCase.java 2011-09-13 11:54:01 UTC (rev 7381)
+++ components/wsrp/branches/clustering/admin-gui/src/test/java/org/gatein/wsrp/admin/ui/ConsumerBeanTestCase.java 2011-09-13 13:55:51 UTC (rev 7382)
@@ -1,6 +1,6 @@
/*
* JBoss, a division of Red Hat
- * Copyright 2010, Red Hat Middleware, LLC, and individual
+ * Copyright 2011, 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.
@@ -54,7 +54,6 @@
bean = new ConsumerBean();
ConsumerRegistry registry = new TestInMemoryConsumerRegistry();
registry.createConsumer(CONSUMER_ID, null, WSDL);
- bean.setRegistry(registry);
bean.setBeanContext(new TestBeanContext());
// consumer associated with bean is null at this point so it should be loaded from the registry
@@ -158,6 +157,12 @@
{
throw new NotYetImplemented();
}
+
+ @Override
+ public <T> T findBean(String name, Class<T> type)
+ {
+ throw new NotYetImplemented();
+ }
}
private static class TestInMemoryConsumerRegistry extends InMemoryConsumerRegistry
13 years, 3 months
gatein SVN: r7381 - in epp/portal/branches/EPP_5_2_Branch: component and 33 other directories.
by do-not-reply@jboss.org
Author: bdaw
Date: 2011-09-13 07:54:01 -0400 (Tue, 13 Sep 2011)
New Revision: 7381
Added:
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml
Removed:
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml
Modified:
epp/portal/branches/EPP_5_2_Branch/
epp/portal/branches/EPP_5_2_Branch/component/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java
epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/gatein.ear/pom.xml
epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/configuration.xml
epp/portal/branches/EPP_5_2_Branch/examples/extension/config/src/main/java/conf/configuration.xml
epp/portal/branches/EPP_5_2_Branch/examples/portal/config/src/main/java/conf/configuration.xml
epp/portal/branches/EPP_5_2_Branch/gadgets/pom.xml
epp/portal/branches/EPP_5_2_Branch/pom.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/navigation.xml
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/pages.xml
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/
epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml
Log:
Merge Portal Lifecycle Management changes
Property changes on: epp/portal/branches/EPP_5_2_Branch
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1790:5871
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7210,7262,7308,7326
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795:5868
/portal/branches/branch-GTNPORTAL-1592:4894
/portal/branches/branch-GTNPORTAL-1643:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745:5765
/portal/branches/branch-GTNPORTAL-1790:5871
/portal/branches/branch-GTNPORTAL-1822:5943,5952
/portal/branches/branch-GTNPORTAL-1832:6030,6063
/portal/branches/branch-GTNPORTAL-1872:6400,6551
/portal/branches/branch-GTNPORTAL-1921:6603
/portal/branches/branch-GTNPORTAL-1963:6904,6915-6916
/portal/branches/decoupled-webos:6214-6243
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/trunk:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
Property changes on: epp/portal/branches/EPP_5_2_Branch/component
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7120,7125,7132-7134,7210,7262,7308,7326
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component:5868
/portal/branches/branch-GTNPORTAL-1592/component:4894
/portal/branches/branch-GTNPORTAL-1643/component:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component:5765
/portal/branches/branch-GTNPORTAL-1790/component:5871
/portal/branches/branch-GTNPORTAL-1822/component:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component:6603
/portal/branches/branch-GTNPORTAL-1963/component:6904,6915-6916
/portal/trunk/component:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6437,6440,6449,6452,6573,6783-6784,6912-6913,6960,7042,7061,7095,7117,7120,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
Property changes on: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component/portal/src/main/java/org:5868
/portal/branches/branch-GTNPORTAL-1592/component/portal/src/main/java/org:4894
/portal/branches/branch-GTNPORTAL-1643/component/portal/src/main/java/org:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component/portal/src/main/java/org:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component/portal/src/main/java/org:5765
/portal/branches/branch-GTNPORTAL-1790/component/portal/src/main/java/org:5871
/portal/branches/branch-GTNPORTAL-1822/component/portal/src/main/java/org:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component/portal/src/main/java/org:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component/portal/src/main/java/org:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component/portal/src/main/java/org:6603
/portal/branches/branch-GTNPORTAL-1963/component/portal/src/main/java/org:6904,6915-6916
/portal/trunk/component/portal/src/main/java/org:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7120,7125,7132-7134,7210,7262,7308,7326
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/component/portal/src/main/java/org:5868
/portal/branches/branch-GTNPORTAL-1592/component/portal/src/main/java/org:4894
/portal/branches/branch-GTNPORTAL-1643/component/portal/src/main/java/org:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/component/portal/src/main/java/org:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/component/portal/src/main/java/org:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/component/portal/src/main/java/org:5765
/portal/branches/branch-GTNPORTAL-1790/component/portal/src/main/java/org:5871
/portal/branches/branch-GTNPORTAL-1822/component/portal/src/main/java/org:5943,5952
/portal/branches/branch-GTNPORTAL-1832/component/portal/src/main/java/org:6030,6063
/portal/branches/branch-GTNPORTAL-1872/component/portal/src/main/java/org:6400,6551
/portal/branches/branch-GTNPORTAL-1921/component/portal/src/main/java/org:6603
/portal/branches/branch-GTNPORTAL-1963/component/portal/src/main/java/org:6904,6915-6916
/portal/trunk/component/portal/src/main/java/org:4891,5744,5822,5943,6031,6033,6168,6196,6201-6203,6205-6206,6223,6292,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7120,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/MopManagementExtension.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -33,6 +33,7 @@
import org.exoplatform.portal.mop.management.operations.page.PageReadResource;
import org.exoplatform.portal.mop.management.operations.site.SiteLayoutExportResource;
import org.exoplatform.portal.mop.management.operations.site.SiteLayoutReadConfigAsXml;
+import org.exoplatform.portal.mop.management.operations.site.SiteLayoutReadResource;
import org.exoplatform.portal.mop.management.operations.site.SiteReadResource;
import org.exoplatform.portal.mop.management.operations.site.SiteTypeReadResource;
import org.gatein.management.api.ComponentRegistration;
@@ -54,16 +55,16 @@
ComponentRegistration registration = context.registerManagedComponent("mop");
registration.registerBindingProvider(MopBindingProvider.INSTANCE);
- ManagedResource.Registration mop = registration.registerManagedResource(description("MOP (Model Object for Portal) Managed Resource"));
+ ManagedResource.Registration mop = registration.registerManagedResource(description("MOP (Model Object for Portal) Managed Resource, responsible for handling management operations on navigation, pages, and sites."));
mop.registerOperationHandler(OperationNames.IMPORT_RESOURCE, new MopImportResource(), description("Imports mop data from an exported zip file."));
- mop.registerOperationHandler(OperationNames.READ_RESOURCE, new MopReadResource(), description("Available site types for a portal"));
+ mop.registerOperationHandler(OperationNames.READ_RESOURCE, new MopReadResource(), description("Lists available site types for a portal"));
ManagedResource.Registration sitetypes = mop.registerSubResource("{site-type}sites", description("Management resource responsible for handling management operations on a specific site type for a portal."));
- sitetypes.registerOperationHandler(OperationNames.READ_RESOURCE, new SiteTypeReadResource(), description("Available sites for a given site type."));
+ sitetypes.registerOperationHandler(OperationNames.READ_RESOURCE, new SiteTypeReadResource(), description("Lists available sites for a given site type."));
ManagedResource.Registration sites = sitetypes.registerSubResource("{site-name: .*}", description("Management resource responsible for handling management operations on a specific site."));
- sites.registerOperationHandler(OperationNames.READ_RESOURCE, new SiteReadResource(), description("Available artifacts for a given site (ie pages, navigation, site layout)"));
+ sites.registerOperationHandler(OperationNames.READ_RESOURCE, new SiteReadResource(), description("Lists available resources for a given site (ie pages, navigation, site layout)"));
// Site Layout management
siteLayoutManagementRegistration(sites);
@@ -77,7 +78,9 @@
private void siteLayoutManagementRegistration(ManagedResource.Registration sites)
{
- ManagedResource.Registration siteLayout = sites.registerSubResource("portal", description("Management resource responsible for handling management operations for a site layout."));
+ // This allows us to filter based on path template site-layout.
+ ManagedResource.Registration siteLayout = sites.registerSubResource("{site-layout: portal}", description("Management resource responsible for handling management operations for a site's layout."));
+ siteLayout.registerOperationHandler(OperationNames.READ_RESOURCE, new SiteLayoutReadResource(), description("The site layout resource."));
siteLayout.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new SiteLayoutReadConfigAsXml(), description("Reads site layout data for a specific site as configuration xml."));
siteLayout.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new SiteLayoutExportResource(), description("Exports site layout configuration xml as a zip file."));
}
@@ -85,15 +88,15 @@
private void pageManagementRegistration(ManagedResource.Registration sites)
{
// Pages management resource registration
- ManagedResource.Registration pages = sites.registerSubResource("pages", description("Management resource responsible for handling management operations on all pages of a site."));
+ ManagedResource.Registration pages = sites.registerSubResource("pages", description("Management resource responsible for handling management operations for pages of a site."));
// Pages management operations
- pages.registerOperationHandler(OperationNames.READ_RESOURCE, new PageReadResource(), description("Available pages at the specified address."), true);
- pages.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new PageReadConfigAsXml(), description("Reads pages as configuration xml at the specified address."), true);
+ pages.registerOperationHandler(OperationNames.READ_RESOURCE, new PageReadResource(), description("Lists available pages at a specified address."), true);
+ pages.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new PageReadConfigAsXml(), description("Reads pages as configuration xml at a specified address."), true);
pages.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new PageExportResource(), description("Exports pages configuration xml as a zip file."), true);
// Page name management resource registration
- pages.registerSubResource("{page-name}", description("Page management resource representing an individual page."));
+ pages.registerSubResource("{page-name}", description("Page resource representing an individual page of a site."));
}
private void navigationManagementRegistration(ManagedResource.Registration sites)
@@ -103,7 +106,7 @@
// Navigation management operations
navigation.registerOperationHandler(OperationNames.READ_RESOURCE, new NavigationReadResource(), description("Available navigation nodes at the specified address."), true);
- navigation.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new NavigationReadConfigAsXml(), description("Reads navigation as configuration xml at the specified address."), true);
+ navigation.registerOperationHandler(OperationNames.READ_CONFIG_AS_XML, new NavigationReadConfigAsXml(), description("Reads navigation as configuration xml at a specified address."), true);
navigation.registerOperationHandler(OperationNames.EXPORT_RESOURCE, new NavigationExportResource(), description("Exports navigation configuration xml as a zip file."), true);
// Navigation node management resource registration
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/binding/xml/NavigationMarshaller.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -99,10 +99,10 @@
writer.writeElement(Element.PRIORITY, WritableValueTypes.INTEGER, navigation.getPriority());
// Page nodes
- writer.writeStartElement(Element.PAGE_NODES);
ArrayList<NavigationFragment> fragments = navigation.getFragments();
for (NavigationFragment fragment : fragments)
{
+ writer.writeStartElement(Element.PAGE_NODES);
if (fragment.getParentURI() != null)
{
String parentUri = fragment.getParentURI();
@@ -117,9 +117,10 @@
marshallNode(writer, node);
}
}
+ writer.writeEndElement(); // End page-nodes
}
- writer.writeEndElement().writeEndElement(); // End page-nodes and node-navigation
+ writer.writeEndElement(); // End node-navigation
}
public void marshallNode(StaxWriter<Element> writer, PageNode node) throws XMLStreamException
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/exportimport/NavigationExportTask.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -23,6 +23,7 @@
package org.exoplatform.portal.mop.management.exportimport;
import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.description.DescriptionService;
import org.exoplatform.portal.mop.management.operations.navigation.NavigationKey;
import org.exoplatform.portal.mop.management.operations.navigation.NavigationUtils;
@@ -55,6 +56,15 @@
this.marshaller = marshaller;
}
+ // TODO: This is a little sloppy to support filtering, fix if we have time.
+ private PageNavigation navigation;
+ public NavigationExportTask(PageNavigation navigation, Marshaller<PageNavigation> marshaller)
+ {
+ super(new SiteKey(navigation.getOwnerType(), navigation.getOwnerId()));
+ this.navigation = navigation;
+ this.marshaller = marshaller;
+ }
+
@Override
protected String getXmlFileName()
{
@@ -64,7 +74,11 @@
@Override
public void export(OutputStream outputStream) throws IOException
{
- PageNavigation navigation = NavigationUtils.loadPageNavigation(navigationKey, navigationService, descriptionService);
+ if (navigation == null)
+ {
+ navigation = NavigationUtils.loadPageNavigation(navigationKey, navigationService, descriptionService);
+ }
+
marshaller.marshal(navigation, outputStream);
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/MopImportResource.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -107,6 +107,7 @@
Map<SiteKey, MopImport> importMap = new HashMap<SiteKey, MopImport>();
final NonCloseableZipInputStream zis = new NonCloseableZipInputStream(inputStream);
ZipEntry entry;
+ boolean empty = false;
try
{
log.info("Preparing data for import.");
@@ -114,6 +115,9 @@
{
// Skip directories
if (entry.isDirectory()) continue;
+ // Skip empty entries (this allows empty zip files to not cause exceptions).
+ empty = entry.getName().equals("");
+ if (empty) continue;
// Parse zip entry
String[] parts = parseEntry(entry);
@@ -186,6 +190,12 @@
}
}
+ if (empty)
+ {
+ log.info("Nothing to import, zip file empty.");
+ return;
+ }
+
// Perform import
Map<SiteKey, MopImport> importsRan = new HashMap<SiteKey, MopImport>();
try
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java (from rev 7359, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/FilteredNavigationExportResource.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,238 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.exoplatform.portal.mop.management.operations.navigation;
+
+import org.exoplatform.portal.config.model.NavigationFragment;
+import org.exoplatform.portal.config.model.PageNavigation;
+import org.exoplatform.portal.mop.management.exportimport.NavigationExportTask;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.ManagedResource;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.PathTemplateFilter;
+import org.gatein.management.api.binding.BindingProvider;
+import org.gatein.management.api.binding.Marshaller;
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.OperationContextDelegate;
+import org.gatein.management.api.operation.OperationHandler;
+import org.gatein.management.api.operation.OperationNames;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.StepResultHandler;
+import org.gatein.management.api.operation.model.ExportResourceModel;
+import org.gatein.management.api.operation.model.ExportTask;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+
+import java.util.Collections;
+import java.util.List;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class FilteredNavigationExportResource
+{
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, PathTemplateFilter filter)
+ {
+ BindingProvider bindingProvider = operationContext.getBindingProvider();
+ Marshaller<PageNavigation> marshaller = bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);
+
+ final ManagedResource resource = operationContext.getManagedResource();
+ final PathAddress address = operationContext.getAddress();
+ final String operationName = operationContext.getOperationName();
+
+ StepResultHandler<PageNavigation> stepResultHandler = new StepResultHandler<PageNavigation>(address)
+ {
+ @Override
+ public void failed(String failureDescription)
+ {
+ if (address.equals(getCurrentAddress()))
+ {
+ throw new OperationException(operationName, "Navigation export failed. Reason: " + failureDescription);
+ }
+ else
+ {
+ throw new OperationException(operationName, "Navigation export failed. Reason: " + failureDescription + " [Step Address: " + getCurrentAddress() + "]");
+ }
+ }
+
+ @Override
+ protected void doCompleted(PageNavigation result)
+ {
+ if (getResults().isEmpty())
+ {
+ super.doCompleted(result);
+ }
+ else
+ {
+ PageNavigation navigation = getResults().get(0);
+ merge(navigation, result);
+ }
+ }
+ };
+
+ try
+ {
+ executeHandlers(resource, operationContext, address, OperationNames.READ_CONFIG_AS_XML, stepResultHandler, filter, true);
+ List<PageNavigation> results = stepResultHandler.getResults();
+ if (results.isEmpty())
+ {
+ resultHandler.completed(new ExportResourceModel(Collections.<ExportTask>emptyList()));
+ }
+ else
+ {
+ NavigationExportTask task = new NavigationExportTask(stepResultHandler.getResults().get(0), marshaller);
+ resultHandler.completed(new ExportResourceModel(task));
+ }
+ }
+ catch (OperationException e)
+ {
+ throw new OperationException(e.getOperationName(), getStepMessage(e, address, stepResultHandler), e);
+ }
+ catch (Throwable t)
+ {
+ throw new OperationException(operationName, getStepMessage(t, address, stepResultHandler), t);
+ }
+ }
+
+ private void executeHandlers(ManagedResource resource, final OperationContext operationContext, PathAddress address, String operationName, StepResultHandler<PageNavigation> stepResultHandler, PathTemplateFilter filter, boolean root)
+ {
+ //resource.getSubResource(address);
+ OperationHandler handler = resource.getOperationHandler(address, operationName);
+ System.out.println("Filter: " + filter + " accepted ? " + address.accepts(filter) + " for address " + address + " and nav-uri template " + address.resolvePathTemplate("nav-uri"));
+ if (handler != null && !root && address.accepts(filter))
+ {
+ handler.execute(operationContext, stepResultHandler);
+ }
+ else
+ {
+ OperationHandler readResource = resource.getOperationHandler(address, OperationNames.READ_RESOURCE);
+ BasicResultHandler readResourceResult = new BasicResultHandler();
+ readResource.execute(new OperationContextDelegate(operationContext)
+ {
+ @Override
+ public String getOperationName()
+ {
+ return OperationNames.READ_RESOURCE;
+ }
+ }, readResourceResult);
+ if (readResourceResult.getFailureDescription() != null)
+ {
+ throw new OperationException(operationName, "Failure '" + readResourceResult.getFailureDescription() + "' encountered executing " + OperationNames.READ_RESOURCE);
+ }
+
+ Object model = readResourceResult.getResult();
+ if (! (model instanceof ReadResourceModel) )
+ {
+ throw new RuntimeException("Was expecting " + ReadResourceModel.class + " to be returned for operation " + OperationNames.READ_RESOURCE + " at address " + address);
+ }
+
+ for (String child : ((ReadResourceModel) model).getChildren())
+ {
+ final PathAddress childAddress = address.append(child);
+ OperationContext childContext = new OperationContextDelegate(operationContext)
+ {
+ @Override
+ public PathAddress getAddress()
+ {
+ return childAddress;
+ }
+ };
+ executeHandlers(resource, childContext, childAddress, operationName, stepResultHandler.next(childAddress), filter, false);
+ }
+ }
+ }
+
+ private String getStepMessage(Throwable t, PathAddress originalAddress, StepResultHandler<PageNavigation> stepResultHandler)
+ {
+ String message = (t.getMessage() == null) ? "Step operation failure" : t.getMessage();
+ if (originalAddress.equals(stepResultHandler.getCurrentAddress()))
+ {
+ return message;
+ }
+ else
+ {
+ return message + " [Step Address: " + stepResultHandler.getCurrentAddress() + "]";
+ }
+ }
+
+ private void merge(PageNavigation navigation, PageNavigation result)
+ {
+ for (NavigationFragment fragment : result.getFragments())
+ {
+ if (fragment.getParentURI() != null)
+ {
+ NavigationFragment found = findFragment(navigation, fragment.getParentURI());
+ if (found == null)
+ {
+ navigation.addFragment(fragment);
+ }
+ else
+ {
+ found.getNodes().addAll(fragment.getNodes());
+ }
+ }
+ else
+ {
+ navigation.addFragment(fragment);
+ }
+ }
+ }
+
+ private NavigationFragment findFragment(PageNavigation navigation, String parentUri)
+ {
+ for (NavigationFragment fragment : navigation.getFragments())
+ {
+ if (fragment.getParentURI().equals(parentUri)) return fragment;
+ }
+
+ return null;
+ }
+
+ private static class BasicResultHandler implements ResultHandler
+ {
+ private Object result;
+ private String failureDescription;
+
+ @Override
+ public void completed(Object result)
+ {
+ this.result = result;
+ }
+
+ @Override
+ public void failed(String failureDescription)
+ {
+ this.failureDescription = failureDescription;
+ }
+
+ public Object getResult()
+ {
+ return result;
+ }
+
+ public String getFailureDescription()
+ {
+ return failureDescription;
+ }
+ }
+}
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/navigation/NavigationExportResource.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -28,6 +28,7 @@
import org.exoplatform.portal.mop.management.exportimport.NavigationExportTask;
import org.exoplatform.portal.mop.navigation.NavigationService;
import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathTemplateFilter;
import org.gatein.management.api.binding.BindingProvider;
import org.gatein.management.api.binding.Marshaller;
import org.gatein.management.api.exceptions.OperationException;
@@ -38,26 +39,49 @@
import org.gatein.mop.api.workspace.Navigation;
import org.gatein.mop.api.workspace.Site;
+import java.text.ParseException;
+import java.util.List;
+
/**
* @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
* @version $Revision$
*/
public class NavigationExportResource extends AbstractNavigationOperationHandler
{
+ private static final FilteredNavigationExportResource filtered = new FilteredNavigationExportResource();
+
@Override
protected void execute(OperationContext operationContext, ResultHandler resultHandler, Navigation navigation) throws ResourceNotFoundException, OperationException
{
- Site site = navigation.getSite();
- String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
- SiteKey siteKey = getSiteKey(site);
+ List<String> filterAttributes = operationContext.getAttributes().getValues("filter");
+ PathTemplateFilter filter;
+ try
+ {
+ filter = PathTemplateFilter.parse(filterAttributes);
+ }
+ catch (ParseException e)
+ {
+ throw new OperationException(operationContext.getOperationName(), "Could not parse filter attributes.", e);
+ }
- DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
- NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
- BindingProvider bindingProvider = operationContext.getBindingProvider();
- Marshaller<PageNavigation> marshaller = bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);
+ if (filter.hasPathTemplate("nav-uri"))
+ {
+ filtered.execute(operationContext, resultHandler, filter);
+ }
+ else
+ {
+ Site site = navigation.getSite();
+ String navUri = operationContext.getAddress().resolvePathTemplate("nav-uri");
+ SiteKey siteKey = getSiteKey(site);
- NavigationExportTask exportTask = new NavigationExportTask(new NavigationKey(siteKey, navUri), navigationService, descriptionService, marshaller);
+ DescriptionService descriptionService = operationContext.getRuntimeContext().getRuntimeComponent(DescriptionService.class);
+ NavigationService navigationService = operationContext.getRuntimeContext().getRuntimeComponent(NavigationService.class);
+ BindingProvider bindingProvider = operationContext.getBindingProvider();
+ Marshaller<PageNavigation> marshaller = bindingProvider.getMarshaller(PageNavigation.class, ContentType.XML);
- resultHandler.completed(new ExportResourceModel(exportTask));
+ NavigationExportTask exportTask = new NavigationExportTask(new NavigationKey(siteKey, navUri), navigationService, descriptionService, marshaller);
+
+ resultHandler.completed(new ExportResourceModel(exportTask));
+ }
}
}
Modified: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/page/PageExportResource.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -26,6 +26,8 @@
import org.exoplatform.portal.mop.SiteKey;
import org.exoplatform.portal.mop.management.exportimport.PageExportTask;
import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.PathTemplateFilter;
import org.gatein.management.api.binding.BindingProvider;
import org.gatein.management.api.exceptions.OperationException;
import org.gatein.management.api.exceptions.ResourceNotFoundException;
@@ -35,8 +37,10 @@
import org.gatein.management.api.operation.model.ExportTask;
import org.gatein.mop.api.workspace.Page;
+import java.text.ParseException;
import java.util.ArrayList;
import java.util.Collection;
+import java.util.Collections;
import java.util.List;
/**
@@ -55,6 +59,7 @@
Collection<Page> pagesList = pages.getChildren();
List<ExportTask> tasks = new ArrayList<ExportTask>(pagesList.size());
+
PageExportTask pageExportTask =
new PageExportTask(siteKey, dataStorage, bindingProvider.getMarshaller(
org.exoplatform.portal.config.model.Page.PageSet.class, ContentType.XML));
@@ -64,7 +69,24 @@
{
if (pageName == null)
{
- pageExportTask.addPageName(page.getName());
+ PathAddress pageAddress = operationContext.getAddress().append(page.getName());
+ // We need to look up the subresource because this sets the path template resolver to be used by the filter.
+ operationContext.getManagedResource().getSubResource(pageAddress);
+
+ PathTemplateFilter filter;
+ try
+ {
+ filter = PathTemplateFilter.parse(operationContext.getAttributes().getValues("filter"));
+ }
+ catch (ParseException e)
+ {
+ throw new OperationException(operationContext.getOperationName(), "Could not parse filter attributes.", e);
+ }
+
+ if (pageAddress.accepts(filter))
+ {
+ pageExportTask.addPageName(page.getName());
+ }
}
else if (pageName.equals(page.getName()))
{
@@ -76,9 +98,14 @@
{
throw new ResourceNotFoundException("No page found for " + new PageKey(siteKey, pageName));
}
-
- tasks.add(pageExportTask);
-
- resultHandler.completed(new ExportResourceModel(tasks));
+ else if (pageExportTask.getPageNames().isEmpty())
+ {
+ resultHandler.completed(new ExportResourceModel(Collections.<ExportTask>emptyList()));
+ }
+ else
+ {
+ tasks.add(pageExportTask);
+ resultHandler.completed(new ExportResourceModel(tasks));
+ }
}
}
Copied: epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java (from rev 7359, portal/trunk/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/component/portal/src/main/java/org/exoplatform/portal/mop/management/operations/site/SiteLayoutReadResource.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.exoplatform.portal.mop.management.operations.site;
+
+import org.gatein.management.api.exceptions.OperationException;
+import org.gatein.management.api.exceptions.ResourceNotFoundException;
+import org.gatein.management.api.operation.OperationContext;
+import org.gatein.management.api.operation.ResultHandler;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+import org.gatein.mop.api.workspace.Site;
+
+import java.util.Collections;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class SiteLayoutReadResource extends AbstractSiteOperationHandler
+{
+ @Override
+ protected void execute(OperationContext operationContext, ResultHandler resultHandler, Site site) throws ResourceNotFoundException, OperationException
+ {
+ ReadResourceModel readResource = new ReadResourceModel(
+ "The site layout for site " + site.getName(), Collections.<String>emptySet());
+
+ resultHandler.completed(readResource);
+ }
+}
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/gatein.ear/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/gatein.ear/pom.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/gatein.ear/pom.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -53,6 +53,12 @@
</dependency>
<dependency>
<groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.gwtGadgets</artifactId>
+ <version>${project.version}</version>
+ <type>war</type>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.portal</groupId>
<artifactId>exo.portal.gadgets-server</artifactId>
<version>${project.version}</version>
<type>war</type>
Modified: epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/configuration.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/distribution/jboss-epp/serverAddon/src/main/resources/conf/gatein/configuration.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -70,6 +70,9 @@
<value>
<string>eXoGadgets</string>
</value>
+ <value>
+ <string>gwtGadgets</string>
+ </value>
<value>
<string>eXoGadgetServer</string>
</value>
Modified: epp/portal/branches/EPP_5_2_Branch/examples/extension/config/src/main/java/conf/configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/examples/extension/config/src/main/java/conf/configuration.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/examples/extension/config/src/main/java/conf/configuration.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -64,6 +64,9 @@
<string>eXoGadgets</string>
</value>
<value>
+ <string>gwtGadgets</string>
+ </value>
+ <value>
<string>eXoGadgetServer</string>
</value>
<value>
Modified: epp/portal/branches/EPP_5_2_Branch/examples/portal/config/src/main/java/conf/configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/examples/portal/config/src/main/java/conf/configuration.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/examples/portal/config/src/main/java/conf/configuration.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -63,6 +63,9 @@
<value>
<string>eXoGadgets</string>
</value>
+ <value>
+ <string>gwtGadgets</string>
+ </value>
<value>
<string>eXoGadgetServer</string>
</value>
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar
===================================================================
(Binary files differ)
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar (from rev 7367, portal/trunk/gadgets/gwtGadgets/mvn-dependencies/gwt-gadgets-1.2.0.jar)
===================================================================
(Binary files differ)
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml
===================================================================
--- portal/trunk/gadgets/gwtGadgets/pom.xml 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,104 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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.
- -->
-
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
- <modelVersion>4.0.0</modelVersion>
-
- <parent>
- <groupId>org.exoplatform.portal</groupId>
- <artifactId>exo.portal.gadgets</artifactId>
- <version>3.2.0-M02-SNAPSHOT</version>
- </parent>
-
- <artifactId>exo.portal.gwtGadgets</artifactId>
- <packaging>war</packaging>
- <name>GateIn Portal GWT Gadgets Application</name>
-
- <properties>
- <com.google.gwt.version>2.1.0</com.google.gwt.version>
- <com.googlecode.gwtupload.version>0.6.3-compat</com.googlecode.gwtupload.version>
- </properties>
-
- <dependencies>
- <dependency>
- <groupId>org.gatein.management</groupId>
- <artifactId>gatein-management-api</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.gatein.common</groupId>
- <artifactId>common-logging</artifactId>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>org.exoplatform.kernel</groupId>
- <artifactId>exo.kernel.container</artifactId>
- <scope>provided</scope>
- </dependency>
- <!-- GWT Dependencies -->
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-servlet</artifactId>
- <version>${com.google.gwt.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.gwt</groupId>
- <artifactId>gwt-user</artifactId>
- <version>${com.google.gwt.version}</version>
- <scope>provided</scope>
- </dependency>
- <dependency>
- <groupId>com.googlecode.gwtupload</groupId>
- <artifactId>gwtupload</artifactId>
- <version>${com.googlecode.gwtupload.version}</version>
- </dependency>
- <dependency>
- <groupId>com.google.gwt.google-apis</groupId>
- <artifactId>gwt-gadgets</artifactId>
- <version>1.2.0</version>
- <scope>system</scope>
- <systemPath>${project.basedir}/mvn-dependencies/gwt-gadgets-1.2.0.jar</systemPath>
- </dependency>
- </dependencies>
-
- <build>
- <finalName>gwtGadgets</finalName>
-
- <!-- dev mode doesn't seem to work for gadgets, so just including the gwt plugin for compile -->
- <plugins>
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>gwt-maven-plugin</artifactId>
- <version>2.1.0</version>
- <executions>
- <execution>
- <goals>
- <goal>compile</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
-</project>
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml (from rev 7367, portal/trunk/gadgets/gwtGadgets/pom.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/pom.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,104 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.exoplatform.portal</groupId>
+ <artifactId>exo.portal.gadgets</artifactId>
+ <version>5.2.0-epp-DEV04-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>exo.portal.gwtGadgets</artifactId>
+ <packaging>war</packaging>
+ <name>GateIn Portal GWT Gadgets Application</name>
+
+ <properties>
+ <com.google.gwt.version>2.1.0</com.google.gwt.version>
+ <com.googlecode.gwtupload.version>0.6.3-compat</com.googlecode.gwtupload.version>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.gatein.management</groupId>
+ <artifactId>gatein-management-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.gatein.common</groupId>
+ <artifactId>common-logging</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.exoplatform.kernel</groupId>
+ <artifactId>exo.kernel.container</artifactId>
+ <scope>provided</scope>
+ </dependency>
+ <!-- GWT Dependencies -->
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-servlet</artifactId>
+ <version>${com.google.gwt.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt</groupId>
+ <artifactId>gwt-user</artifactId>
+ <version>${com.google.gwt.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.googlecode.gwtupload</groupId>
+ <artifactId>gwtupload</artifactId>
+ <version>${com.googlecode.gwtupload.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.google.gwt.google-apis</groupId>
+ <artifactId>gwt-gadgets</artifactId>
+ <version>1.2.0</version>
+ <scope>system</scope>
+ <systemPath>${project.basedir}/mvn-dependencies/gwt-gadgets-1.2.0.jar</systemPath>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <finalName>gwtGadgets</finalName>
+
+ <!-- dev mode doesn't seem to work for gadgets, so just including the gwt plugin for compile -->
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>gwt-maven-plugin</artifactId>
+ <version>2.1.0</version>
+ <executions>
+ <execution>
+ <goals>
+ <goal>compile</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,47 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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 module PUBLIC "//gwt-module/"
- "http://google-web-toolkit.googlecode.com/svn/tags/2.3.0/distro-source/cor...">
-<module rename-to="exportimport">
-
- <!-- Inherit the core Web Toolkit stuff. -->
- <inherits name='com.google.gwt.user.User'/>
-
- <!-- inherit css based theme -->
- <inherits name='com.google.gwt.user.theme.standard.Standard'/>
-
- <!-- inherit gadget support -->
- <inherits name="com.google.gwt.gadgets.Gadgets"/>
-
- <!-- Include GWTUpload library -->
- <inherits name="gwtupload.GWTUpload"/>
-
- <!-- Specify the app entry point class. -->
- <entry-point class='org.gatein.management.gadget.mop.exportimport.client.Application'/>
-
- <!-- Specify the application specific style sheet. -->
- <stylesheet src="Application.css"/>
-
- <!-- Load dynamically predefined styles in the library when the application starts -->
- <stylesheet src="Upload.css"/>
-</module>
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/ExportImport.gwt.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,47 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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 module PUBLIC "//gwt-module/"
+ "http://google-web-toolkit.googlecode.com/svn/tags/2.3.0/distro-source/cor...">
+<module rename-to="exportimport">
+
+ <!-- Inherit the core Web Toolkit stuff. -->
+ <inherits name='com.google.gwt.user.User'/>
+
+ <!-- inherit css based theme -->
+ <inherits name='com.google.gwt.user.theme.standard.Standard'/>
+
+ <!-- inherit gadget support -->
+ <inherits name="com.google.gwt.gadgets.Gadgets"/>
+
+ <!-- Include GWTUpload library -->
+ <inherits name="gwtupload.GWTUpload"/>
+
+ <!-- Specify the app entry point class. -->
+ <entry-point class='org.gatein.management.gadget.mop.exportimport.client.Application'/>
+
+ <!-- Specify the application specific style sheet. -->
+ <stylesheet src="Application.css"/>
+
+ <!-- Load dynamically predefined styles in the library when the application starts -->
+ <stylesheet src="Upload.css"/>
+</module>
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,533 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.core.client.GWT;
-import com.google.gwt.event.dom.client.ClickEvent;
-import com.google.gwt.event.dom.client.ClickHandler;
-import com.google.gwt.event.logical.shared.OpenEvent;
-import com.google.gwt.event.logical.shared.OpenHandler;
-import com.google.gwt.event.logical.shared.SelectionEvent;
-import com.google.gwt.event.logical.shared.SelectionHandler;
-import com.google.gwt.gadgets.client.Gadget;
-import com.google.gwt.gadgets.client.Gadget.ModulePrefs;
-import com.google.gwt.gadgets.client.UserPreferences;
-import com.google.gwt.resources.client.ImageResource;
-import com.google.gwt.user.client.Timer;
-import com.google.gwt.user.client.Window;
-import com.google.gwt.user.client.rpc.AsyncCallback;
-import com.google.gwt.user.client.rpc.ServiceDefTarget;
-import com.google.gwt.user.client.ui.AbsolutePanel;
-import com.google.gwt.user.client.ui.Anchor;
-import com.google.gwt.user.client.ui.Button;
-import com.google.gwt.user.client.ui.CheckBox;
-import com.google.gwt.user.client.ui.DecoratedTabPanel;
-import com.google.gwt.user.client.ui.DecoratorPanel;
-import com.google.gwt.user.client.ui.DialogBox;
-import com.google.gwt.user.client.ui.Frame;
-import com.google.gwt.user.client.ui.HTML;
-import com.google.gwt.user.client.ui.HasVerticalAlignment;
-import com.google.gwt.user.client.ui.HorizontalPanel;
-import com.google.gwt.user.client.ui.Image;
-import com.google.gwt.user.client.ui.Label;
-import com.google.gwt.user.client.ui.NamedFrame;
-import com.google.gwt.user.client.ui.RootPanel;
-import com.google.gwt.user.client.ui.ScrollPanel;
-import com.google.gwt.user.client.ui.Tree;
-import com.google.gwt.user.client.ui.TreeItem;
-import gwtupload.client.IUploader;
-import gwtupload.client.MultiUploader;
-
-import java.util.List;
-
-/**
- * {@code Application}
- * <p>
- * Creates a gadget that will show the sites tree which allows to navigate
- * between different sites. This gadget allows the administrator of the portal
- * to import/export sites.
- * </p>
- * Created on Dec 29, 2010, 8:01:18 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-@ModulePrefs(title = "Export/Import Tool", author = "Nabil Benothman", author_email = "nbenothm(a)redhat.com",
- description = "This gadget allows the administrator to export/import sites")
-(a)Gadget.AllowHtmlQuirksMode(false)
-(a)Gadget.UseLongManifestName(false)
-public class Application extends Gadget<UserPreferences>
-{
- private static final String EXPORT_IMPORT_SERVLET_BASE = ServletPath.path("/exportimport");
-
- // asycn services to get requests from the server through ajax.
- private final GateInServiceAsync gtnService = GWT.create(GateInService.class);
- private static final String UPLOAD_ACTION_URL = EXPORT_IMPORT_SERVLET_BASE + "/upload";
- private static final String DOWNLOAD_ACTION_URL = EXPORT_IMPORT_SERVLET_BASE + "/download";
- // gui elements
- private HTML header;
- private HTML details;
- private Button exportButton;
- private Frame frame;
- private String exportHref = "";
-
- private SelectionHandler<TreeItem> selectionHandler;
- private OpenHandler<TreeItem> openHandler;
-
- @Override
- protected void init(UserPreferences preferences)
- {
- ((ServiceDefTarget) gtnService).setServiceEntryPoint(EXPORT_IMPORT_SERVLET_BASE + "/GateInService");
-
- selectionHandler = createSelectionHandler();
- openHandler = createOpenHandler();
-
- TreeImages images = GWT.create(TreeImages.class);
-
- RootPanel rootPanel = RootPanel.get();
- rootPanel.setSize("885px", "490px");
- rootPanel.addStyleName("rootpanelstyle");
-
- DecoratedTabPanel decoratedTabPanel = new DecoratedTabPanel();
- decoratedTabPanel.setAnimationEnabled(true);
- rootPanel.add(decoratedTabPanel, 10, 10);
- decoratedTabPanel.setSize("870px", "480px");
-
- AbsolutePanel absolutePanel = new AbsolutePanel();
- absolutePanel.setSize("847px", "425px");
-
- DecoratorPanel decoratorPanelWest = new DecoratorPanel();
- absolutePanel.add(decoratorPanelWest, 10, 10);
- decoratorPanelWest.setSize("240px", "400px");
-
- AbsolutePanel treePanel = new AbsolutePanel();
- treePanel.setSize("230px", "395px");
- decoratorPanelWest.setWidget(treePanel);
-
- ScrollPanel treeScrollPanel = new ScrollPanel();
- treePanel.add(treeScrollPanel, 10, 10);
- treeScrollPanel.setSize("210px", "375px");
-
- final Tree tree = getTree(images);
- treeScrollPanel.setWidget(tree);
-
- final DecoratorPanel decoratorPanelCenter = new DecoratorPanel();
-
- absolutePanel.add(decoratorPanelCenter, 256, 10);
- decoratorPanelCenter.setSize("400px", "402px");
-
- AbsolutePanel centerAbsolutePanel = new AbsolutePanel();
- centerAbsolutePanel.setSize("97%", "100%");
-
- this.header = new HTML("Select an item");
- this.header.setDirectionEstimator(true);
- centerAbsolutePanel.add(this.header, 10, 10);
- this.header.setSize("450px", "50px");
- this.header.setStyleName("header-style");
-
- this.details = new HTML("No item selected");
- centerAbsolutePanel.add(this.details, 10, 76);
- this.details.setSize("450px", "156px");
-
- HTML html = new HTML("<hr />", true);
- centerAbsolutePanel.add(html, 10, 43);
- html.setSize("380px", "15px");
-
- this.frame = new NamedFrame("download-frame");
- frame.setStyleName("download-frame");
- rootPanel.add(frame);
-
- this.exportButton = new Button("Export site", new ClickHandler()
- {
-
- public void onClick(ClickEvent event)
- {
- frame.setUrl(exportHref);
- }
- });
- this.exportButton.setEnabled(false);
- centerAbsolutePanel.add(this.exportButton, 10, 359);
- decoratorPanelCenter.setWidget(centerAbsolutePanel);
- centerAbsolutePanel.setSize("400px", "393px");
-
- DecoratorPanel decoratorPanelEast = new DecoratorPanel();
- absolutePanel.add(decoratorPanelEast, 672, 10);
- decoratorPanelEast.setSize("165px", "405px");
- AbsolutePanel absolutePanelImportLink = new AbsolutePanel();
- absolutePanelImportLink.setSize("162px", "395px");
-
- final Anchor importAnchor = new Anchor("Import site");
- absolutePanelImportLink.add(importAnchor, 10, 10);
- importAnchor.setWidth("90%");
-
- decoratorPanelEast.setWidget(absolutePanelImportLink);
-
- decoratedTabPanel.add(absolutePanel, "Export/Import sites", false);
- importAnchor.addClickHandler(new ClickHandler()
- {
-
- public void onClick(ClickEvent event)
- {
- DialogBox dialogBox = createDialogBox();
- dialogBox.setPopupPosition(267, 60);
- dialogBox.show();
- }
- });
-
- decoratedTabPanel.selectTab(0);
- }
-
- public native String getPortalContainerName()/*-{
- return parent.eXo.env.portal.context.substring(1); // remove leading '/'
- }-*/;
-
- /**
- * Create and return the dialog box for the site upload.
- *
- * @return a {@code DialogBox}
- */
- private DialogBox createDialogBox()
- {
-
- // Create a dialog box
- final DialogBox dialogBox = new DialogBox();
- dialogBox.setText("Import site");
- dialogBox.setAnimationEnabled(true);
- dialogBox.setModal(true);
- dialogBox.setGlassEnabled(true);
-
- final AbsolutePanel absolutePanel = new AbsolutePanel();
- dialogBox.setWidget(absolutePanel);
- absolutePanel.setStyleName("status-panel");
- absolutePanel.setSize("400px", "220px");
-
- final Button importButton = new Button("Import");
- final CheckBox overwriteBox = new CheckBox("Overwrite the existing site");
- final HTML statusImg = new HTML(" ", true);
- final Label statusLabel = new Label("status label");
- final Label headerLabel = new Label("Select file to import :");
- final AbsolutePanel statusPanel = new AbsolutePanel();
- headerLabel.setSize("380px", "39px");
- headerLabel.setStyleName("header-style");
- absolutePanel.add(headerLabel, 10, 10);
-
- final MultiUploader uploader = new GTNMultiUploader();
- uploader.setAvoidRepeatFiles(false);
- absolutePanel.add(uploader, 10, 46);
- uploader.setSize("380px", "32px");
- uploader.addOnChangeUploadHandler(new IUploader.OnChangeUploaderHandler()
- {
-
- @Override
- public void onChange(IUploader uploader)
- {
- // Nothing to do
- if (uploader.getFileName() != null)
- {
- importButton.setEnabled(true);
- }
- }
- });
-
- // Add a finish handler which will notify user once the upload finishes
- uploader.addOnFinishUploadHandler(new IUploader.OnFinishUploaderHandler()
- {
-
- public void onFinish(IUploader uploader)
- {
-
- switch (uploader.getStatus())
- {
- case SUCCESS:
- statusLabel.setText("File uploaded with success");
- statusLabel.setStyleName("success-style");
- statusImg.setStyleName("success-style-icon");
- break;
- case ERROR:
- statusLabel.setText("File upload error");
- statusLabel.setStyleName("error-style");
- statusImg.setStyleName("error-style-icon");
- break;
- case CANCELED:
- statusLabel.setText("File upload canceled");
- statusLabel.setStyleName("warn-style");
- statusImg.setStyleName("warn-style-icon");
- break;
- default:
- statusLabel.setText("");
- statusLabel.setStyleName("blank-style");
- statusImg.setStyleName("blank-style");
- break;
- }
-
- overwriteBox.setEnabled(true);
- importButton.setEnabled(true);
- }
- });
- // Add a start handler which will disable the UI until the upload finishes
- uploader.addOnStartUploadHandler(new IUploader.OnStartUploaderHandler()
- {
-
- boolean isShwon = false;
-
- public void onStart(IUploader uploader)
- {
- statusLabel.setText("Process in progress...");
- statusLabel.setStyleName("progress-style");
- statusImg.setStyleName("progress-style-icon");
- overwriteBox.setEnabled(false);
- importButton.setEnabled(false);
- if (!isShwon)
- {
- statusPanel.setStyleName("status-panel");
- statusPanel.setSize("380px", "0px");
- absolutePanel.add(statusPanel, 10, 120);
-
- Timer t = new Timer()
- {
-
- int dx = 5;
- int height = 0;
-
- public void run()
- {
- height += dx;
- statusPanel.setHeight(height + "px");
- if (height >= 45)
- {
- cancel(); // Stop the timer
- }
- }
- };
-
- // Schedule the timer to run once in 100 milliseconds.
- t.scheduleRepeating(100);
- isShwon = true;
- }
- }
- });
- // accept only zip files
- uploader.setValidExtensions("zip");
- // You can add customized parameters to servlet call
- uploader.setServletPath(UPLOAD_ACTION_URL + "?pc=" + getPortalContainerName());
-
- overwriteBox.setTitle("If you want to force overwriting an existing site, check this checkbox");
- overwriteBox.addClickHandler(new ClickHandler()
- {
-
- public void onClick(ClickEvent event)
- {
- String url = UPLOAD_ACTION_URL + "?pc=" + getPortalContainerName() + "&overwrite=" + overwriteBox.getValue();
- uploader.setServletPath(url);
- }
- });
-
- absolutePanel.add(overwriteBox, 10, 84);
- Button closeButton = new Button("Close", new ClickHandler()
- {
-
- public void onClick(ClickEvent event)
- {
- dialogBox.hide();
- }
- });
- absolutePanel.add(closeButton, 343, 188);
-
- statusImg.setStyleName("progress-style-icon");
- statusPanel.add(statusImg, 10, 10);
- statusImg.setSize("50px", "30px");
-
- statusPanel.add(statusLabel, 60, 15);
- statusLabel.setSize("300px", "25px");
-
- importButton.addClickHandler(new ClickHandler()
- {
-
- @Override
- public void onClick(ClickEvent event)
- {
-
- uploader.submit();
- }
- });
- importButton.setEnabled(false);
- absolutePanel.add(importButton, 10, 188);
-
- return dialogBox;
- }
-
- /**
- * Create and initialize the site tree
- *
- * @param resources
- * @return
- */
- private Tree getTree(TreeImages resources)
- {
- Tree tree = new Tree(resources, true);
- tree.addSelectionHandler(selectionHandler);
- tree.addOpenHandler(openHandler);
- tree.setAnimationEnabled(true);
- tree.setSize("100%", "100%");
- //final TreeItem rootItem = tree.addItem(getItemString("Sites", resources.treeRoot()));
- final TreeNode rootNode = new TreeNode("Sites");
- final TreeItem rootItem = createItem(rootNode);
- tree.addItem(rootItem);
-
- gtnService.getRootNodes(getPortalContainerName(), new AsyncCallback<List<TreeNode>>()
- {
-
- public void onFailure(Throwable caught)
- {
- Window.alert("Failed to load sites available for export. See server log for more details.");
- }
-
- public void onSuccess(List<TreeNode> result)
- {
- for (TreeNode tn : result)
- {
- TreeItem ti = createItem(tn);
- ti.addItem(new PendingItem());
- rootItem.addItem(ti);
- rootNode.addChild(tn);
- }
- }
- });
-
- rootItem.setState(true);
-
- return tree;
- }
-
- /**
- * @param text
- * @param image
- * @return
- */
- private String getItemString(String text, ImageResource image)
- {
- // Add the image and text to a horizontal panel
- HorizontalPanel hPanel = new HorizontalPanel();
- hPanel.setSpacing(0);
- hPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
- hPanel.add(new Image(image));
- HTML headerText = new HTML(text);
- hPanel.add(headerText);
- // Return the HTML string for the panel
- return hPanel.getElement().getString();
- }
-
- /**
- * Create a {@code TreeItem} and set it's user object
- *
- * @param tn The user object of the {@code TreeItem}
- * @return {@code TreeItem}
- */
- private TreeItem createItem(TreeNode tn)
- {
- TreeItem item = new TreeItem(tn.getText());
- item.setUserObject(tn);
-
- return item;
- }
-
- private OpenHandler<TreeItem> createOpenHandler()
- {
- return new OpenHandler<TreeItem>()
- {
- @Override
- public void onOpen(OpenEvent<TreeItem> event)
- {
- final TreeItem target = event.getTarget();
- final TreeNode tn = (TreeNode) target.getUserObject();
- String text = target.getText();
- target.setText("Loading items");
-
- if (target.getChildCount() > 0)
- {
- TreeItem it = target.getChild(0);
- if (it instanceof PendingItem)
- {
- target.removeItem(it);
- }
- }
-
- if (target.getChildCount() == 0)
- {
- gtnService.updateItem(getPortalContainerName(), tn, new AsyncCallback<TreeNode>()
- {
-
- public void onFailure(Throwable caught)
- {
- Window.alert("Failed to update tree items. See server log for more details.");
- Application.this.details.setHTML("Failed to load sub-tree");
- }
-
- public void onSuccess(TreeNode result)
- {
-
- for (TreeNode tnChild : result.getChildren())
- {
- TreeItem it = Application.this.createItem(tnChild);
- if (!tnChild.getChildren().isEmpty())
- {
- it.addItem(new PendingItem());
- }
- target.addItem(it);
- }
- }
- });
- }
-
- target.setText(text);
- }
- };
- }
-
- private SelectionHandler<TreeItem> createSelectionHandler()
- {
- return new SelectionHandler<TreeItem>()
- {
- @Override
- public void onSelection(SelectionEvent<TreeItem> event)
- {
- final TreeItem item = event.getSelectedItem();
- TreeNode node = (TreeNode) item.getUserObject();
- Application.this.header.setHTML(node.getPath());
- Application.this.details.setHTML(node.getNodeInfo());
-
- if (node.isExportable())
- {
- Application.this.exportHref = DOWNLOAD_ACTION_URL + "?pc=" + getPortalContainerName() +
- "&ownerType=" + node.getType() + "&ownerId=" + node.getSiteName();
- Application.this.exportButton.setEnabled(true);
- }
- else
- {
- Application.this.exportButton.setEnabled(false);
- Application.this.exportHref = "#";
- }
- }
- };
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/Application.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,533 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.core.client.GWT;
+import com.google.gwt.event.dom.client.ClickEvent;
+import com.google.gwt.event.dom.client.ClickHandler;
+import com.google.gwt.event.logical.shared.OpenEvent;
+import com.google.gwt.event.logical.shared.OpenHandler;
+import com.google.gwt.event.logical.shared.SelectionEvent;
+import com.google.gwt.event.logical.shared.SelectionHandler;
+import com.google.gwt.gadgets.client.Gadget;
+import com.google.gwt.gadgets.client.Gadget.ModulePrefs;
+import com.google.gwt.gadgets.client.UserPreferences;
+import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.user.client.Timer;
+import com.google.gwt.user.client.Window;
+import com.google.gwt.user.client.rpc.AsyncCallback;
+import com.google.gwt.user.client.rpc.ServiceDefTarget;
+import com.google.gwt.user.client.ui.AbsolutePanel;
+import com.google.gwt.user.client.ui.Anchor;
+import com.google.gwt.user.client.ui.Button;
+import com.google.gwt.user.client.ui.CheckBox;
+import com.google.gwt.user.client.ui.DecoratedTabPanel;
+import com.google.gwt.user.client.ui.DecoratorPanel;
+import com.google.gwt.user.client.ui.DialogBox;
+import com.google.gwt.user.client.ui.Frame;
+import com.google.gwt.user.client.ui.HTML;
+import com.google.gwt.user.client.ui.HasVerticalAlignment;
+import com.google.gwt.user.client.ui.HorizontalPanel;
+import com.google.gwt.user.client.ui.Image;
+import com.google.gwt.user.client.ui.Label;
+import com.google.gwt.user.client.ui.NamedFrame;
+import com.google.gwt.user.client.ui.RootPanel;
+import com.google.gwt.user.client.ui.ScrollPanel;
+import com.google.gwt.user.client.ui.Tree;
+import com.google.gwt.user.client.ui.TreeItem;
+import gwtupload.client.IUploader;
+import gwtupload.client.MultiUploader;
+
+import java.util.List;
+
+/**
+ * {@code Application}
+ * <p>
+ * Creates a gadget that will show the sites tree which allows to navigate
+ * between different sites. This gadget allows the administrator of the portal
+ * to import/export sites.
+ * </p>
+ * Created on Dec 29, 2010, 8:01:18 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+@ModulePrefs(title = "Export/Import Tool", author = "Nabil Benothman", author_email = "nbenothm(a)redhat.com",
+ description = "This gadget allows the administrator to export/import sites")
+(a)Gadget.AllowHtmlQuirksMode(false)
+(a)Gadget.UseLongManifestName(false)
+public class Application extends Gadget<UserPreferences>
+{
+ private static final String EXPORT_IMPORT_SERVLET_BASE = ServletPath.path("/exportimport");
+
+ // asycn services to get requests from the server through ajax.
+ private final GateInServiceAsync gtnService = GWT.create(GateInService.class);
+ private static final String UPLOAD_ACTION_URL = EXPORT_IMPORT_SERVLET_BASE + "/upload";
+ private static final String DOWNLOAD_ACTION_URL = EXPORT_IMPORT_SERVLET_BASE + "/download";
+ // gui elements
+ private HTML header;
+ private HTML details;
+ private Button exportButton;
+ private Frame frame;
+ private String exportHref = "";
+
+ private SelectionHandler<TreeItem> selectionHandler;
+ private OpenHandler<TreeItem> openHandler;
+
+ @Override
+ protected void init(UserPreferences preferences)
+ {
+ ((ServiceDefTarget) gtnService).setServiceEntryPoint(EXPORT_IMPORT_SERVLET_BASE + "/GateInService");
+
+ selectionHandler = createSelectionHandler();
+ openHandler = createOpenHandler();
+
+ TreeImages images = GWT.create(TreeImages.class);
+
+ RootPanel rootPanel = RootPanel.get();
+ rootPanel.setSize("885px", "490px");
+ rootPanel.addStyleName("rootpanelstyle");
+
+ DecoratedTabPanel decoratedTabPanel = new DecoratedTabPanel();
+ decoratedTabPanel.setAnimationEnabled(true);
+ rootPanel.add(decoratedTabPanel, 10, 10);
+ decoratedTabPanel.setSize("870px", "480px");
+
+ AbsolutePanel absolutePanel = new AbsolutePanel();
+ absolutePanel.setSize("847px", "425px");
+
+ DecoratorPanel decoratorPanelWest = new DecoratorPanel();
+ absolutePanel.add(decoratorPanelWest, 10, 10);
+ decoratorPanelWest.setSize("240px", "400px");
+
+ AbsolutePanel treePanel = new AbsolutePanel();
+ treePanel.setSize("230px", "395px");
+ decoratorPanelWest.setWidget(treePanel);
+
+ ScrollPanel treeScrollPanel = new ScrollPanel();
+ treePanel.add(treeScrollPanel, 10, 10);
+ treeScrollPanel.setSize("210px", "375px");
+
+ final Tree tree = getTree(images);
+ treeScrollPanel.setWidget(tree);
+
+ final DecoratorPanel decoratorPanelCenter = new DecoratorPanel();
+
+ absolutePanel.add(decoratorPanelCenter, 256, 10);
+ decoratorPanelCenter.setSize("400px", "402px");
+
+ AbsolutePanel centerAbsolutePanel = new AbsolutePanel();
+ centerAbsolutePanel.setSize("97%", "100%");
+
+ this.header = new HTML("Select an item");
+ this.header.setDirectionEstimator(true);
+ centerAbsolutePanel.add(this.header, 10, 10);
+ this.header.setSize("450px", "50px");
+ this.header.setStyleName("header-style");
+
+ this.details = new HTML("No item selected");
+ centerAbsolutePanel.add(this.details, 10, 76);
+ this.details.setSize("450px", "156px");
+
+ HTML html = new HTML("<hr />", true);
+ centerAbsolutePanel.add(html, 10, 43);
+ html.setSize("380px", "15px");
+
+ this.frame = new NamedFrame("download-frame");
+ frame.setStyleName("download-frame");
+ rootPanel.add(frame);
+
+ this.exportButton = new Button("Export site", new ClickHandler()
+ {
+
+ public void onClick(ClickEvent event)
+ {
+ frame.setUrl(exportHref);
+ }
+ });
+ this.exportButton.setEnabled(false);
+ centerAbsolutePanel.add(this.exportButton, 10, 359);
+ decoratorPanelCenter.setWidget(centerAbsolutePanel);
+ centerAbsolutePanel.setSize("400px", "393px");
+
+ DecoratorPanel decoratorPanelEast = new DecoratorPanel();
+ absolutePanel.add(decoratorPanelEast, 672, 10);
+ decoratorPanelEast.setSize("165px", "405px");
+ AbsolutePanel absolutePanelImportLink = new AbsolutePanel();
+ absolutePanelImportLink.setSize("162px", "395px");
+
+ final Anchor importAnchor = new Anchor("Import site");
+ absolutePanelImportLink.add(importAnchor, 10, 10);
+ importAnchor.setWidth("90%");
+
+ decoratorPanelEast.setWidget(absolutePanelImportLink);
+
+ decoratedTabPanel.add(absolutePanel, "Export/Import sites", false);
+ importAnchor.addClickHandler(new ClickHandler()
+ {
+
+ public void onClick(ClickEvent event)
+ {
+ DialogBox dialogBox = createDialogBox();
+ dialogBox.setPopupPosition(267, 60);
+ dialogBox.show();
+ }
+ });
+
+ decoratedTabPanel.selectTab(0);
+ }
+
+ public native String getPortalContainerName()/*-{
+ return parent.eXo.env.portal.context.substring(1); // remove leading '/'
+ }-*/;
+
+ /**
+ * Create and return the dialog box for the site upload.
+ *
+ * @return a {@code DialogBox}
+ */
+ private DialogBox createDialogBox()
+ {
+
+ // Create a dialog box
+ final DialogBox dialogBox = new DialogBox();
+ dialogBox.setText("Import site");
+ dialogBox.setAnimationEnabled(true);
+ dialogBox.setModal(true);
+ dialogBox.setGlassEnabled(true);
+
+ final AbsolutePanel absolutePanel = new AbsolutePanel();
+ dialogBox.setWidget(absolutePanel);
+ absolutePanel.setStyleName("status-panel");
+ absolutePanel.setSize("400px", "220px");
+
+ final Button importButton = new Button("Import");
+ final CheckBox overwriteBox = new CheckBox("Overwrite the existing site");
+ final HTML statusImg = new HTML(" ", true);
+ final Label statusLabel = new Label("status label");
+ final Label headerLabel = new Label("Select file to import :");
+ final AbsolutePanel statusPanel = new AbsolutePanel();
+ headerLabel.setSize("380px", "39px");
+ headerLabel.setStyleName("header-style");
+ absolutePanel.add(headerLabel, 10, 10);
+
+ final MultiUploader uploader = new GTNMultiUploader();
+ uploader.setAvoidRepeatFiles(false);
+ absolutePanel.add(uploader, 10, 46);
+ uploader.setSize("380px", "32px");
+ uploader.addOnChangeUploadHandler(new IUploader.OnChangeUploaderHandler()
+ {
+
+ @Override
+ public void onChange(IUploader uploader)
+ {
+ // Nothing to do
+ if (uploader.getFileName() != null)
+ {
+ importButton.setEnabled(true);
+ }
+ }
+ });
+
+ // Add a finish handler which will notify user once the upload finishes
+ uploader.addOnFinishUploadHandler(new IUploader.OnFinishUploaderHandler()
+ {
+
+ public void onFinish(IUploader uploader)
+ {
+
+ switch (uploader.getStatus())
+ {
+ case SUCCESS:
+ statusLabel.setText("File uploaded with success");
+ statusLabel.setStyleName("success-style");
+ statusImg.setStyleName("success-style-icon");
+ break;
+ case ERROR:
+ statusLabel.setText("File upload error");
+ statusLabel.setStyleName("error-style");
+ statusImg.setStyleName("error-style-icon");
+ break;
+ case CANCELED:
+ statusLabel.setText("File upload canceled");
+ statusLabel.setStyleName("warn-style");
+ statusImg.setStyleName("warn-style-icon");
+ break;
+ default:
+ statusLabel.setText("");
+ statusLabel.setStyleName("blank-style");
+ statusImg.setStyleName("blank-style");
+ break;
+ }
+
+ overwriteBox.setEnabled(true);
+ importButton.setEnabled(true);
+ }
+ });
+ // Add a start handler which will disable the UI until the upload finishes
+ uploader.addOnStartUploadHandler(new IUploader.OnStartUploaderHandler()
+ {
+
+ boolean isShwon = false;
+
+ public void onStart(IUploader uploader)
+ {
+ statusLabel.setText("Process in progress...");
+ statusLabel.setStyleName("progress-style");
+ statusImg.setStyleName("progress-style-icon");
+ overwriteBox.setEnabled(false);
+ importButton.setEnabled(false);
+ if (!isShwon)
+ {
+ statusPanel.setStyleName("status-panel");
+ statusPanel.setSize("380px", "0px");
+ absolutePanel.add(statusPanel, 10, 120);
+
+ Timer t = new Timer()
+ {
+
+ int dx = 5;
+ int height = 0;
+
+ public void run()
+ {
+ height += dx;
+ statusPanel.setHeight(height + "px");
+ if (height >= 45)
+ {
+ cancel(); // Stop the timer
+ }
+ }
+ };
+
+ // Schedule the timer to run once in 100 milliseconds.
+ t.scheduleRepeating(100);
+ isShwon = true;
+ }
+ }
+ });
+ // accept only zip files
+ uploader.setValidExtensions("zip");
+ // You can add customized parameters to servlet call
+ uploader.setServletPath(UPLOAD_ACTION_URL + "?pc=" + getPortalContainerName());
+
+ overwriteBox.setTitle("If you want to force overwriting an existing site, check this checkbox");
+ overwriteBox.addClickHandler(new ClickHandler()
+ {
+
+ public void onClick(ClickEvent event)
+ {
+ String url = UPLOAD_ACTION_URL + "?pc=" + getPortalContainerName() + "&overwrite=" + overwriteBox.getValue();
+ uploader.setServletPath(url);
+ }
+ });
+
+ absolutePanel.add(overwriteBox, 10, 84);
+ Button closeButton = new Button("Close", new ClickHandler()
+ {
+
+ public void onClick(ClickEvent event)
+ {
+ dialogBox.hide();
+ }
+ });
+ absolutePanel.add(closeButton, 343, 188);
+
+ statusImg.setStyleName("progress-style-icon");
+ statusPanel.add(statusImg, 10, 10);
+ statusImg.setSize("50px", "30px");
+
+ statusPanel.add(statusLabel, 60, 15);
+ statusLabel.setSize("300px", "25px");
+
+ importButton.addClickHandler(new ClickHandler()
+ {
+
+ @Override
+ public void onClick(ClickEvent event)
+ {
+
+ uploader.submit();
+ }
+ });
+ importButton.setEnabled(false);
+ absolutePanel.add(importButton, 10, 188);
+
+ return dialogBox;
+ }
+
+ /**
+ * Create and initialize the site tree
+ *
+ * @param resources
+ * @return
+ */
+ private Tree getTree(TreeImages resources)
+ {
+ Tree tree = new Tree(resources, true);
+ tree.addSelectionHandler(selectionHandler);
+ tree.addOpenHandler(openHandler);
+ tree.setAnimationEnabled(true);
+ tree.setSize("100%", "100%");
+ //final TreeItem rootItem = tree.addItem(getItemString("Sites", resources.treeRoot()));
+ final TreeNode rootNode = new TreeNode("Sites");
+ final TreeItem rootItem = createItem(rootNode);
+ tree.addItem(rootItem);
+
+ gtnService.getRootNodes(getPortalContainerName(), new AsyncCallback<List<TreeNode>>()
+ {
+
+ public void onFailure(Throwable caught)
+ {
+ Window.alert("Failed to load sites available for export. See server log for more details.");
+ }
+
+ public void onSuccess(List<TreeNode> result)
+ {
+ for (TreeNode tn : result)
+ {
+ TreeItem ti = createItem(tn);
+ ti.addItem(new PendingItem());
+ rootItem.addItem(ti);
+ rootNode.addChild(tn);
+ }
+ }
+ });
+
+ rootItem.setState(true);
+
+ return tree;
+ }
+
+ /**
+ * @param text
+ * @param image
+ * @return
+ */
+ private String getItemString(String text, ImageResource image)
+ {
+ // Add the image and text to a horizontal panel
+ HorizontalPanel hPanel = new HorizontalPanel();
+ hPanel.setSpacing(0);
+ hPanel.setVerticalAlignment(HasVerticalAlignment.ALIGN_MIDDLE);
+ hPanel.add(new Image(image));
+ HTML headerText = new HTML(text);
+ hPanel.add(headerText);
+ // Return the HTML string for the panel
+ return hPanel.getElement().getString();
+ }
+
+ /**
+ * Create a {@code TreeItem} and set it's user object
+ *
+ * @param tn The user object of the {@code TreeItem}
+ * @return {@code TreeItem}
+ */
+ private TreeItem createItem(TreeNode tn)
+ {
+ TreeItem item = new TreeItem(tn.getText());
+ item.setUserObject(tn);
+
+ return item;
+ }
+
+ private OpenHandler<TreeItem> createOpenHandler()
+ {
+ return new OpenHandler<TreeItem>()
+ {
+ @Override
+ public void onOpen(OpenEvent<TreeItem> event)
+ {
+ final TreeItem target = event.getTarget();
+ final TreeNode tn = (TreeNode) target.getUserObject();
+ String text = target.getText();
+ target.setText("Loading items");
+
+ if (target.getChildCount() > 0)
+ {
+ TreeItem it = target.getChild(0);
+ if (it instanceof PendingItem)
+ {
+ target.removeItem(it);
+ }
+ }
+
+ if (target.getChildCount() == 0)
+ {
+ gtnService.updateItem(getPortalContainerName(), tn, new AsyncCallback<TreeNode>()
+ {
+
+ public void onFailure(Throwable caught)
+ {
+ Window.alert("Failed to update tree items. See server log for more details.");
+ Application.this.details.setHTML("Failed to load sub-tree");
+ }
+
+ public void onSuccess(TreeNode result)
+ {
+
+ for (TreeNode tnChild : result.getChildren())
+ {
+ TreeItem it = Application.this.createItem(tnChild);
+ if (!tnChild.getChildren().isEmpty())
+ {
+ it.addItem(new PendingItem());
+ }
+ target.addItem(it);
+ }
+ }
+ });
+ }
+
+ target.setText(text);
+ }
+ };
+ }
+
+ private SelectionHandler<TreeItem> createSelectionHandler()
+ {
+ return new SelectionHandler<TreeItem>()
+ {
+ @Override
+ public void onSelection(SelectionEvent<TreeItem> event)
+ {
+ final TreeItem item = event.getSelectedItem();
+ TreeNode node = (TreeNode) item.getUserObject();
+ Application.this.header.setHTML(node.getPath());
+ Application.this.details.setHTML(node.getNodeInfo());
+
+ if (node.isExportable())
+ {
+ Application.this.exportHref = DOWNLOAD_ACTION_URL + "?pc=" + getPortalContainerName() +
+ "&ownerType=" + node.getType() + "&ownerId=" + node.getSiteName();
+ Application.this.exportButton.setEnabled(true);
+ }
+ else
+ {
+ Application.this.exportButton.setEnabled(false);
+ Application.this.exportHref = "#";
+ }
+ }
+ };
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class DisplayableException extends Exception
-{
- public DisplayableException(String message)
- {
- super(message);
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/DisplayableException.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class DisplayableException extends Exception
+{
+ public DisplayableException(String message)
+ {
+ super(message);
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,139 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.uibinder.client.UiConstructor;
-import gwtupload.client.IFileInput;
-import gwtupload.client.IFileInput.FileInputType;
-import gwtupload.client.IUploadStatus;
-import gwtupload.client.IUploader;
-import gwtupload.client.MultiUploader;
-import gwtupload.client.Uploader;
-
-/**
- * {@code GTNMultiUploader}
- * <p>
- * Implementation of an uploader panel that is able to handle several uploads.
- * This uploader allows to upload multiple files asynchronously using <i>Ajax</i>
- * This version of multi file uploader allows to enable/disable the automatic upload, i.e
- * the upload starts right after selecting file. The default version does not allow
- * this feature and upload is automatic by default.
- * </p>
- * Created on Feb 17, 2011, 6:47:18 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-public class GTNMultiUploader extends MultiUploader
-{
-
- private boolean automaticUpload;
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * Initialize widget components and layout elements.
- * Uses the default status widget and the standard input file.
- */
- public GTNMultiUploader()
- {
- super();
- }
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * Initialize widget components and layout elements.
- * Uses the default status widget.
- *
- * @param type
- * file input to use
- */
- @UiConstructor
- public GTNMultiUploader(FileInputType type)
- {
- super(type);
- }
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * Initialize widget components and layout elements.
- *
- * @param type
- * file input to use
- * @param status
- * Customized status widget to use
- */
- public GTNMultiUploader(FileInputType type, IUploadStatus status)
- {
- super(type, status);
- }
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * Initialize widget components and layout elements.
- *
- * @param status
- * Customized status widget to use
- */
- public GTNMultiUploader(IUploadStatus status)
- {
- super(status);
- }
-
- /**
- * Create a new instance of {@code GTNMultiUploader}
- * This is the constructor for customized multi-uploaders.
- *
- * @param status
- * Customized status widget to use
- * @param fileInput
- * Customized file input
- */
- public GTNMultiUploader(IUploadStatus status, IFileInput fileInput)
- {
- super(status, fileInput);
- }
-
- @Override
- protected IUploader getUploaderInstance()
- {
- Uploader uploader = (Uploader) super.getUploaderInstance();
- uploader.setAutoSubmit(automaticUpload);
- return uploader;
- }
-
- /**
- * @return the automaticUpload
- */
- public boolean isAutomaticUpload()
- {
- return automaticUpload;
- }
-
- /**
- * @param automaticUpload the automaticUpload to set
- */
- public void setAutomaticUpload(boolean automaticUpload)
- {
- this.automaticUpload = automaticUpload;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GTNMultiUploader.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.uibinder.client.UiConstructor;
+import gwtupload.client.IFileInput;
+import gwtupload.client.IFileInput.FileInputType;
+import gwtupload.client.IUploadStatus;
+import gwtupload.client.IUploader;
+import gwtupload.client.MultiUploader;
+import gwtupload.client.Uploader;
+
+/**
+ * {@code GTNMultiUploader}
+ * <p>
+ * Implementation of an uploader panel that is able to handle several uploads.
+ * This uploader allows to upload multiple files asynchronously using <i>Ajax</i>
+ * This version of multi file uploader allows to enable/disable the automatic upload, i.e
+ * the upload starts right after selecting file. The default version does not allow
+ * this feature and upload is automatic by default.
+ * </p>
+ * Created on Feb 17, 2011, 6:47:18 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+public class GTNMultiUploader extends MultiUploader
+{
+
+ private boolean automaticUpload;
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * Initialize widget components and layout elements.
+ * Uses the default status widget and the standard input file.
+ */
+ public GTNMultiUploader()
+ {
+ super();
+ }
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * Initialize widget components and layout elements.
+ * Uses the default status widget.
+ *
+ * @param type
+ * file input to use
+ */
+ @UiConstructor
+ public GTNMultiUploader(FileInputType type)
+ {
+ super(type);
+ }
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * Initialize widget components and layout elements.
+ *
+ * @param type
+ * file input to use
+ * @param status
+ * Customized status widget to use
+ */
+ public GTNMultiUploader(FileInputType type, IUploadStatus status)
+ {
+ super(type, status);
+ }
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * Initialize widget components and layout elements.
+ *
+ * @param status
+ * Customized status widget to use
+ */
+ public GTNMultiUploader(IUploadStatus status)
+ {
+ super(status);
+ }
+
+ /**
+ * Create a new instance of {@code GTNMultiUploader}
+ * This is the constructor for customized multi-uploaders.
+ *
+ * @param status
+ * Customized status widget to use
+ * @param fileInput
+ * Customized file input
+ */
+ public GTNMultiUploader(IUploadStatus status, IFileInput fileInput)
+ {
+ super(status, fileInput);
+ }
+
+ @Override
+ protected IUploader getUploaderInstance()
+ {
+ Uploader uploader = (Uploader) super.getUploaderInstance();
+ uploader.setAutoSubmit(automaticUpload);
+ return uploader;
+ }
+
+ /**
+ * @return the automaticUpload
+ */
+ public boolean isAutomaticUpload()
+ {
+ return automaticUpload;
+ }
+
+ /**
+ * @param automaticUpload the automaticUpload to set
+ */
+ public void setAutomaticUpload(boolean automaticUpload)
+ {
+ this.automaticUpload = automaticUpload;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.user.client.rpc.RemoteService;
-
-import java.util.List;
-
-/**
- * {@code GateInService}
- * <p/>
- * Created on Jan 3, 2011, 12:28:43 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-public interface GateInService extends RemoteService
-{
-
- /**
- * Update the Tree item asynchronously
- *
- * @param containerName name of portal container
- * @param item The item to be updated
- * @return the updated tree node
- * @throws DisplayableException
- */
- public TreeNode updateItem(String containerName, TreeNode item) throws Exception;
-
- /**
- * Retrieve asynchronously the list of root nodes
- *
- * @param containerName The portal container name
- * @return The list of the root nodes
- * @throws DisplayableException
- */
- public List<TreeNode> getRootNodes(String containerName) throws Exception;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInService.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,58 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.user.client.rpc.RemoteService;
+
+import java.util.List;
+
+/**
+ * {@code GateInService}
+ * <p/>
+ * Created on Jan 3, 2011, 12:28:43 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+public interface GateInService extends RemoteService
+{
+
+ /**
+ * Update the Tree item asynchronously
+ *
+ * @param containerName name of portal container
+ * @param item The item to be updated
+ * @return the updated tree node
+ * @throws DisplayableException
+ */
+ public TreeNode updateItem(String containerName, TreeNode item) throws Exception;
+
+ /**
+ * Retrieve asynchronously the list of root nodes
+ *
+ * @param containerName The portal container name
+ * @return The list of the root nodes
+ * @throws DisplayableException
+ */
+ public List<TreeNode> getRootNodes(String containerName) throws Exception;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,56 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.user.client.rpc.AsyncCallback;
-
-import java.util.List;
-
-/**
- * {@code GateInServiceAsync}
- * <p/>
- * Created on Jan 3, 2011, 12:29:53 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-public interface GateInServiceAsync
-{
-
- /**
- * Update the Tree item asynchronously
- *
- * @param portalContainerName name of portal container
- * @param item The item to be updated
- * @param asyncCallback asynchronous callback
- */
- public void updateItem(String portalContainerName, TreeNode item, AsyncCallback<TreeNode> asyncCallback);
-
- /**
- * Retrieve asynchronously the list of root nodes
- *
- * @param portalContainerName The portal container name
- * @param asyncCallback asynchronous callback
- */
- public void getRootNodes(String portalContainerName, AsyncCallback<List<TreeNode>> asyncCallback);
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/GateInServiceAsync.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,56 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.user.client.rpc.AsyncCallback;
+
+import java.util.List;
+
+/**
+ * {@code GateInServiceAsync}
+ * <p/>
+ * Created on Jan 3, 2011, 12:29:53 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+public interface GateInServiceAsync
+{
+
+ /**
+ * Update the Tree item asynchronously
+ *
+ * @param portalContainerName name of portal container
+ * @param item The item to be updated
+ * @param asyncCallback asynchronous callback
+ */
+ public void updateItem(String portalContainerName, TreeNode item, AsyncCallback<TreeNode> asyncCallback);
+
+ /**
+ * Retrieve asynchronously the list of root nodes
+ *
+ * @param portalContainerName The portal container name
+ * @param asyncCallback asynchronous callback
+ */
+ public void getRootNodes(String portalContainerName, AsyncCallback<List<TreeNode>> asyncCallback);
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,89 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.safehtml.shared.SafeHtml;
-import com.google.gwt.user.client.ui.TreeItem;
-import com.google.gwt.user.client.ui.Widget;
-
-import java.io.Serializable;
-
-/**
- * {@code PendingItem}
- * <p>
- * Tree item representing a pending item (loading in progress)
- * </p>
- * Created on Dec 29, 2010, 1:25:04 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-public class PendingItem extends TreeItem implements Serializable
-{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
-
- /**
- * Create a new instance of {@code PendingItem}
- */
- public PendingItem()
- {
- super("Loading sub-tree...");
- this.setStyleName("gwt-TreeItem-pending");
- }
-
- /**
- * Constructs a tree item with the given HTML.
- *
- * @param html the item's HTML
- */
- public PendingItem(String html)
- {
- this();
- }
-
- /**
- * Constructs a tree item with the given HTML.
- *
- * @param html the item's HTML
- */
- public PendingItem(SafeHtml html)
- {
- super(html);
- this.setText("Loading sub-tree...");
- }
-
- /**
- * Constructs a tree item with the given <code>Widget</code>.
- *
- * @param widget the item's widget
- */
- public PendingItem(Widget widget)
- {
- super(widget);
- this.setText("Loading sub-tree...");
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/PendingItem.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.safehtml.shared.SafeHtml;
+import com.google.gwt.user.client.ui.TreeItem;
+import com.google.gwt.user.client.ui.Widget;
+
+import java.io.Serializable;
+
+/**
+ * {@code PendingItem}
+ * <p>
+ * Tree item representing a pending item (loading in progress)
+ * </p>
+ * Created on Dec 29, 2010, 1:25:04 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+public class PendingItem extends TreeItem implements Serializable
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Create a new instance of {@code PendingItem}
+ */
+ public PendingItem()
+ {
+ super("Loading sub-tree...");
+ this.setStyleName("gwt-TreeItem-pending");
+ }
+
+ /**
+ * Constructs a tree item with the given HTML.
+ *
+ * @param html the item's HTML
+ */
+ public PendingItem(String html)
+ {
+ this();
+ }
+
+ /**
+ * Constructs a tree item with the given HTML.
+ *
+ * @param html the item's HTML
+ */
+ public PendingItem(SafeHtml html)
+ {
+ super(html);
+ this.setText("Loading sub-tree...");
+ }
+
+ /**
+ * Constructs a tree item with the given <code>Widget</code>.
+ *
+ * @param widget the item's widget
+ */
+ public PendingItem(Widget widget)
+ {
+ super(widget);
+ this.setText("Loading sub-tree...");
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,39 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-class ServletPath
-{
- private static final String SERVLET_CONTEXT = "/gwtGadgets";
-
- private ServletPath(){}
-
- static String path(String path)
- {
- return SERVLET_CONTEXT + path;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/ServletPath.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+class ServletPath
+{
+ private static final String SERVLET_CONTEXT = "/gwtGadgets";
+
+ private ServletPath(){}
+
+ static String path(String path)
+ {
+ return SERVLET_CONTEXT + path;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
-
-import com.google.gwt.resources.client.ImageResource;
-import com.google.gwt.user.client.ui.Tree;
-
-/**
- * {@code TreeImages}
- * <p/>
- * Created on Jan 6, 2011, 10:45:39 AM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-public interface TreeImages extends Tree.Resources
-{
-
- /**
- * Use noimage.png, which is a blank 1x1 image.
- */
- @Source("../public/images/cogwheel.png")
- ImageResource treeLeaf();
-
- @Source("../public/images/home-icon.jpg")
- ImageResource treeRoot();
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeImages.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
+
+import com.google.gwt.resources.client.ImageResource;
+import com.google.gwt.user.client.ui.Tree;
+
+/**
+ * {@code TreeImages}
+ * <p/>
+ * Created on Jan 6, 2011, 10:45:39 AM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+public interface TreeImages extends Tree.Resources
+{
+
+ /**
+ * Use noimage.png, which is a blank 1x1 image.
+ */
+ @Source("../public/images/cogwheel.png")
+ ImageResource treeLeaf();
+
+ @Source("../public/images/home-icon.jpg")
+ ImageResource treeRoot();
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,250 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
-
-import java.io.Serializable;
-import java.util.ArrayList;
-import java.util.List;
-
-/**
- * {@code TreeNode}
- * <p/>
- * Created on Dec 29, 2010, 1:25:55 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-public class TreeNode implements Serializable
-{
-
- /**
- *
- */
- private static final long serialVersionUID = 1L;
- private TreeNode parent;
- private List<TreeNode> children;
- private String text;
- private String type;
- private String siteName;
- private String nodeInfo;
- private boolean updated = false;
- private boolean exportable;
-
- /**
- * Create a new instance of {@code TreeNode}
- */
- public TreeNode()
- {
- this("");
- }
-
- /**
- * Create a new instance of {@code TreeNode}
- *
- * @param text The tree node text
- */
- public TreeNode(String text)
- {
- this.text = text;
- this.children = new ArrayList<TreeNode>();
- }
-
- /**
- * Create a new instance of {@code TreeNode}
- *
- * @param text The tree node text
- * @param children The tree node children
- */
- public TreeNode(String text, List<TreeNode> children)
- {
- this.text = text;
- this.children = children;
- }
-
- /**
- * Return the node informations
- *
- * @return The node informations
- */
- public String getNodeInfo()
- {
- return this.nodeInfo;
- }
-
- /**
- * Setter for the node info
- *
- * @param info the info to set
- */
- public void setNodeInfo(String info)
- {
- this.nodeInfo = info;
- }
-
- /**
- * Add a {@code TreeNode} child to the list of children
- *
- * @param child The child to add
- * @return {@code true} if the child is added successfully else {@code false}
- */
- public boolean addChild(TreeNode child)
- {
- child.setParent(this);
- return this.children.add(child);
- }
-
- /**
- * Remove the child, if exists, from the list of children
- *
- * @param tn The child to be removed
- * @return {@code true} if the child is removed successfully else {@code false}
- */
- public boolean removeChild(TreeNode tn)
- {
- return this.children.remove(tn);
- }
-
- /**
- * @return the children
- */
- public List<TreeNode> getChildren()
- {
- return this.children;
- }
-
- /**
- * Setter for the children
- *
- * @param children the children to set
- */
- public void setChildren(List<TreeNode> children)
- {
- this.children = children;
- }
-
- /**
- * @return the text
- */
- public String getText()
- {
- return text;
- }
-
- /**
- * Setter for the text
- *
- * @param text the text to set
- */
- public void setText(String text)
- {
- this.text = text;
- }
-
- /**
- * @return the type
- */
- public String getType()
- {
- return type;
- }
-
- /**
- * @param type the type to set
- */
- public void setType(String type)
- {
- this.type = type;
- }
-
- /**
- * @return the path
- */
- public String getPath()
- {
- return (this.parent != null ? this.parent.getPath() : "") + " » " + this.text;
- }
-
- /**
- * @return the updated
- */
- public boolean isUpdated()
- {
- return updated;
- }
-
- /**
- * @param updated the updated to set
- */
- public void setUpdated(boolean updated)
- {
- this.updated = updated;
- }
-
- /**
- * @return the siteName
- */
- public String getSiteName()
- {
- return siteName;
- }
-
- /**
- * @param siteName the siteName to set
- */
- public void setSiteName(String siteName)
- {
- this.siteName = siteName;
- }
-
- /**
- * @return the exportable
- */
- public boolean isExportable()
- {
- return exportable;
- }
-
- /**
- * @param exportable the exportable to set
- */
- public void setExportable(boolean exportable)
- {
- this.exportable = exportable;
- }
-
- /**
- * @return the parent
- */
- public TreeNode getParent()
- {
- return parent;
- }
-
- /**
- * @param parent the parent to set
- */
- public void setParent(TreeNode parent)
- {
- this.parent = parent;
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/client/TreeNode.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,250 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.client;
+
+import java.io.Serializable;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * {@code TreeNode}
+ * <p/>
+ * Created on Dec 29, 2010, 1:25:55 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+public class TreeNode implements Serializable
+{
+
+ /**
+ *
+ */
+ private static final long serialVersionUID = 1L;
+ private TreeNode parent;
+ private List<TreeNode> children;
+ private String text;
+ private String type;
+ private String siteName;
+ private String nodeInfo;
+ private boolean updated = false;
+ private boolean exportable;
+
+ /**
+ * Create a new instance of {@code TreeNode}
+ */
+ public TreeNode()
+ {
+ this("");
+ }
+
+ /**
+ * Create a new instance of {@code TreeNode}
+ *
+ * @param text The tree node text
+ */
+ public TreeNode(String text)
+ {
+ this.text = text;
+ this.children = new ArrayList<TreeNode>();
+ }
+
+ /**
+ * Create a new instance of {@code TreeNode}
+ *
+ * @param text The tree node text
+ * @param children The tree node children
+ */
+ public TreeNode(String text, List<TreeNode> children)
+ {
+ this.text = text;
+ this.children = children;
+ }
+
+ /**
+ * Return the node informations
+ *
+ * @return The node informations
+ */
+ public String getNodeInfo()
+ {
+ return this.nodeInfo;
+ }
+
+ /**
+ * Setter for the node info
+ *
+ * @param info the info to set
+ */
+ public void setNodeInfo(String info)
+ {
+ this.nodeInfo = info;
+ }
+
+ /**
+ * Add a {@code TreeNode} child to the list of children
+ *
+ * @param child The child to add
+ * @return {@code true} if the child is added successfully else {@code false}
+ */
+ public boolean addChild(TreeNode child)
+ {
+ child.setParent(this);
+ return this.children.add(child);
+ }
+
+ /**
+ * Remove the child, if exists, from the list of children
+ *
+ * @param tn The child to be removed
+ * @return {@code true} if the child is removed successfully else {@code false}
+ */
+ public boolean removeChild(TreeNode tn)
+ {
+ return this.children.remove(tn);
+ }
+
+ /**
+ * @return the children
+ */
+ public List<TreeNode> getChildren()
+ {
+ return this.children;
+ }
+
+ /**
+ * Setter for the children
+ *
+ * @param children the children to set
+ */
+ public void setChildren(List<TreeNode> children)
+ {
+ this.children = children;
+ }
+
+ /**
+ * @return the text
+ */
+ public String getText()
+ {
+ return text;
+ }
+
+ /**
+ * Setter for the text
+ *
+ * @param text the text to set
+ */
+ public void setText(String text)
+ {
+ this.text = text;
+ }
+
+ /**
+ * @return the type
+ */
+ public String getType()
+ {
+ return type;
+ }
+
+ /**
+ * @param type the type to set
+ */
+ public void setType(String type)
+ {
+ this.type = type;
+ }
+
+ /**
+ * @return the path
+ */
+ public String getPath()
+ {
+ return (this.parent != null ? this.parent.getPath() : "") + " » " + this.text;
+ }
+
+ /**
+ * @return the updated
+ */
+ public boolean isUpdated()
+ {
+ return updated;
+ }
+
+ /**
+ * @param updated the updated to set
+ */
+ public void setUpdated(boolean updated)
+ {
+ this.updated = updated;
+ }
+
+ /**
+ * @return the siteName
+ */
+ public String getSiteName()
+ {
+ return siteName;
+ }
+
+ /**
+ * @param siteName the siteName to set
+ */
+ public void setSiteName(String siteName)
+ {
+ this.siteName = siteName;
+ }
+
+ /**
+ * @return the exportable
+ */
+ public boolean isExportable()
+ {
+ return exportable;
+ }
+
+ /**
+ * @param exportable the exportable to set
+ */
+ public void setExportable(boolean exportable)
+ {
+ this.exportable = exportable;
+ }
+
+ /**
+ * @return the parent
+ */
+ public TreeNode getParent()
+ {
+ return parent;
+ }
+
+ /**
+ * @param parent the parent to set
+ */
+ public void setParent(TreeNode parent)
+ {
+ this.parent = parent;
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,460 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.
- */
-
-/** Add css rules here for your application. */
-
-/*
-button {
- display: block;
- font-size: 16pt
-}
-
-.widePanel {
- width: 100%
-}
-
-img {
- margin-top: 20px;
-}
-
-.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent {
- overflow: hidden;
- padding: 5px 5px 5px 5px;
- border-style: solid;
- border-width: 2px 2px 2px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- -khtml-border-radius: 4px;
- border-radius: 4px;
-}
-
-.gwt-StackPanel {
- cursor:default;
-}
-
-.gwt-StackPanel .gwt-StackPanelItem {
- cursor:default;
-}
-
-body {
- background-color: white;
- color: black;
- font-family: Arial, sans-serif;
- font-size: small;
- margin: 5px;
-}
-*/
-
-.rootpanelstyle {
- border: #AAAAAA solid 2px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- -khtml-border-radius: 4px;
- border-radius: 4px;
- padding: 5px;
-}
-
-.download-frame {
- border: 0px;
- visibility: hidden;
-}
-
-.header-style {
- text-decoration: none;
- color: #ff8800;
- font: bold;
-}
-
-.success-style {
- text-decoration: none;
- color: #00ff00;
- font-weight: bold;
- height: 35px;
- padding-left: 10px;
-}
-
-.success-style-icon {
- text-decoration: none;
- background-image: url('images/success-icon.png');
- background-repeat: no-repeat;
- background-position: left top;
- padding-right: 5px;
- height: 35px;
-}
-
-.error-style {
- text-decoration: none;
- color: #ff0000;
- height: 35px;
- font-weight: bold;
- padding-left: 10px;
-}
-
-.error-style-icon {
- background-image: url('images/error-icon.png');
- background-repeat: no-repeat;
- background-position: left top;
- text-decoration: none;
- height: 35px;
- padding-right: 5px;
-}
-
-.warn-style {
- text-decoration: none;
- color: #ff8800;
- height: 35px;
- font-weight: bold;
- padding-left: 10px;
-}
-
-.warn-style-icon {
- background-image: url('images/warning-icon.png');
- background-repeat: no-repeat;
- background-position: left top;
- text-decoration: none;
- height: 35px;
- padding-right: 5px;
-}
-
-.progress-style{
- text-decoration: none;
- color: #0000ff;
- height: 35px;
- font-weight: bold;
- padding-left: 10px;
-}
-
-.progress-style-icon{
- background-image: url('images/loading.gif');
- background-repeat: no-repeat;
- background-position: left top;
- text-decoration: none;
- padding-right: 5px;
- height: 35px;
-}
-
-.blank-style {
- background-image: url("images/blank.png");
- background-repeat: no-repeat;
-}
-
-.status-panel {
- border: #AAAAAA solid 1px;
- -moz-border-radius: 4px;
- -webkit-border-radius: 4px;
- -khtml-border-radius: 4px;
- border-radius: 4px;
-}
-
-status-panel-no-border {
- border: #AAAAAA solid 0px;
-}
-
-a {
- color: darkblue;
-}
-
-a:visited {
- color: darkblue;
-}
-
-.gwt-DialogBox {
- /*
- border: 2px solid #AAAAAA;
- background-color: white;
- */
-}
-
-.gwt-DialogBox .Caption {
- background-image: url(gray_gradient.gif);
- background-repeat: repeat-x;
- padding: 4px;
- padding-bottom: 8px;
- font-weight: bold;
- cursor: default;
-}
-
-.gwt-MenuBar {
- background-color: #C3D9FF;
- cursor: default;
-}
-
-.gwt-MenuItem {
- font-size: 80%;
- margin: 1px;
- cursor: default;
-}
-
-.gwt-MenuItem-selected {
- background-color: #E8EEF7;
-}
-
-.gwt-Tree {
-}
-
-.gwt-Tree .gwt-TreeItem {
- font-size: 80%;
- cursor: default;
-}
-
-.gwt-Tree .gwt-TreeItem-selected {
- background-color: #C3D9FF;
-}
-
-.gwt-StackPanel {
- background-color: white;
- border: 1px solid #AAAAAA;
- width: 15em;
-}
-
-.gwt-StackPanel .gwt-StackPanelItem {
- background-image: url(blue_gradient.gif);
- background-repeat: repeat-x;
- background-color: #EEEEEE;
-
-}
-
-.gwt-StackPanel .gwt-StackPanelItem-selected {
-}
-
-.gwt-TabPanel {
-
-}
-
-.gwt-TabPanelBottom {
- border-left: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- border-bottom: 1px solid #87b3ff;
-}
-
-.gwt-TabBar {
- font-size: smaller;
-}
-
-.gwt-TabBar .gwt-TabBarFirst {
- height: 100%;
- border-bottom: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- padding-left: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarRest {
- border-bottom: 1px solid #87b3ff;
- padding-right: 3px;
-}
-
-.gwt-TabBar .gwt-TabBarItem {
- border-top: 1px solid #87b3ff;
- border-bottom: 1px solid #87b3ff;
- padding: 2px;
- cursor: hand;
- white-space: nowrap;
- border-right: 1px solid #87b3ff;
-}
-
-.gwt-TabBar .gwt-TabBarItem-selected {
- font-weight: bold;
- background-color: #e8eef7;
- border-top: 1px solid #87b3ff;
- border-right: 1px solid #87b3ff;
- border-bottom: 1px solid #e8eef7;
- padding: 2px;
- cursor: default;
- white-space: nowrap;
-}
-
-.gwt-PushButton-up {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-PushButton-up-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-PushButton-down {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-PushButton-down-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-up {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-up-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- border: 2px solid transparent;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-down {
- background-color: #C3D9FF;
- padding: 2px;
- background-color: #E8F1FF;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-ToggleButton-down-hovering {
- background-color: #C3D9FF;
- padding: 2px;
- background-color: #E8F1FF;
- border: 2px solid transparent;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
- cursor: pointer;
- cursor: hand;
-}
-
-.gwt-RichTextArea {
- border: 1px solid black;
- background-color: white;
-}
-
-.gwt-RichTextToolbar {
- background-color: #C3D9FF;
- padding: 2px;
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-up {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-down {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
-}
-
-.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-up {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
- margin-right: 2px;
- border: 1px solid #C3D9FF;
- border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-down {
- margin-right: 2px;
- background-color: #E8F1FF;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
-}
-
-.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
- margin-right: 2px;
- background-color: #E8F1FF;
- border: 1px solid #C3D9FF;
- border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
-}
-
-.gwt-HorizontalSplitPanel {
- border: 8px solid #C3D9FF;
-}
-
-.gwt-HorizontalSplitPanel .splitter {
- background-color: #C3D9FF;
- cursor: move;
-}
-
-.gwt-HorizontalSplitPanel .left {
- background-color: #E8EEF7;
-}
-
-.gwt-VerticalSplitPanel {
- border: 8px solid #C3D9FF;
-}
-
-.gwt-VerticalSplitPanel .splitter {
- background-color: #C3D9FF;
- height: 8px;
- cursor: move;
-}
-
-.gwt-SuggestBoxPopup {
- border: 2px solid #C3D9FF;
-}
-
-.gwt-SuggestBoxPopup .item {
- padding: 2px;
-}
-
-.gwt-SuggestBoxPopup .item-selected {
- background-color: #C3D9FF;
- padding: 2px;
-}
-
-.gwt-DisclosurePanel {
- border: 2px solid #C3D9FF;
-}
-
-.gwt-DisclosurePanel .header {
- background-color: #e8eef7;
- cursor: hand;
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/Application.css 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,460 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.
+ */
+
+/** Add css rules here for your application. */
+
+/*
+button {
+ display: block;
+ font-size: 16pt
+}
+
+.widePanel {
+ width: 100%
+}
+
+img {
+ margin-top: 20px;
+}
+
+.gwt-TabLayoutPanel .gwt-TabLayoutPanelContent {
+ overflow: hidden;
+ padding: 5px 5px 5px 5px;
+ border-style: solid;
+ border-width: 2px 2px 2px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+}
+
+.gwt-StackPanel {
+ cursor:default;
+}
+
+.gwt-StackPanel .gwt-StackPanelItem {
+ cursor:default;
+}
+
+body {
+ background-color: white;
+ color: black;
+ font-family: Arial, sans-serif;
+ font-size: small;
+ margin: 5px;
+}
+*/
+
+.rootpanelstyle {
+ border: #AAAAAA solid 2px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+ padding: 5px;
+}
+
+.download-frame {
+ border: 0px;
+ visibility: hidden;
+}
+
+.header-style {
+ text-decoration: none;
+ color: #ff8800;
+ font: bold;
+}
+
+.success-style {
+ text-decoration: none;
+ color: #00ff00;
+ font-weight: bold;
+ height: 35px;
+ padding-left: 10px;
+}
+
+.success-style-icon {
+ text-decoration: none;
+ background-image: url('images/success-icon.png');
+ background-repeat: no-repeat;
+ background-position: left top;
+ padding-right: 5px;
+ height: 35px;
+}
+
+.error-style {
+ text-decoration: none;
+ color: #ff0000;
+ height: 35px;
+ font-weight: bold;
+ padding-left: 10px;
+}
+
+.error-style-icon {
+ background-image: url('images/error-icon.png');
+ background-repeat: no-repeat;
+ background-position: left top;
+ text-decoration: none;
+ height: 35px;
+ padding-right: 5px;
+}
+
+.warn-style {
+ text-decoration: none;
+ color: #ff8800;
+ height: 35px;
+ font-weight: bold;
+ padding-left: 10px;
+}
+
+.warn-style-icon {
+ background-image: url('images/warning-icon.png');
+ background-repeat: no-repeat;
+ background-position: left top;
+ text-decoration: none;
+ height: 35px;
+ padding-right: 5px;
+}
+
+.progress-style{
+ text-decoration: none;
+ color: #0000ff;
+ height: 35px;
+ font-weight: bold;
+ padding-left: 10px;
+}
+
+.progress-style-icon{
+ background-image: url('images/loading.gif');
+ background-repeat: no-repeat;
+ background-position: left top;
+ text-decoration: none;
+ padding-right: 5px;
+ height: 35px;
+}
+
+.blank-style {
+ background-image: url("images/blank.png");
+ background-repeat: no-repeat;
+}
+
+.status-panel {
+ border: #AAAAAA solid 1px;
+ -moz-border-radius: 4px;
+ -webkit-border-radius: 4px;
+ -khtml-border-radius: 4px;
+ border-radius: 4px;
+}
+
+status-panel-no-border {
+ border: #AAAAAA solid 0px;
+}
+
+a {
+ color: darkblue;
+}
+
+a:visited {
+ color: darkblue;
+}
+
+.gwt-DialogBox {
+ /*
+ border: 2px solid #AAAAAA;
+ background-color: white;
+ */
+}
+
+.gwt-DialogBox .Caption {
+ background-image: url(gray_gradient.gif);
+ background-repeat: repeat-x;
+ padding: 4px;
+ padding-bottom: 8px;
+ font-weight: bold;
+ cursor: default;
+}
+
+.gwt-MenuBar {
+ background-color: #C3D9FF;
+ cursor: default;
+}
+
+.gwt-MenuItem {
+ font-size: 80%;
+ margin: 1px;
+ cursor: default;
+}
+
+.gwt-MenuItem-selected {
+ background-color: #E8EEF7;
+}
+
+.gwt-Tree {
+}
+
+.gwt-Tree .gwt-TreeItem {
+ font-size: 80%;
+ cursor: default;
+}
+
+.gwt-Tree .gwt-TreeItem-selected {
+ background-color: #C3D9FF;
+}
+
+.gwt-StackPanel {
+ background-color: white;
+ border: 1px solid #AAAAAA;
+ width: 15em;
+}
+
+.gwt-StackPanel .gwt-StackPanelItem {
+ background-image: url(blue_gradient.gif);
+ background-repeat: repeat-x;
+ background-color: #EEEEEE;
+
+}
+
+.gwt-StackPanel .gwt-StackPanelItem-selected {
+}
+
+.gwt-TabPanel {
+
+}
+
+.gwt-TabPanelBottom {
+ border-left: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ border-bottom: 1px solid #87b3ff;
+}
+
+.gwt-TabBar {
+ font-size: smaller;
+}
+
+.gwt-TabBar .gwt-TabBarFirst {
+ height: 100%;
+ border-bottom: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ padding-left: 3px;
+}
+
+.gwt-TabBar .gwt-TabBarRest {
+ border-bottom: 1px solid #87b3ff;
+ padding-right: 3px;
+}
+
+.gwt-TabBar .gwt-TabBarItem {
+ border-top: 1px solid #87b3ff;
+ border-bottom: 1px solid #87b3ff;
+ padding: 2px;
+ cursor: hand;
+ white-space: nowrap;
+ border-right: 1px solid #87b3ff;
+}
+
+.gwt-TabBar .gwt-TabBarItem-selected {
+ font-weight: bold;
+ background-color: #e8eef7;
+ border-top: 1px solid #87b3ff;
+ border-right: 1px solid #87b3ff;
+ border-bottom: 1px solid #e8eef7;
+ padding: 2px;
+ cursor: default;
+ white-space: nowrap;
+}
+
+.gwt-PushButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-PushButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-up-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ border: 2px solid transparent;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-ToggleButton-down-hovering {
+ background-color: #C3D9FF;
+ padding: 2px;
+ background-color: #E8F1FF;
+ border: 2px solid transparent;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+ cursor: pointer;
+ cursor: hand;
+}
+
+.gwt-RichTextArea {
+ border: 1px solid black;
+ background-color: white;
+}
+
+.gwt-RichTextToolbar {
+ background-color: #C3D9FF;
+ padding: 2px;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-PushButton-down-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-up-hovering {
+ margin-right: 2px;
+ border: 1px solid #C3D9FF;
+ border-color: #E8F1FF rgb(157, 174, 205) rgb(157, 174, 205) rgb(232, 241, 255);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-RichTextToolbar .gwt-ToggleButton-down-hovering {
+ margin-right: 2px;
+ background-color: #E8F1FF;
+ border: 1px solid #C3D9FF;
+ border-color: #9DAECD rgb(232, 241, 255) rgb(232, 241, 255) rgb(157, 174, 205);
+}
+
+.gwt-HorizontalSplitPanel {
+ border: 8px solid #C3D9FF;
+}
+
+.gwt-HorizontalSplitPanel .splitter {
+ background-color: #C3D9FF;
+ cursor: move;
+}
+
+.gwt-HorizontalSplitPanel .left {
+ background-color: #E8EEF7;
+}
+
+.gwt-VerticalSplitPanel {
+ border: 8px solid #C3D9FF;
+}
+
+.gwt-VerticalSplitPanel .splitter {
+ background-color: #C3D9FF;
+ height: 8px;
+ cursor: move;
+}
+
+.gwt-SuggestBoxPopup {
+ border: 2px solid #C3D9FF;
+}
+
+.gwt-SuggestBoxPopup .item {
+ padding: 2px;
+}
+
+.gwt-SuggestBoxPopup .item-selected {
+ background-color: #C3D9FF;
+ padding: 2px;
+}
+
+.gwt-DisclosurePanel {
+ border: 2px solid #C3D9FF;
+}
+
+.gwt-DisclosurePanel .header {
+ background-color: #e8eef7;
+ cursor: hand;
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png
===================================================================
(Binary files differ)
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/blank.png)
===================================================================
(Binary files differ)
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png
===================================================================
(Binary files differ)
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/cogwheel.png)
===================================================================
(Binary files differ)
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png
===================================================================
(Binary files differ)
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/error-icon.png)
===================================================================
(Binary files differ)
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg
===================================================================
(Binary files differ)
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/home-icon.jpg)
===================================================================
(Binary files differ)
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif
===================================================================
(Binary files differ)
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/loading.gif)
===================================================================
(Binary files differ)
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png
===================================================================
(Binary files differ)
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/success-icon.png)
===================================================================
(Binary files differ)
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png
===================================================================
(Binary files differ)
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/public/images/warning-icon.png)
===================================================================
(Binary files differ)
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
-
-import org.exoplatform.container.ExoContainer;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public abstract class ContainerCallback<T>
-{
-
- public abstract T doInContainer(ExoContainer container) throws Exception;
-
- public <C> C getComponent(ExoContainer container, Class<C> componentClass)
- {
- return componentClass.cast(container.getComponentInstanceOfType(componentClass));
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerCallback.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
+
+import org.exoplatform.container.ExoContainer;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public abstract class ContainerCallback<T>
+{
+
+ public abstract T doInContainer(ExoContainer container) throws Exception;
+
+ public <C> C getComponent(ExoContainer container, Class<C> componentClass)
+ {
+ return componentClass.cast(container.getComponentInstanceOfType(componentClass));
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,67 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
-
-import org.exoplatform.container.ExoContainerContext;
-import org.exoplatform.container.PortalContainer;
-import org.exoplatform.container.RootContainer;
-import org.exoplatform.container.component.RequestLifeCycle;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-
-/**
- * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
- * @version $Revision$
- */
-public class ContainerRequestHandler
-{
-
- private static final Logger log = LoggerFactory.getLogger(ContainerRequestHandler.class);
-
- public static <T> T doInRequest(String containerName, ContainerCallback<T> containerCallback) throws Exception
- {
- RootContainer rootContainer = RootContainer.getInstance();
- PortalContainer container = rootContainer.getPortalContainer(containerName);
- if (container == null)
- {
- throw new RuntimeException("Invalid container name " + containerName);
- }
- ExoContainerContext.setCurrentContainer(container);
- RequestLifeCycle.begin(container, true);
- try
- {
- return containerCallback.doInContainer(container);
- }
- finally
- {
- try
- {
- RequestLifeCycle.end();
- }
- catch (IllegalStateException e)
- {
- log.warn("Illegal state exception ending RequestLifeCycle", e);
- }
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/ContainerRequestHandler.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,67 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
+
+import org.exoplatform.container.ExoContainerContext;
+import org.exoplatform.container.PortalContainer;
+import org.exoplatform.container.RootContainer;
+import org.exoplatform.container.component.RequestLifeCycle;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+
+/**
+ * @author <a href="mailto:nscavell@redhat.com">Nick Scavelli</a>
+ * @version $Revision$
+ */
+public class ContainerRequestHandler
+{
+
+ private static final Logger log = LoggerFactory.getLogger(ContainerRequestHandler.class);
+
+ public static <T> T doInRequest(String containerName, ContainerCallback<T> containerCallback) throws Exception
+ {
+ RootContainer rootContainer = RootContainer.getInstance();
+ PortalContainer container = rootContainer.getPortalContainer(containerName);
+ if (container == null)
+ {
+ throw new RuntimeException("Invalid container name " + containerName);
+ }
+ ExoContainerContext.setCurrentContainer(container);
+ RequestLifeCycle.begin(container, true);
+ try
+ {
+ return containerCallback.doInContainer(container);
+ }
+ finally
+ {
+ try
+ {
+ RequestLifeCycle.end();
+ }
+ catch (IllegalStateException e)
+ {
+ log.warn("Illegal state exception ending RequestLifeCycle", e);
+ }
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,128 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
-
-import org.exoplatform.container.ExoContainer;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.PathAddress;
-import org.gatein.management.api.controller.ManagedRequest;
-import org.gatein.management.api.controller.ManagedResponse;
-import org.gatein.management.api.controller.ManagementController;
-import org.gatein.management.api.operation.OperationNames;
-
-import javax.servlet.ServletException;
-import javax.servlet.http.HttpServlet;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.IOException;
-import java.io.OutputStream;
-import java.text.SimpleDateFormat;
-import java.util.Date;
-
-import static org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
-
-/**
- * {@code FileDownloadServlet}
- * <p>
- * The file download servlet. Used for export sites.
- * </p>
- * Created on Feb 3, 2011, 3:49:16 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-public class FileDownloadServlet extends HttpServlet
-{
-
- private static final Logger log = LoggerFactory.getLogger(FileDownloadServlet.class);
- private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
-
- @Override
- protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
- {
- String portalContainerName = request.getParameter("pc");
- final String type = request.getParameter("ownerType");
- final String name = request.getParameter("ownerId");
- String safeName = name.replaceAll("/", "-");
- if (safeName.startsWith("-"))
- {
- safeName = safeName.substring(1);
- }
- String filename = new StringBuilder(type).append("_").append(safeName).append("_").append(getTimestamp()).append(".zip").toString();
-
- response.setContentType("application/octet-stream; charset=UTF-8");
- response.setHeader("Content-disposition", "attachment; filename=\"" + filename + "\"");
-
- final OutputStream os = response.getOutputStream();
- try
- {
- doInRequest(portalContainerName, new ContainerCallback<Void>()
- {
-
- public Void doInContainer(ExoContainer container) throws Exception
- {
- ManagementController controller = getComponent(container, ManagementController.class);
- PathAddress address = PathAddress.pathAddress("mop", type+"sites", name);
-
- ManagedRequest request = ManagedRequest.Factory.create(OperationNames.EXPORT_RESOURCE, address, ContentType.ZIP);
- ManagedResponse response = controller.execute(request);
- if (response.getOutcome().isSuccess())
- {
- response.writeResult(os);
- }
- else
- {
- throw new Exception(response.getOutcome().getFailureDescription());
- }
-
- return null;
- }
- });
- os.flush();
- }
- catch (Exception e)
- {
- log.error("Error during download", e);
- }
- finally
- {
- if (os != null)
- {
- os.close();
- }
- }
- }
-
- @Override
- protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
- {
- doGet(request, response);
- }
-
- private String getTimestamp()
- {
- return SDF.format(new Date());
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileDownloadServlet.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,128 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
+
+import org.exoplatform.container.ExoContainer;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.controller.ManagedRequest;
+import org.gatein.management.api.controller.ManagedResponse;
+import org.gatein.management.api.controller.ManagementController;
+import org.gatein.management.api.operation.OperationNames;
+
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServlet;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.text.SimpleDateFormat;
+import java.util.Date;
+
+import static org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
+
+/**
+ * {@code FileDownloadServlet}
+ * <p>
+ * The file download servlet. Used for export sites.
+ * </p>
+ * Created on Feb 3, 2011, 3:49:16 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+public class FileDownloadServlet extends HttpServlet
+{
+
+ private static final Logger log = LoggerFactory.getLogger(FileDownloadServlet.class);
+ private static final SimpleDateFormat SDF = new SimpleDateFormat("yyyy-MM-dd_HH-mm-ss");
+
+ @Override
+ protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ String portalContainerName = request.getParameter("pc");
+ final String type = request.getParameter("ownerType");
+ final String name = request.getParameter("ownerId");
+ String safeName = name.replaceAll("/", "-");
+ if (safeName.startsWith("-"))
+ {
+ safeName = safeName.substring(1);
+ }
+ String filename = new StringBuilder(type).append("_").append(safeName).append("_").append(getTimestamp()).append(".zip").toString();
+
+ response.setContentType("application/octet-stream; charset=UTF-8");
+ response.setHeader("Content-disposition", "attachment; filename=\"" + filename + "\"");
+
+ final OutputStream os = response.getOutputStream();
+ try
+ {
+ doInRequest(portalContainerName, new ContainerCallback<Void>()
+ {
+
+ public Void doInContainer(ExoContainer container) throws Exception
+ {
+ ManagementController controller = getComponent(container, ManagementController.class);
+ PathAddress address = PathAddress.pathAddress("mop", type+"sites", name);
+
+ ManagedRequest request = ManagedRequest.Factory.create(OperationNames.EXPORT_RESOURCE, address, ContentType.ZIP);
+ ManagedResponse response = controller.execute(request);
+ if (response.getOutcome().isSuccess())
+ {
+ response.writeResult(os);
+ }
+ else
+ {
+ throw new Exception(response.getOutcome().getFailureDescription());
+ }
+
+ return null;
+ }
+ });
+ os.flush();
+ }
+ catch (Exception e)
+ {
+ log.error("Error during download", e);
+ }
+ finally
+ {
+ if (os != null)
+ {
+ os.close();
+ }
+ }
+ }
+
+ @Override
+ protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException
+ {
+ doGet(request, response);
+ }
+
+ private String getTimestamp()
+ {
+ return SDF.format(new Date());
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,194 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
-
-import gwtupload.server.UploadAction;
-import gwtupload.server.exceptions.UploadActionException;
-import org.apache.commons.fileupload.FileItem;
-import org.exoplatform.container.ExoContainer;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.PathAddress;
-import org.gatein.management.api.controller.ManagedRequest;
-import org.gatein.management.api.controller.ManagedResponse;
-import org.gatein.management.api.controller.ManagementController;
-import org.gatein.management.api.operation.OperationNames;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.IOException;
-import java.io.InputStream;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Hashtable;
-import java.util.List;
-import java.util.Map;
-
-import static org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
-
-/**
- * {@code FileUploadServlet}
- * <p>
- * The file upload servlet based on GWT upload, used for import sites.
- * </p>
- * Created on Jan 3, 2011, 3:43:36 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-public class FileUploadServlet extends UploadAction
-{
-
- private static final Logger log = LoggerFactory.getLogger(FileUploadServlet.class);
- private static final long serialVersionUID = 1L;
- private Hashtable<String, String> receivedContentTypes = new Hashtable<String, String>();
- /**
- * Maintain a list with received files and their content types.
- */
- private Hashtable<String, File> receivedFiles = new Hashtable<String, File>();
-
- /**
- * Override executeAction to save the received files in a custom place
- * and delete this items from session.
- */
- @Override
- public String executeAction(HttpServletRequest request, List<FileItem> sessionFiles) throws UploadActionException
- {
- StringBuilder response = new StringBuilder("<response>\n");
- int count = 0;
- for (FileItem item : sessionFiles)
- {
- //if (false == item.isFormField()) {
- if (!item.isFormField())
- {
- count++;
- try
- {
- // Create a new file based on the remote file name in the client
- String saveName = item.getName().replaceAll("[\\\\/><\\|\\s\"'{}()\\[\\]]+", "_");
- // Create a temporary file placed in the default system temp folder
- File file = File.createTempFile(saveName, ".zip");
- item.write(file);
-
- // Save a list with the received files
- receivedFiles.put(item.getFieldName(), file);
- receivedContentTypes.put(item.getFieldName(), item.getContentType());
-
- String overwriteVal = request.getParameter("overwrite");
- boolean overwrite = Boolean.parseBoolean(overwriteVal);
-
- // process the uploaded file
- processImport(request.getParameter("pc"), new FileInputStream(file), overwrite);
-
- // Compose a xml message with the full file information which can be parsed in client side
- response.append("<file-").append(count).append("-field>").append(item.getFieldName()).append("</file-").append(count).append("-field>\n");
- response.append("<file-").append(count).append("-name>").append(item.getName()).append("</file-").append(count).append("-name>\n");
- response.append("<file-").append(count).append("-size>").append(item.getSize()).append("</file-").append(count).append("-size>\n");
- response.append("<file-").append(count).append("-type>").append(item.getContentType()).append("</file-").append(count).append("type>\n");
- }
- catch (Exception e)
- {
- throw new UploadActionException(e);
- }
- }
- }
-
- // Remove files from session because we have a copy of them
- removeSessionFileItems(request);
-
- // Send information of the received files to the client.
- return response.append("</response>\n").toString();
- }
-
- /**
- * Get the content of an uploaded file.
- */
- @Override
- public void getUploadedFile(HttpServletRequest request, HttpServletResponse response) throws IOException
- {
- String fieldName = request.getParameter(PARAM_SHOW);
- File f = receivedFiles.get(fieldName);
- if (f != null)
- {
- response.setContentType(receivedContentTypes.get(fieldName));
- FileInputStream is = new FileInputStream(f);
- copyFromInputStreamToOutputStream(is, response.getOutputStream());
- }
- else
- {
- renderXmlResponse(request, response, ERROR_ITEM_NOT_FOUND);
- }
- }
-
- /**
- * Remove a file when the user sends a delete request.
- */
- @Override
- public void removeItem(HttpServletRequest request, String fieldName) throws UploadActionException
- {
- File file = receivedFiles.get(fieldName);
- receivedFiles.remove(fieldName);
- receivedContentTypes.remove(fieldName);
- if (file != null)
- {
- boolean deleted = file.delete();
- if (!deleted) log.warn("Could not delete file " + file);
- }
- }
-
- private void processImport(final String containerName, final InputStream in, final boolean overwrite) throws Exception
- {
-
- doInRequest(containerName, new ContainerCallback<Void>()
- {
-
- @Override
- public Void doInContainer(ExoContainer container) throws Exception
- {
- ManagementController controller = getComponent(container, ManagementController.class);
-
- Map<String, List<String>> attributes = Collections.emptyMap();
- if (overwrite)
- {
- attributes = new HashMap<String, List<String>>(1);
- attributes.put("import-strategy", Collections.singletonList("overwrite"));
- }
- ManagedRequest request = ManagedRequest.Factory.create(
- OperationNames.IMPORT_RESOURCE, PathAddress.pathAddress("mop"),
- attributes, in, ContentType.ZIP);
-
- ManagedResponse response = controller.execute(request);
- if (!response.getOutcome().isSuccess())
- {
- throw new Exception(response.getOutcome().getFailureDescription());
- }
-
- return null;
- }
- });
-
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/FileUploadServlet.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,194 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
+
+import gwtupload.server.UploadAction;
+import gwtupload.server.exceptions.UploadActionException;
+import org.apache.commons.fileupload.FileItem;
+import org.exoplatform.container.ExoContainer;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.controller.ManagedRequest;
+import org.gatein.management.api.controller.ManagedResponse;
+import org.gatein.management.api.controller.ManagementController;
+import org.gatein.management.api.operation.OperationNames;
+
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.List;
+import java.util.Map;
+
+import static org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
+
+/**
+ * {@code FileUploadServlet}
+ * <p>
+ * The file upload servlet based on GWT upload, used for import sites.
+ * </p>
+ * Created on Jan 3, 2011, 3:43:36 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+public class FileUploadServlet extends UploadAction
+{
+
+ private static final Logger log = LoggerFactory.getLogger(FileUploadServlet.class);
+ private static final long serialVersionUID = 1L;
+ private Hashtable<String, String> receivedContentTypes = new Hashtable<String, String>();
+ /**
+ * Maintain a list with received files and their content types.
+ */
+ private Hashtable<String, File> receivedFiles = new Hashtable<String, File>();
+
+ /**
+ * Override executeAction to save the received files in a custom place
+ * and delete this items from session.
+ */
+ @Override
+ public String executeAction(HttpServletRequest request, List<FileItem> sessionFiles) throws UploadActionException
+ {
+ StringBuilder response = new StringBuilder("<response>\n");
+ int count = 0;
+ for (FileItem item : sessionFiles)
+ {
+ //if (false == item.isFormField()) {
+ if (!item.isFormField())
+ {
+ count++;
+ try
+ {
+ // Create a new file based on the remote file name in the client
+ String saveName = item.getName().replaceAll("[\\\\/><\\|\\s\"'{}()\\[\\]]+", "_");
+ // Create a temporary file placed in the default system temp folder
+ File file = File.createTempFile(saveName, ".zip");
+ item.write(file);
+
+ // Save a list with the received files
+ receivedFiles.put(item.getFieldName(), file);
+ receivedContentTypes.put(item.getFieldName(), item.getContentType());
+
+ String overwriteVal = request.getParameter("overwrite");
+ boolean overwrite = Boolean.parseBoolean(overwriteVal);
+
+ // process the uploaded file
+ processImport(request.getParameter("pc"), new FileInputStream(file), overwrite);
+
+ // Compose a xml message with the full file information which can be parsed in client side
+ response.append("<file-").append(count).append("-field>").append(item.getFieldName()).append("</file-").append(count).append("-field>\n");
+ response.append("<file-").append(count).append("-name>").append(item.getName()).append("</file-").append(count).append("-name>\n");
+ response.append("<file-").append(count).append("-size>").append(item.getSize()).append("</file-").append(count).append("-size>\n");
+ response.append("<file-").append(count).append("-type>").append(item.getContentType()).append("</file-").append(count).append("type>\n");
+ }
+ catch (Exception e)
+ {
+ throw new UploadActionException(e);
+ }
+ }
+ }
+
+ // Remove files from session because we have a copy of them
+ removeSessionFileItems(request);
+
+ // Send information of the received files to the client.
+ return response.append("</response>\n").toString();
+ }
+
+ /**
+ * Get the content of an uploaded file.
+ */
+ @Override
+ public void getUploadedFile(HttpServletRequest request, HttpServletResponse response) throws IOException
+ {
+ String fieldName = request.getParameter(PARAM_SHOW);
+ File f = receivedFiles.get(fieldName);
+ if (f != null)
+ {
+ response.setContentType(receivedContentTypes.get(fieldName));
+ FileInputStream is = new FileInputStream(f);
+ copyFromInputStreamToOutputStream(is, response.getOutputStream());
+ }
+ else
+ {
+ renderXmlResponse(request, response, ERROR_ITEM_NOT_FOUND);
+ }
+ }
+
+ /**
+ * Remove a file when the user sends a delete request.
+ */
+ @Override
+ public void removeItem(HttpServletRequest request, String fieldName) throws UploadActionException
+ {
+ File file = receivedFiles.get(fieldName);
+ receivedFiles.remove(fieldName);
+ receivedContentTypes.remove(fieldName);
+ if (file != null)
+ {
+ boolean deleted = file.delete();
+ if (!deleted) log.warn("Could not delete file " + file);
+ }
+ }
+
+ private void processImport(final String containerName, final InputStream in, final boolean overwrite) throws Exception
+ {
+
+ doInRequest(containerName, new ContainerCallback<Void>()
+ {
+
+ @Override
+ public Void doInContainer(ExoContainer container) throws Exception
+ {
+ ManagementController controller = getComponent(container, ManagementController.class);
+
+ Map<String, List<String>> attributes = Collections.emptyMap();
+ if (overwrite)
+ {
+ attributes = new HashMap<String, List<String>>(1);
+ attributes.put("import-strategy", Collections.singletonList("overwrite"));
+ }
+ ManagedRequest request = ManagedRequest.Factory.create(
+ OperationNames.IMPORT_RESOURCE, PathAddress.pathAddress("mop"),
+ attributes, in, ContentType.ZIP);
+
+ ManagedResponse response = controller.execute(request);
+ if (!response.getOutcome().isSuccess())
+ {
+ throw new Exception(response.getOutcome().getFailureDescription());
+ }
+
+ return null;
+ }
+ });
+
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,193 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2011, Red Hat, Inc., and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
-
-import com.google.gwt.user.server.rpc.RemoteServiceServlet;
-import com.google.gwt.user.server.rpc.SerializationPolicy;
-import com.google.gwt.user.server.rpc.SerializationPolicyLoader;
-import org.exoplatform.container.ExoContainer;
-import org.gatein.common.logging.Logger;
-import org.gatein.common.logging.LoggerFactory;
-import org.gatein.management.api.ContentType;
-import org.gatein.management.api.PathAddress;
-import org.gatein.management.api.controller.ManagedRequest;
-import org.gatein.management.api.controller.ManagedResponse;
-import org.gatein.management.api.controller.ManagementController;
-import org.gatein.management.api.operation.OperationNames;
-import org.gatein.management.api.operation.model.ReadResourceModel;
-import org.gatein.management.gadget.mop.exportimport.client.DisplayableException;
-import org.gatein.management.gadget.mop.exportimport.client.GateInService;
-import org.gatein.management.gadget.mop.exportimport.client.TreeNode;
-
-import javax.servlet.http.HttpServletRequest;
-import java.io.IOException;
-import java.io.InputStream;
-import java.text.ParseException;
-import java.util.ArrayList;
-import java.util.List;
-
-import static org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
-
-/**
- * {@code GateInServiceImpl}
- * <p>
- * The {@code GateInService} remote servlet implementation.
- * </p>
- * Created on Jan 3, 2011, 12:30:45 PM
- *
- * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
- * @version 1.0
- */
-public class GateInServiceImpl extends RemoteServiceServlet implements GateInService
-{
- private static final Logger log = LoggerFactory.getLogger(GateInService.class);
-
- @Override
- protected SerializationPolicy doGetSerializationPolicy(HttpServletRequest request, String moduleBaseURL, String strongName)
- {
- // Code taken from RemoteServiceServlet
- String serializationPolicyFilePath = SerializationPolicyLoader.getSerializationPolicyFileName("/exportimport/" + strongName);
-
- // Open the RPC resource file and read its contents.
- InputStream is = getServletContext().getResourceAsStream(serializationPolicyFilePath);
- try
- {
- if (is != null)
- {
- try
- {
- return SerializationPolicyLoader.loadFromStream(is, null);
- }
- catch (ParseException e)
- {
- log.error("Failed to parse the policy file '" + serializationPolicyFilePath + "'", e);
- }
- catch (IOException e)
- {
- log.error("Could not read the policy file '" + serializationPolicyFilePath + "'", e);
- }
- }
- else
- {
- String message = "ERROR: The serialization policy file '"
- + serializationPolicyFilePath
- + "' was not found; did you forget to include it in this deployment?";
- log.error(message);
- }
- }
- finally
- {
- if (is != null)
- {
- try
- {
- is.close();
- }
- catch (IOException e)
- {
- // Ignore this error
- }
- }
- }
-
- return null;
- }
-
- /**
- * Update the Tree item asynchronously
- *
- * @param containerName name of portal container
- * @param tn The item to be updated
- * @return the updated tree node
- */
- public TreeNode updateItem(String containerName, TreeNode tn)
- {
- //TODO: Do we need this ?
- return tn;
- }
-
- /**
- * Retrieve asynchronously the list of root nodes
- *
- * @param containerName The portal container name
- * @return The list of the root nodes
- */
- public List<TreeNode> getRootNodes(String containerName) throws Exception
- {
- try
- {
- return doInRequest(containerName, new ContainerCallback<List<TreeNode>>()
- {
- public List<TreeNode> doInContainer(ExoContainer container) throws Exception
- {
- ManagementController controller = getComponent(container, ManagementController.class);
- List<TreeNode> nodes = new ArrayList<TreeNode>();
- nodes.add(getSiteTypeNode(controller, "portal"));
- nodes.add(getSiteTypeNode(controller, "group"));
-
- return nodes;
- }
- });
- }
- catch (Exception e)
- {
- log.error("Exception obtaining portal and group site names.", e);
- throw e;
- }
- }
-
- private TreeNode getSiteTypeNode(ManagementController controller, String siteType) throws Exception
- {
- try
- {
- ManagedRequest request = ManagedRequest.Factory.create(
- OperationNames.READ_RESOURCE,
- PathAddress.pathAddress("mop", siteType + "sites"),
- ContentType.JSON);
-
- ManagedResponse response = controller.execute(request);
- if (!response.getOutcome().isSuccess())
- {
- throw new Exception(response.getOutcome().getFailureDescription());
- }
-
- ReadResourceModel result = (ReadResourceModel) response.getResult();
- List<TreeNode> children = new ArrayList<TreeNode>(result.getChildren().size());
- for (String siteName : result.getChildren())
- {
- TreeNode siteNode = new TreeNode(siteName);
- siteNode.setExportable(true);
- siteNode.setType(siteType);
- siteNode.setSiteName(siteName);
- children.add(siteNode);
- }
-
- return new TreeNode(siteType, children);
- }
- catch (Exception e)
- {
- log.error("Exception getting site type " + siteType + " node.", e);
- throw e;
- }
- }
-}
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/java/org/gatein/management/gadget/mop/exportimport/server/GateInServiceImpl.java 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,193 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2011, Red Hat, Inc., and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.management.gadget.mop.exportimport.server;
+
+import com.google.gwt.user.server.rpc.RemoteServiceServlet;
+import com.google.gwt.user.server.rpc.SerializationPolicy;
+import com.google.gwt.user.server.rpc.SerializationPolicyLoader;
+import org.exoplatform.container.ExoContainer;
+import org.gatein.common.logging.Logger;
+import org.gatein.common.logging.LoggerFactory;
+import org.gatein.management.api.ContentType;
+import org.gatein.management.api.PathAddress;
+import org.gatein.management.api.controller.ManagedRequest;
+import org.gatein.management.api.controller.ManagedResponse;
+import org.gatein.management.api.controller.ManagementController;
+import org.gatein.management.api.operation.OperationNames;
+import org.gatein.management.api.operation.model.ReadResourceModel;
+import org.gatein.management.gadget.mop.exportimport.client.DisplayableException;
+import org.gatein.management.gadget.mop.exportimport.client.GateInService;
+import org.gatein.management.gadget.mop.exportimport.client.TreeNode;
+
+import javax.servlet.http.HttpServletRequest;
+import java.io.IOException;
+import java.io.InputStream;
+import java.text.ParseException;
+import java.util.ArrayList;
+import java.util.List;
+
+import static org.gatein.management.gadget.mop.exportimport.server.ContainerRequestHandler.*;
+
+/**
+ * {@code GateInServiceImpl}
+ * <p>
+ * The {@code GateInService} remote servlet implementation.
+ * </p>
+ * Created on Jan 3, 2011, 12:30:45 PM
+ *
+ * @author <a href="mailto:nbenothm@redhat.com">Nabil Benothman</a>
+ * @version 1.0
+ */
+public class GateInServiceImpl extends RemoteServiceServlet implements GateInService
+{
+ private static final Logger log = LoggerFactory.getLogger(GateInService.class);
+
+ @Override
+ protected SerializationPolicy doGetSerializationPolicy(HttpServletRequest request, String moduleBaseURL, String strongName)
+ {
+ // Code taken from RemoteServiceServlet
+ String serializationPolicyFilePath = SerializationPolicyLoader.getSerializationPolicyFileName("/exportimport/" + strongName);
+
+ // Open the RPC resource file and read its contents.
+ InputStream is = getServletContext().getResourceAsStream(serializationPolicyFilePath);
+ try
+ {
+ if (is != null)
+ {
+ try
+ {
+ return SerializationPolicyLoader.loadFromStream(is, null);
+ }
+ catch (ParseException e)
+ {
+ log.error("Failed to parse the policy file '" + serializationPolicyFilePath + "'", e);
+ }
+ catch (IOException e)
+ {
+ log.error("Could not read the policy file '" + serializationPolicyFilePath + "'", e);
+ }
+ }
+ else
+ {
+ String message = "ERROR: The serialization policy file '"
+ + serializationPolicyFilePath
+ + "' was not found; did you forget to include it in this deployment?";
+ log.error(message);
+ }
+ }
+ finally
+ {
+ if (is != null)
+ {
+ try
+ {
+ is.close();
+ }
+ catch (IOException e)
+ {
+ // Ignore this error
+ }
+ }
+ }
+
+ return null;
+ }
+
+ /**
+ * Update the Tree item asynchronously
+ *
+ * @param containerName name of portal container
+ * @param tn The item to be updated
+ * @return the updated tree node
+ */
+ public TreeNode updateItem(String containerName, TreeNode tn)
+ {
+ //TODO: Do we need this ?
+ return tn;
+ }
+
+ /**
+ * Retrieve asynchronously the list of root nodes
+ *
+ * @param containerName The portal container name
+ * @return The list of the root nodes
+ */
+ public List<TreeNode> getRootNodes(String containerName) throws Exception
+ {
+ try
+ {
+ return doInRequest(containerName, new ContainerCallback<List<TreeNode>>()
+ {
+ public List<TreeNode> doInContainer(ExoContainer container) throws Exception
+ {
+ ManagementController controller = getComponent(container, ManagementController.class);
+ List<TreeNode> nodes = new ArrayList<TreeNode>();
+ nodes.add(getSiteTypeNode(controller, "portal"));
+ nodes.add(getSiteTypeNode(controller, "group"));
+
+ return nodes;
+ }
+ });
+ }
+ catch (Exception e)
+ {
+ log.error("Exception obtaining portal and group site names.", e);
+ throw e;
+ }
+ }
+
+ private TreeNode getSiteTypeNode(ManagementController controller, String siteType) throws Exception
+ {
+ try
+ {
+ ManagedRequest request = ManagedRequest.Factory.create(
+ OperationNames.READ_RESOURCE,
+ PathAddress.pathAddress("mop", siteType + "sites"),
+ ContentType.JSON);
+
+ ManagedResponse response = controller.execute(request);
+ if (!response.getOutcome().isSuccess())
+ {
+ throw new Exception(response.getOutcome().getFailureDescription());
+ }
+
+ ReadResourceModel result = (ReadResourceModel) response.getResult();
+ List<TreeNode> children = new ArrayList<TreeNode>(result.getChildren().size());
+ for (String siteName : result.getChildren())
+ {
+ TreeNode siteNode = new TreeNode(siteName);
+ siteNode.setExportable(true);
+ siteNode.setType(siteType);
+ siteNode.setSiteName(siteName);
+ children.add(siteNode);
+ }
+
+ return new TreeNode(siteType, children);
+ }
+ catch (Exception e)
+ {
+ log.error("Exception getting site type " + siteType + " node.", e);
+ throw e;
+ }
+ }
+}
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/webapp/ExportImport.html 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,44 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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 html>
-<html>
-<head>
- <meta http-equiv="content-type" content="text/html; charset=UTF-8">
- <title>MOP Export Import</title>
- <script type="text/javascript" language="javascript" src="exportimport/exportimport.nocache.js"></script>
-</head>
-<body>
-
-<h1>ExportImport</h1>
-
-<div id="rootpanelstyle"></div>
-<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
- style="position:absolute;width:0;height:0;border:0"></iframe>
-<noscript>
- <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
- Your web browser must have JavaScript enabled
- in order for this application to display correctly.
- </div>
-</noscript>
-</body>
-</html>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/webapp/ExportImport.html)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/ExportImport.html 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,44 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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 html>
+<html>
+<head>
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8">
+ <title>MOP Export Import</title>
+ <script type="text/javascript" language="javascript" src="exportimport/exportimport.nocache.js"></script>
+</head>
+<body>
+
+<h1>ExportImport</h1>
+
+<div id="rootpanelstyle"></div>
+<iframe src="javascript:''" id="__gwt_historyFrame" tabIndex='-1'
+ style="position:absolute;width:0;height:0;border:0"></iframe>
+<noscript>
+ <div style="width: 22em; position: absolute; left: 50%; margin-left: -11em; color: red; background-color: white; border: 1px solid red; padding: 4px; font-family: sans-serif">
+ Your web browser must have JavaScript enabled
+ in order for this application to display correctly.
+ </div>
+</noscript>
+</body>
+</html>
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,32 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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.
- -->
-
-<gadgets
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_1 http://www.gatein.org/xml/ns/gadgets_1_0"
- xmlns="http://www.gatein.org/xml/ns/gadgets_1_0">
-
- <gadget name="SiteExportImport">
- <path>/exportimport/Application.gadget.xml</path>
- </gadget>
-
-</gadgets>
\ No newline at end of file
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/gadget.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,32 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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.
+ -->
+
+<gadgets
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.gatein.org/xml/ns/gatein_objects_1_1 http://www.gatein.org/xml/ns/gadgets_1_0"
+ xmlns="http://www.gatein.org/xml/ns/gadgets_1_0">
+
+ <gadget name="SiteExportImport">
+ <path>/exportimport/Application.gadget.xml</path>
+ </gadget>
+
+</gadgets>
\ No newline at end of file
Deleted: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml
===================================================================
--- portal/trunk/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml 2011-09-13 05:13:55 UTC (rev 7367)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -1,80 +0,0 @@
-<!--
- ~ JBoss, Home of Professional Open Source.
- ~ Copyright 2011, Red Hat, Inc., and individual contributors
- ~ as indicated by the @author tags. See the copyright.txt file 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 web-app PUBLIC
- "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
- "http://java.sun.com/dtd/web-app_2_3.dtd" >
-
-<web-app>
-
- <display-name>gwtGadgets</display-name>
-
- <!-- TODO: Determine if these parameters (maxSize and slowUploads) is what we want for this -->
- <context-param>
- <!-- max size of the upload request -->
- <param-name>maxSize</param-name>
- <param-value>3145728</param-value>
- </context-param>
-
- <context-param>
- <!--
- Useful in development mode to slow down the uploads in fast networks.
- Put the number of milliseconds to sleep in each block received in the server.
- false or 0, means don't use slow uploads
- -->
- <param-name>slowUploads</param-name>
- <param-value>50</param-value>
- </context-param>
-
- <!-- GateIn service servlet -->
- <servlet>
- <servlet-name>gtnService</servlet-name>
- <servlet-class>org.gatein.management.gadget.mop.exportimport.server.GateInServiceImpl</servlet-class>
- </servlet>
-
- <!-- file upload servlet-->
- <servlet>
- <servlet-name>uploadServlet</servlet-name>
- <servlet-class>org.gatein.management.gadget.mop.exportimport.server.FileUploadServlet</servlet-class>
- </servlet>
-
- <servlet>
- <servlet-name>downloadServlet</servlet-name>
- <servlet-class>org.gatein.management.gadget.mop.exportimport.server.FileDownloadServlet</servlet-class>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>gtnService</servlet-name>
- <url-pattern>/exportimport/GateInService</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>uploadServlet</servlet-name>
- <url-pattern>/exportimport/upload</url-pattern>
- </servlet-mapping>
-
- <servlet-mapping>
- <servlet-name>downloadServlet</servlet-name>
- <url-pattern>/exportimport/download</url-pattern>
- </servlet-mapping>
-
-</web-app>
Copied: epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml (from rev 7367, portal/trunk/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml)
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml (rev 0)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/gwtGadgets/src/main/webapp/WEB-INF/web.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -0,0 +1,80 @@
+<!--
+ ~ JBoss, Home of Professional Open Source.
+ ~ Copyright 2011, Red Hat, Inc., and individual contributors
+ ~ as indicated by the @author tags. See the copyright.txt file 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 web-app PUBLIC
+ "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+ "http://java.sun.com/dtd/web-app_2_3.dtd" >
+
+<web-app>
+
+ <display-name>gwtGadgets</display-name>
+
+ <!-- TODO: Determine if these parameters (maxSize and slowUploads) is what we want for this -->
+ <context-param>
+ <!-- max size of the upload request -->
+ <param-name>maxSize</param-name>
+ <param-value>3145728</param-value>
+ </context-param>
+
+ <context-param>
+ <!--
+ Useful in development mode to slow down the uploads in fast networks.
+ Put the number of milliseconds to sleep in each block received in the server.
+ false or 0, means don't use slow uploads
+ -->
+ <param-name>slowUploads</param-name>
+ <param-value>50</param-value>
+ </context-param>
+
+ <!-- GateIn service servlet -->
+ <servlet>
+ <servlet-name>gtnService</servlet-name>
+ <servlet-class>org.gatein.management.gadget.mop.exportimport.server.GateInServiceImpl</servlet-class>
+ </servlet>
+
+ <!-- file upload servlet-->
+ <servlet>
+ <servlet-name>uploadServlet</servlet-name>
+ <servlet-class>org.gatein.management.gadget.mop.exportimport.server.FileUploadServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>downloadServlet</servlet-name>
+ <servlet-class>org.gatein.management.gadget.mop.exportimport.server.FileDownloadServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>gtnService</servlet-name>
+ <url-pattern>/exportimport/GateInService</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>uploadServlet</servlet-name>
+ <url-pattern>/exportimport/upload</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>downloadServlet</servlet-name>
+ <url-pattern>/exportimport/download</url-pattern>
+ </servlet-mapping>
+
+</web-app>
Modified: epp/portal/branches/EPP_5_2_Branch/gadgets/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/gadgets/pom.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/gadgets/pom.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -35,5 +35,6 @@
<module>core</module>
<module>server</module>
<module>eXoGadgets</module>
+ <module>gwtGadgets</module>
</modules>
</project>
Modified: epp/portal/branches/EPP_5_2_Branch/pom.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/pom.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -50,7 +50,7 @@
<org.picketlink.idm>1.3.0.Alpha04</org.picketlink.idm>
<org.gatein.wsrp.version>2.1.0-Beta05</org.gatein.wsrp.version>
<org.gatein.mop.version>1.1.0-Beta05</org.gatein.mop.version>
- <org.gatein.mgmt.version>1.0.0-Beta02</org.gatein.mgmt.version>
+ <org.gatein.mgmt.version>1.0.0-Beta03</org.gatein.mgmt.version>
<org.slf4j.version>1.5.8</org.slf4j.version>
<commons-pool.version>1.5.5</commons-pool.version>
<rhino.version>1.6R5</rhino.version>
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/navigation.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/navigation.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/navigation.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -45,6 +45,12 @@
<label>#{administration.pageManagement}</label>
<page-reference>group::/platform/administrators::pageManagement</page-reference>
</node>
+
+ <node>
+ <name>siteExportImport</name>
+ <label>Site Export/Import</label>
+ <page-reference>group::/platform/administrators::siteExportImport</page-reference>
+ </node>
</node>
</page-nodes>
</node-navigation>
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/pages.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/pages.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/group/platform/administrators/pages.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -88,4 +88,19 @@
<show-info-bar>false</show-info-bar>
</portlet-application>
</page>
+
+ <page>
+ <name>siteExportImport</name>
+ <title>Site Export/Import</title>
+ <access-permissions>manager:/platform/administrators</access-permissions>
+ <edit-permission>manager:/platform/administrators</edit-permission>
+ <gadget-application>
+ <gadget>
+ <gadget-ref>SiteExportImport</gadget-ref>
+ </gadget>
+ <title>Site Export/Import</title>
+ <access-permissions>manager:/platform/administrators</access-permissions>
+ <show-info-bar>false</show-info-bar>
+ </gadget-application>
+ </page>
</page-set>
Property changes on: epp/portal/branches/EPP_5_2_Branch/wsrp-integration
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7210,7262,7308,7326
+ /epp/portal/branches/EPP_5_1_0_GA_JBEPP-795/wsrp-integration:5868
/portal/branches/branch-GTNPORTAL-1592/wsrp-integration:4894
/portal/branches/branch-GTNPORTAL-1643/wsrp-integration:5002,5063,5167
/portal/branches/branch-GTNPORTAL-1700/wsrp-integration:5348,5363,5402,5445
/portal/branches/branch-GTNPORTAL-1731/wsrp-integration:5622,5644,5668
/portal/branches/branch-GTNPORTAL-1745/wsrp-integration:5765
/portal/branches/branch-GTNPORTAL-1790/wsrp-integration:5871
/portal/branches/branch-GTNPORTAL-1822/wsrp-integration:5943,5952
/portal/branches/branch-GTNPORTAL-1832/wsrp-integration:6030,6063
/portal/branches/branch-GTNPORTAL-1872/wsrp-integration:6400,6551
/portal/branches/branch-GTNPORTAL-1921/wsrp-integration:6603
/portal/branches/branch-GTNPORTAL-1963/wsrp-integration:6904,6915-6916
/portal/branches/decoupled-webos/wsrp-integration:6214-6243
/portal/branches/gatein-management/wsrp-integration:6920-6958
/portal/branches/global-portlet-metadata/wsrp-integration:6298-6384
/portal/branches/site-describability/wsrp-integration:6171-6235
/portal/trunk/wsrp-integration:4891,5744,5822,5943,6168,6196,6201-6203,6205-6206,6223,6437,6440,6449,6452,6573,6741,6783-6784,6912-6913,6960,7042,7061,7095,7117,7125,7132-7134,7239,7262,7308,7326,7331,7359,7367
Modified: epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml 2011-09-13 11:30:58 UTC (rev 7380)
+++ epp/portal/branches/EPP_5_2_Branch/wsrp-integration/extension-war/src/main/webapp/WEB-INF/conf/wsrp/wsrp-configuration.xml 2011-09-13 11:54:01 UTC (rev 7381)
@@ -164,6 +164,9 @@
<name>group.configuration</name>
<description>description</description>
<object type="org.exoplatform.portal.config.NewPortalConfig">
+ <field name="importMode">
+ <string>merge</string>
+ </field>
<field name="predefinedOwner">
<collection type="java.util.HashSet">
<value>
13 years, 3 months
gatein SVN: r7380 - in portal/branches/xss: portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component and 1 other directories.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-09-13 07:30:58 -0400 (Tue, 13 Sep 2011)
New Revision: 7380
Modified:
portal/branches/xss/
portal/branches/xss/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl
portal/branches/xss/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
GTNPORTAL-2062 XSS issue when entering site description
Property changes on: portal/branches/xss
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_Branch:6841
/portal/branches/branch-GTNPORTAL-1790:5864-5919
/portal/branches/branch-GTNPORTAL-1822:5938-5991
/portal/branches/branch-GTNPORTAL-1832:5993-6105
/portal/branches/branch-GTNPORTAL-1872:6327-6594
/portal/branches/branch-GTNPORTAL-1921:6597-6803
/portal/branches/branch-GTNPORTAL-1963:6902-6986
/portal/branches/decoupled-webos:6214-6243
/portal/branches/dom:7272-7349
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/wsrp-extraction:5828-6031
/portal/branches/xss-issues:7350
+ /epp/portal/branches/EPP_5_1_Branch:6841
/portal/branches/branch-GTNPORTAL-1790:5864-5919
/portal/branches/branch-GTNPORTAL-1822:5938-5991
/portal/branches/branch-GTNPORTAL-1832:5993-6105
/portal/branches/branch-GTNPORTAL-1872:6327-6594
/portal/branches/branch-GTNPORTAL-1921:6597-6803
/portal/branches/branch-GTNPORTAL-1963:6902-6986
/portal/branches/decoupled-webos:6214-6243
/portal/branches/dom:7272-7349
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/wsrp-extraction:5828-6031
/portal/branches/xss-issues:7350-7351
Modified: portal/branches/xss/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl
===================================================================
--- portal/branches/xss/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl 2011-09-13 11:19:54 UTC (rev 7379)
+++ portal/branches/xss/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl 2011-09-13 11:30:58 UTC (rev 7380)
@@ -1,62 +1,67 @@
<%
+ import org.exoplatform.portal.config.UserPortalConfigService;
import org.exoplatform.webui.core.UIComponent ;
import org.exoplatform.webui.form.UIForm;
- import java.text.DateFormat;
- import java.text.SimpleDateFormat;
- import org.exoplatform.portal.config.UserPortalConfigService;
-
+
+ import org.gatein.common.text.EntityEncoder;
+
String[] actions = uicomponent.getActions();
uicomponent.loadPortalConfigs();
def rcontext = _ctx.getRequestContext();
def userPortalConfigService = uicomponent.getApplicationComponent(UserPortalConfigService.class);
def defaultPortalName = userPortalConfigService.getDefaultPortal();
+ EntityEncoder encoder = EntityEncoder.FULL;
+
+ String editLayoutLabel = _ctx.appRes("UISiteManagement.label.editLayout");
+ String editNavigationLabel = _ctx.appRes("UISiteManagement.label.editNav");
+ String editPortalPropLabel = _ctx.appRes("UISiteManagement.label.editPortalProp");
+ String deletePortalLabel = _ctx.appRes("UISiteManagement.label.deletePortal");
%>
<div class="UISiteManagement UIManagement" id="<%=uicomponent.getId();%>">
- <%
- for (portalConfig in uicomponent.getPortalConfigs()) {
- %>
- <table class="ManagementBlock" style="table-layout: fixed">
- <tr>
- <td class="Image"><img src="/exoadmin/skin/navigation/webui/component/background/PlImg.gif" alt=""/></td>
- <td class="Content">
+ <%
+ for (portalConfig in uicomponent.getPortalConfigs()) {
+ %>
+ <table class="ManagementBlock" style="table-layout: fixed">
+ <tr>
+ <td class="Image"><img src="/exoadmin/skin/navigation/webui/component/background/PlImg.gif" alt=""/></td>
+ <td class="Content">
<div class="Label"><%=uicomponent.getFieldValue(portalConfig, 'name') %></div>
<%
- def siteLabel = uicomponent.getFieldValue(portalConfig, 'label');
- def siteDescription = uicomponent.getFieldValue(portalConfig, 'description');
- if (siteLabel != null && siteLabel.trim().length() > 0)
- {
+ String siteLabel = uicomponent.getFieldValue(portalConfig, 'label');
+ if (siteLabel != null && siteLabel.trim().length() > 0) {
+ siteLabel = encoder.encode(siteLabel);
print """<div>$siteLabel</div>""";
}
- if (siteDescription != null && siteDescription.trim().length() > 0)
- {
+
+ String siteDescription = uicomponent.getFieldValue(portalConfig, 'description');
+ if (siteDescription != null && siteDescription.trim().length() > 0) {
+ siteDescription = encoder.encode(siteDescription);
print """<div>$siteDescription</div>""";
}
%>
- </td>
- <td class="ActionBlock">
- <a href="<%=uicomponent.event("EditPortalLayout", portalConfig.getName());%>" class="EditLayoutIcon"><%=_ctx.appRes("UISiteManagement.label.editLayout")%></a>
- <a href="<%=uicomponent.event("EditNavigation", portalConfig.getName());%>" class="EditNavIcon"><%=_ctx.appRes("UISiteManagement.label.editNav")%></a>
- <a href="javascript:ajaxGet(eXo.env.server.createPortalURL('UIPortal', 'EditPortalProperties', true, [{name:'portalName',value:'<%=portalConfig.getName()%>'}]))" class="EditNavIcon"><%=_ctx.appRes("UISiteManagement.label.editPortalProp")%></a>
-
- <% if(defaultPortalName != null && !defaultPortalName.equals(portalConfig.getName())) {%>
- <a href="<%=uicomponent.url("DeletePortal", portalConfig.getName());%>" class="DeleteIcon"><%=_ctx.appRes("UISiteManagement.label.deletePortal")%></a>
- <% } %>
- </td>
- </tr>
- </table>
- <%
- }
- %>
- <%
- if(uicomponent.getPortalConfigs() != null && uicomponent.getPortalConfigs().size() > 0){
- %>
- <div class="UIAction">
+ </td>
+ <td class="ActionBlock">
+ <a href="<%=uicomponent.event("EditPortalLayout", portalConfig.getName());%>" class="EditLayoutIcon">$editLayoutLabel</a>
+ <a href="<%=uicomponent.event("EditNavigation", portalConfig.getName());%>" class="EditNavIcon">$editNavigationLabel</a>
+ <a href="javascript:ajaxGet(eXo.env.server.createPortalURL('UIPortal', 'EditPortalProperties', true, [{name:'portalName',value:'<%=portalConfig.getName()%>'}]))" class="EditNavIcon">$editPortalPropLabel</a>
+
+ <% if(defaultPortalName != null && !defaultPortalName.equals(portalConfig.getName())) {%>
+ <a href="<%=uicomponent.url("DeletePortal", portalConfig.getName());%>" class="DeleteIcon">$deletePortalLabel</a>
+ <% } %>
+ </td>
+ </tr>
+ </table>
+ <%
+ }
+ %>
+ <%
+ if(uicomponent.getPortalConfigs() != null && uicomponent.getPortalConfigs().size() > 0){
+ %>
+ <div class="UIAction">
<a href="javascript:void(0);" onclick="ajaxGet(eXo.env.server.createPortalURL('UIWorkingWorkspace', 'CreatePortal', true))" class="ActionButton LightBlueStyle"><%=_ctx.appRes(uicomponent.getId() + ".action.addNewPortal")%></a>
</div>
<%
}
%>
<%uicomponent.renderChildren();%>
-</div>
-
-
+</div>
\ No newline at end of file
Modified: portal/branches/xss/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
--- portal/branches/xss/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-09-13 11:19:54 UTC (rev 7379)
+++ portal/branches/xss/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-09-13 11:30:58 UTC (rev 7380)
@@ -63,6 +63,7 @@
import org.exoplatform.webui.form.UIFormTabPane;
import org.exoplatform.webui.form.validator.IdentifierValidator;
import org.exoplatform.webui.form.validator.MandatoryValidator;
+import org.exoplatform.webui.form.validator.SpecialCharacterValidator;
import org.exoplatform.webui.form.validator.StringLengthValidator;
import org.exoplatform.webui.organization.UIListPermissionSelector;
import org.exoplatform.webui.organization.UIListPermissionSelector.EmptyIteratorValidator;
@@ -242,7 +243,7 @@
new UIFormStringInput(FIELD_NAME, FIELD_NAME, null).addValidator(MandatoryValidator.class).addValidator(
StringLengthValidator.class, 3, 30).addValidator(IdentifierValidator.class).setEditable(false));
- uiSettingSet.addUIFormInput(new UIFormStringInput(FIELD_LABEL, FIELD_LABEL, null));
+ uiSettingSet.addUIFormInput(new UIFormStringInput(FIELD_LABEL, FIELD_LABEL, null).addValidator(SpecialCharacterValidator.class));
uiSettingSet.addUIFormInput(new UIFormStringInput(FIELD_DESCRIPTION, FIELD_DESCRIPTION, null));
uiSettingSet.addUIFormInput(new UIFormSelectBox(FIELD_LOCALE, FIELD_LOCALE, languages).addValidator(MandatoryValidator.class));
13 years, 3 months
gatein SVN: r7379 - in portal/branches/xss: portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component and 1 other directory.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-09-13 07:19:54 -0400 (Tue, 13 Sep 2011)
New Revision: 7379
Modified:
portal/branches/xss/
portal/branches/xss/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl
Log:
GTNPORTAL-2061 XSS in Group description content
GTNPORTAL-2066 XSS vulnerabilities when creating new group
Property changes on: portal/branches/xss
___________________________________________________________________
Modified: svn:mergeinfo
- /epp/portal/branches/EPP_5_1_Branch:6841
/portal/branches/branch-GTNPORTAL-1790:5864-5919
/portal/branches/branch-GTNPORTAL-1822:5938-5991
/portal/branches/branch-GTNPORTAL-1832:5993-6105
/portal/branches/branch-GTNPORTAL-1872:6327-6594
/portal/branches/branch-GTNPORTAL-1921:6597-6803
/portal/branches/branch-GTNPORTAL-1963:6902-6986
/portal/branches/decoupled-webos:6214-6243
/portal/branches/dom:7272-7349
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/wsrp-extraction:5828-6031
+ /epp/portal/branches/EPP_5_1_Branch:6841
/portal/branches/branch-GTNPORTAL-1790:5864-5919
/portal/branches/branch-GTNPORTAL-1822:5938-5991
/portal/branches/branch-GTNPORTAL-1832:5993-6105
/portal/branches/branch-GTNPORTAL-1872:6327-6594
/portal/branches/branch-GTNPORTAL-1921:6597-6803
/portal/branches/branch-GTNPORTAL-1963:6902-6986
/portal/branches/decoupled-webos:6214-6243
/portal/branches/dom:7272-7349
/portal/branches/gatein-management:6920-6958
/portal/branches/global-portlet-metadata:6298-6384
/portal/branches/site-describability:6171-6235
/portal/branches/wsrp-extraction:5828-6031
/portal/branches/xss-issues:7350
Modified: portal/branches/xss/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl
===================================================================
--- portal/branches/xss/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl 2011-09-13 11:13:36 UTC (rev 7378)
+++ portal/branches/xss/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl 2011-09-13 11:19:54 UTC (rev 7379)
@@ -1,34 +1,51 @@
-<%
- import java.util.List;
- import org.exoplatform.webui.organization.OrganizationUtils;
- import org.exoplatform.portal.mop.SiteKey;
-
- def parent = uicomponent.getParent();
- def navigations = uicomponent.getBeans();
+<%
+ import org.exoplatform.portal.mop.SiteKey;
+ import org.exoplatform.webui.organization.OrganizationUtils;
+ import org.gatein.common.text.EntityEncoder;
+
+ import java.util.List;
+
+ def parent = uicomponent.getParent();
+ def navigations = uicomponent.getBeans();
%>
<div id="$uicomponent.id" class="FeedBox">
- <%
- boolean isEvenRow = true;
- SiteKey siteKey;
- for(navigation in navigations) {
- siteKey = navigation.getKey();
- deleteLink = parent.event("DeleteNavigation",String.valueOf(siteKey.getName()));
- editProperties = parent.event("EditProperties",String.valueOf(siteKey.getName()));
- editLink = parent.event("EditNavigation",String.valueOf(siteKey.getName()));%>
+ <%
+ boolean isEvenRow = true;
+ SiteKey siteKey;
+ EntityEncoder encoder = EntityEncoder.FULL;
+ String descriptionLabel = _ctx.appRes("UIGroupNavigationManagement.Label.Description");
+ String editNavigationLabel = _ctx.appRes("UIGroupNavigationManagement.Label.EditNavigation");
+ String editPropertiesLabel = _ctx.appRes("UIGroupNavigationManagement.Label.EditProperties");
+ String deleteNavigationLabel = _ctx.appRes("UIGroupNavigationManagement.Label.DeleteNavigation");
+ for(navigation in navigations) {
+ siteKey = navigation.getKey();
+ String groupDescription = OrganizationUtils.getGroupDescription(siteKey.getName());
+ if (groupDescription) {
+ groupDescription = encoder.encode(groupDescription);
+ }
+
+ String groupLabel = OrganizationUtils.getGroupLabel(siteKey.getName())
+ if (groupLabel) {
+ groupLabel = encoder.encode(groupLabel);
+ }
+
+ String deleteLink = parent.event("DeleteNavigation",String.valueOf(siteKey.getName()));
+ String editProperties = parent.event("EditProperties",String.valueOf(siteKey.getName()));
+ String editLink = parent.event("EditNavigation",String.valueOf(siteKey.getName()));%>
<table class="ManagementBlock <%=isEvenRow ? "EvenRow":"OddRow"%>" style="table-layout: fixed">
- <tr>
- <td class="Image"><img src="/exoadmin/skin/navigation/webui/component/background/GroupImage.png" alt="" /></td>
- <td class="Content">
- <div class="Label" title="$siteKey.name"><%= OrganizationUtils.getGroupLabel(siteKey.getName()) %></div>
- <div><%=_ctx.appRes("UIGroupNavigationManagement.Label.Description")%>: <%= OrganizationUtils.getGroupDescription(siteKey.getName()) %></div>
- </td>
- <td class="ActionBlock">
- <a href="<%=editLink%>" class="EditNavIcon"><%=_ctx.appRes("UIGroupNavigationManagement.Label.EditNavigation")%></a>
- <a href="<%=editProperties%>" class="EditProIcon"><%=_ctx.appRes("UIGroupNavigationManagement.Label.EditProperties")%></a>
- <a href="<%=deleteLink%>" class="DeleteIcon"><%=_ctx.appRes("UIGroupNavigationManagement.Label.DeleteNavigation")%></a>
- </td>
- </tr>
+ <tr>
+ <td class="Image"><img src="/exoadmin/skin/navigation/webui/component/background/GroupImage.png" alt="" /></td>
+ <td class="Content">
+ <div class="Label" title="$siteKey.name">$groupLabel</div>
+ <div>$descriptionLabel: $groupDescription</div>
+ </td>
+ <td class="ActionBlock">
+ <a href="<%=editLink%>" class="EditNavIcon">$editNavigationLabel</a>
+ <a href="<%=editProperties%>" class="EditProIcon">$editPropertiesLabel</a>
+ <a href="<%=deleteLink%>" class="DeleteIcon">$deleteNavigationLabel</a>
+ </td>
+ </tr>
</table>
- <% isEvenRow = !isEvenRow;} %>
+ <% isEvenRow = !isEvenRow;} %>
</div>
13 years, 3 months
gatein SVN: r7378 - portal/trunk.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-13 07:13:36 -0400 (Tue, 13 Sep 2011)
New Revision: 7378
Modified:
portal/trunk/pom.xml
Log:
- GTNPORTAL-2095: added temporary exclusion for missing dependency.
Modified: portal/trunk/pom.xml
===================================================================
--- portal/trunk/pom.xml 2011-09-13 10:54:12 UTC (rev 7377)
+++ portal/trunk/pom.xml 2011-09-13 11:13:36 UTC (rev 7378)
@@ -645,6 +645,13 @@
<groupId>org.chromattic</groupId>
<artifactId>chromattic.core</artifactId>
<version>${version.chromattic}</version>
+ <!-- GTNPORTAL-2095: temporary exclusion for missing dependency -->
+ <exclusions>
+ <exclusion>
+ <groupId>com.google.code.javaparser</groupId>
+ <artifactId>javaparser</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.chromattic</groupId>
13 years, 3 months
gatein SVN: r7377 - epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet.
by do-not-reply@jboss.org
Author: theute
Date: 2011-09-13 06:54:12 -0400 (Tue, 13 Sep 2011)
New Revision: 7377
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css
Log:
JBEPP-1158: DOM Optimization
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css 2011-09-13 10:39:42 UTC (rev 7376)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/skin/portal/webui/component/UINavigationPortlet/DefaultStylesheet.css 2011-09-13 10:54:12 UTC (rev 7377)
@@ -1,265 +1,264 @@
-/**
- * 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.
- */
-
-/**
- * Created by The eXo Platform SARL
- * Modifier : Nguyen Ngoc Thuy
- * April 23, 2007
- * version: $Id$
- */
-
-.UINavigationPortlet ul {
- list-style:none;
- padding:0px;
- margin:0px;
-}
-
-.UINavigationPortlet {
- background: #b6b6b6;
- padding: 0px 8px;
-}
-
-.UINavigationPortlet .UINavigationBar {
- white-space: nowrap;
- background-color:#0e4aaa;
- padding: 0 10px;
- height: 33px;
- !position: relative;
- -moz-border-radius-topleft: 5px; /* Firefox up to version 3.6 */
- -moz-border-radius-topright: 5px;
- -webkit-border-top-left-radius: 5px; /* Safari, Chrome (before WebKit version 533) */
- -webkit-border-top-right-radius: 5px;
- border-top-left-radius: 5px; /*Firefox 4; browsers with CSS3 support */
- border-top-right-radius: 5px;
-}
-
-.UINavigationPortlet .UINavigationBar .UITab {
- float:left;/* orientation=lt */
- float:right;/* orientation=rt */
- margin: 6px 10px 0 0;
- font-weight:bold;
- text-align:center;
-}
-.UINavigationPortlet .UITab > span {
- padding: 0 6px;
- color: #f57a00;
- line-height: 21px;
- -moz-border-radius: 5px;
- -webkit-border-radius: 5px;
- border-radius: 5px;
- display:block;
- zoom:1;
-}
-
-.UINavigationPortlet .UITab .DropDownArrowIcon {
- padding: 0 19px 0 6px;/* orientation=lt */
- padding: 0 6px 0 19px;/* orientation=rt */
-}
-
-.UINavigationPortlet .UITab a.TabIcon {
- display:block;
- padding:0 0 0 21px;/* orientation=lt */
- padding:0 21px 0 0px;/* orientation=rt */
- background-position: right;/* orientation=rt */
-}
-
-.UINavigationPortlet .UITab > span a.DefaultPageIcon {
- background:none;
- padding:0;
-}
-
-
-/*###############-Selected Navigation Tab-################*/
-
-.UINavigationPortlet .UINavigationBar .SelectedNavigationTab {
- line-height: 26px;
- background: url('DefaultSkin/background/NavigationTab.gif') no-repeat center -82px;
- padding-bottom: 5px;
-}
-
-.UINavigationPortlet .SelectedNavigationTab > span {
- background-color:#fff;
-}
-
-.UINavigationPortlet .SelectedNavigationTab a {
- color: #f57a00;
-}
-
-.UINavigationPortlet .SelectedNavigationTab .DropDownArrowIcon {
- background:#fff url('DefaultSkin/background/NavDownArrowHover.gif') no-repeat right center; /* orientation=lt */
- background:#fff url('DefaultSkin/background/NavDownArrowHover.gif') no-repeat left center; /* orientation=rt */
-}
-
-/*###########################-NormalNavigationTab--############################*/
-
-
-.UINavigationPortlet .NormalNavigationTab .DropDownArrowIcon {
- background: url('DefaultSkin/background/NavDownArrow.gif') no-repeat right; /* orientation=lt */
- background: url('DefaultSkin/background/NavDownArrow.gif') no-repeat left; /* orientation=rt */
- cursor: pointer;
-}
-
-/*###########################-Hightlight-NavigationTabTab--############################*/
-
-.UINavigationPortlet .HighlightNavigationTab .TabIcon ,.UINavigationPortlet .NormalNavigationTab .TabIcon{
- color: #fff;
-}
-
-.UINavigationPortlet .HighlightNavigationTab > span {
- background-color:#6D94C8;
- margin-bottom: 5px;
-}
-
-
-.UINavigationPortlet .HighlightNavigationTab .DropDownArrowIcon {
- background:#6D94C8 url('DefaultSkin/background/NavDownArrow.gif') no-repeat right center; /* orientation=lt */
- background:#6D94C8 url('DefaultSkin/background/NavDownArrow.gif') no-repeat left center; /* orientation=rt */
-}
-
-/*============ Submenu =====================*/
-
-.UINavigationPortlet .MenuItemContainer {
- white-space: nowrap;
- border: solid #b7b7b7 1px; /*fix for IE*/
- text-align: left; /* orientation=lt */
- text-align: right; /* orientation=rt */
- z-index: 1;
- background: #FFF;
- padding: 1px 1px 6px 1px;
- opacity: 0.9;
-}
-
-.UINavigationPortlet .MenuItemContainer .MenuItem {
- border-bottom: 1px solid #fff;
- cursor: pointer;
- line-height: 24px;
- height: 24px;
- width: auto;
- display: block;
- white-space: nowrap;
- font-weight: normal;
- padding:0 5px;
-}
-
-.UINavigationPortlet .MenuItemContainer .ArrowIcon{
- background: url('DefaultSkin/background/Button.gif') no-repeat right -46px; /* orientation=lt */
- background: url('DefaultSkin/background/Button-rt.gif') no-repeat left -46px; /* orientation=rt */
-}
-
-
-.UINavigationPortlet .MenuItemContainer .MenuItem a {
- padding: 0px 20px 0px 25px; /* orientation=lt */
- padding: 0px 25px 0px 20px; /* orientation=rt */
- display: block;
-}
-
-.UINavigationPortlet .MenuItemContainer .MenuItem a:hover {
- color: #3e8df0;
-}
-
-.UINavigationPortlet .MenuItemContainer .SelectedItem {
- line-height: 24px;
- width: auto;
- background-color: #c7c7c7;
- color: #3e8df0;
-}
-
-.UINavigationPortlet .MenuItemContainer .SelectedItem a {
- color: #3e8df0;
-}
-
-.UINavigationPortlet .MenuItemContainer .SelectedItem .NormalItem a {
- color: #000;
-}
-
-.UINavigationPortlet .MenuItemContainer .SelectedItem .NormalItem a:hover {
- color: #3e8df0;
-}
-
-.UINavigationPortlet .MenuItemContainer .NormalItem .SelectedItem a {
- color: #3e8df0;
-}
-
-.UINavigationPortlet .MenuItemContainer .ItemIcon {
- height: 24px;
- width: auto;
- background-position: right;/* orientation=rt */
+/**
+ * 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.
+ */
+
+/**
+ * Created by The eXo Platform SARL
+ * Modifier : Nguyen Ngoc Thuy
+ * April 23, 2007
+ * version: $Id$
+ */
+
+.UINavigationPortlet ul {
+ list-style:none;
+ padding:0px;
+ margin:0px;
}
-
-/*============ Scroll Buttons =====================*/
-
-.UINavigationPortlet .ScrollButtons {
- margin: 10px 0 0 0;
- display: none;
- cursor:pointer;
- float: right; /* orientation=lt */
- float: left; /* orientation=rt */
- height: 15px;
- width: 20px;
-}
-
-.UINavigationPortlet .ScrollButtons a {
- display:block;
- cursor:pointer;
- width: 10px;
- height: 15px;
- float: left; /* orientation=lt */
- float: right; /* orientation=rt */
-}
-
-.UINavigationPortlet .ScrollLeftButton {
- background: url('DefaultSkin/background/Button.gif') no-repeat left -15px; /* orientation=lt */
- background: url('DefaultSkin/background/Button-rt.gif') no-repeat right -15px; /* orientation=rt */
-
-}
-
-.UINavigationPortlet .ScrollRightButton {
- background: url('DefaultSkin/background/Button.gif') no-repeat right -15px; /* orientation=lt */
- background: url('DefaultSkin/background/Button-rt.gif') no-repeat left -15px; /* orientation=rt */
-}
-
-.UINavigationPortlet .DisableScrollLeftButton {
- background: url('DefaultSkin/background/Button.gif') no-repeat left -30px; /* orientation=lt */
- background: url('DefaultSkin/background/Button-rt.gif') no-repeat right -30px; /* orientation=rt */
-}
-
-.UINavigationPortlet .DisableScrollRightButton {
- background: url('DefaultSkin/background/Button.gif') no-repeat right -30px; /* orientation=lt */
- background: url('DefaultSkin/background/Button-rt.gif') no-repeat left -30px; /* orientation=rt */
-}
-
-.UINavigationPortlet .HighlightScrollLeftButton ,.UINavigationPortlet .ScrollLeftButton:hover{
- background: url('DefaultSkin/background/Button.gif') no-repeat left top; /* orientation=lt */
- background: url('DefaultSkin/background/Button-rt.gif') no-repeat right top; /* orientation=rt */
-}
-
-.UINavigationPortlet .HighlightScrollRightButton,.UINavigationPortlet .ScrollRightButton:hover {
- background: url('DefaultSkin/background/Button.gif') no-repeat right top; /* orientation=lt */
- background: url('DefaultSkin/background/Button-rt.gif') no-repeat left top; /* orientation=rt */
-}
-
-/***********GroupNavigation*************/
-
-.UINavigationPortlet .GroupNavigation {
- background-color:#ffa200;
-}
-
-.UINavigationPortlet .GroupNavigation .HighlightNavigationTab > span {
- background-color:#ffcf01;
+
+.UINavigationPortlet {
+ background: #a3a3a3;
+ padding: 0;
+ border-top: 1px solid #fff;
+ border-bottom: 1px solid #fff;
+ border-left: 1px solid #b4b4b4;
+ border-right: 1px solid #b4b4b4;
}
+
+.UINavigationPortlet .UINavigationBar {
+ white-space: nowrap;
+ background-color:#0e4aaa;
+ background: url('/web/skin/portal/webui/component/UINavigationPortlet/DefaultSkin/background/nav-bg.jpg') no-repeat left top;
+ padding: 0 10px 0 10px;
+ height: 31px;
+ !position: relative;
+}
+
+.UINavigationPortlet .UINavigationBar .UITab {
+ float:left;/* orientation=lt */
+
+ padding: 0px 5px 0 5px;
+ font-weight:bold;
+ text-align:center;
+}
+.UINavigationPortlet .UITab > span {
+ padding: 5 6px;
+ color: #f57a00;
+ line-height: 31px;
+ display:block;
+ zoom:1;
+}
+
+.UINavigationPortlet .UITab .DropDownArrowIcon {
+ padding: 0 19px 0 6px;/* orientation=lt */
+
+}
+
+.UINavigationPortlet .UITab a.TabIcon {
+ display:block;
+ padding:0 0 0 21px;/* orientation=lt */
+
+
+}
+
+.UINavigationPortlet .UITab > span a.DefaultPageIcon {
+ background:none;
+ padding:0;
+}
+
+
+/*###############-Selected Navigation Tab-################*/
+
+.UINavigationPortlet .UINavigationBar .SelectedNavigationTab {
+ background-color: #fff;
+ line-height: 31px;
+
+
+}
+
+.UINavigationPortlet .SelectedNavigationTab > span {
+ background-color:#fff;
+}
+
+.UINavigationPortlet .SelectedNavigationTab a {
+}
+
+.UINavigationPortlet .SelectedNavigationTab .DropDownArrowIcon {
+}
+
+/*###########################-NormalNavigationTab--############################*/
+
+
+.UINavigationPortlet .NormalNavigationTab .DropDownArrowIcon {
+ cursor: pointer;
+}
+
+.UINavigationPortlet .NormalNavigationTab a.TabIcon {
+ color: #fff;
+}
+
+/*###########################-Hightlight-NavigationTabTab--############################*/
+
+
+.UINavigationPortlet .HighlightNavigationTab .UITab {
+
+}
+
+.UINavigationPortlet .HighlightNavigationTab {
+ color: #000;
+ background-color: #ffF;
+}
+
+
+.UINavigationPortlet .HighlightNavigationTab .DropDownArrowIcon {
+ background-color: #fff;
+
+}
+
+/*============ Submenu =====================*/
+
+.UINavigationPortlet .MenuItemContainer {
+ white-space: nowrap;
+ border: solid #b7b7b7 1px; /*fix for IE*/
+ text-align: left; /* orientation=lt */
+
+ z-index: 1;
+ background: #FFF;
+ padding: 1px 1px 6px 1px;
+ opacity: 0.9;
+}
+
+.UINavigationPortlet .MenuItemContainer .MenuItem {
+ border-bottom: 1px solid #fff;
+ cursor: pointer;
+ line-height: 24px;
+ height: 24px;
+ width: auto;
+ display: block;
+ white-space: nowrap;
+ font-weight: normal;
+ padding:0 5px;
+}
+
+.UINavigationPortlet .MenuItemContainer .ArrowIcon{
+ background: url('/web/skin/portal/webui/component/UINavigationPortlet/DefaultSkin/background/Button.gif') no-repeat right -46px; /* orientation=lt */
+
+}
+
+
+.UINavigationPortlet .MenuItemContainer .MenuItem a {
+ padding: 0px 20px 0px 25px; /* orientation=lt */
+
+ display: block;
+}
+
+.UINavigationPortlet .MenuItemContainer .MenuItem a:hover {
+ color: #3e8df0;
+}
+
+.UINavigationPortlet .MenuItemContainer .SelectedItem {
+ line-height: 24px;
+ width: auto;
+ background-color: #c7c7c7;
+ color: #3e8df0;
+}
+
+.UINavigationPortlet .MenuItemContainer .SelectedItem a {
+ color: #3e8df0;
+}
+
+.UINavigationPortlet .MenuItemContainer .SelectedItem .NormalItem a {
+ color: #000;
+}
+
+.UINavigationPortlet .MenuItemContainer .SelectedItem .NormalItem a:hover {
+ color: #3e8df0;
+}
+
+.UINavigationPortlet .MenuItemContainer .NormalItem .SelectedItem a {
+ color: #3e8df0;
+}
+
+.UINavigationPortlet .MenuItemContainer .ItemIcon {
+ height: 24px;
+ width: auto;
+
+}
+
+/*============ Scroll Buttons =====================*/
+
+.UINavigationPortlet .ScrollButtons {
+ margin: 10px 0 0 0;
+ display: none;
+ cursor:pointer;
+ float: right; /* orientation=lt */
+
+ height: 15px;
+ width: 20px;
+}
+
+.UINavigationPortlet .ScrollButtons a {
+ display:block;
+ cursor:pointer;
+ width: 10px;
+ height: 15px;
+ float: left; /* orientation=lt */
+
+}
+
+.UINavigationPortlet .ScrollLeftButton {
+ background: url('/web/skin/portal/webui/component/UINavigationPortlet/DefaultSkin/background/Button.gif') no-repeat left -15px; /* orientation=lt */
+
+
+}
+
+.UINavigationPortlet .ScrollRightButton {
+ background: url('/web/skin/portal/webui/component/UINavigationPortlet/DefaultSkin/background/Button.gif') no-repeat right -15px; /* orientation=lt */
+
+}
+
+.UINavigationPortlet .DisableScrollLeftButton {
+ background: url('/web/skin/portal/webui/component/UINavigationPortlet/DefaultSkin/background/Button.gif') no-repeat left -30px; /* orientation=lt */
+
+}
+
+.UINavigationPortlet .DisableScrollRightButton {
+ background: url('/web/skin/portal/webui/component/UINavigationPortlet/DefaultSkin/background/Button.gif') no-repeat right -30px; /* orientation=lt */
+
+}
+
+.UINavigationPortlet .HighlightScrollLeftButton ,.UINavigationPortlet .ScrollLeftButton:hover{
+ background: url('/web/skin/portal/webui/component/UINavigationPortlet/DefaultSkin/background/Button.gif') no-repeat left top; /* orientation=lt */
+
+}
+
+.UINavigationPortlet .HighlightScrollRightButton,.UINavigationPortlet .ScrollRightButton:hover {
+ background: url('/web/skin/portal/webui/component/UINavigationPortlet/DefaultSkin/background/Button.gif') no-repeat right top; /* orientation=lt */
+
+}
+
+/***********GroupNavigation*************/
+
+.UINavigationPortlet .GroupNavigation {
+ background-color:#ffa200;
+}
+
+.UINavigationPortlet .GroupNavigation .HighlightNavigationTab > span {
+ background-color:#ffcf01;
+}
+
+
13 years, 3 months
gatein SVN: r7376 - portal/branches.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-09-13 06:39:42 -0400 (Tue, 13 Sep 2011)
New Revision: 7376
Added:
portal/branches/xss/
Log:
XSS issues
13 years, 3 months
gatein SVN: r7375 - portal/branches.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-09-13 06:38:49 -0400 (Tue, 13 Sep 2011)
New Revision: 7375
Removed:
portal/branches/xss/
Log:
Remove wrong branch
13 years, 3 months