JBoss Portal SVN: r7705 - trunk/build.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-10 08:33:21 -0400 (Tue, 10 Jul 2007)
New Revision: 7705
Modified:
trunk/build/build.xml
Log:
correct undeploy-all task
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2007-07-10 12:30:56 UTC (rev 7704)
+++ trunk/build/build.xml 2007-07-10 12:33:21 UTC (rev 7705)
@@ -310,7 +310,10 @@
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-admin.sar"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-cms.sar"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-management.sar"/>
- <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-samples.sar"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-basic-samples.sar"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-news-samples.war"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-jsp-samples.war"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-weather-samples.war"/>
<!--<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-search.sar"/>-->
<delete file="${jboss.home}/server/${portal.deploy.dir}/widget.war"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp.sar"/>
18 years, 10 months
JBoss Portal SVN: r7704 - in trunk: identity/src/main/org/jboss/portal/identity/db and 4 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-10 08:30:56 -0400 (Tue, 10 Jul 2007)
New Revision: 7704
Modified:
trunk/identity/build.xml
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java
trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java
trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
Log:
merge changes from JBoss_Portal_Branch_2_6
Modified: trunk/identity/build.xml
===================================================================
--- trunk/identity/build.xml 2007-07-10 11:50:52 UTC (rev 7703)
+++ trunk/identity/build.xml 2007-07-10 12:30:56 UTC (rev 7704)
@@ -480,11 +480,11 @@
<x-test>
- <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.db.DBIdentityTestCase"/>-->
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.db.DBIdentityTestCase"/>
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPIdentityTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleUserModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleRoleModuleTestCase"/>-->
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticGroupMembershipModuleTestCase"/>
+ <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticGroupMembershipModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticRoleMembershipModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPUserProfileModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtUserModuleTestCase"/>
Modified: trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-07-10 11:50:52 UTC (rev 7703)
+++ trunk/identity/src/main/org/jboss/portal/identity/db/HibernateMembershipModuleImpl.java 2007-07-10 12:30:56 UTC (rev 7704)
@@ -110,7 +110,7 @@
{
if (!(role instanceof HibernateRoleImpl))
{
- throw new IllegalArgumentException("User is not a HibernateRoleImpl user");
+ throw new IllegalArgumentException("Role is not a HibernateRoleImpl role");
}
// We return an immutable set to avoid modifications
@@ -131,7 +131,7 @@
//throw new UnsupportedOperationException("Not yet implemented");
if (!(role instanceof HibernateRoleImpl))
{
- throw new IllegalArgumentException("User is not a HibernateRoleImpl user");
+ throw new IllegalArgumentException("Role is not a HibernateRoleImpl role");
}
for (Iterator i = users.iterator(); i.hasNext();)
@@ -144,7 +144,7 @@
}
else
{
- throw new IllegalArgumentException("Only HibernateUserImpl roles can be accepted");
+ throw new IllegalArgumentException("Only HibernateUserImpl users can be accepted");
}
}
Modified: trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java 2007-07-10 11:50:52 UTC (rev 7703)
+++ trunk/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java 2007-07-10 12:30:56 UTC (rev 7704)
@@ -187,6 +187,11 @@
public void removeUser(Object id) throws IdentityException
{
+ if (id == null)
+ {
+ throw new IllegalArgumentException("User id cannot be null");
+ }
+
if (id instanceof Long)
{
try
@@ -194,11 +199,14 @@
Session session = getCurrentSession();
HibernateUserImpl user = (HibernateUserImpl)session.load(HibernateUserImpl.class, (Serializable)id);
- String userName = user.getUserName();
+
if (user == null)
{
throw new NoSuchUserException("No such user " + id);
}
+
+ String userName = user.getUserName();
+
session.delete(user);
session.flush();
Modified: trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-07-10 11:50:52 UTC (rev 7703)
+++ trunk/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-07-10 12:30:56 UTC (rev 7704)
@@ -9,6 +9,7 @@
import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.ProfileMap;
+import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.common.util.CollectionBuilder;
import org.jboss.portal.common.p3p.P3PConstants;
@@ -315,6 +316,20 @@
assertNotNull(g2);
Assert.assertEquals("role2", g2.getName());
ctx.commit();
+
+ ctx.begin();
+
+ try
+ {
+ userModule.removeUser(new Long(9999999));
+ fail();
+ }
+ catch (IdentityException e)
+ {
+ //expected
+ }
+
+ ctx.commit();
}
public void testFindRoles() throws Exception
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-10 11:50:52 UTC (rev 7703)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-10 12:30:56 UTC (rev 7704)
@@ -78,6 +78,11 @@
return getInfo().getTitle();
}
+ public LocalizedString getDirectoryTitle()
+ {
+ return getInfo().getDirectoryTitle();
+ }
+
public LocalizedString getDescription()
{
return getInfo().getDescription();
@@ -98,7 +103,8 @@
tmp.append("&synd=open");
tmp.append("&w=").append(info.getWidth());
tmp.append("&h=").append(info.getHeight());
- tmp.append("&title=").append(FastURLEncoder.DEFAULT_ENCODER.encode(info.getTitle().getDefaultString()));
+ //don's let to override the title param - proper one will be picked up with i18n support
+ //tmp.append("&title=").append(FastURLEncoder.DEFAULT_ENCODER.encode(info.getTitle().getDefaultString()));
tmp.append("&border=%23ffffff%7C3px%2C1px+none+%23999999"); // "&border=%23ffffff%7C3px%2C1px+solid+%23999999"
tmp.append("&output=js");
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java 2007-07-10 11:50:52 UTC (rev 7703)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java 2007-07-10 12:30:56 UTC (rev 7704)
@@ -37,6 +37,9 @@
private final LocalizedString title;
/** . */
+ private final LocalizedString directoryTitle;
+
+ /** . */
private final LocalizedString description;
/** . */
@@ -50,12 +53,14 @@
public GGWidgetInfo(
LocalizedString title,
+ LocalizedString directoryTitle,
LocalizedString description,
int width,
int height,
GGPreferencesInfo preferences)
{
this.title = title;
+ this.directoryTitle = directoryTitle;
this.description = description;
this.width = width;
this.height = height;
@@ -86,4 +91,10 @@
{
return height;
}
+
+
+ public LocalizedString getDirectoryTitle()
+ {
+ return directoryTitle;
+ }
}
Modified: trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java
===================================================================
--- trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java 2007-07-10 11:50:52 UTC (rev 7703)
+++ trunk/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java 2007-07-10 12:30:56 UTC (rev 7704)
@@ -37,6 +37,8 @@
import org.jboss.portal.widget.google.GGWidgetInfo;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
@@ -45,6 +47,8 @@
import java.util.Locale;
import java.util.Collection;
import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
import java.io.ByteArrayInputStream;
/**
@@ -53,7 +57,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class GGWidgetInfoBuilder
+public class GGWidgetInfoBuilder
{
/** . */
@@ -96,6 +100,110 @@
Document doc = builder.parse(new ByteArrayInputStream(bytes));
Element moduleElt = doc.getDocumentElement();
+ Map messagesBundle = new HashMap();
+
+ //first process locale bundles
+ Iterator modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
+ if (modulePrefsEltIterator.hasNext())
+ {
+ Element modulePrefsElt = (Element)modulePrefsEltIterator.next();
+
+ Iterator localeEltIterator = XMLTools.getChildrenIterator(modulePrefsElt, "Locale");
+
+ Map messages = new HashMap();
+
+ while(localeEltIterator.hasNext())
+ {
+ Element localeElt = (Element)localeEltIterator.next();
+
+ String langAttr = localeElt.getAttribute("lang");
+ String countryAttr = localeElt.getAttribute("country");
+ String messagesAttr = localeElt.getAttribute("messages");
+
+ //as portal spec defines fallback to EN we'll use it for all_ALL gg bundle
+ if (langAttr == null || langAttr.length() == 0)
+ {
+ langAttr = "en";
+ }
+
+ Locale locale;
+ if (countryAttr == null || countryAttr.length() == 0)
+ {
+ locale = new Locale(langAttr);
+ }
+ else
+ {
+ locale = new Locale(langAttr, countryAttr);
+ }
+
+
+
+ URL bundleURL = new URL(url, messagesAttr);
+
+ byte[] bundleBytes = obtainLocaleBundle(bundleURL);
+
+ //if no response obtained - ignore this bundle
+ if (bundleBytes == null)
+ {
+ continue;
+ }
+
+ DocumentBuilder bundleDocBuilder = factory.newDocumentBuilder();
+ Document bundleDoc = bundleDocBuilder.parse(new ByteArrayInputStream(bundleBytes));
+ Element messagebundleElt = bundleDoc.getDocumentElement();
+
+ Iterator messagesEltIterator = XMLTools.getChildrenIterator(messagebundleElt, "msg");
+
+ while(messagesEltIterator.hasNext())
+ {
+ Element msgElt = (Element)messagesEltIterator.next();
+
+ String name = msgElt.getAttribute("name");
+
+ StringBuffer value = new StringBuffer();
+
+ //create value from the tag content
+ NodeList nodes = msgElt.getChildNodes();
+ for (int i = 0; i < nodes.getLength(); i++) {
+ Node n = nodes.item(i);
+
+ if (n.getNodeType() == Element.TEXT_NODE) {
+ value.append(n.getNodeValue());
+ }
+ }
+
+
+ Map entries;
+ if (!messages.containsKey(name))
+ {
+ entries = new HashMap();
+ messages.put(name, entries);
+ }
+ else
+ {
+ entries = (Map)messages.get(name);
+ }
+
+ entries.put(locale, value.toString());
+ }
+ }
+
+ //Reiterate whole bundle to store LocalizedString values;
+ for (Iterator iterator = messages.keySet().iterator(); iterator.hasNext();)
+ {
+ String name = (String)iterator.next();
+ Map entries = (Map)messages.get(name);
+
+ messagesBundle.put(name, new LocalizedString(entries, Locale.ENGLISH));
+ }
+
+ }
+ else
+ {
+ throw new Exception(); // Basic for now
+ }
+
+
//
Collection tmp = null;
Iterator userPrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "UserPref");
@@ -141,7 +249,8 @@
Element enumValueElt = (Element)i.next();
String valueAttr = enumValueElt.getAttribute("value");
String displayValueAttr = enumValueElt.getAttribute("display_value");
- EnumType.Value value = new EnumType.Value(valueAttr, displayValueAttr.length() > 0 ? displayValueAttr : null);
+
+ EnumType.Value value = new EnumType.Value(valueAttr, resolveLocalizedValue(displayValueAttr, messagesBundle));
values.add(value);
}
dataType = new EnumType(values);
@@ -153,10 +262,12 @@
}
//
+
+
GGPreferenceInfo prefInfo = new GGPreferenceInfo(
nameAttr,
dataType,
- displayNameAttr.length() > 0 ? displayNameAttr : null,
+ resolveLocalizedValue(displayNameAttr, messagesBundle),
requiredAttr.length() > 0 ? Boolean.valueOf(requiredAttr).booleanValue() : false,
defaultValueAttr.length() > 0 ? defaultValueAttr : null
);
@@ -174,21 +285,25 @@
prefsInfo = new GGPreferencesInfo(tmp);
}
- Iterator modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
+ modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
if (modulePrefsEltIterator.hasNext())
{
Element modulePrefsElt = (Element)modulePrefsEltIterator.next();
String titleAttr = modulePrefsElt.getAttribute("title");
+ String directoryTitleAttr = modulePrefsElt.getAttribute("directory_title");
String descriptionAttr = modulePrefsElt.getAttribute("description");
String widthAttr = modulePrefsElt.getAttribute("width");
String heightAttr = modulePrefsElt.getAttribute("height");
//
- LocalizedString title = titleAttr != null ? new LocalizedString(titleAttr, Locale.ENGLISH) : null;
- LocalizedString description = descriptionAttr != null ? new LocalizedString(descriptionAttr, Locale.ENGLISH) : null;
+ LocalizedString title = resolveLocalizedStringValue(titleAttr, messagesBundle);
+ LocalizedString directoryTitle = resolveLocalizedStringValue(directoryTitleAttr, messagesBundle);
+ LocalizedString description = resolveLocalizedStringValue(descriptionAttr, messagesBundle);
+
+
int width = (widthAttr != null && widthAttr.length() > 0) ? Integer.parseInt(widthAttr) : 320;
int height = (heightAttr != null && heightAttr.length() > 0) ? Integer.parseInt(heightAttr) : 200;
- return new GGWidgetInfo(title, description, width, height, prefsInfo);
+ return new GGWidgetInfo(title, directoryTitle, description, width, height, prefsInfo);
}
else
{
@@ -196,8 +311,61 @@
}
}
+ private LocalizedString resolveLocalizedStringValue(String value, Map bundle)
+ {
+ if(value != null)
+ {
+ if (value.startsWith("__MSG_"))
+ {
+ String name = value.substring("__MSG_".length(), value.length() - 2);
+
+ if (bundle.containsKey(name))
+ {
+ return (LocalizedString)bundle.get(name);
+ }
+ }
+
+ return new LocalizedString(value, Locale.ENGLISH);
+ }
+
+ return null;
+
+ }
+
+ private String resolveLocalizedValue(String value, Map bundle)
+ {
+ LocalizedString out = resolveLocalizedStringValue(value, bundle);
+
+ if (out != null)
+ {
+ return out.getDefaultString();
+ }
+
+ return null;
+
+ }
+
+
+
+ /**
+ * needed for testing
+ */
protected byte[] obtainWidget(URL url) throws Exception
{
+ return obtainURL(url);
+ }
+
+ /**
+ * needed for testing
+ */
+ protected byte[] obtainLocaleBundle(URL url) throws Exception
+ {
+ return obtainURL(url);
+ }
+
+ private byte[] obtainURL(URL url) throws Exception
+ {
return URLTools.performGET(url, 5000, 5000);
}
+
}
Modified: trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp
===================================================================
--- trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-10 11:50:52 UTC (rev 7703)
+++ trunk/widget/src/resources/widget-war/WEB-INF/jsp/edit.jsp 2007-07-10 12:30:56 UTC (rev 7704)
@@ -97,7 +97,7 @@
String rowClass = selected ? "portlet-section-selected" : (i.getIndex() % 2 == 0 ? "portlet-section-body" : "portlet-section-alternate");
%>
<tr class="<%= rowClass %>">
- <td><a href="<%= selectURL %>"><%= widget.getTitle().getDefaultString() %></a></td>
+ <td><a href="<%= selectURL %>"><%= widget.getDirectoryTitle().getDefaultString().length() > 0 ? widget.getDirectoryTitle().getDefaultString() : widget.getTitle().getDefaultString() %></a></td>
</tr>
<%
}
@@ -152,7 +152,7 @@
}
%>
<tr>
- <td><%= prefInfo.getName() %>:</td>
+ <td><%= prefInfo.getDisplayName() != null ? prefInfo.getDisplayName() : prefInfo.getName() %>:</td>
<%
switch (prefInfo.getType().getOrdinal())
{
18 years, 10 months
JBoss Portal SVN: r7703 - in branches/JBoss_Portal_Branch_2_6/identity: src/main/org/jboss/portal/identity/db and 1 other directories.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-10 07:50:52 -0400 (Tue, 10 Jul 2007)
New Revision: 7703
Modified:
branches/JBoss_Portal_Branch_2_6/identity/build.xml
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java
branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
Log:
JBPORTAL-1545 - HibernateUserModuleImpl.removeUser potential unwanted NPE
Modified: branches/JBoss_Portal_Branch_2_6/identity/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/build.xml 2007-07-10 11:36:14 UTC (rev 7702)
+++ branches/JBoss_Portal_Branch_2_6/identity/build.xml 2007-07-10 11:50:52 UTC (rev 7703)
@@ -480,11 +480,11 @@
<x-test>
- <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.db.DBIdentityTestCase"/>-->
+ <test todir="${test.reports}" name="org.jboss.portal.test.identity.db.DBIdentityTestCase"/>
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPIdentityTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleUserModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPSimpleRoleModuleTestCase"/>-->
- <test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticGroupMembershipModuleTestCase"/>
+ <!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticGroupMembershipModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPStaticRoleMembershipModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPUserProfileModuleTestCase"/>-->
<!--<test todir="${test.reports}" name="org.jboss.portal.test.identity.ldap.LDAPExtUserModuleTestCase"/>
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java 2007-07-10 11:36:14 UTC (rev 7702)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/identity/db/HibernateUserModuleImpl.java 2007-07-10 11:50:52 UTC (rev 7703)
@@ -187,6 +187,11 @@
public void removeUser(Object id) throws IdentityException
{
+ if (id == null)
+ {
+ throw new IllegalArgumentException("User id cannot be null");
+ }
+
if (id instanceof Long)
{
try
@@ -194,11 +199,14 @@
Session session = getCurrentSession();
HibernateUserImpl user = (HibernateUserImpl)session.load(HibernateUserImpl.class, (Serializable)id);
- String userName = user.getUserName();
+
if (user == null)
{
throw new NoSuchUserException("No such user " + id);
}
+
+ String userName = user.getUserName();
+
session.delete(user);
session.flush();
Modified: branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-07-10 11:36:14 UTC (rev 7702)
+++ branches/JBoss_Portal_Branch_2_6/identity/src/main/org/jboss/portal/test/identity/IdentityTest.java 2007-07-10 11:50:52 UTC (rev 7703)
@@ -9,6 +9,7 @@
import org.jboss.portal.identity.Role;
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.ProfileMap;
+import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.common.util.CollectionBuilder;
import org.jboss.portal.common.p3p.P3PConstants;
@@ -315,6 +316,20 @@
assertNotNull(g2);
Assert.assertEquals("role2", g2.getName());
ctx.commit();
+
+ ctx.begin();
+
+ try
+ {
+ userModule.removeUser(new Long(9999999));
+ fail();
+ }
+ catch (IdentityException e)
+ {
+ //expected
+ }
+
+ ctx.commit();
}
public void testFindRoles() throws Exception
18 years, 10 months
JBoss Portal SVN: r7702 - branches/JBoss_Portal_Branch_2_6/build.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-10 07:36:14 -0400 (Tue, 10 Jul 2007)
New Revision: 7702
Modified:
branches/JBoss_Portal_Branch_2_6/build/build.xml
Log:
correct undeploy-all task
Modified: branches/JBoss_Portal_Branch_2_6/build/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-07-10 06:21:27 UTC (rev 7701)
+++ branches/JBoss_Portal_Branch_2_6/build/build.xml 2007-07-10 11:36:14 UTC (rev 7702)
@@ -310,7 +310,10 @@
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-admin.sar"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-cms.sar"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-management.sar"/>
- <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-samples.sar"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-basic-samples.sar"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-news-samples.war"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-jsp-samples.war"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-weather-samples.war"/>
<!--<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-search.sar"/>-->
<delete file="${jboss.home}/server/${portal.deploy.dir}/widget.war"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp.sar"/>
18 years, 10 months
JBoss Portal SVN: r7701 - docs/trunk/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: xhuang(a)jboss.com
Date: 2007-07-10 02:21:27 -0400 (Tue, 10 Jul 2007)
New Revision: 7701
Modified:
docs/trunk/referenceGuide/en/modules/configuration.xml
Log:
providing two options to avoid context conflicts
Modified: docs/trunk/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/trunk/referenceGuide/en/modules/configuration.xml 2007-07-10 05:47:23 UTC (rev 7700)
+++ docs/trunk/referenceGuide/en/modules/configuration.xml 2007-07-10 06:21:27 UTC (rev 7701)
@@ -65,9 +65,9 @@
.
</para>
<note>
- By default, Tomcat holds on to the root context '/'. Some users have mentioned that you also need to remove the
+ By default, Tomcat holds on to the root context '/'. You may need to either remove the
<emphasis>$JBOSS_HOME\server\default\deploy\jbossweb-tomcat55.sar\ROOT.war</emphasis>
- for the below changes to take effect on restart.
+ or add a jboss-web.xml (declaring another context-root other than '/')under its WEB-INFO directory for the below changes to take effect on restart.
</note>
<para>You can accomplish this, with either a deployed jboss-portal.sar or before you build from source:
<itemizedlist>
18 years, 10 months
JBoss Portal SVN: r7700 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: xhuang(a)jboss.com
Date: 2007-07-10 01:47:23 -0400 (Tue, 10 Jul 2007)
New Revision: 7700
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
Log:
providing two options to avoid context conflicts
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2007-07-10 02:04:04 UTC (rev 7699)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/configuration.xml 2007-07-10 05:47:23 UTC (rev 7700)
@@ -65,9 +65,9 @@
.
</para>
<note>
- By default, Tomcat holds on to the root context '/'. Some users have mentioned that you also need to remove the
+ By default, Tomcat holds on to the root context '/'. You may need to either remove the
<emphasis>$JBOSS_HOME\server\default\deploy\jbossweb-tomcat55.sar\ROOT.war</emphasis>
- for the below changes to take effect on restart.
+ or add a jboss-web.xml (declaring another context-root other than '/')under its WEB-INFO directory for the below changes to take effect on restart.
</note>
<para>You can accomplish this, with either a deployed jboss-portal.sar or before you build from source:
<itemizedlist>
18 years, 10 months
JBoss Portal SVN: r7699 - branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-09 22:04:04 -0400 (Mon, 09 Jul 2007)
New Revision: 7699
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java
Log:
JBPORTAL-1533 - Internationalize gadget metadata
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java 2007-07-09 23:50:46 UTC (rev 7698)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/provider/GGWidgetInfoBuilder.java 2007-07-10 02:04:04 UTC (rev 7699)
@@ -37,6 +37,8 @@
import org.jboss.portal.widget.google.GGWidgetInfo;
import org.w3c.dom.Document;
import org.w3c.dom.Element;
+import org.w3c.dom.NodeList;
+import org.w3c.dom.Node;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.parsers.DocumentBuilder;
@@ -45,6 +47,8 @@
import java.util.Locale;
import java.util.Collection;
import java.util.ArrayList;
+import java.util.Map;
+import java.util.HashMap;
import java.io.ByteArrayInputStream;
/**
@@ -53,7 +57,7 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
-public class GGWidgetInfoBuilder
+public class GGWidgetInfoBuilder
{
/** . */
@@ -96,6 +100,110 @@
Document doc = builder.parse(new ByteArrayInputStream(bytes));
Element moduleElt = doc.getDocumentElement();
+ Map messagesBundle = new HashMap();
+
+ //first process locale bundles
+ Iterator modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
+ if (modulePrefsEltIterator.hasNext())
+ {
+ Element modulePrefsElt = (Element)modulePrefsEltIterator.next();
+
+ Iterator localeEltIterator = XMLTools.getChildrenIterator(modulePrefsElt, "Locale");
+
+ Map messages = new HashMap();
+
+ while(localeEltIterator.hasNext())
+ {
+ Element localeElt = (Element)localeEltIterator.next();
+
+ String langAttr = localeElt.getAttribute("lang");
+ String countryAttr = localeElt.getAttribute("country");
+ String messagesAttr = localeElt.getAttribute("messages");
+
+ //as portal spec defines fallback to EN we'll use it for all_ALL gg bundle
+ if (langAttr == null || langAttr.length() == 0)
+ {
+ langAttr = "en";
+ }
+
+ Locale locale;
+ if (countryAttr == null || countryAttr.length() == 0)
+ {
+ locale = new Locale(langAttr);
+ }
+ else
+ {
+ locale = new Locale(langAttr, countryAttr);
+ }
+
+
+
+ URL bundleURL = new URL(url, messagesAttr);
+
+ byte[] bundleBytes = obtainLocaleBundle(bundleURL);
+
+ //if no response obtained - ignore this bundle
+ if (bundleBytes == null)
+ {
+ continue;
+ }
+
+ DocumentBuilder bundleDocBuilder = factory.newDocumentBuilder();
+ Document bundleDoc = bundleDocBuilder.parse(new ByteArrayInputStream(bundleBytes));
+ Element messagebundleElt = bundleDoc.getDocumentElement();
+
+ Iterator messagesEltIterator = XMLTools.getChildrenIterator(messagebundleElt, "msg");
+
+ while(messagesEltIterator.hasNext())
+ {
+ Element msgElt = (Element)messagesEltIterator.next();
+
+ String name = msgElt.getAttribute("name");
+
+ StringBuffer value = new StringBuffer();
+
+ //create value from the tag content
+ NodeList nodes = msgElt.getChildNodes();
+ for (int i = 0; i < nodes.getLength(); i++) {
+ Node n = nodes.item(i);
+
+ if (n.getNodeType() == Element.TEXT_NODE) {
+ value.append(n.getNodeValue());
+ }
+ }
+
+
+ Map entries;
+ if (!messages.containsKey(name))
+ {
+ entries = new HashMap();
+ messages.put(name, entries);
+ }
+ else
+ {
+ entries = (Map)messages.get(name);
+ }
+
+ entries.put(locale, value.toString());
+ }
+ }
+
+ //Reiterate whole bundle to store LocalizedString values;
+ for (Iterator iterator = messages.keySet().iterator(); iterator.hasNext();)
+ {
+ String name = (String)iterator.next();
+ Map entries = (Map)messages.get(name);
+
+ messagesBundle.put(name, new LocalizedString(entries, Locale.ENGLISH));
+ }
+
+ }
+ else
+ {
+ throw new Exception(); // Basic for now
+ }
+
+
//
Collection tmp = null;
Iterator userPrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "UserPref");
@@ -141,7 +249,8 @@
Element enumValueElt = (Element)i.next();
String valueAttr = enumValueElt.getAttribute("value");
String displayValueAttr = enumValueElt.getAttribute("display_value");
- EnumType.Value value = new EnumType.Value(valueAttr, displayValueAttr.length() > 0 ? displayValueAttr : null);
+
+ EnumType.Value value = new EnumType.Value(valueAttr, resolveLocalizedValue(displayValueAttr, messagesBundle));
values.add(value);
}
dataType = new EnumType(values);
@@ -153,10 +262,12 @@
}
//
+
+
GGPreferenceInfo prefInfo = new GGPreferenceInfo(
nameAttr,
dataType,
- displayNameAttr.length() > 0 ? displayNameAttr : null,
+ resolveLocalizedValue(displayNameAttr, messagesBundle),
requiredAttr.length() > 0 ? Boolean.valueOf(requiredAttr).booleanValue() : false,
defaultValueAttr.length() > 0 ? defaultValueAttr : null
);
@@ -174,21 +285,25 @@
prefsInfo = new GGPreferencesInfo(tmp);
}
- Iterator modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
+ modulePrefsEltIterator = XMLTools.getChildrenIterator(moduleElt, "ModulePrefs");
if (modulePrefsEltIterator.hasNext())
{
Element modulePrefsElt = (Element)modulePrefsEltIterator.next();
String titleAttr = modulePrefsElt.getAttribute("title");
+ String directoryTitleAttr = modulePrefsElt.getAttribute("directory_title");
String descriptionAttr = modulePrefsElt.getAttribute("description");
String widthAttr = modulePrefsElt.getAttribute("width");
String heightAttr = modulePrefsElt.getAttribute("height");
//
- LocalizedString title = titleAttr != null ? new LocalizedString(titleAttr, Locale.ENGLISH) : null;
- LocalizedString description = descriptionAttr != null ? new LocalizedString(descriptionAttr, Locale.ENGLISH) : null;
+ LocalizedString title = resolveLocalizedStringValue(titleAttr, messagesBundle);
+ LocalizedString directoryTitle = resolveLocalizedStringValue(directoryTitleAttr, messagesBundle);
+ LocalizedString description = resolveLocalizedStringValue(descriptionAttr, messagesBundle);
+
+
int width = (widthAttr != null && widthAttr.length() > 0) ? Integer.parseInt(widthAttr) : 320;
int height = (heightAttr != null && heightAttr.length() > 0) ? Integer.parseInt(heightAttr) : 200;
- return new GGWidgetInfo(title, description, width, height, prefsInfo);
+ return new GGWidgetInfo(title, directoryTitle, description, width, height, prefsInfo);
}
else
{
@@ -196,8 +311,61 @@
}
}
+ private LocalizedString resolveLocalizedStringValue(String value, Map bundle)
+ {
+ if(value != null)
+ {
+ if (value.startsWith("__MSG_"))
+ {
+ String name = value.substring("__MSG_".length(), value.length() - 2);
+
+ if (bundle.containsKey(name))
+ {
+ return (LocalizedString)bundle.get(name);
+ }
+ }
+
+ return new LocalizedString(value, Locale.ENGLISH);
+ }
+
+ return null;
+
+ }
+
+ private String resolveLocalizedValue(String value, Map bundle)
+ {
+ LocalizedString out = resolveLocalizedStringValue(value, bundle);
+
+ if (out != null)
+ {
+ return out.getDefaultString();
+ }
+
+ return null;
+
+ }
+
+
+
+ /**
+ * needed for testing
+ */
protected byte[] obtainWidget(URL url) throws Exception
{
+ return obtainURL(url);
+ }
+
+ /**
+ * needed for testing
+ */
+ protected byte[] obtainLocaleBundle(URL url) throws Exception
+ {
+ return obtainURL(url);
+ }
+
+ private byte[] obtainURL(URL url) throws Exception
+ {
return URLTools.performGET(url, 5000, 5000);
}
+
}
18 years, 10 months
JBoss Portal SVN: r7698 - in branches/JBoss_Portal_Branch_2_6/core: src/main/org/jboss/portal/test/core/model/portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-07-09 19:50:46 -0400 (Mon, 09 Jul 2007)
New Revision: 7698
Modified:
branches/JBoss_Portal_Branch_2_6/core/build.xml
branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
Log:
- JBPORTAL-1541: Added regression test.
- Fixed output file for PortalNodeTestCase.
Modified: branches/JBoss_Portal_Branch_2_6/core/build.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-07-09 23:47:09 UTC (rev 7697)
+++ branches/JBoss_Portal_Branch_2_6/core/build.xml 2007-07-09 23:50:46 UTC (rev 7698)
@@ -113,8 +113,8 @@
<path refid="trove.trove.classpath"/>
<path refid="qdox.qdox.classpath"/>
<pathelement location="${source.etc}/sun-jsf/jsf-example.jar"/>
- <!-- jbpm integration -->
- <path refid="jbpm.jaronly.classpath"/>
+ <!-- jbpm integration -->
+ <path refid="jbpm.jaronly.classpath"/>
</path>
<!-- Configure modules -->
@@ -161,11 +161,11 @@
<path refid="ehcache.ehcache.classpath"/>
<path refid="hibernate.hibernate.classpath"/>
</path>
-
+
<path id="aop.classpath">
<pathelement path="${jbossas/core.libs.lib}/jboss-aspect-library.jar"/>
<pathelement path="${jboss.aop.lib}/jboss-aop.jar"/>
- <path refid="javassist.javassist.classpath"/>
+ <path refid="javassist.javassist.classpath"/>
<path refid="oswego.concurrent.classpath"/>
<path refid="trove.trove.classpath"/>
<path refid="qdox.qdox.classpath"/>
@@ -179,7 +179,7 @@
classpathref="explode.task.classpath"/>
</target>
-
+
<target name="configure-explode">
<path id="explode.task.classpath">
<pathelement location="${project.tools}/lib/explode.jar"/>
@@ -190,7 +190,7 @@
classname="org.jboss.portal.common.ant.Explode"
classpathref="explode.task.classpath"/>
</target>
-
+
<target name="configure-jbossaop">
<path id="jbossaop.task.classpath">
<path refid="jboss.aop.classpath"/>
@@ -224,7 +224,7 @@
<path id="bilto">
<path refid="sun.servlet.classpath"/>
<path refid="apache.log4j.classpath"/>
- <path refid="jbossas/core.libs.classpath"/>
+ <path refid="jbossas/core.libs.classpath"/>
<path refid="jboss.microcontainer.classpath"/>
<path refid="jboss.serialization.classpath"/>
<path refid="beanshell.beanshell.classpath"/>
@@ -249,7 +249,7 @@
<aoppath path="${source.etc}/jboss-aop/base-aop.xml"/>
<include name="org/jboss/portal/core/aspects/server/TransactionInterceptor.class"/>
<include name="org/jboss/portal/core/aspects/server/UserInterceptor$UserFinalizer.class"/>
- <include name="org/jboss/portal/core/aspects/portlet/TransactionInterceptor.class"/>
+ <include name="org/jboss/portal/core/aspects/portlet/TransactionInterceptor.class"/>
<include name="org/jboss/portal/core/deployment/jboss/ObjectDeployment.class"/>
<include name="org/jboss/portal/core/deployment/jboss/PortletAppDeployment.class"/>
<include name="org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.class"/>
@@ -350,8 +350,8 @@
</copy>
</target>
-
-
+
+
<target name="explode" depends="init">
<explode
file="${build.lib}/jboss-portal.sar"
@@ -365,37 +365,37 @@
<copy todir="${build.resources}/jboss-portal-ha.sar">
<fileset dir="${build.resources}/jboss-portal" excludes="**/*.xml"/>
</copy>
-
+
<copy todir="${build.resources}/jboss-portal-ha.sar">
<filterset>
<filtersfile file="../build/etc/clustered.properties"/>
</filterset>
<fileset dir="${build.resources}/jboss-portal" includes="**/*.xml"/>
- </copy>
-
+ </copy>
+
<implode
dir="${build.resources}/jboss-portal-ha.sar"
tofile="${build.lib}/jboss-portal-ha.sar"/>
-
+
</target>
<!-- Build the jboss-portal.sar -->
- <target name="output" depends="artifacts">
+ <target name="output" depends="artifacts">
<!-- Build configurations -->
- <copy todir="${build.resources}/jboss-portal.sar">
+ <copy todir="${build.resources}/jboss-portal.sar">
<fileset dir="${build.resources}/jboss-portal" excludes="**/*.xml"/>
</copy>
-
+
<copy todir="${build.resources}/jboss-portal.sar">
<filterset>
<filtersfile file="../build/etc/single.properties"/>
</filterset>
<fileset dir="${build.resources}/jboss-portal" includes="**/*.xml"/>
</copy>
- <!-- Build archives -->
- <implode
- dir="${build.resources}/jboss-portal.sar"
- tofile="${build.lib}/jboss-portal.sar"/>
+ <!-- Build archives -->
+ <implode
+ dir="${build.resources}/jboss-portal.sar"
+ tofile="${build.lib}/jboss-portal.sar"/>
</target>
<!-- create artifacts for running the portlet tests (except TCK) target output should have already been executed -->
@@ -508,7 +508,7 @@
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
<copy file="${build.lib}/jboss-portal.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
</target>
-
+
<target name="deploy-ha"
description="Deploy high availability."
depends="output-ha">
@@ -525,7 +525,7 @@
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
<delete file="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar"/>
</target>
-
+
<target name="undeploy-ha"
description="Undeploy."
depends="init">
@@ -556,29 +556,29 @@
</x-sysproperty>
<x-test>
<zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalNodeTestCase"
- outfile="TEST-PortalObjectContainerTestCase">
+ outfile="TEST-PortalNodeTestCase">
<parameter name="CacheNaturalId" value="true"/>
<parameter name="Config" value="persistent-jboss-beans.xml"/>
</zest>
-<!--
- <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalNodeTestCase"
- outfile="TEST-PortalObjectContainerTestCase">
- <parameter name="CacheNaturalId" value="true"/>
- <parameter name="Config" value="transient-jboss-beans.xml"/>
- </zest>
--->
+ <!--
+ <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalNodeTestCase"
+ outfile="TEST-PortalObjectContainerTestCase">
+ <parameter name="CacheNaturalId" value="true"/>
+ <parameter name="Config" value="transient-jboss-beans.xml"/>
+ </zest>
+ -->
<zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalObjectContainerTestCase"
outfile="TEST-PortalObjectContainerTestCase">
<parameter name="CacheNaturalId" value="true"/>
<parameter name="Config" value="persistent-jboss-beans.xml"/>
</zest>
-<!--
- <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalObjectContainerTestCase"
- outfile="TEST-PortalObjectContainerTestCase">
- <parameter name="CacheNaturalId" value="true"/>
- <parameter name="Config" value="transient-jboss-beans.xml"/>
- </zest>
--->
+ <!--
+ <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalObjectContainerTestCase"
+ outfile="TEST-PortalObjectContainerTestCase">
+ <parameter name="CacheNaturalId" value="true"/>
+ <parameter name="Config" value="transient-jboss-beans.xml"/>
+ </zest>
+ -->
<zest todir="${test.reports}" name="org.jboss.portal.test.core.model.instance.InstanceContainerTestCase"
outfile="TEST-PersistedLocally-ClonedOnCreate-InstanceContainerTestCase">
<parameter name="PersistLocally" value="true"/>
@@ -608,15 +608,15 @@
<parameter name="Config" value="persistent-jboss-beans.xml"/>
</zest>
-<!--
- <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.instance.InstanceContainerTestCase"
- outfile="TEST-PersistedLocally-ClonedOnCreate-InstanceContainerTestCase">
- <parameter name="PersistLocally" value="true"/>
- <parameter name="CloneOnCreate" value="true"/>
- <parameter name="CacheNaturalId" value="true"/>
- <parameter name="Config" value="transient-jboss-beans.xml"/>
- </zest>
--->
+ <!--
+ <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.instance.InstanceContainerTestCase"
+ outfile="TEST-PersistedLocally-ClonedOnCreate-InstanceContainerTestCase">
+ <parameter name="PersistLocally" value="true"/>
+ <parameter name="CloneOnCreate" value="true"/>
+ <parameter name="CacheNaturalId" value="true"/>
+ <parameter name="Config" value="transient-jboss-beans.xml"/>
+ </zest>
+ -->
<zest todir="${test.reports}" name="org.jboss.portal.test.core.state.ProducerTestCase"
outfile="TEST-ProducerTestCase-WithoutRegistration">
<parameter name="UseRegistration" value="false"/>
@@ -674,16 +674,16 @@
ant -Dtest=org.jboss.portal.test.core.model.portal.PortalObjectContainerTestCase one-test
-->
<target name="one-test" depends="init" if="test" description="Run a single unit test">
- <property name="build.testlog" value="${module.output}/log"/>
+ <property name="build.testlog" value="${module.output}/log"/>
<mkdir dir="${build.reports}"/>
<mkdir dir="${build.testlog}"/>
-
- <junit printsummary="yes" showoutput="yes" dir="${module.output}">
+
+ <junit printsummary="yes" showoutput="yes" dir="${module.output}">
<!--jvmarg line="-Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5006" /-->
<sysproperty key="build.testlog" value="${build.testlog}"/>
- <sysproperty key="build.resources" value="${build.resources}"/>
+ <sysproperty key="build.resources" value="${build.resources}"/>
<classpath>
<path refid="apache.xerces.classpath"/>
@@ -708,7 +708,7 @@
</classpath>
- <formatter type="plain" usefile="true"/>
+ <formatter type="plain" usefile="true"/>
<formatter type="xml" usefile="true"/>
<test todir="${test.reports}" name="${test}" fork="true"/>
@@ -728,21 +728,21 @@
</target>
<!--
- Some convenience build targets to help deployment during development
+ Some convenience build targets to help deployment during development
-->
- <target name="deploy-explode" depends="output,explode">
+ <target name="deploy-explode" depends="output,explode">
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
<copy todir="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar" overwrite="true">
<fileset dir="${build.lib}/jboss-portal-exploded.sar"/>
</copy>
- </target>
+ </target>
<target name="explode-ha" depends="init">
<explode
- file="${build.lib}/jboss-portal-ha.sar"
- todir="${build.lib}"
- name="jboss-portal-ha-exploded.sar"
- />
- </target>
+ file="${build.lib}/jboss-portal-ha.sar"
+ todir="${build.lib}"
+ name="jboss-portal-ha-exploded.sar"
+ />
+ </target>
<target name="deploy-ha-explode" description="Deploy high availability." depends="output-ha,explode-ha">
<require file="${jboss.home}/server/${portal-ha.deploy.dir}"/>
<copy todir="${jboss.home}/server/${portal-ha.deploy.dir}/jboss-portal-ha.sar" overwrite="true">
Modified: branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-07-09 23:47:09 UTC (rev 7697)
+++ branches/JBoss_Portal_Branch_2_6/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-07-09 23:50:46 UTC (rev 7698)
@@ -29,6 +29,7 @@
import org.jboss.portal.common.util.CollectionBuilder;
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.content.spi.handler.ContentState;
+import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalContainer;
@@ -39,7 +40,11 @@
import org.jboss.portal.test.core.model.content.SimpleContent;
import org.jboss.portal.test.framework.AbstractPortalTestCase;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
/**
* Portal Object Container Test Cases based on the microcontainer architecture
@@ -65,100 +70,104 @@
TransactionAssert.commitTransaction();
}
- /**
- *
- */
public void testPropertyUpdateCascadeToDescendantsWhenTheyDoNotDeclareIt() throws Exception
{
- TransactionAssert.beginTransaction();
- PortalContainer ctx = container.getContext();
- Portal n1 = ctx.createPortal("default");
- Page n2 = n1.createPage("default");
- Page n3 = n2.createPage("default");
- Map p1 = n1.getProperties();
- Map p2 = n2.getProperties();
- Map p3 = n3.getProperties();
+ TransactionAssert.beginTransaction();
+ PortalContainer ctx = container.getContext();
+ Portal n1 = ctx.createPortal("default");
+ Page n2 = n1.createPage("default");
+ Page n3 = n2.createPage("default");
+ Map p1 = n1.getProperties();
+ Map p2 = n2.getProperties();
+ Map p3 = n3.getProperties();
- //
- n1.setDeclaredProperty("foo", "bar1");
- assertEquals("bar1", p1.get("foo"));
- assertEquals("bar1", p2.get("foo"));
- assertEquals("bar1", p3.get("foo"));
+ //
+ n1.setDeclaredProperty("foo", "bar1");
+ assertEquals("bar1", p1.get("foo"));
+ assertEquals("bar1", p2.get("foo"));
+ assertEquals("bar1", p3.get("foo"));
- //
- n2.setDeclaredProperty("foo", "bar2");
- assertEquals("bar1", p1.get("foo"));
- assertEquals("bar2", p2.get("foo"));
- assertEquals("bar2", p3.get("foo"));
+ //
+ n2.setDeclaredProperty("foo", "bar2");
+ assertEquals("bar1", p1.get("foo"));
+ assertEquals("bar2", p2.get("foo"));
+ assertEquals("bar2", p3.get("foo"));
- TransactionAssert.commitTransaction();
+ TransactionAssert.commitTransaction();
}
- /**
- *
- */
- public void testPropertyUpdateDoesNotCascadeToDescendantsWhenTheyDeclareIt() throws Exception
- {
- TransactionAssert.beginTransaction();
- PortalContainer ctx = container.getContext();
- Portal n1 = ctx.createPortal("default");
- Page n2 = n1.createPage("default");
- Page n3 = n2.createPage("default");
- Map p1 = n1.getProperties();
- Map p2 = n2.getProperties();
- Map p3 = n3.getProperties();
+ public void testPropertyUpdateDoesNotCascadeToDescendantsWhenTheyDeclareIt() throws Exception
+ {
+ TransactionAssert.beginTransaction();
+ PortalContainer ctx = container.getContext();
+ Portal n1 = ctx.createPortal("default");
+ Page n2 = n1.createPage("default");
+ Page n3 = n2.createPage("default");
+ Map p1 = n1.getProperties();
+ Map p2 = n2.getProperties();
+ Map p3 = n3.getProperties();
- //
- n2.setDeclaredProperty("foo", "bar1");
- assertEquals(null, p1.get("foo"));
- assertEquals("bar1", p2.get("foo"));
- assertEquals("bar1", p3.get("foo"));
+ //
+ n2.setDeclaredProperty("foo", "bar1");
+ assertEquals(null, p1.get("foo"));
+ assertEquals("bar1", p2.get("foo"));
+ assertEquals("bar1", p3.get("foo"));
- //
- n1.setDeclaredProperty("foo", "bar2");
- assertEquals("bar2", p1.get("foo"));
- assertEquals("bar1", p2.get("foo"));
- assertEquals("bar1", p3.get("foo"));
+ //
+ n1.setDeclaredProperty("foo", "bar2");
+ assertEquals("bar2", p1.get("foo"));
+ assertEquals("bar1", p2.get("foo"));
+ assertEquals("bar1", p3.get("foo"));
- //
- TransactionAssert.commitTransaction();
- }
+ //
+ TransactionAssert.commitTransaction();
+ }
- /**
- *
- */
- public void testOverridenPropertyRemovalPropagateParentValueToDescendants() throws Exception
- {
- TransactionAssert.beginTransaction();
- PortalContainer ctx = container.getContext();
- Portal n1 = ctx.createPortal("default");
- Page n2 = n1.createPage("default");
- Page n3 = n2.createPage("default");
- Map p1 = n1.getProperties();
- Map p2 = n2.getProperties();
- Map p3 = n3.getProperties();
+ public void testOverridenPropertyRemovalPropagateParentValueToDescendants() throws Exception
+ {
+ TransactionAssert.beginTransaction();
+ PortalContainer ctx = container.getContext();
+ Portal n1 = ctx.createPortal("default");
+ Page n2 = n1.createPage("default");
+ Page n3 = n2.createPage("default");
+ Map p1 = n1.getProperties();
+ Map p2 = n2.getProperties();
+ Map p3 = n3.getProperties();
- //
- n1.setDeclaredProperty("foo", "bar1");
- n2.setDeclaredProperty("foo", "bar2");
- assertEquals("bar1", p1.get("foo"));
- assertEquals("bar2", p2.get("foo"));
- assertEquals("bar2", p3.get("foo"));
+ //
+ n1.setDeclaredProperty("foo", "bar1");
+ n2.setDeclaredProperty("foo", "bar2");
+ assertEquals("bar1", p1.get("foo"));
+ assertEquals("bar2", p2.get("foo"));
+ assertEquals("bar2", p3.get("foo"));
- //
- n2.setDeclaredProperty("foo", null);
- assertEquals("bar1", p1.get("foo"));
- assertEquals("bar1", p2.get("foo"));
- assertEquals("bar1", p3.get("foo"));
+ //
+ n2.setDeclaredProperty("foo", null);
+ assertEquals("bar1", p1.get("foo"));
+ assertEquals("bar1", p2.get("foo"));
+ assertEquals("bar1", p3.get("foo"));
- //
- TransactionAssert.commitTransaction();
- }
+ //
+ TransactionAssert.commitTransaction();
+ }
+ /**
+ * Regression test for JBPORTAL-1541...
+ *
+ * @throws DuplicatePortalObjectException
+ */
+ public void testSetDeclaredPropertyWithoutParent() throws DuplicatePortalObjectException
+ {
+ TransactionAssert.beginTransaction();
+ PortalContainer ctx = container.createContext("test");
+ ctx.setDeclaredProperty("name", null);
+ TransactionAssert.commitTransaction();
+ }
+
public void testCRUD() throws Exception
{
TransactionAssert.beginTransaction();
- PortalContainer ctx = (PortalContainer)container.getContext();
+ PortalContainer ctx = container.getContext();
Portal portal = ctx.createPortal("default");
PortalObjectId portalId = portal.getId();
assertNotNull(portalId);
@@ -215,7 +224,7 @@
//
TransactionAssert.beginTransaction();
- ctx = (PortalContainer)container.getContext();
+ ctx = container.getContext();
assertNotNull(ctx);
portal = ctx.getPortal("default");
assertNotNull(portal);
@@ -230,7 +239,7 @@
//
TransactionAssert.beginTransaction();
- ctx = (PortalContainer)container.getContext();
+ ctx = container.getContext();
assertNotNull(ctx);
ctx.destroyChild("default");
portal = ctx.getPortal("default");
@@ -248,7 +257,7 @@
public void testGetChildren() throws Exception
{
TransactionAssert.beginTransaction();
- PortalContainer ctx = (PortalContainer)container.getContext();
+ PortalContainer ctx = container.getContext();
Portal portal_1 = ctx.createPortal("1");
Page page_1_1 = portal_1.createPage("1");
Page page_1_2 = portal_1.createPage("2");
@@ -296,7 +305,7 @@
//
TransactionAssert.beginTransaction();
- PortalContainer ctx = (PortalContainer)container.getContext();
+ PortalContainer ctx = container.getContext();
Portal portal = ctx.createPortal("default");
assertNotNull(portal);
@@ -326,7 +335,7 @@
//
TransactionAssert.beginTransaction();
- PortalContainer ctx = (PortalContainer)container.getContext();
+ PortalContainer ctx = container.getContext();
Portal portal = ctx.createPortal("portal");
portal.setDeclaredProperty("portalname", "portalvalue");
portal.getSupportedWindowStates().add(WindowState.NORMAL);
@@ -344,7 +353,7 @@
//
TransactionAssert.beginTransaction();
- ctx = (PortalContainer)container.getContext();
+ ctx = container.getContext();
portal = (Portal)container.getObject(defaultId);
portal = (Portal)portal.copy(ctx, "copy", true);
assertNotNull(portal);
@@ -386,4 +395,4 @@
return po1.getId().compareTo(po2.getId());
}
}
-}
+}
\ No newline at end of file
18 years, 10 months
JBoss Portal SVN: r7697 - in trunk/core: src/main/org/jboss/portal/test/core/model/portal and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-07-09 19:47:09 -0400 (Mon, 09 Jul 2007)
New Revision: 7697
Modified:
trunk/core/build.xml
trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
Log:
- JBPORTAL-1541: Added regression test.
- Fixed output file for PortalNodeTestCase.
Modified: trunk/core/build.xml
===================================================================
--- trunk/core/build.xml 2007-07-09 21:13:28 UTC (rev 7696)
+++ trunk/core/build.xml 2007-07-09 23:47:09 UTC (rev 7697)
@@ -113,8 +113,8 @@
<path refid="trove.trove.classpath"/>
<path refid="qdox.qdox.classpath"/>
<pathelement location="${source.etc}/sun-jsf/jsf-example.jar"/>
- <!-- jbpm integration -->
- <path refid="jbpm.jaronly.classpath"/>
+ <!-- jbpm integration -->
+ <path refid="jbpm.jaronly.classpath"/>
</path>
<!-- Configure modules -->
@@ -380,9 +380,9 @@
</target>
<!-- Build the jboss-portal.sar -->
- <target name="output" depends="artifacts">
+ <target name="output" depends="artifacts">
<!-- Build configurations -->
- <copy todir="${build.resources}/jboss-portal.sar">
+ <copy todir="${build.resources}/jboss-portal.sar">
<fileset dir="${build.resources}/jboss-portal" excludes="**/*.xml"/>
</copy>
@@ -392,10 +392,10 @@
</filterset>
<fileset dir="${build.resources}/jboss-portal" includes="**/*.xml"/>
</copy>
- <!-- Build archives -->
- <implode
- dir="${build.resources}/jboss-portal.sar"
- tofile="${build.lib}/jboss-portal.sar"/>
+ <!-- Build archives -->
+ <implode
+ dir="${build.resources}/jboss-portal.sar"
+ tofile="${build.lib}/jboss-portal.sar"/>
</target>
<!-- create artifacts for running the portlet tests (except TCK) target output should have already been executed -->
@@ -556,29 +556,29 @@
</x-sysproperty>
<x-test>
<zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalNodeTestCase"
- outfile="TEST-PortalObjectContainerTestCase">
+ outfile="TEST-PortalNodeTestCase">
<parameter name="CacheNaturalId" value="true"/>
<parameter name="Config" value="persistent-jboss-beans.xml"/>
</zest>
-<!--
- <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalNodeTestCase"
- outfile="TEST-PortalObjectContainerTestCase">
- <parameter name="CacheNaturalId" value="true"/>
- <parameter name="Config" value="transient-jboss-beans.xml"/>
- </zest>
--->
+ <!--
+ <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalNodeTestCase"
+ outfile="TEST-PortalObjectContainerTestCase">
+ <parameter name="CacheNaturalId" value="true"/>
+ <parameter name="Config" value="transient-jboss-beans.xml"/>
+ </zest>
+ -->
<zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalObjectContainerTestCase"
outfile="TEST-PortalObjectContainerTestCase">
<parameter name="CacheNaturalId" value="true"/>
<parameter name="Config" value="persistent-jboss-beans.xml"/>
</zest>
-<!--
- <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalObjectContainerTestCase"
- outfile="TEST-PortalObjectContainerTestCase">
- <parameter name="CacheNaturalId" value="true"/>
- <parameter name="Config" value="transient-jboss-beans.xml"/>
- </zest>
--->
+ <!--
+ <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.portal.PortalObjectContainerTestCase"
+ outfile="TEST-PortalObjectContainerTestCase">
+ <parameter name="CacheNaturalId" value="true"/>
+ <parameter name="Config" value="transient-jboss-beans.xml"/>
+ </zest>
+ -->
<zest todir="${test.reports}" name="org.jboss.portal.test.core.model.instance.InstanceContainerTestCase"
outfile="TEST-PersistedLocally-ClonedOnCreate-InstanceContainerTestCase">
<parameter name="PersistLocally" value="true"/>
@@ -608,15 +608,15 @@
<parameter name="Config" value="persistent-jboss-beans.xml"/>
</zest>
-<!--
- <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.instance.InstanceContainerTestCase"
- outfile="TEST-PersistedLocally-ClonedOnCreate-InstanceContainerTestCase">
- <parameter name="PersistLocally" value="true"/>
- <parameter name="CloneOnCreate" value="true"/>
- <parameter name="CacheNaturalId" value="true"/>
- <parameter name="Config" value="transient-jboss-beans.xml"/>
- </zest>
--->
+ <!--
+ <zest todir="${test.reports}" name="org.jboss.portal.test.core.model.instance.InstanceContainerTestCase"
+ outfile="TEST-PersistedLocally-ClonedOnCreate-InstanceContainerTestCase">
+ <parameter name="PersistLocally" value="true"/>
+ <parameter name="CloneOnCreate" value="true"/>
+ <parameter name="CacheNaturalId" value="true"/>
+ <parameter name="Config" value="transient-jboss-beans.xml"/>
+ </zest>
+ -->
<zest todir="${test.reports}" name="org.jboss.portal.test.core.state.ProducerTestCase"
outfile="TEST-ProducerTestCase-WithoutRegistration">
<parameter name="UseRegistration" value="false"/>
@@ -730,7 +730,7 @@
<!--
Some convenience build targets to help deployment during development
-->
- <target name="deploy-explode" depends="output,explode">
+ <target name="deploy-explode" depends="output,explode">
<require file="${jboss.home}/server/${portal.deploy.dir}"/>
<copy todir="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar" overwrite="true">
<fileset dir="${build.lib}/jboss-portal-exploded.sar"/>
@@ -738,10 +738,10 @@
</target>
<target name="explode-ha" depends="init">
<explode
- file="${build.lib}/jboss-portal-ha.sar"
- todir="${build.lib}"
- name="jboss-portal-ha-exploded.sar"
- />
+ file="${build.lib}/jboss-portal-ha.sar"
+ todir="${build.lib}"
+ name="jboss-portal-ha-exploded.sar"
+ />
</target>
<target name="deploy-ha-explode" description="Deploy high availability." depends="output-ha,explode-ha">
<require file="${jboss.home}/server/${portal-ha.deploy.dir}"/>
Modified: trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-07-09 21:13:28 UTC (rev 7696)
+++ trunk/core/src/main/org/jboss/portal/test/core/model/portal/PortalObjectContainerTestCase.java 2007-07-09 23:47:09 UTC (rev 7697)
@@ -29,6 +29,7 @@
import org.jboss.portal.common.util.CollectionBuilder;
import org.jboss.portal.core.model.content.ContentType;
import org.jboss.portal.core.model.content.spi.handler.ContentState;
+import org.jboss.portal.core.model.portal.DuplicatePortalObjectException;
import org.jboss.portal.core.model.portal.Page;
import org.jboss.portal.core.model.portal.Portal;
import org.jboss.portal.core.model.portal.PortalContainer;
@@ -39,7 +40,11 @@
import org.jboss.portal.test.core.model.content.SimpleContent;
import org.jboss.portal.test.framework.AbstractPortalTestCase;
-import java.util.*;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.List;
+import java.util.Map;
/**
* Portal Object Container Test Cases based on the microcontainer architecture
@@ -65,9 +70,6 @@
TransactionAssert.commitTransaction();
}
- /**
- *
- */
public void testPropertyUpdateCascadeToDescendantsWhenTheyDoNotDeclareIt() throws Exception
{
TransactionAssert.beginTransaction();
@@ -94,9 +96,6 @@
TransactionAssert.commitTransaction();
}
- /**
- *
- */
public void testPropertyUpdateDoesNotCascadeToDescendantsWhenTheyDeclareIt() throws Exception
{
TransactionAssert.beginTransaction();
@@ -124,9 +123,6 @@
TransactionAssert.commitTransaction();
}
- /**
- *
- */
public void testOverridenPropertyRemovalPropagateParentValueToDescendants() throws Exception
{
TransactionAssert.beginTransaction();
@@ -155,10 +151,23 @@
TransactionAssert.commitTransaction();
}
+ /**
+ * Regression test for JBPORTAL-1541...
+ *
+ * @throws DuplicatePortalObjectException
+ */
+ public void testSetDeclaredPropertyWithoutParent() throws DuplicatePortalObjectException
+ {
+ TransactionAssert.beginTransaction();
+ PortalContainer ctx = container.createContext("test");
+ ctx.setDeclaredProperty("name", null);
+ TransactionAssert.commitTransaction();
+ }
+
public void testCRUD() throws Exception
{
TransactionAssert.beginTransaction();
- PortalContainer ctx = (PortalContainer)container.getContext();
+ PortalContainer ctx = container.getContext();
Portal portal = ctx.createPortal("default");
PortalObjectId portalId = portal.getId();
assertNotNull(portalId);
@@ -215,7 +224,7 @@
//
TransactionAssert.beginTransaction();
- ctx = (PortalContainer)container.getContext();
+ ctx = container.getContext();
assertNotNull(ctx);
portal = ctx.getPortal("default");
assertNotNull(portal);
@@ -230,7 +239,7 @@
//
TransactionAssert.beginTransaction();
- ctx = (PortalContainer)container.getContext();
+ ctx = container.getContext();
assertNotNull(ctx);
ctx.destroyChild("default");
portal = ctx.getPortal("default");
@@ -248,7 +257,7 @@
public void testGetChildren() throws Exception
{
TransactionAssert.beginTransaction();
- PortalContainer ctx = (PortalContainer)container.getContext();
+ PortalContainer ctx = container.getContext();
Portal portal_1 = ctx.createPortal("1");
Page page_1_1 = portal_1.createPage("1");
Page page_1_2 = portal_1.createPage("2");
@@ -296,7 +305,7 @@
//
TransactionAssert.beginTransaction();
- PortalContainer ctx = (PortalContainer)container.getContext();
+ PortalContainer ctx = container.getContext();
Portal portal = ctx.createPortal("default");
assertNotNull(portal);
@@ -326,7 +335,7 @@
//
TransactionAssert.beginTransaction();
- PortalContainer ctx = (PortalContainer)container.getContext();
+ PortalContainer ctx = container.getContext();
Portal portal = ctx.createPortal("portal");
portal.setDeclaredProperty("portalname", "portalvalue");
portal.getSupportedWindowStates().add(WindowState.NORMAL);
@@ -344,7 +353,7 @@
//
TransactionAssert.beginTransaction();
- ctx = (PortalContainer)container.getContext();
+ ctx = container.getContext();
portal = (Portal)container.getObject(defaultId);
portal = (Portal)portal.copy(ctx, "copy", true);
assertNotNull(portal);
18 years, 10 months
JBoss Portal SVN: r7696 - branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-07-09 17:13:28 -0400 (Mon, 09 Jul 2007)
New Revision: 7696
Modified:
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
Log:
JBPORTAL-1557 - drop the 'title' parameter when rendering a gadget so the best default will be resolved
JBPORTAL-1554 - use 'directory_title' instead of 'title' attribute in for google widgets selection
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-09 18:13:38 UTC (rev 7695)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidget.java 2007-07-09 21:13:28 UTC (rev 7696)
@@ -78,6 +78,11 @@
return getInfo().getTitle();
}
+ public LocalizedString getDirectoryTitle()
+ {
+ return getInfo().getDirectoryTitle();
+ }
+
public LocalizedString getDescription()
{
return getInfo().getDescription();
@@ -98,7 +103,8 @@
tmp.append("&synd=open");
tmp.append("&w=").append(info.getWidth());
tmp.append("&h=").append(info.getHeight());
- tmp.append("&title=").append(FastURLEncoder.DEFAULT_ENCODER.encode(info.getTitle().getDefaultString()));
+ //don's let to override the title param - proper one will be picked up with i18n support
+ //tmp.append("&title=").append(FastURLEncoder.DEFAULT_ENCODER.encode(info.getTitle().getDefaultString()));
tmp.append("&border=%23ffffff%7C3px%2C1px+none+%23999999"); // "&border=%23ffffff%7C3px%2C1px+solid+%23999999"
tmp.append("&output=js");
Modified: branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java 2007-07-09 18:13:38 UTC (rev 7695)
+++ branches/JBoss_Portal_Branch_2_6/widget/src/main/org/jboss/portal/widget/google/GGWidgetInfo.java 2007-07-09 21:13:28 UTC (rev 7696)
@@ -37,6 +37,9 @@
private final LocalizedString title;
/** . */
+ private final LocalizedString directoryTitle;
+
+ /** . */
private final LocalizedString description;
/** . */
@@ -50,12 +53,14 @@
public GGWidgetInfo(
LocalizedString title,
+ LocalizedString directoryTitle,
LocalizedString description,
int width,
int height,
GGPreferencesInfo preferences)
{
this.title = title;
+ this.directoryTitle = directoryTitle;
this.description = description;
this.width = width;
this.height = height;
@@ -86,4 +91,10 @@
{
return height;
}
+
+
+ public LocalizedString getDirectoryTitle()
+ {
+ return directoryTitle;
+ }
}
18 years, 10 months