gatein SVN: r8347 - in portal/trunk/webui/core/src: test/java/org/exoplatform/webui/test/validator and 1 other directory.
by do-not-reply@jboss.org
Author: chris.laprun(a)jboss.com
Date: 2012-02-01 13:54:13 -0500 (Wed, 01 Feb 2012)
New Revision: 8347
Modified:
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UserConfigurableUsernameValidator.java
portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java
portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/validator/TestWebuiValidator.java
Log:
- GTNPORTAL-1673: Made UserConfigurableUsernameValidator more generic so that it can load any number of named configurations from gatein.conf.dir/configuration.properties. A validation is activated by creating a validator with the associated name. Documentation upcoming.
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UserConfigurableUsernameValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UserConfigurableUsernameValidator.java 2012-02-01 15:28:25 UTC (rev 8346)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UserConfigurableUsernameValidator.java 2012-02-01 18:54:13 UTC (rev 8347)
@@ -33,31 +33,109 @@
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
+import java.util.HashMap;
+import java.util.Map;
import java.util.Properties;
import java.util.regex.Pattern;
/** @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a> */
@Serialized
-public class UserConfigurableUsernameValidator extends UsernameValidator
+public class UserConfigurableUsernameValidator extends MultipleConditionsValidator
{
- private static ValidatorConfiguration configuration = new ValidatorConfiguration();
+ protected static Log log = ExoLogger.getLogger(UserConfigurableUsernameValidator.class);
+ public static final String USERNAME = "username";
+ public static final String GROUPMEMBERSHIP = "groupmembership";
+ public static final String DEFAULT_LOCALIZATION_KEY = "ExpressionValidator.msg.value-invalid";
+ public static final String GROUP_MEMBERSHIP_VALIDATION_REGEX = "^\\p{L}[\\p{L}\\d._\\-\\s*,\\s*]+$";
+ public static final String GROUP_MEMBERSHIP_LOCALIZATION_KEY = "UIGroupMembershipForm.msg.Invalid-char";
+
+ private static Map<String, ValidatorConfiguration> configurations = new HashMap<String, ValidatorConfiguration>(3);
+
+ public static final String KEY_PREFIX = "gatein.validators.";
+
+ static
+ {
+ String gateinConfDir = System.getProperty("gatein.conf.dir");
+ File conf = new File(gateinConfDir, "configuration.properties");
+ if (conf.exists())
+ {
+ try
+ {
+ Properties properties = new Properties();
+ properties.load(new FileInputStream(conf));
+ int length = KEY_PREFIX.length();
+ for (Object objectKey : properties.keySet())
+ {
+ String key = (String)objectKey;
+ if (key.startsWith(KEY_PREFIX))
+ {
+ // extract property key
+ String propertyKey = key.substring(length, key.indexOf('.', length));
+ if(!configurations.containsKey(propertyKey))
+ {
+ configurations.put(propertyKey, new ValidatorConfiguration(propertyKey, properties));
+ }
+ }
+ }
+ }
+ catch (IOException e)
+ {
+ log.info(e.getLocalizedMessage());
+ log.debug(e);
+ }
+ }
+ }
+
+ private final String validatorName;
+ private final String localizationKey;
+
// needed by @Serialized
public UserConfigurableUsernameValidator()
{
+ this(USERNAME, DEFAULT_LOCALIZATION_KEY);
+ }
+
+ public UserConfigurableUsernameValidator(String validatorName, String messageLocalizationKey)
+ {
this.exceptionOnMissingMandatory = true;
this.trimValue = true;
+ localizationKey = messageLocalizationKey != null ? messageLocalizationKey : DEFAULT_LOCALIZATION_KEY;
+ this.validatorName = validatorName != null ? validatorName : USERNAME;
}
+ public UserConfigurableUsernameValidator(String validatorName)
+ {
+ this(validatorName, DEFAULT_LOCALIZATION_KEY);
+ }
+
@Override
protected void validate(String value, String label, CompoundApplicationMessage messages, UIFormInput uiInput)
{
- if (configuration.defaultConfig)
+ ValidatorConfiguration configuration = configurations.get(validatorName);
+
+ if (configuration == null)
{
- super.validate(value, label, messages, uiInput);
+ // we don't have a user-configured validator for this validator name
+
+ if (USERNAME.equals(validatorName))
+ {
+ // if the validator name is USERNAME constant, we have a username to validate with the original, non-configured behavior
+ UsernameValidator.validate(value, label, messages, UsernameValidator.DEFAULT_MIN_LENGTH, UsernameValidator.DEFAULT_MAX_LENGTH);
+ }
+ else
+ {
+ // else, we assume that we need to validate a group membership, replicating original behavior
+ if (!Pattern.matches(GROUP_MEMBERSHIP_VALIDATION_REGEX, value))
+ {
+ messages.addMessage(localizationKey, new Object[]{label});
+ }
+ }
}
else
{
+ // otherwise, use the user-provided configuration
+
if (value.length() < configuration.minLength || value.length() > configuration.maxLength)
{
messages.addMessage("StringLengthValidator.msg.length-invalid", new Object[]{label, configuration.minLength.toString(), configuration.maxLength.toString()});
@@ -65,48 +143,33 @@
if (!Pattern.matches(configuration.pattern, value))
{
- messages.addMessage("ExpressionValidator.msg.value-invalid", new Object[]{label, configuration.formatMessage});
+ messages.addMessage(localizationKey, new Object[]{label, configuration.formatMessage});
}
}
}
private static class ValidatorConfiguration
{
- protected static Log log = ExoLogger.getLogger("username-validator");
private Integer minLength;
private Integer maxLength;
private String pattern;
private String formatMessage;
- private boolean defaultConfig = true;
- private ValidatorConfiguration()
+ private ValidatorConfiguration(String propertyKey, Properties properties)
{
- String gateinConfDir = System.getProperty("gatein.conf.dir");
- File conf = new File(gateinConfDir, "username-validator.properties");
+ // used to assign backward compatible default values
+ boolean isUser = USERNAME.equals(propertyKey);
+ String prefixedKey = KEY_PREFIX + propertyKey;
- minLength = DEFAULT_MIN_LENGTH;
- maxLength = DEFAULT_MAX_LENGTH;
- pattern = Utils.USER_NAME_VALIDATOR_REGEX;
- formatMessage = pattern;
+ String property = properties.getProperty(prefixedKey + ".min.length");
+ minLength = property != null ? Integer.valueOf(property) : (isUser ? UsernameValidator.DEFAULT_MIN_LENGTH : 0);
- if (conf.exists())
- {
- try
- {
- Properties properties = new Properties();
- properties.load(new FileInputStream(conf));
- minLength = Integer.valueOf(properties.getProperty("minLength", String.valueOf(DEFAULT_MIN_LENGTH)));
- maxLength = Integer.valueOf(properties.getProperty("maxLength", String.valueOf(DEFAULT_MAX_LENGTH)));
- pattern = properties.getProperty("regexp", Utils.USER_NAME_VALIDATOR_REGEX);
- formatMessage = properties.getProperty("formatMessage", formatMessage);
- defaultConfig = false;
- }
- catch (IOException e)
- {
- log.info(e.getLocalizedMessage());
- log.debug(e);
- }
- }
+ property = properties.getProperty(prefixedKey + ".max.length");
+ maxLength = property != null ? Integer.valueOf(property) : (isUser ? UsernameValidator.DEFAULT_MAX_LENGTH : Integer.MAX_VALUE);
+
+ pattern = properties.getProperty(prefixedKey + ".regexp", Utils.USER_NAME_VALIDATOR_REGEX);
+ formatMessage = properties.getProperty(prefixedKey + ".format.message", pattern);
}
+
}
}
Modified: portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java
===================================================================
--- portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java 2012-02-01 15:28:25 UTC (rev 8346)
+++ portal/trunk/webui/core/src/main/java/org/exoplatform/webui/form/validator/UsernameValidator.java 2012-02-01 18:54:13 UTC (rev 8347)
@@ -49,6 +49,11 @@
protected void validate(String value, String label, CompoundApplicationMessage messages, UIFormInput uiInput)
{
+ validate(value, label, messages, min, max);
+ }
+
+ static void validate(String value, String label, CompoundApplicationMessage messages, Integer min, Integer max)
+ {
char[] buff = value.toCharArray();
if (buff.length < min || buff.length > max)
{
@@ -93,7 +98,7 @@
}
}
- private boolean isSymbol(char c)
+ private static boolean isSymbol(char c)
{
return c == '_' || c == '.';
}
Modified: portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/validator/TestWebuiValidator.java
===================================================================
--- portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/validator/TestWebuiValidator.java 2012-02-01 15:28:25 UTC (rev 8346)
+++ portal/trunk/webui/core/src/test/java/org/exoplatform/webui/test/validator/TestWebuiValidator.java 2012-02-01 18:54:13 UTC (rev 8347)
@@ -31,6 +31,7 @@
import org.exoplatform.webui.form.validator.ResourceValidator;
import org.exoplatform.webui.form.validator.SpecialCharacterValidator;
import org.exoplatform.webui.form.validator.URLValidator;
+import org.exoplatform.webui.form.validator.UserConfigurableUsernameValidator;
import org.exoplatform.webui.form.validator.UsernameValidator;
import org.exoplatform.webui.form.validator.Validator;
@@ -93,6 +94,14 @@
public void testUsernameValidator()
{
Validator validator = new UsernameValidator(3, 30);
+ validateUsernames(validator);
+
+ validator = new UserConfigurableUsernameValidator(UserConfigurableUsernameValidator.USERNAME);
+ validateUsernames(validator);
+ }
+
+ private void validateUsernames(Validator validator)
+ {
assertTrue(expected(validator, "root.gtn"));
assertTrue(expected(validator, "root_gtn"));
assertTrue(expected(validator, "root_gtn.01"));
12 years, 11 months
gatein SVN: r8346 - epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web.
by do-not-reply@jboss.org
Author: kenfinni
Date: 2012-02-01 10:28:25 -0500 (Wed, 01 Feb 2012)
New Revision: 8346
Modified:
epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
Log:
JBEPP-1428: Unicode characters handling problem
- Set Character encoding to UTF-8 before any Request parameters are accessed
Modified: epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2012-02-01 14:54:02 UTC (rev 8345)
+++ epp/portal/branches/EPP_5_2_Branch/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2012-02-01 15:28:25 UTC (rev 8346)
@@ -309,6 +309,17 @@
public void service(HttpServletRequest req, HttpServletResponse res) throws Exception
{
boolean debug = log.isDebugEnabled();
+
+ try
+ {
+ // We set the character encoding now to UTF-8 before obtaining parameters
+ req.setCharacterEncoding("UTF-8");
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ log.error("Encoding not supported", e);
+ }
+
String portalPath = req.getRequestURI().substring(req.getContextPath().length());
Router router = routerRef.get();
12 years, 11 months
gatein SVN: r8345 - portal/trunk/component/web/controller/src/main/java/org/exoplatform/web.
by do-not-reply@jboss.org
Author: kenfinni
Date: 2012-02-01 09:54:02 -0500 (Wed, 01 Feb 2012)
New Revision: 8345
Modified:
portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
Log:
GTNPORTAL-2342: Unicode characters encoding error
- Set the Character Encoding to UTF-8 before the Request parameters are retrieved
Modified: portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java
===================================================================
--- portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2012-02-01 11:31:54 UTC (rev 8344)
+++ portal/trunk/component/web/controller/src/main/java/org/exoplatform/web/WebAppController.java 2012-02-01 14:54:02 UTC (rev 8345)
@@ -19,8 +19,26 @@
package org.exoplatform.web;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
+import java.net.MalformedURLException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.concurrent.atomic.AtomicReference;
+
+import javax.servlet.ServletConfig;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
import org.exoplatform.commons.utils.Safe;
-import org.exoplatform.container.ExoContainer;
import org.exoplatform.container.ExoContainerContext;
import org.exoplatform.container.component.RequestLifeCycle;
import org.exoplatform.container.xml.InitParams;
@@ -42,22 +60,6 @@
import org.gatein.common.http.QueryStringParser;
import org.gatein.common.logging.Logger;
import org.gatein.common.logging.LoggerFactory;
-import java.io.File;
-import java.io.IOException;
-import java.io.InputStream;
-import java.net.MalformedURLException;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.concurrent.atomic.AtomicReference;
-import javax.servlet.ServletConfig;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
/**
* The WebAppController is the entry point of the GateIn service.
@@ -309,6 +311,17 @@
public void service(HttpServletRequest req, HttpServletResponse res) throws Exception
{
boolean debug = log.isDebugEnabled();
+
+ try
+ {
+ // We set the character encoding now to UTF-8 before obtaining parameters
+ req.setCharacterEncoding("UTF-8");
+ }
+ catch (UnsupportedEncodingException e)
+ {
+ log.error("Encoding not supported", e);
+ }
+
String portalPath = req.getRequestURI().substring(req.getContextPath().length());
Router router = routerRef.get();
12 years, 11 months
gatein SVN: r8344 - portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-02-01 06:31:54 -0500 (Wed, 01 Feb 2012)
New Revision: 8344
Modified:
portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
Log:
Update location with latest ZIP file.
Modified: portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
===================================================================
--- portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2012-02-01 11:25:19 UTC (rev 8343)
+++ portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2012-02-01 11:31:54 UTC (rev 8344)
@@ -19,7 +19,8 @@
In this tutorial, the SSO server is installed in a Tomcat installation. Tomcat can be obtained from <ulink type="http" url="http://tomcat.apache.org">http://tomcat.apache.org</ulink>.
</para>
<para>
- All the packages required for setup can be found in a zip file located at <ulink type="http" url="https://repository.jboss.org/nexus/content/groups/public/org/gatein/sso/s...">here</ulink>. In this document, $GATEIN_SSO_HOME is called as the directory where the file is extracted.
+ All the packages required for setup can be found in a zip file located at <ulink type="http" url="https://repository.jboss.org/nexus/content/groups/public/org/gatein/sso/s...">here</ulink>.
+ In this document, $GATEIN_SSO_HOME is called as the directory where the file is extracted.
</para>
<para>
Users are advised to not run any portal extensions that could override the data when manipulating the <filename>gatein.ear</filename> file directly.
12 years, 11 months
gatein SVN: r8343 - portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-02-01 06:25:19 -0500 (Wed, 01 Feb 2012)
New Revision: 8343
Modified:
portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
Log:
GTNPORTAL-2322 Update docs according to JOSSO changes in newly released SSO 1.1.1-CR01.
Modified: portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml
===================================================================
--- portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2012-02-01 11:18:16 UTC (rev 8342)
+++ portal/trunk/docs/reference-guide/en-US/modules/AuthenticationAndIdentity/SSO.xml 2012-02-01 11:25:19 UTC (rev 8343)
@@ -709,7 +709,7 @@
Once downloaded, extract the package into what will be called <filename>JOSSO_HOME</filename> in this example.
</para>
<warning>
- <para>The steps described later are only correct in case of JOSSO v.1.8.1.</para>
+ <para>The steps described later are only correct in case of JOSSO v.1.8</para>
</warning>
</section>
@@ -718,9 +718,12 @@
<procedure>
<step>
<para>
- Copy the files from <filename>GATEIN_SSO_HOME/josso/plugin</filename> into the Tomcat directory (<filename>JOSSO_HOME</filename>).
+ If you have JOSSO 1.8.1, then copy the files from <filename>GATEIN_SSO_HOME/josso/josso-181/plugin</filename> into the Tomcat directory (<filename>JOSSO_HOME</filename>).
</para>
<para>
+ If you have JOSSO 1.8.2 or newer, then copy the files from <filename>GATEIN_SSO_HOME/josso/josso-182/plugin</filename> into the Tomcat directory (<filename>JOSSO_HOME</filename>).
+ </para>
+ <para>
This action should replace or add the following files to the <filename>JOSSO_HOME/webapps/josso/WEB-INF/lib</filename> directory:
</para>
<itemizedlist>
@@ -775,15 +778,20 @@
<section id="sect-Reference_Guide-JOSSO-Setup_the_JOSSO_client">
<title>Setup the JOSSO client</title>
+ <note>
+ There are some changes in JOSSO agent api among versions 1.8.1 and 1.8.2, which means that we need to use different modules for different JOSSO versions.
+ In next section, we will use directory with key <emphasis role="bold">josso-18X</emphasis>, which will be directory <emphasis>josso-181</emphasis> if you
+ have JOSSO 1.8.1 and <emphasis>josso-182</emphasis> if you have JOSSO 1.8.2 or newer.
+ </note>
<procedure>
<step>
<para>
- Copy the library files from <filename>GATEIN_SSO_HOME/josso/gatein.ear/lib</filename> into <filename>gatein.ear/lib</filename> (or into <filename>GATEIN_HOME/lib</filename> if &PRODUCT; is running in Tomcat)
+ Copy the library files from <filename>GATEIN_SSO_HOME/josso/josso-18X/gatein.ear/lib</filename> into <filename>gatein.ear/lib</filename> (or into <filename>GATEIN_HOME/lib</filename> if &PRODUCT; is running in Tomcat)
</para>
</step>
<step>
<para>
- Copy the file <filename>GATEIN_SSO_HOME/josso/gatein.ear/portal.war/WEB-INF/classes/josso-agent-config.xml</filename> into <filename>gatein.ear/02portal.war/WEB-INF/classes</filename> (or into <filename>GATEIN_HOME/webapps/portal.war/WEB-INF/classes</filename>, or <filename>GATEIN_HOME/conf</filename> if &PRODUCT; is running in Tomcat)
+ Copy the file <filename>GATEIN_SSO_HOME/josso/josso-18X/gatein.ear/portal.war/WEB-INF/classes/josso-agent-config.xml</filename> into <filename>gatein.ear/02portal.war/WEB-INF/classes</filename> (or into <filename>GATEIN_HOME/webapps/portal.war/WEB-INF/classes</filename>, or <filename>GATEIN_HOME/conf</filename> if &PRODUCT; is running in Tomcat)
</para>
</step>
<step>
12 years, 11 months
gatein SVN: r8342 - epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2012-02-01 06:18:16 -0500 (Wed, 01 Feb 2012)
New Revision: 8342
Modified:
epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml
Log:
JBEPP-1429 Czech localization labels for navigation nodes are missing
Modified: epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml 2012-02-01 11:16:51 UTC (rev 8341)
+++ epp/portal/branches/EPP_5_2_Branch/web/portal/src/main/webapp/WEB-INF/conf/portal/portal/classic/navigation.xml 2012-02-01 11:18:16 UTC (rev 8342)
@@ -29,6 +29,7 @@
<node>
<name>home</name>
<label xml:lang="en">Home</label>
+ <label xml:lang="cs">Domů</label>
<label xml:lang="fr">Accueil</label>
<label xml:lang="es">Inicio</label>
<label xml:lang="de">Startseite</label>
@@ -49,6 +50,7 @@
<node>
<name>sitemap</name>
<label xml:lang="en">SiteMap</label>
+ <label xml:lang="cs">Mapa stránek</label>
<label xml:lang="fr">SiteMap</label>
<label xml:lang="es">Mapa del Sitio</label>
<label xml:lang="de">Seitenübersicht</label>
@@ -69,6 +71,7 @@
<node>
<name>groupnavigation</name>
<label xml:lang="en">Group Navigation</label>
+ <label xml:lang="cs">Navigace skupin</label>
<label xml:lang="fr">Group Navigation</label>
<label xml:lang="es">Navegación por Grupos</label>
<label xml:lang="de">Gruppennavigation</label>
@@ -90,6 +93,7 @@
<node>
<name>portalnavigation</name>
<label xml:lang="en">Portal Navigation</label>
+ <label xml:lang="cs">Navigace portálu</label>
<label xml:lang="fr">Portal Navigation</label>
<label xml:lang="es">Navegación por Portales</label>
<label xml:lang="de">Portalnavigation</label>
@@ -111,6 +115,7 @@
<node>
<name>register</name>
<label xml:lang="en">Register</label>
+ <label xml:lang="cs">Registrace</label>
<label xml:lang="es">Registrarse</label>
<label xml:lang="de">Registrieren</label>
<label xml:lang="it">Registrazione</label>
12 years, 11 months
gatein SVN: r8341 - epp/portal/branches/EPP_5_2_Branch/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2012-02-01 06:16:51 -0500 (Wed, 01 Feb 2012)
New Revision: 8341
Modified:
epp/portal/branches/EPP_5_2_Branch/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/LocalGadgetData.java
Log:
JBEPP-1414 Gadgets without titles not handled properly in Application Registry
Modified: epp/portal/branches/EPP_5_2_Branch/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/LocalGadgetData.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/LocalGadgetData.java 2012-02-01 11:15:11 UTC (rev 8340)
+++ epp/portal/branches/EPP_5_2_Branch/component/application-registry/src/main/java/org/exoplatform/application/gadget/impl/LocalGadgetData.java 2012-02-01 11:16:51 UTC (rev 8341)
@@ -84,7 +84,7 @@
// Update def
def.setDescription(prefs.getDescription());
def.setThumbnail(prefs.getThumbnail().toString()); // Do something better than that
- def.setTitle(prefs.getTitle());
+ def.setTitle(getGadgetTitle(prefs, def.getName()));
def.setReferenceURL(prefs.getTitleUrl().toString());
// Update content
@@ -106,4 +106,18 @@
NTFile content = getGadgetContent();
return content.getLastModified();
}
+
+ private String getGadgetTitle(ModulePrefs prefs, String defaultValue)
+ {
+ String title = prefs.getDirectoryTitle();
+ if (title == null || title.trim().length() < 1)
+ {
+ title = prefs.getTitle();
+ }
+ if (title == null || title.trim().length() < 1)
+ {
+ return defaultValue;
+ }
+ return title;
+ }
}
12 years, 11 months
gatein SVN: r8340 - in epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main: webapp/groovy/portal/webui/component and 1 other directory.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2012-02-01 06:15:11 -0500 (Wed, 01 Feb 2012)
New Revision: 8340
Modified:
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java
epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl
Log:
JBEPP-1395 Breadcrumb Portlet doesn't update when a language change occurs
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java 2012-02-01 11:08:24 UTC (rev 8339)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/java/org/exoplatform/portal/webui/component/UIBreadcumbsPortlet.java 2012-02-01 11:15:11 UTC (rev 8340)
@@ -19,18 +19,17 @@
package org.exoplatform.portal.webui.component;
+import org.exoplatform.portal.mop.user.UserNavigation;
import org.exoplatform.portal.mop.user.UserNode;
+import org.exoplatform.portal.mop.user.UserPortal;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.webui.application.WebuiRequestContext;
import org.exoplatform.webui.application.portlet.PortletRequestContext;
import org.exoplatform.webui.config.annotation.ComponentConfig;
import org.exoplatform.webui.core.UIPortletApplication;
import org.exoplatform.webui.core.lifecycle.UIApplicationLifecycle;
-
-import java.util.ArrayList;
-import java.util.Collections;
+import java.util.LinkedList;
import java.util.List;
-
import javax.portlet.PortletPreferences;
import javax.portlet.PortletRequest;
@@ -72,16 +71,19 @@
public List<UserNode> getSelectedPath() throws Exception
{
UserNode node = Util.getUIPortal().getSelectedUserNode();
- List<UserNode> paths = new ArrayList<UserNode>();
+ UserPortal userPortal = Util.getPortalRequestContext().getUserPortalConfig().getUserPortal();
+ UserNavigation nav = userPortal.getNavigation(node.getNavigation().getKey());
+ UserNode targetNode = userPortal.resolvePath(nav, null, node.getURI());
+ LinkedList<UserNode> paths = new LinkedList<UserNode>();
+
do
{
- paths.add(node);
- node = node.getParent();
+ paths.addFirst(targetNode);
+ targetNode = targetNode.getParent();
}
- while (node != null && node.getParent() != null);
- Collections.reverse(paths);
-
+ while (targetNode != null && targetNode.getParent() != null);
+
return paths;
}
Modified: epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl 2012-02-01 11:08:24 UTC (rev 8339)
+++ epp/portal/branches/EPP_5_2_Branch/portlet/web/src/main/webapp/groovy/portal/webui/component/UIBreadcumbsPortlet.gtmpl 2012-02-01 11:15:11 UTC (rev 8340)
@@ -1,5 +1,6 @@
<%
import java.util.List;
+ import org.exoplatform.portal.mop.user.UserNode;
import org.exoplatform.portal.webui.util.Util;
import org.exoplatform.portal.application.PortalRequestContext;
import org.gatein.common.text.EntityEncoder;
@@ -7,7 +8,8 @@
import org.exoplatform.web.url.PortalURL;
import org.exoplatform.web.url.navigation.NavigationResource;
- List list = uicomponent.getSelectedPath();
+ List<UserNode> list = uicomponent.getSelectedPath();
+ int size = list.size();
PortalRequestContext pcontext = Util.getPortalRequestContext();
PortalURL nodeURL = nodeurl();
@@ -19,16 +21,17 @@
<div class="RightBreadcumbsBar">
<div class="BreadcumbsInfoBar">
<div class="HomeIcon LeftBlock BCHome16x16Icon"><span></span></div>
- <%if(list.size() > 0) {
+ <%if(size > 0) {
String note = "LeftBlock";
- for(i in 0 .. list.size()-1) {
- def node = list.get(i);
+ int counter = 0;
+ for(UserNode node : list) {
+ counter++;
String actionLink = nodeURL.setNode(node);
- if(i == list.size()-1) note = "Selected";
+ if(counter == size) note = "Selected";
%>
<a href="<%=(node.getPageRef() == null) ? "#" : actionLink%>" class="$note"><%=node.getEncodedResolvedLabel();%></a>
<%
- if(i != list.size()-1) {
+ if(counter < size) {
%>
<div class="RightBlackGridArrowIcon LeftBlock RightBlackGridArrow16x16Icon"><span></span></div>
<%
12 years, 11 months
gatein SVN: r8339 - epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs.
by do-not-reply@jboss.org
Author: hfnukal
Date: 2012-02-01 06:08:24 -0500 (Wed, 01 Feb 2012)
New Revision: 8339
Modified:
epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css
Log:
JBEPP-1272 Icons sticking out in Page Editor
Modified: epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css
===================================================================
--- epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css 2012-02-01 10:29:39 UTC (rev 8338)
+++ epp/portal/branches/EPP_5_2_Branch/web/eXoResources/src/main/webapp/skin/DefaultSkin/webui/component/UITabSystem/UIVerticalSlideTabs/Stylesheet.css 2012-02-01 11:08:24 UTC (rev 8339)
@@ -250,7 +250,8 @@
float: left; /* orientation=lt */
float: right; /* orientation=rt */
margin: 0px 4px 0px 0px; /* orientation=lt */
- margin: 0px 0px 0px 4px; /* orientation=rt */
+ margin: 0px 0px 0px 4px; /* orientation=rt */
+ width: 80px;
}
.UIVerticalSlideTabs .VTabStyle4 .VTabContentBG .ContentInfo {
12 years, 11 months
gatein SVN: r8338 - in components/sso/trunk: agent and 17 other directories.
by do-not-reply@jboss.org
Author: mposolda
Date: 2012-02-01 05:29:39 -0500 (Wed, 01 Feb 2012)
New Revision: 8338
Modified:
components/sso/trunk/agent/pom.xml
components/sso/trunk/auth-callback/pom.xml
components/sso/trunk/cas/gatein-cas-plugin/pom.xml
components/sso/trunk/cas/gatein-cas-portal/pom.xml
components/sso/trunk/cas/pom.xml
components/sso/trunk/josso/gatein-agent-josso181/pom.xml
components/sso/trunk/josso/gatein-agent-josso182/pom.xml
components/sso/trunk/josso/gatein-josso-plugin/pom.xml
components/sso/trunk/josso/gatein-josso-portal/pom.xml
components/sso/trunk/josso/pom.xml
components/sso/trunk/opensso/gatein-opensso-plugin/pom.xml
components/sso/trunk/opensso/gatein-opensso-portal/pom.xml
components/sso/trunk/opensso/pom.xml
components/sso/trunk/packaging/pom.xml
components/sso/trunk/pom.xml
components/sso/trunk/saml/gatein-saml-plugin/pom.xml
components/sso/trunk/saml/gatein-saml-portal/pom.xml
components/sso/trunk/saml/pom.xml
components/sso/trunk/spnego/pom.xml
Log:
[maven-release-plugin] prepare for next development iteration
Modified: components/sso/trunk/agent/pom.xml
===================================================================
--- components/sso/trunk/agent/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/agent/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -3,7 +3,7 @@
<groupId>org.gatein.sso</groupId>
<artifactId>sso-parent</artifactId>
<relativePath>../pom.xml</relativePath>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/sso/trunk/auth-callback/pom.xml
===================================================================
--- components/sso/trunk/auth-callback/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/auth-callback/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -3,7 +3,7 @@
<groupId>org.gatein.sso</groupId>
<artifactId>sso-parent</artifactId>
<relativePath>../pom.xml</relativePath>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/sso/trunk/cas/gatein-cas-plugin/pom.xml
===================================================================
--- components/sso/trunk/cas/gatein-cas-plugin/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/cas/gatein-cas-plugin/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -3,7 +3,7 @@
<groupId>org.gatein.sso</groupId>
<artifactId>sso-cas-parent</artifactId>
<relativePath>../pom.xml</relativePath>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/sso/trunk/cas/gatein-cas-portal/pom.xml
===================================================================
--- components/sso/trunk/cas/gatein-cas-portal/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/cas/gatein-cas-portal/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -3,7 +3,7 @@
<groupId>org.gatein.sso</groupId>
<artifactId>sso-cas-parent</artifactId>
<relativePath>../pom.xml</relativePath>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/sso/trunk/cas/pom.xml
===================================================================
--- components/sso/trunk/cas/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/cas/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.gatein.sso</groupId>
<artifactId>sso-parent</artifactId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/josso/gatein-agent-josso181/pom.xml
===================================================================
--- components/sso/trunk/josso/gatein-agent-josso181/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/josso/gatein-agent-josso181/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -2,7 +2,7 @@
<parent>
<artifactId>sso-josso-parent</artifactId>
<groupId>org.gatein.sso</groupId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/sso/trunk/josso/gatein-agent-josso182/pom.xml
===================================================================
--- components/sso/trunk/josso/gatein-agent-josso182/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/josso/gatein-agent-josso182/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -2,7 +2,7 @@
<parent>
<artifactId>sso-josso-parent</artifactId>
<groupId>org.gatein.sso</groupId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/sso/trunk/josso/gatein-josso-plugin/pom.xml
===================================================================
--- components/sso/trunk/josso/gatein-josso-plugin/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/josso/gatein-josso-plugin/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.sso</groupId>
<artifactId>sso-josso-parent</artifactId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/josso/gatein-josso-portal/pom.xml
===================================================================
--- components/sso/trunk/josso/gatein-josso-portal/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/josso/gatein-josso-portal/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.sso</groupId>
<artifactId>sso-josso-parent</artifactId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/josso/pom.xml
===================================================================
--- components/sso/trunk/josso/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/josso/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.gatein.sso</groupId>
<artifactId>sso-parent</artifactId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/opensso/gatein-opensso-plugin/pom.xml
===================================================================
--- components/sso/trunk/opensso/gatein-opensso-plugin/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/opensso/gatein-opensso-plugin/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -3,7 +3,7 @@
<groupId>org.gatein.sso</groupId>
<artifactId>sso-opensso-parent</artifactId>
<relativePath>../pom.xml</relativePath>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: components/sso/trunk/opensso/gatein-opensso-portal/pom.xml
===================================================================
--- components/sso/trunk/opensso/gatein-opensso-portal/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/opensso/gatein-opensso-portal/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.sso</groupId>
<artifactId>sso-opensso-parent</artifactId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/opensso/pom.xml
===================================================================
--- components/sso/trunk/opensso/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/opensso/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -8,7 +8,7 @@
<parent>
<groupId>org.gatein.sso</groupId>
<artifactId>sso-parent</artifactId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/packaging/pom.xml
===================================================================
--- components/sso/trunk/packaging/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/packaging/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -2,7 +2,7 @@
<parent>
<groupId>org.gatein.sso</groupId>
<artifactId>sso-parent</artifactId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/pom.xml
===================================================================
--- components/sso/trunk/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -10,7 +10,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.gatein.sso</groupId>
<artifactId>sso-parent</artifactId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<packaging>pom</packaging>
<parent>
@@ -25,9 +25,9 @@
<scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/sso/tags/1.1.1-CR01</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/sso/tags/1.1.1-CR01</developerConnection>
- <url>http://fisheye.jboss.org/browse/gatein/components/sso/tags/1.1.1-CR01</url>
+ <connection>scm:svn:http://anonsvn.jboss.org/repos/gatein/components/sso/trunk</connection>
+ <developerConnection>scm:svn:https://svn.jboss.org/repos/gatein/components/sso/trunk</developerConnection>
+ <url>http://fisheye.jboss.org/browse/gatein/components/sso/trunk</url>
</scm>
Modified: components/sso/trunk/saml/gatein-saml-plugin/pom.xml
===================================================================
--- components/sso/trunk/saml/gatein-saml-plugin/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/saml/gatein-saml-plugin/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -2,7 +2,7 @@
<parent>
<artifactId>sso-saml-parent</artifactId>
<groupId>org.gatein.sso</groupId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/saml/gatein-saml-portal/pom.xml
===================================================================
--- components/sso/trunk/saml/gatein-saml-portal/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/saml/gatein-saml-portal/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -2,7 +2,7 @@
<parent>
<artifactId>sso-saml-parent</artifactId>
<groupId>org.gatein.sso</groupId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/saml/pom.xml
===================================================================
--- components/sso/trunk/saml/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/saml/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -25,7 +25,7 @@
<parent>
<groupId>org.gatein.sso</groupId>
<artifactId>sso-parent</artifactId>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
Modified: components/sso/trunk/spnego/pom.xml
===================================================================
--- components/sso/trunk/spnego/pom.xml 2012-02-01 10:29:22 UTC (rev 8337)
+++ components/sso/trunk/spnego/pom.xml 2012-02-01 10:29:39 UTC (rev 8338)
@@ -3,7 +3,7 @@
<groupId>org.gatein.sso</groupId>
<artifactId>sso-parent</artifactId>
<relativePath>../pom.xml</relativePath>
- <version>1.1.1-CR01</version>
+ <version>1.1.1-CR02-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
12 years, 11 months