gatein SVN: r7354 - 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-12 06:54:31 -0400 (Mon, 12 Sep 2011)
New Revision: 7354
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/ConsumerManagerBean.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/webapp/WEB-INF/classes/Resource.properties
components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/web.xml
Log:
- Mark state as transient where possible and generally make JSF beans behave better in a cluster environment (still not there yet, though).
- Made WSRP admin portlet distributable.
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-12 10:52:17 UTC (rev 7353)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerBean.java 2011-09-12 10:54:31 UTC (rev 7354)
@@ -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.
@@ -66,12 +66,14 @@
public class ConsumerBean extends ManagedBean
{
public static final SelectablePortletToHandleFunction SELECTABLE_TO_HANDLE = new SelectablePortletToHandleFunction();
- private WSRPConsumer consumer;
- private ConsumerRegistry registry;
- private ConsumerManagerBean manager;
+ private transient WSRPConsumer consumer;
+ private transient ConsumerRegistry registry;
+ private transient ConsumerManagerBean manager;
private boolean modified;
private String wsdl;
+ private String id;
+ private static final String NULL_ID_CONSUMER = "bean_consumer_null_id";
private static final String CANNOT_FIND_CONSUMER = "bean_consumer_cannot_find_consumer";
private static final String CANNOT_UPDATE_CONSUMER = "bean_consumer_cannot_update_consumer";
private static final String CANNOT_REFRESH_CONSUMER = "bean_consumer_cannot_refresh_consumer";
@@ -107,12 +109,12 @@
public boolean isRefreshNeeded()
{
- return consumer.isRefreshNeeded();
+ return getConsumer().isRefreshNeeded();
}
public String getId()
{
- return consumer.getProducerId();
+ return getConsumer().getProducerId();
}
public void setId(String id)
@@ -136,23 +138,46 @@
// we're not using modifyIfNeeded here to avoid double equality check, so we need to set modified manually
modified = true;
+
+ this.id = id;
}
}
}
else
{
// initialization scenario
+ resolveConsumer(id);
+ }
+ }
+
+ private void resolveConsumer(String id)
+ {
+ // if we don't have an id, try to get it from the ConsumerManagerBean
+ if (id == null)
+ {
+ id = manager.getSelectedId();
+ }
+
+ // if it's still null, output an error
+ if (id == null)
+ {
+ beanContext.createErrorMessage(NULL_ID_CONSUMER);
+ }
+ else
+ {
consumer = getRegistry().getConsumer(id);
if (consumer != null)
{
EndpointConfigurationInfo endpoint = getProducerInfo().getEndpointConfigurationInfo();
wsdl = endpoint.getWsdlDefinitionURL();
+ this.id = id;
}
else
{
beanContext.createErrorMessage(CANNOT_FIND_CONSUMER, id);
}
}
+
}
public Integer getCache()
@@ -200,7 +225,7 @@
public boolean isActive()
{
- return consumer.isActive();
+ return getConsumer().isActive();
}
public boolean isRegistered()
@@ -264,7 +289,7 @@
public ProducerInfo getProducerInfo()
{
- return consumer.getProducerInfo();
+ return getConsumer().getProducerInfo();
}
public boolean isLocalInfoPresent()
@@ -327,7 +352,7 @@
private String internalUpdate(boolean showMessage)
{
- if (consumer != null)
+ if (getConsumer() != null)
{
if (isModified())
{
@@ -366,6 +391,7 @@
public String refreshConsumer()
{
+ final WSRPConsumer consumer = getConsumer();
if (consumer != null)
{
if (isModified())
@@ -396,7 +422,7 @@
public String modifyRegistration()
{
- if (consumer != null)
+ if (getConsumer() != null)
{
ProducerInfo info = getProducerInfo();
if (isModified())
@@ -461,7 +487,7 @@
public String eraseLocalRegistration()
{
- if (consumer != null)
+ if (getConsumer() != null)
{
getProducerInfo().eraseRegistrationInfo();
return ConsumerManagerBean.CONFIGURE_CONSUMER;
@@ -516,6 +542,7 @@
{
if (portletHandles == null)
{
+ final WSRPConsumer consumer = getConsumer();
Collection<Portlet> portlets = consumer.getProducerInfo().getPortletMap().values();
List<SelectablePortletHandle> selectableHandles = Collections.emptyList();
if (ParameterValidation.existsAndIsNotEmpty(portlets))
@@ -555,6 +582,7 @@
public String exportPortlets()
{
+ final WSRPConsumer consumer = getConsumer();
if (consumer != null)
{
List<SelectablePortletHandle> handles = (List<SelectablePortletHandle>)portletHandles.getWrappedData();
@@ -593,7 +621,7 @@
if (existingExports == null)
{
Locale locale = beanContext.getLocale();
- MigrationService migrationService = consumer.getMigrationService();
+ MigrationService migrationService = getConsumer().getMigrationService();
List<ExportInfo> availableExportInfos = migrationService.getAvailableExportInfos();
List<ExportInfoDisplay> exportDisplays = new ArrayList<ExportInfoDisplay>(availableExportInfos.size());
for (ExportInfo exportInfo : availableExportInfos)
@@ -627,6 +655,8 @@
portletsToImport.add(exportedPortlet);
}
}
+
+ final WSRPConsumer consumer = getConsumer();
ImportInfo info = consumer.importPortlets(currentExport.getExport(), WSRPUtils.transform(portletsToImport, SELECTABLE_TO_HANDLE));
ConsumerStructureProvider structureProvider = consumer.getMigrationService().getStructureProvider();
@@ -673,6 +703,7 @@
public String deleteExport()
{
ExportInfo export = currentExport.getExport();
+ final WSRPConsumer consumer = getConsumer();
if (consumer.getMigrationService().remove(export) == export)
{
// release the export on the producer
@@ -708,29 +739,45 @@
public boolean isSupportsExport()
{
- return isActive() && consumer.isSupportsExport();
+ return isActive() && getConsumer().isSupportsExport();
}
public boolean isAvailableExportInfosEmpty()
{
- return consumer.getMigrationService().isAvailableExportInfosEmpty();
+ return getConsumer().getMigrationService().isAvailableExportInfosEmpty();
}
public boolean isWssEnabled()
{
- return consumer.getProducerInfo().getEndpointConfigurationInfo().getWSSEnabled();
+ return getProducerInfo().getEndpointConfigurationInfo().getWSSEnabled();
}
-
+
public boolean isWssAvailable()
{
- return consumer.getProducerInfo().getEndpointConfigurationInfo().isWSSAvailable();
+ return getProducerInfo().getEndpointConfigurationInfo().isWSSAvailable();
}
public void setWssEnabled(boolean enable)
{
- consumer.getProducerInfo().getEndpointConfigurationInfo().setWSSEnabled(enable);
+ getProducerInfo().getEndpointConfigurationInfo().setWSSEnabled(enable);
}
+ public WSRPConsumer getConsumer()
+ {
+ if (consumer == null)
+ {
+ // try to resolve it
+ resolveConsumer(id);
+ }
+
+ return consumer;
+ }
+
+ public void setConsumer(WSRPConsumer consumer)
+ {
+ this.consumer = consumer;
+ }
+
public static class SelectablePortletHandle implements Comparable<SelectablePortletHandle>
{
private String handle;
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-12 10:52:17 UTC (rev 7353)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ConsumerManagerBean.java 2011-09-12 10:54:31 UTC (rev 7354)
@@ -32,6 +32,7 @@
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
+import java.io.Serializable;
import java.util.List;
import java.util.Map;
@@ -40,9 +41,9 @@
* @version $Revision: 12865 $
* @since 2.6
*/
-public class ConsumerManagerBean extends ManagedBean
+public class ConsumerManagerBean extends ManagedBean implements Serializable
{
- private ConsumerRegistry registry;
+ private transient ConsumerRegistry registry;
private String selectedId;
private static final String NO_CONSUMER = "bean_consumermanager_no_consumer";
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-12 10:52:17 UTC (rev 7353)
+++ components/wsrp/branches/clustering/admin-gui/src/main/java/org/gatein/wsrp/admin/ui/ManagedBean.java 2011-09-12 10:54:31 UTC (rev 7354)
@@ -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.
@@ -37,9 +37,9 @@
*/
public abstract class ManagedBean
{
- protected Logger log = LoggerFactory.getLogger(getClass());
+ protected transient Logger log = LoggerFactory.getLogger(getClass());
- protected BeanContext beanContext;
+ protected transient BeanContext beanContext;
private String cancelOutcome;
Modified: components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2011-09-12 10:52:17 UTC (rev 7353)
+++ components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/classes/Resource.properties 2011-09-12 10:54:31 UTC (rev 7354)
@@ -179,6 +179,7 @@
CONSUMER_TYPE = Consumer
# ConsumerBean
+bean_consumer_null_id = No identifier was specified to resolve a consumer from. Please refresh the app and try again.
bean_consumer_cannot_find_consumer = Couldn''t find consumer ''{0}''!
bean_consumer_cannot_update_consumer = Couldn't update consumer!
bean_consumer_cannot_refresh_consumer = Couldn't refresh consumer!
Modified: components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2011-09-12 10:52:17 UTC (rev 7353)
+++ components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/classes/Resource_fr.properties 2011-09-12 10:54:31 UTC (rev 7354)
@@ -183,4 +183,5 @@
bean_consumermanager_refresh_failure_wsdl=Le rafra\u00eechissement a \u00e9chou\u00e9 (probablement \u00e0 cause d'URL WSDL non valide)
producer_config_wsdl_v1=Adresse WSDL pour le Producteur WSRP v1:
producer_config_wsdl_v2=Adresse WSDL pour le Producteur WSRP v2:
-unavailable_service=Le service WSRP n''est pas disponible. Veuillez l''activer avant d'utiliser cette portlet.
\ No newline at end of file
+unavailable_service=Le service WSRP n''est pas disponible. Veuillez l''activer avant d'utiliser cette portlet.
+bean_consumer_null_id=Aucun identifiant disponible pour r�cup�rer un consommateur. Veuillez rafra�chir l'application et r�essayer.
\ No newline at end of file
Modified: components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/web.xml
===================================================================
--- components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/web.xml 2011-09-12 10:52:17 UTC (rev 7353)
+++ components/wsrp/branches/clustering/admin-gui/src/main/webapp/WEB-INF/web.xml 2011-09-12 10:54:31 UTC (rev 7354)
@@ -83,6 +83,8 @@
<exception-type>java.lang.Exception</exception-type>
<location>/faces/jsf/error.xhtml</location>
</error-page>
+
+ <distributable/>
</web-app>
13 years, 3 months
gatein SVN: r7353 - in components/wsrp/branches/clustering: jcr-impl/src/main/java/org/gatein/wsrp/consumer/migration and 5 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-12 06:52:17 -0400 (Mon, 12 Sep 2011)
New Revision: 7353
Added:
components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/
components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/BaseMixin.java
components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/LastModified.java
components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/ModifyRegistrationRequired.java
Modified:
components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/migration/JCRMigrationService.java
components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java
components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/BaseChromatticPersister.java
components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/StoresByPathManager.java
components/wsrp/branches/clustering/jcr-impl/src/main/resources/conf/nodetypes/consumers-configuration-nodetypes.xml
Log:
- Added support for last modified time and check if ModifyRegistration is required on ProducerInfo via JCR mixins.
Modified: components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java
===================================================================
--- components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2011-09-12 10:49:34 UTC (rev 7352)
+++ components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/ProducerInfo.java 2011-09-12 10:52:17 UTC (rev 7353)
@@ -105,6 +105,16 @@
/** The activated status of the associated Consumer */
private boolean persistentActive;
+ // GTNWSRP-239: information that's currently transient but should probably be persistent
+ /**
+ * GTNWSRP-239: whether or not this ProducerInfo requires ModifyRegistration to be called, currently persisted via
+ * mixin
+ */
+ private boolean isModifyRegistrationRequired;
+
+ /** GTNWSRP-239: last modification epoch: currently persistent via mixin */
+ private long lastModified;
+
// Transient information
/** The Cookie handling policy required by the Producer */
@@ -122,8 +132,6 @@
/** Time at which the cache expires */
private long expirationTimeMillis;
- private boolean isModifyRegistrationRequired;
-
private final ConsumerRegistrySPI registry;
private static final String ERASED_LOCAL_REGISTRATION_INFORMATION = "Erased local registration information!";
@@ -1277,4 +1285,14 @@
return eventDescriptions.get(name);
}
}
+
+ public long getLastModified()
+ {
+ return lastModified;
+ }
+
+ public void setLastModified(long lastModified)
+ {
+ this.lastModified = lastModified;
+ }
}
Modified: components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/migration/JCRMigrationService.java
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/migration/JCRMigrationService.java 2011-09-12 10:49:34 UTC (rev 7352)
+++ components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/migration/JCRMigrationService.java 2011-09-12 10:52:17 UTC (rev 7353)
@@ -32,6 +32,7 @@
import org.gatein.wsrp.consumer.migration.mapping.ExportedStateMapping;
import org.gatein.wsrp.jcr.ChromatticPersister;
import org.gatein.wsrp.jcr.StoresByPathManager;
+import org.gatein.wsrp.jcr.mapping.mixins.LastModified;
import java.util.ArrayList;
import java.util.Collections;
@@ -189,6 +190,11 @@
return getPathFor(exportInfo.getExportTime());
}
+ public LastModified lastModifiedToUpdateOnDelete(ChromatticSession session)
+ {
+ return null;
+ }
+
private String getPathFor(final long exportTime)
{
return getParentPath() + "/" + exportTime;
Modified: components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java 2011-09-12 10:49:34 UTC (rev 7352)
+++ components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java 2011-09-12 10:52:17 UTC (rev 7353)
@@ -35,6 +35,9 @@
import org.gatein.wsrp.consumer.registry.xml.XMLConsumerRegistry;
import org.gatein.wsrp.jcr.ChromatticPersister;
import org.gatein.wsrp.jcr.StoresByPathManager;
+import org.gatein.wsrp.jcr.mapping.mixins.BaseMixin;
+import org.gatein.wsrp.jcr.mapping.mixins.LastModified;
+import org.gatein.wsrp.jcr.mapping.mixins.ModifyRegistrationRequired;
import org.gatein.wsrp.registration.mapping.RegistrationPropertyDescriptionMapping;
import javax.jcr.RepositoryException;
@@ -65,12 +68,14 @@
public static final List<Class> mappingClasses = new ArrayList<Class>(6);
private InputStream configurationIS;
+ private long lastModified;
+// private Map<String, ProducerInfo> infoCache;
static
{
Collections.addAll(mappingClasses, ProducerInfosMapping.class, ProducerInfoMapping.class,
EndpointInfoMapping.class, RegistrationInfoMapping.class, RegistrationPropertyMapping.class,
- RegistrationPropertyDescriptionMapping.class);
+ RegistrationPropertyDescriptionMapping.class, LastModified.class, ModifyRegistrationRequired.class);
}
public JCRConsumerRegistry(ChromatticPersister persister) throws Exception
@@ -122,6 +127,17 @@
info.setKey(key);
pim.initFrom(info);
+ // update cache
+ final long now = System.currentTimeMillis();
+ lastModified = now;
+// getRefreshedInfoCache(session).put(info.getId(), info);
+
+ // GTNWSRP-239
+ getMixin(pims, session, LastModified.class).setLastModified(now);
+ getMixin(pim, session, LastModified.class).setLastModified(now);
+ getMixin(pim, session, ModifyRegistrationRequired.class).setModifyRegistrationRequired(info.isModifyRegistrationRequired());
+ info.setLastModified(now);
+
persister.closeSession(true);
}
catch (Exception e)
@@ -167,13 +183,27 @@
idUnchanged = oldId.equals(newId);
+ final long now = System.currentTimeMillis();
if (!idUnchanged)
{
ProducerInfosMapping pims = getProducerInfosMapping(session);
Map<String, ProducerInfoMapping> nameToProducerInfoMap = pims.getNameToProducerInfoMap();
nameToProducerInfoMap.put(pim.getId(), pim);
+
+ // update cache
+ /*getRefreshedInfoCache(session).remove(oldId);
+ getRefreshedInfoCache(session).put(newId, producerInfo);*/
+
+ // GTNWSRP-239
+ getMixin(pims, session, LastModified.class).setLastModified(now);
+ lastModified = now;
}
+ // GTNWSRP-239
+ getMixin(pim, session, ModifyRegistrationRequired.class).setModifyRegistrationRequired(producerInfo.isModifyRegistrationRequired());
+ getMixin(pim, session, LastModified.class).setLastModified(now);
+ producerInfo.setLastModified(now);
+
persister.closeSession(true);
}
@@ -184,13 +214,53 @@
public Iterator<ProducerInfo> getProducerInfosFromStorage()
{
ChromatticSession session = persister.getSession();
+ final Iterator<ProducerInfo> iterator = new ProducerInfoIterator(getRefreshedInfoCache(session).getConsumers().iterator());
+ persister.closeSession(false);
+ return iterator;
+ }
+
+ /*private Map<String, ProducerInfo> getRefreshedInfoCache(ChromatticSession session)
+ {
ProducerInfosMapping producerInfosMapping = getProducerInfosMapping(session);
- List<ProducerInfoMapping> mappings = producerInfosMapping.getProducerInfos();
+ // check if we need to refresh the local cache
+ if (lastModified < getMixin(producerInfosMapping, session, LastModified.class).getLastModified())
+ {
+ List<ProducerInfoMapping> mappings = producerInfosMapping.getProducerInfos();
- persister.closeSession(true);
- return new MappingToProducerInfoIterator(mappings.iterator(), this);
+ for (ProducerInfoMapping mapping : mappings)
+ {
+ infoCache.put(mapping.getId(), mapping.toModel(null, this));
+ }
+
+ lastModified = System.currentTimeMillis();
+ }
+
+ return infoCache;
+ }*/
+
+ private ConsumerCache getRefreshedInfoCache(ChromatticSession session)
+ {
+ ProducerInfosMapping producerInfosMapping = getProducerInfosMapping(session);
+
+ // check if we need to refresh the local cache
+ if (lastModified < getMixin(producerInfosMapping, session, LastModified.class).getLastModified())
+ {
+ List<ProducerInfoMapping> mappings = producerInfosMapping.getProducerInfos();
+
+ for (ProducerInfoMapping pim : mappings)
+ {
+ if (lastModified < getMixin(pim, session, LastModified.class).getLastModified())
+ {
+ consumers.putConsumer(pim.getId(), createConsumerFrom(pim.toModel(null, this)));
+ }
+ }
+
+ lastModified = System.currentTimeMillis();
+ }
+
+ return consumers;
}
public ProducerInfo loadProducerInfo(String id)
@@ -202,7 +272,28 @@
if (pim != null)
{
- return pim.toModel(null, this);
+ WSRPConsumer consumer = getRefreshedInfoCache(session).getConsumer(id);
+
+ if (consumer == null)
+ {
+ return null;
+ }
+ else
+ {
+ return consumer.getProducerInfo();
+ /*ProducerInfo producerInfo = consumer.getProducerInfo();
+ if(producerInfo == null || producerInfo.getLastModified() < getMixin(pim, session, LastModified.class).getLastModified())
+ {
+ producerInfo = pim.toModel(producerInfo, this);
+ getRefreshedInfoCache(session).put(id, producerInfo);
+ return producerInfo;
+ }
+ else
+ {
+ return producerInfo;
+ }*/
+ }
+
}
else
{
@@ -215,6 +306,18 @@
}
}
+ private <M extends BaseMixin> M getMixin(Object objectToCheck, ChromatticSession session, Class<M> type)
+ {
+ M mixin = session.getEmbedded(objectToCheck, type);
+ if (mixin == null)
+ {
+ mixin = session.create(type);
+ session.setEmbedded(objectToCheck, type, mixin);
+ mixin.initializeValue();
+ }
+ return mixin;
+ }
+
@Override
public boolean containsConsumer(String id)
{
@@ -316,8 +419,8 @@
// Save to JCR
List<ProducerInfoMapping> infos = producerInfosMapping.getProducerInfos();
- List<WSRPConsumer> consumers = fromXML.getConfiguredConsumers();
- for (WSRPConsumer consumer : consumers)
+ List<WSRPConsumer> xmlConsumers = fromXML.getConfiguredConsumers();
+ for (WSRPConsumer consumer : xmlConsumers)
{
ProducerInfo info = consumer.getProducerInfo();
@@ -328,7 +431,16 @@
// init it from ProducerInfo
pim.initFrom(info);
+
+ // update ProducerInfo with the persistence key
+ info.setKey(pim.getKey());
+
+ consumers.putConsumer(info.getId(), consumer);
}
+
+ lastModified = System.currentTimeMillis();
+ getMixin(producerInfosMapping, session, LastModified.class).setLastModified(lastModified);
+ session.save();
}
}
@@ -340,6 +452,20 @@
return getPathFor(needsComputedPath);
}
+ public LastModified lastModifiedToUpdateOnDelete(ChromatticSession session)
+ {
+ final ProducerInfosMapping pims = session.findByPath(ProducerInfosMapping.class, PRODUCER_INFOS_PATH);
+ if (pims != null)
+ {
+ // GTNWSRP-239
+ return getMixin(pims, session, LastModified.class);
+ }
+ else
+ {
+ return null;
+ }
+ }
+
private static String getPathFor(ProducerInfo info)
{
return getPathFor(info.getId());
Modified: components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/BaseChromatticPersister.java
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/BaseChromatticPersister.java 2011-09-12 10:49:34 UTC (rev 7352)
+++ components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/BaseChromatticPersister.java 2011-09-12 10:52:17 UTC (rev 7353)
@@ -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.jcr;
@@ -27,6 +28,7 @@
import org.chromattic.api.ChromatticSession;
import org.gatein.common.util.ParameterValidation;
import org.gatein.wsrp.jcr.mapping.BaseMapping;
+import org.gatein.wsrp.jcr.mapping.mixins.LastModified;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
@@ -125,7 +127,7 @@
getOpenedSessionOrFail().save();
}
- public <T> boolean delete(T toDelete, org.gatein.wsrp.jcr.StoresByPathManager<T> manager)
+ public <T> boolean delete(T toDelete, StoresByPathManager<T> manager)
{
Class<? extends Object> modelClass = toDelete.getClass();
Class<? extends BaseMapping> baseMappingClass = modelToMapping.get(modelClass);
@@ -141,6 +143,13 @@
if (old != null)
{
session.remove(old);
+
+ // update last modified of element linked to toDelete if needed
+ final LastModified lastModified = manager.lastModifiedToUpdateOnDelete(session);
+ if (lastModified != null)
+ {
+ lastModified.setLastModified(System.currentTimeMillis());
+ }
closeSession(true);
return true;
}
Modified: components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/StoresByPathManager.java
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/StoresByPathManager.java 2011-09-12 10:49:34 UTC (rev 7352)
+++ components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/StoresByPathManager.java 2011-09-12 10:52:17 UTC (rev 7353)
@@ -23,6 +23,9 @@
package org.gatein.wsrp.jcr;
+import org.chromattic.api.ChromatticSession;
+import org.gatein.wsrp.jcr.mapping.mixins.LastModified;
+
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
* @version $Revision$
@@ -30,4 +33,12 @@
public interface StoresByPathManager<C>
{
String getChildPath(C needsComputedPath);
+
+ /**
+ * // GTNWSRP-239
+ *
+ * @param session
+ * @return
+ */
+ LastModified lastModifiedToUpdateOnDelete(ChromatticSession session);
}
Added: components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/BaseMixin.java
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/BaseMixin.java (rev 0)
+++ components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/BaseMixin.java 2011-09-12 10:52:17 UTC (rev 7353)
@@ -0,0 +1,30 @@
+/*
+ * 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.jcr.mapping.mixins;
+
+/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
+public interface BaseMixin
+{
+ void initializeValue();
+}
Added: components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/LastModified.java
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/LastModified.java (rev 0)
+++ components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/LastModified.java 2011-09-12 10:52:17 UTC (rev 7353)
@@ -0,0 +1,42 @@
+/*
+ * 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.jcr.mapping.mixins;
+
+import org.chromattic.api.annotations.MixinType;
+import org.chromattic.api.annotations.Property;
+
+/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
+@MixinType(name = "wsrp:lastmodified")
+public abstract class LastModified implements BaseMixin
+{
+ @Property(name = "wsrp:time")
+ public abstract long getLastModified();
+
+ public abstract void setLastModified(long lastModified);
+
+ public void initializeValue()
+ {
+ setLastModified(System.currentTimeMillis());
+ }
+}
Added: components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/ModifyRegistrationRequired.java
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/ModifyRegistrationRequired.java (rev 0)
+++ components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/jcr/mapping/mixins/ModifyRegistrationRequired.java 2011-09-12 10:52:17 UTC (rev 7353)
@@ -0,0 +1,42 @@
+/*
+ * 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.jcr.mapping.mixins;
+
+import org.chromattic.api.annotations.MixinType;
+import org.chromattic.api.annotations.Property;
+
+/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
+@MixinType(name = "wsrp:modifyregistrationrequired")
+public abstract class ModifyRegistrationRequired implements BaseMixin
+{
+ @Property(name = "wsrp:ismodifyregistrationrequired")
+ public abstract boolean isModifyRegistrationRequired();
+
+ public abstract void setModifyRegistrationRequired(boolean modifyRegistrationRequired);
+
+ public void initializeValue()
+ {
+ setModifyRegistrationRequired(false);
+ }
+}
Modified: components/wsrp/branches/clustering/jcr-impl/src/main/resources/conf/nodetypes/consumers-configuration-nodetypes.xml
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/src/main/resources/conf/nodetypes/consumers-configuration-nodetypes.xml 2011-09-12 10:49:34 UTC (rev 7352)
+++ components/wsrp/branches/clustering/jcr-impl/src/main/resources/conf/nodetypes/consumers-configuration-nodetypes.xml 2011-09-12 10:52:17 UTC (rev 7353)
@@ -26,6 +26,24 @@
<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:lastmodified" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="wsrp:time" requiredType="long" autoCreated="false" mandatory="false"
+ onParentVersion="COPY" protected="false" multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
+ <nodeType name="wsrp:modifyregistrationrequired" isMixin="true" hasOrderableChildNodes="false" primaryItemName="">
+ <propertyDefinitions>
+ <propertyDefinition name="wsrp:ismodifyregistrationrequired" requiredType="boolean" autoCreated="false"
+ mandatory="false" onParentVersion="COPY" protected="false" multiple="false">
+ <valueConstraints/>
+ </propertyDefinition>
+ </propertyDefinitions>
+ </nodeType>
+
<nodeType name="wsrp:producerinfos" isMixin="false" hasOrderableChildNodes="true" primaryItemName="">
<supertypes>
<supertype>nt:base</supertype>
13 years, 3 months
gatein SVN: r7352 - in components/wsrp/branches/clustering: consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml and 4 other directories.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2011-09-12 06:49:34 -0400 (Mon, 12 Sep 2011)
New Revision: 7352
Modified:
components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java
components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml/XMLConsumerRegistry.java
components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/spi/ConsumerRegistrySPI.java
components/wsrp/branches/clustering/consumer/src/test/java/org/gatein/wsrp/test/support/MockConsumerRegistry.java
components/wsrp/branches/clustering/hibernate-impl/src/main/java/org/gatein/wsrp/consumer/registry/hibernate/HibernateConsumerRegistry.java
components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java
Log:
- Moved abstract methods from AbstractConsumerRegistry to ConsumerRegistrySPI since it makes sense for implementations to provide these methods.
Modified: components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java
===================================================================
--- components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2011-09-12 10:38:27 UTC (rev 7351)
+++ components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/AbstractConsumerRegistry.java 2011-09-12 10:49:34 UTC (rev 7352)
@@ -68,7 +68,7 @@
private static final Logger log = LoggerFactory.getLogger(AbstractConsumerRegistry.class);
- private ConsumerCache consumers = new InMemoryConsumerCache();
+ protected ConsumerCache consumers = new InMemoryConsumerCache();
public void setConsumerCache(ConsumerCache consumers)
{
@@ -197,7 +197,7 @@
this.federatingPortletInvoker = federatingPortletInvoker;
}
- protected WSRPConsumer createConsumerFrom(ProducerInfo producerInfo)
+ public WSRPConsumer createConsumerFrom(ProducerInfo producerInfo)
{
// make sure we set the registry after loading from DB since registry is not persisted.
// producerInfo.setRegistry(this);
@@ -325,25 +325,7 @@
{
ParameterValidation.throwIllegalArgExceptionIfNullOrEmpty(id, "consumer id", null);
- // try cache first
- WSRPConsumer consumer = consumers.getConsumer(id);
- if (consumer != null)
- {
- return consumer;
- }
- else
- {
- ProducerInfo info = loadProducerInfo(id);
- if (info != null)
- {
- return createConsumerFrom(info);
- }
- else
- {
- return null;
- }
- }
-
+ return consumers.getConsumer(id);
}
public boolean containsConsumer(String id)
@@ -475,22 +457,6 @@
return RELEASE_SESSIONS_LISTENER + id;
}
- protected abstract void save(ProducerInfo info, String messageOnError) throws ConsumerException;
-
- protected abstract void delete(ProducerInfo info) throws ConsumerException;
-
- /**
- * Persists the changes made to ProducerInfo.
- *
- * @param producerInfo
- * @return the previous value of the ProducerInfo's id if it has changed, <code>null</code> otherwise
- */
- protected abstract String update(ProducerInfo producerInfo);
-
- protected abstract Iterator<ProducerInfo> getProducerInfosFromStorage();
-
- protected abstract ProducerInfo loadProducerInfo(String id);
-
protected List<WSRPConsumer> getConsumers(boolean startConsumers)
{
final Collection<WSRPConsumer> consumerz = consumers.getConsumers();
Modified: components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java
===================================================================
--- components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java 2011-09-12 10:38:27 UTC (rev 7351)
+++ components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/InMemoryConsumerRegistry.java 2011-09-12 10:49:34 UTC (rev 7352)
@@ -53,7 +53,7 @@
}
@Override
- protected WSRPConsumer createConsumerFrom(ProducerInfo producerInfo)
+ public WSRPConsumer createConsumerFrom(ProducerInfo producerInfo)
{
WSRPConsumer consumer = super.createConsumerFrom(producerInfo);
@@ -77,15 +77,13 @@
return oldId;
}
- @Override
- protected void save(ProducerInfo info, String messageOnError)
+ public void save(ProducerInfo info, String messageOnError)
{
// generate a UUID for ProducerInfo
info.setKey(UUID.randomUUID().toString());
}
- @Override
- protected void delete(ProducerInfo info)
+ public void delete(ProducerInfo info)
{
String key = info.getKey();
String removed = keysToIds.remove(key);
@@ -95,8 +93,7 @@
}
}
- @Override
- protected String update(ProducerInfo producerInfo)
+ public String update(ProducerInfo producerInfo)
{
String key = producerInfo.getKey();
String oldId = keysToIds.get(key);
@@ -116,14 +113,12 @@
// do nothing
}
- @Override
- protected Iterator<ProducerInfo> getProducerInfosFromStorage()
+ public Iterator<ProducerInfo> getProducerInfosFromStorage()
{
return new ProducerInfoIterator(consumers.values().iterator());
}
- @Override
- protected ProducerInfo loadProducerInfo(String id)
+ public ProducerInfo loadProducerInfo(String id)
{
if (keysToIds.containsValue(id))
{
Modified: components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml/XMLConsumerRegistry.java
===================================================================
--- components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml/XMLConsumerRegistry.java 2011-09-12 10:38:27 UTC (rev 7351)
+++ components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/registry/xml/XMLConsumerRegistry.java 2011-09-12 10:49:34 UTC (rev 7352)
@@ -98,24 +98,21 @@
}
catch (JBossXBException e)
{
- throw new RuntimeException("Couldn't set unmarshall WSRP Consumers configuration", e);
+ throw new RuntimeException("Couldn't unmarshall WSRP Consumers configuration", e);
}
}
- @Override
- protected void save(ProducerInfo info, String messageOnError)
+ public void save(ProducerInfo info, String messageOnError)
{
// do nothing
}
- @Override
- protected void delete(ProducerInfo info)
+ public void delete(ProducerInfo info)
{
// do nothing
}
- @Override
- protected String update(ProducerInfo producerInfo)
+ public String update(ProducerInfo producerInfo)
{
return null;
}
Modified: components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/spi/ConsumerRegistrySPI.java
===================================================================
--- components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/spi/ConsumerRegistrySPI.java 2011-09-12 10:38:27 UTC (rev 7351)
+++ components/wsrp/branches/clustering/consumer/src/main/java/org/gatein/wsrp/consumer/spi/ConsumerRegistrySPI.java 2011-09-12 10:49:34 UTC (rev 7352)
@@ -24,11 +24,16 @@
package org.gatein.wsrp.consumer.spi;
import org.gatein.pc.federation.FederatingPortletInvoker;
+import org.gatein.wsrp.WSRPConsumer;
import org.gatein.wsrp.api.session.SessionEventBroadcaster;
+import org.gatein.wsrp.consumer.ConsumerException;
+import org.gatein.wsrp.consumer.ProducerInfo;
import org.gatein.wsrp.consumer.handlers.session.SessionRegistry;
import org.gatein.wsrp.consumer.migration.MigrationService;
import org.gatein.wsrp.consumer.registry.ConsumerRegistry;
+import java.util.Iterator;
+
/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
public interface ConsumerRegistrySPI extends ConsumerRegistry
{
@@ -47,4 +52,22 @@
void start() throws Exception;
void stop() throws Exception;
+
+ void save(ProducerInfo info, String messageOnError) throws ConsumerException;
+
+ void delete(ProducerInfo info) throws ConsumerException;
+
+ /**
+ * Persists the changes made to ProducerInfo.
+ *
+ * @param producerInfo
+ * @return the previous value of the ProducerInfo's id if it has changed, <code>null</code> otherwise
+ */
+ String update(ProducerInfo producerInfo);
+
+ Iterator<ProducerInfo> getProducerInfosFromStorage();
+
+ ProducerInfo loadProducerInfo(String id);
+
+ WSRPConsumer createConsumerFrom(ProducerInfo producerInfo);
}
Modified: components/wsrp/branches/clustering/consumer/src/test/java/org/gatein/wsrp/test/support/MockConsumerRegistry.java
===================================================================
--- components/wsrp/branches/clustering/consumer/src/test/java/org/gatein/wsrp/test/support/MockConsumerRegistry.java 2011-09-12 10:38:27 UTC (rev 7351)
+++ components/wsrp/branches/clustering/consumer/src/test/java/org/gatein/wsrp/test/support/MockConsumerRegistry.java 2011-09-12 10:49:34 UTC (rev 7352)
@@ -39,6 +39,7 @@
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
+import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -144,6 +145,31 @@
//To change body of implemented methods use File | Settings | File Templates.
}
+ public void save(ProducerInfo info, String messageOnError) throws ConsumerException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public void delete(ProducerInfo info) throws ConsumerException
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public String update(ProducerInfo producerInfo)
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Iterator<ProducerInfo> getProducerInfosFromStorage()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public ProducerInfo loadProducerInfo(String id)
+ {
+ throw new UnsupportedOperationException();
+ }
+
public void setFederatingPortletInvoker(FederatingPortletInvoker federatingPortletInvoker)
{
//To change body of implemented methods use File | Settings | File Templates.
@@ -193,4 +219,9 @@
{
return consumers.size();
}
+
+ public WSRPConsumer createConsumerFrom(ProducerInfo producerInfo)
+ {
+ throw new UnsupportedOperationException();
+ }
}
Modified: components/wsrp/branches/clustering/hibernate-impl/src/main/java/org/gatein/wsrp/consumer/registry/hibernate/HibernateConsumerRegistry.java
===================================================================
--- components/wsrp/branches/clustering/hibernate-impl/src/main/java/org/gatein/wsrp/consumer/registry/hibernate/HibernateConsumerRegistry.java 2011-09-12 10:38:27 UTC (rev 7351)
+++ components/wsrp/branches/clustering/hibernate-impl/src/main/java/org/gatein/wsrp/consumer/registry/hibernate/HibernateConsumerRegistry.java 2011-09-12 10:49:34 UTC (rev 7352)
@@ -42,7 +42,7 @@
private SessionFactory sessionFactory;
private String sessionFactoryJNDIName;
- protected void save(ProducerInfo info, String messageOnError)
+ public void save(ProducerInfo info, String messageOnError)
{
try
{
@@ -55,7 +55,7 @@
}
}
- protected void delete(ProducerInfo info)
+ public void delete(ProducerInfo info)
{
Session session = sessionFactory.getCurrentSession();
@@ -79,7 +79,7 @@
* @return the id that was previously assigned to the specified ProducerInfo or <code>null</code> if the id hasn't
* been modified
*/
- protected String update(ProducerInfo producerInfo)
+ public String update(ProducerInfo producerInfo)
{
String oldId;
Session session = sessionFactory.getCurrentSession();
@@ -105,15 +105,14 @@
return oldId;
}
- protected Iterator<ProducerInfo> getProducerInfosFromStorage()
+ public Iterator<ProducerInfo> getProducerInfosFromStorage()
{
Session session = sessionFactory.getCurrentSession();
return session.createQuery("from ProducerInfo pi order by pi.persistentId").iterate();
}
- @Override
- protected ProducerInfo loadProducerInfo(String id)
+ public ProducerInfo loadProducerInfo(String id)
{
Session session = sessionFactory.getCurrentSession();
return (ProducerInfo)session.createQuery("from ProducerInfo pi where pi.persistentId = :id")
Modified: components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java
===================================================================
--- components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java 2011-09-12 10:38:27 UTC (rev 7351)
+++ components/wsrp/branches/clustering/jcr-impl/src/main/java/org/gatein/wsrp/consumer/registry/JCRConsumerRegistry.java 2011-09-12 10:49:34 UTC (rev 7352)
@@ -109,8 +109,7 @@
this.configurationIS = is;
}
- @Override
- protected void save(ProducerInfo info, String messageOnError)
+ public void save(ProducerInfo info, String messageOnError)
{
try
@@ -132,8 +131,7 @@
}
}
- @Override
- protected void delete(ProducerInfo info)
+ public void delete(ProducerInfo info)
{
if (!persister.delete(info, this))
{
@@ -141,8 +139,7 @@
}
}
- @Override
- protected String update(ProducerInfo producerInfo)
+ public String update(ProducerInfo producerInfo)
{
String key = producerInfo.getKey();
if (key == null)
@@ -184,8 +181,7 @@
return idUnchanged ? null : oldId;
}
- @Override
- protected Iterator<ProducerInfo> getProducerInfosFromStorage()
+ public Iterator<ProducerInfo> getProducerInfosFromStorage()
{
ChromatticSession session = persister.getSession();
ProducerInfosMapping producerInfosMapping = getProducerInfosMapping(session);
@@ -197,8 +193,7 @@
return new MappingToProducerInfoIterator(mappings.iterator(), this);
}
- @Override
- protected ProducerInfo loadProducerInfo(String id)
+ public ProducerInfo loadProducerInfo(String id)
{
ChromatticSession session = persister.getSession();
try
13 years, 3 months
gatein SVN: r7351 - in portal/branches/xss-issues: webui/portal/src/main/java/org/exoplatform/portal/webui/portal and 1 other directory.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-09-12 06:38:27 -0400 (Mon, 12 Sep 2011)
New Revision: 7351
Modified:
portal/branches/xss-issues/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl
portal/branches/xss-issues/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
Log:
GTNPORTAL-2062 XSS issue when entering site description
Modified: portal/branches/xss-issues/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl
===================================================================
--- portal/branches/xss-issues/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl 2011-09-12 10:26:25 UTC (rev 7350)
+++ portal/branches/xss-issues/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UISiteManagement.gtmpl 2011-09-12 10:38:27 UTC (rev 7351)
@@ -1,76 +1,81 @@
<%
+ 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">
<table class="ActionContainer">
- <tr>
- <td>
- <div onclick="ajaxGet(eXo.env.server.createPortalURL('UIWorkingWorkspace', 'CreatePortal', true))" class="ActionButton BlueButton">
- <div class="ButtonLeft">
- <div class="ButtonRight">
- <div class="ButtonMiddle">
- <a href="javascript:void(0);"><%=_ctx.appRes(uicomponent.getId() + ".action.addNewPortal")%></a>
- </div>
- </div>
- </div>
- </div>
- </td>
+ <tr>
+ <td>
+ <div onclick="ajaxGet(eXo.env.server.createPortalURL('UIWorkingWorkspace', 'CreatePortal', true))" class="ActionButton BlueButton">
+ <div class="ButtonLeft">
+ <div class="ButtonRight">
+ <div class="ButtonMiddle">
+ <a href="javascript:void(0);"><%=_ctx.appRes(uicomponent.getId() + ".action.addNewPortal")%></a>
+ </div>
+ </div>
+ </div>
+ </div>
+ </td>
</tr>
- </table>
- </div>
- <%
- }
- %>
- <%uicomponent.renderChildren();%>
-</div>
-
-
+ </table>
+ </div>
+ <%
+ }
+ %>
+ <%uicomponent.renderChildren();%>
+</div>
\ No newline at end of file
Modified: portal/branches/xss-issues/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java
===================================================================
--- portal/branches/xss-issues/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-09-12 10:26:25 UTC (rev 7350)
+++ portal/branches/xss-issues/webui/portal/src/main/java/org/exoplatform/portal/webui/portal/UIPortalForm.java 2011-09-12 10:38:27 UTC (rev 7351)
@@ -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: r7350 - portal/branches/xss-issues/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-09-12 06:26:25 -0400 (Mon, 12 Sep 2011)
New Revision: 7350
Modified:
portal/branches/xss-issues/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
Modified: portal/branches/xss-issues/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl
===================================================================
--- portal/branches/xss-issues/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl 2011-09-12 09:58:42 UTC (rev 7349)
+++ portal/branches/xss-issues/portlet/exoadmin/src/main/webapp/groovy/navigation/webui/component/UINavigationGrid.gtmpl 2011-09-12 10:26:25 UTC (rev 7350)
@@ -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: r7349 - portal/branches.
by do-not-reply@jboss.org
Author: ndkhoiits
Date: 2011-09-12 05:58:42 -0400 (Mon, 12 Sep 2011)
New Revision: 7349
Added:
portal/branches/xss-issues/
Log:
Create a branch for XSS issues
13 years, 3 months
gatein SVN: r7347 - portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application.
by do-not-reply@jboss.org
Author: theute
Date: 2011-09-09 10:20:28 -0400 (Fri, 09 Sep 2011)
New Revision: 7347
Modified:
portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java
Log:
GTNPORTAL-2088: Infinite loop when edit banner portlet with invalid value
Modified: portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java
===================================================================
--- portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java 2011-09-09 14:17:54 UTC (rev 7346)
+++ portal/trunk/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java 2011-09-09 14:20:28 UTC (rev 7347)
@@ -178,13 +178,14 @@
public ResourceResolver getResourceResolver(String uri)
{
Application app = getApplication();
+ RequestContext pcontext = this;
while (app != null)
{
ApplicationResourceResolver appResolver = app.getResourceResolver();
ResourceResolver resolver = appResolver.getResourceResolver(uri);
if (resolver != null)
return resolver;
- RequestContext pcontext = getParentAppRequestContext();
+ pcontext = pcontext.getParentAppRequestContext();
if (pcontext != null)
app = pcontext.getApplication();
else
13 years, 3 months
gatein SVN: r7346 - epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/application.
by do-not-reply@jboss.org
Author: theute
Date: 2011-09-09 10:17:54 -0400 (Fri, 09 Sep 2011)
New Revision: 7346
Modified:
epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java
Log:
JBEPP-1155: Infinite loop when edit banner portlet with invalid value
Modified: epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java 2011-09-09 11:12:12 UTC (rev 7345)
+++ epp/portal/branches/EPP_5_2_Branch/webui/framework/src/main/java/org/exoplatform/webui/application/WebuiRequestContext.java 2011-09-09 14:17:54 UTC (rev 7346)
@@ -178,13 +178,14 @@
public ResourceResolver getResourceResolver(String uri)
{
Application app = getApplication();
+ RequestContext pcontext = this;
while (app != null)
{
ApplicationResourceResolver appResolver = app.getResourceResolver();
ResourceResolver resolver = appResolver.getResourceResolver(uri);
if (resolver != null)
return resolver;
- RequestContext pcontext = getParentAppRequestContext();
+ pcontext = pcontext.getParentAppRequestContext();
if (pcontext != null)
app = pcontext.getApplication();
else
13 years, 3 months
gatein SVN: r7345 - portal/branches/dom/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/UILoginForm.
by do-not-reply@jboss.org
Author: phuong_vu
Date: 2011-09-09 07:12:12 -0400 (Fri, 09 Sep 2011)
New Revision: 7345
Modified:
portal/branches/dom/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/UILoginForm/Stylesheet.css
Log:
[DOM] Improve css for UILoginForm
Modified: portal/branches/dom/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/UILoginForm/Stylesheet.css
===================================================================
--- portal/branches/dom/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/UILoginForm/Stylesheet.css 2011-09-09 10:28:25 UTC (rev 7344)
+++ portal/branches/dom/web/eXoResources/src/main/webapp/skin/DefaultSkin/portal/webui/component/widget/UILoginForm/Stylesheet.css 2011-09-09 11:12:12 UTC (rev 7345)
@@ -21,7 +21,11 @@
margin: auto;
padding: 30px 17px 30px 10px; /* orientation=lt */
padding: 30px 10px 30px 17px; /* orientation=rt */
-}
+ background: #EBEBEB;
+ border-radius: 5px 5px 5px 5px;
+ -moz-border-radius: 5px 5px 5px 5px;
+ -webkit-border-radius: 5px 5px 5px 5px;
+}
/*##############################- LoginBox Style-################################*/
13 years, 3 months