JBoss Portal SVN: r7318 - trunk/core-admin/src/main/org/jboss/portal/core/admin/ui.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-05-24 04:56:01 -0400 (Thu, 24 May 2007)
New Revision: 7318
Modified:
trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
Log:
JBPORTAL-1412: The current portlet instance should be the default selected item in the list
Modified: trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java
===================================================================
--- trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-05-23 23:18:37 UTC (rev 7317)
+++ trunk/core-admin/src/main/org/jboss/portal/core/admin/ui/PortalObjectManagerBean.java 2007-05-24 08:56:01 UTC (rev 7318)
@@ -68,6 +68,8 @@
/** The serialVersionUID */
private static final long serialVersionUID = -8923517554726982622L;
+
+ private static final String CONTENT_URI = "content.uri";
// Wired services
@@ -385,7 +387,7 @@
if (content != null)
{
renderParameters = new HashMap();
- renderParameters.put("uri", new String[]{content.getURI()});
+ renderParameters.put(CONTENT_URI, new String[]{content.getURI()});
}
break;
}
@@ -530,7 +532,7 @@
Map actionParams = actionEvent.getParameterMap();
if (actionParams.get("content.action.select") != null)
{
- String[] uris = (String[])actionParams.get("content.uri");
+ String[] uris = (String[])actionParams.get(CONTENT_URI);
if (uris != null && uris.length > 0)
{
String uri = uris[0];
18 years, 11 months
JBoss Portal SVN: r7317 - in trunk/identity/src: resources/example and 1 other directory.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-05-23 19:18:37 -0400 (Wed, 23 May 2007)
New Revision: 7317
Added:
trunk/identity/src/resources/example/portal-sample-local2.ldif
Modified:
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java
trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
Log:
add support for multiply search DNs for LDAPExtUserModuleImpl
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-05-23 21:04:54 UTC (rev 7316)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPExtUserModuleImpl.java 2007-05-23 23:18:37 UTC (rev 7317)
@@ -25,6 +25,7 @@
import org.jboss.portal.identity.IdentityException;
import org.jboss.portal.identity.NoSuchUserException;
import org.jboss.portal.identity.User;
+import org.jboss.portal.identity.IdentityConfiguration;
import org.jboss.portal.common.util.Tools;
import javax.naming.NamingEnumeration;
@@ -38,6 +39,8 @@
import java.util.HashSet;
import java.util.Collections;
import java.util.LinkedList;
+import java.util.Enumeration;
+import java.util.Iterator;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -62,8 +65,8 @@
log.debug("Search filter: " + filter);
Object[] filterArgs = {userName};
- NamingEnumeration results = searchUsers(filter, filterArgs);
- List sr = Tools.toList(results);
+
+ List sr = searchUsers(filter, filterArgs);
if (sr.size() > 1)
{
throw new IdentityException("Found more than one user with id: " + userName + "" +
@@ -135,7 +138,7 @@
filter = "*" + filter + "*";
}
- NamingEnumeration results = null;
+ Enumeration results = null;
String ldap_filter = getUserSearchFilter();
@@ -143,8 +146,7 @@
ldap_filter = ldap_filter.replaceAll("\\{0\\}", filter);
log.debug("Search filter: " + ldap_filter);
- results = searchUsers(ldap_filter, null);
- uf = Tools.toList(results);
+ uf = searchUsers(ldap_filter, null);
int size = uf.size();
if (offset == 0 && size <= limit)
@@ -188,9 +190,9 @@
//* chars are escaped in filterArgs so we must replace it manually
filter = filter.replaceAll("\\{0\\}", "*");
- NamingEnumeration results = searchUsers(filter, null);
- List sr = Tools.toList(results);
+ List sr = searchUsers(filter, null);
+
return sr.size();
}
catch (NoSuchElementException e)
@@ -214,7 +216,7 @@
* @param filter that will be concatenated with proper user search filter from the module
* @return
*/
- public NamingEnumeration searchUsers(String filter, Object[] filterArgs) throws NamingException, IdentityException
+ public List searchUsers(String filter, Object[] filterArgs) throws NamingException, IdentityException
{
SearchControls controls = new SearchControls();
controls.setSearchScope(SearchControls.SUBTREE_SCOPE);
@@ -232,13 +234,60 @@
}
log.debug("Search ctx: " + getUserSearchCtxDN());
- if (filterArgs == null)
+ Set userCtxs = getUserSearchCtxDNs();
+
+ if (userCtxs.size() == 1)
{
- return getConnectionContext().createInitialContext().search(getUserSearchCtxDN(), filter, controls);
+ Enumeration results = null;
+ if (filterArgs == null)
+ {
+ results = getConnectionContext().createInitialContext().search(getUserSearchCtxDN(), filter, controls);
+ return Tools.toList(results);
+ }
+ else
+ {
+ results = getConnectionContext().createInitialContext().search(getUserSearchCtxDN(), filter, filterArgs, controls);
+ return Tools.toList(results);
+ }
+
+
}
else
{
- return getConnectionContext().createInitialContext().search(getUserSearchCtxDN(), filter, filterArgs, controls);
+ List merged = new LinkedList();
+
+ for (Iterator iterator = userCtxs.iterator(); iterator.hasNext();)
+ {
+ String userCtx = (String)iterator.next();
+ Enumeration results = null;
+ if (filterArgs == null)
+ {
+ results = getConnectionContext().createInitialContext().search(userCtx, filter, controls);
+ merged.addAll(Tools.toList(results));
+
+ }
+ else
+ {
+ results = getConnectionContext().createInitialContext().search(userCtx, filter, filterArgs, controls);
+ merged.addAll(Tools.toList(results));
+ }
+ }
+
+ return merged;
}
}
+
+
+ protected Set getUserSearchCtxDNs() throws IdentityException
+ {
+ Set searchCtx = getIdentityConfiguration().getValues(IdentityConfiguration.GROUP_COMMON, IdentityConfiguration.USER_CONTEXT_DN);
+ if (searchCtx == null || searchCtx.size() == 0)
+ {
+ throw new IdentityException(IdentityConfiguration.USER_CONTEXT_DN + " missing in configuration");
+ }
+ else
+ {
+ return searchCtx;
+ }
+ }
}
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-05-23 21:04:54 UTC (rev 7316)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPStaticRoleMembershipModuleImpl.java 2007-05-23 23:18:37 UTC (rev 7317)
@@ -42,6 +42,7 @@
import java.util.Iterator;
import java.util.LinkedList;
import java.util.Collections;
+import java.util.Enumeration;
/**
* @author <a href="mailto:boleslaw.dawidowicz@jboss.org">Boleslaw Dawidowicz</a>
@@ -180,8 +181,7 @@
//NamingEnumeration results = getConnectionContext().createInitialContext().search(getUserContainerDN(), filter, controls);
- NamingEnumeration results = getUserModule().searchUsers(filter, null);
- List sr = Tools.toList(results);
+ List sr = getUserModule().searchUsers(filter, null);
for (Iterator iterator = sr.iterator(); iterator.hasNext();)
@@ -263,8 +263,7 @@
String filter = getMemberAttributeID().concat("=").concat(memberOfName);
log.debug("Search filter: " + filter);
- NamingEnumeration results = getUserModule().searchUsers(filter, null);
- List sr = Tools.toList(results);
+ List sr = getUserModule().searchUsers(filter, null);
//iterate over users that contain a role
for (Iterator iterator = sr.iterator(); iterator.hasNext();)
{
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-05-23 21:04:54 UTC (rev 7316)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModule.java 2007-05-23 23:18:37 UTC (rev 7317)
@@ -43,6 +43,8 @@
import java.util.NoSuchElementException;
import java.util.Map;
import java.util.Hashtable;
+import java.util.Enumeration;
+import java.util.List;
/**
* Abstract LDAPUserModule that should be extended to provide compabitibility across identity modules
@@ -213,7 +215,7 @@
* @param filterArgs
* @return
*/
- public abstract NamingEnumeration searchUsers(String filter, Object[] filterArgs) throws NamingException, IdentityException;
+ public abstract List searchUsers(String filter, Object[] filterArgs) throws NamingException, IdentityException;
//**************************
Modified: trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java
===================================================================
--- trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-05-23 21:04:54 UTC (rev 7316)
+++ trunk/identity/src/main/org/jboss/portal/identity/ldap/LDAPUserModuleImpl.java 2007-05-23 23:18:37 UTC (rev 7317)
@@ -47,6 +47,7 @@
import java.util.Collections;
import java.util.Collection;
import java.util.Comparator;
+import java.util.Enumeration;
import java.security.NoSuchAlgorithmException;
/**
@@ -77,8 +78,7 @@
String filter = "(".concat(getUidAttributeID()).concat("=").concat(userName).concat(")");
log.debug("Search filter: " + filter);
- NamingEnumeration results = searchUsers(filter, null);
- List sr = Tools.toList(results);
+ List sr = searchUsers(filter, null);
if (sr.size() > 1)
{
throw new IdentityException("Found more than one user with id: " + userName + "" +
@@ -250,7 +250,7 @@
}
List uf = new LinkedList();
- NamingEnumeration results = null;
+ Enumeration results = null;
if (filter.length() == 0)
@@ -269,9 +269,9 @@
log.debug("Search filter: " + filter);
- results = searchUsers(ldap_filter, null);
- uf = Tools.toList(results);
+ uf = searchUsers(ldap_filter, null);
+
int size = uf.size();
if (offset == 0 && size <= limit)
{
@@ -314,8 +314,7 @@
log.debug("Search filter: " + filter);
- NamingEnumeration results = searchUsers(filter, null);
- List sr = Tools.toList(results);
+ List sr = searchUsers(filter, null);
return sr.size();
@@ -339,7 +338,7 @@
* @param filter that will be concatenated with proper user search filter from the module
* @return
*/
- public NamingEnumeration searchUsers(String filter, Object[] filterArgs) throws NamingException, IdentityException
+ public List searchUsers(String filter, Object[] filterArgs) throws NamingException, IdentityException
{
SearchControls controls = new SearchControls();
controls.setSearchScope(SearchControls.ONELEVEL_SCOPE);
@@ -348,13 +347,16 @@
log.debug("Search filter: " + filter);
+ Enumeration results = null;
if (filterArgs == null)
{
- return getConnectionContext().createInitialContext().search(getContainerDN(), filter, controls);
+ results = getConnectionContext().createInitialContext().search(getContainerDN(), filter, controls);
+ return Tools.toList(results);
}
else
{
- return getConnectionContext().createInitialContext().search(getContainerDN(), filter, filterArgs, controls);
+ results = getConnectionContext().createInitialContext().search(getContainerDN(), filter, filterArgs, controls);
+ return Tools.toList(results);
}
}
Added: trunk/identity/src/resources/example/portal-sample-local2.ldif
===================================================================
--- trunk/identity/src/resources/example/portal-sample-local2.ldif (rev 0)
+++ trunk/identity/src/resources/example/portal-sample-local2.ldif 2007-05-23 23:18:37 UTC (rev 7317)
@@ -0,0 +1,224 @@
+dn: dc=example,dc=com
+objectclass: top
+objectclass: dcObject
+objectclass: organization
+dc: example
+o: example
+
+dn: dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: dcObject
+objectclass: organization
+o: portal
+dc: portal
+
+dn: o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: organization
+o: test
+
+dn: ou=People,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+
+dn: uid=admin,ou=People,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: admin
+cn: Java Duke
+sn: Duke
+userPassword: admin
+mail: email(a)email.com
+
+dn: uid=user,ou=People,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user
+cn: user
+sn: Portal User
+userPassword: user
+mail: email(a)email.com
+
+dn: uid=jduke,ou=People,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke
+cn: Java Duke
+sn: Duke
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke1,ou=People,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke1
+cn: Java Duke1
+sn: Duke1
+userPassword: theduke
+mail: email(a)email.com
+
+
+dn: uid=jduke2,ou=People,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke2
+cn: Java Duke2
+sn: Duke2
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke3,ou=People,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke3
+cn: Java Duke3
+sn: Duke3
+userPassword: theduke
+mail: email(a)email.com
+
+dn: uid=jduke4,ou=People,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: jduke4
+cn: Java Duke4
+sn: Duke4
+userPassword: theduke
+mail: email(a)email.com
+
+dn: ou=Roles,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: Roles
+
+dn: cn=Admin,ou=Roles,o=test,dc=portal,dc=example,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Admin
+description: Portal admin role
+member: uid=admin,ou=People,o=test,dc=portal,dc=example,dc=com
+
+dn: cn=User,ou=Roles,o=test,dc=portal,dc=example,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: User
+description: Portal user role
+member: uid=admin,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=user,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke1,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke2,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke4,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=user21,ou=People2,o=test,dc=portal,dc=example,dc=com
+member: uid=user22,ou=People2,o=test,dc=portal,dc=example,dc=com
+member: uid=user31,ou=People3,o=test,dc=portal,dc=example,dc=com
+member: uid=user32,ou=People3,o=test,dc=portal,dc=example,dc=com
+
+
+dn: cn=Echo,ou=Roles,o=test,dc=portal,dc=example,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo
+description: the JBossAdmin group
+member: uid=jduke1,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke4,ou=People,o=test,dc=portal,dc=example,dc=com
+
+dn: cn=Echo1,ou=Roles,o=test,dc=portal,dc=example,dc=com
+objectClass: top
+objectClass: groupOfNames
+cn: Echo1
+description: the JBossAdmin group 2
+member: uid=jduke2,ou=People,o=test,dc=portal,dc=example,dc=com
+member: uid=jduke3,ou=People,o=test,dc=portal,dc=example,dc=com
+
+dn: cn=TheDuke,ou=Roles,o=test,dc=portal,dc=example,dc=com
+objectClass: groupOfNames
+objectClass: top
+cn: TheDuke
+description: TheDuke role context
+member: uid=jduke,ou=People,o=test,dc=portal,dc=example,dc=com
+
+dn: ou=People2,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: uid=user21,ou=People2,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user21
+cn: user21
+sn: Portal User
+userPassword: user21
+mail: email(a)email.com
+
+dn: uid=user22,ou=People2,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user22
+cn: user22
+sn: Portal User
+userPassword: user22
+mail: email(a)email.com
+
+dn: ou=People3,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: uid=user31,ou=People3,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user31
+cn: user31
+sn: Portal User
+userPassword: user31
+mail: email(a)email.com
+
+dn: uid=user32,ou=People3,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user32
+cn: user32
+sn: Portal User
+userPassword: user32
+mail: email(a)email.com
+
+dn: ou=People4,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: organizationalUnit
+ou: People
+
+dn: uid=user41,ou=People4,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user41
+cn: user41
+sn: Portal User
+userPassword: user41
+mail: email(a)email.com
+
+dn: uid=user42,ou=People4,o=test,dc=portal,dc=example,dc=com
+objectclass: top
+objectclass: inetOrgPerson
+objectclass: person
+uid: user42
+cn: user42
+sn: Portal User
+userPassword: user42
+mail: email(a)email.com
18 years, 11 months
JBoss Portal SVN: r7316 - in trunk/wsrp/src: resources/portal-wsrp-sar/META-INF and 1 other directory.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-05-23 17:04:54 -0400 (Wed, 23 May 2007)
New Revision: 7316
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/RenderRequestProcessor.java
trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
Log:
- Use FragmentResponse expiration instead of portlet metadata for cache info for better accuracy.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/RenderRequestProcessor.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/RenderRequestProcessor.java 2007-05-23 15:49:45 UTC (rev 7315)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/producer/RenderRequestProcessor.java 2007-05-23 21:04:54 UTC (rev 7316)
@@ -23,11 +23,10 @@
package org.jboss.portal.wsrp.producer;
+import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.common.util.MarkupInfo;
import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.impl.jsr168.PortletUtils;
-import org.jboss.portal.portlet.info.CacheInfo;
import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -159,15 +158,17 @@
markupContext.setPreferredTitle(portletDescription.getTitle().getValue());
// cache information
- CacheInfo cacheInfo = portlet.getInfo().getCache();
- if (cacheInfo != null)
+ int expires = fragment.getExpirationSecs();
+ // only create a CacheControl if expiration time is not 0
+ if (expires != 0)
{
- int expires = cacheInfo.getExpirationSecs();
- // only create a CacheControl if expiration time is not 0
- if (expires != 0)
+ // if expires is negative, replace by -1 to make sure
+ if (expires < 0)
{
- markupContext.setCacheControl(WSRPTypeFactory.createCacheControl(expires, WSRPConstants.CACHE_PER_USER));
+ expires = -1;
}
+
+ markupContext.setCacheControl(WSRPTypeFactory.createCacheControl(expires, WSRPConstants.CACHE_PER_USER));
}
return new MarkupResponse(markupContext, null, null);
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-05-23 15:49:45 UTC (rev 7315)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/META-INF/jboss-service.xml 2007-05-23 21:04:54 UTC (rev 7316)
@@ -35,6 +35,7 @@
<depends-list-element>portal:service=Interceptor,type=Portlet,name=ContextDispatcher</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=WindowStates</depends-list-element>
<depends-list-element>portal:service=Interceptor,type=Portlet,name=Modes</depends-list-element>
+ <depends-list-element>portal:service=Interceptor,type=Portlet,name=ProducerCache</depends-list-element>
</depends-list>
</mbean>
18 years, 11 months
JBoss Portal SVN: r7315 - in trunk: core-admin/src/resources/portal-admin-war/WEB-INF and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-05-23 11:49:45 -0400 (Wed, 23 May 2007)
New Revision: 7315
Added:
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridge.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeBootstrap.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeFactory.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortletConfig.java
Removed:
trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortlet.java
trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml
Log:
update of JSF meta bridge to handle the myfaces servlet context listener
Modified: trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-05-23 12:35:12 UTC (rev 7314)
+++ trunk/core/src/main/org/jboss/portal/core/impl/model/portal/PortalObjectImpl.java 2007-05-23 15:49:45 UTC (rev 7315)
@@ -69,7 +69,6 @@
private Map childrenMap;
private Map properties;
private Map unmodifiableProperties;
-// private DashboardContext dashboardContext;
public PortalObjectImpl()
{
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-05-23 12:35:12 UTC (rev 7314)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/web.xml 2007-05-23 15:49:45 UTC (rev 7315)
@@ -74,15 +74,16 @@
<param-value>server</param-value>
</context-param>
- <!-- -->
+ <!-- The JSF servlet -->
<servlet>
<servlet-name>Faces Servlet</servlet-name>
<servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
<load-on-startup>1</load-on-startup>
</servlet>
- <!-- -->
+ <!-- The JSF meta bridge bootstrap -->
<listener>
- <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ <display-name> Faces Meta Bridge Bootstrap</display-name>
+ <listener-class>org.jboss.portal.faces.portlet.JSFMetaBridgeBootstrap</listener-class>
</listener>
</web-app>
Deleted: trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java 2007-05-23 12:35:12 UTC (rev 7314)
+++ trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java 2007-05-23 15:49:45 UTC (rev 7315)
@@ -1,74 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.faces.portlet;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class BridgeInfo
-{
-
- /** . */
- static final BridgeInfo SUN_JSF = new BridgeInfo(
- "jsfportletbridge",
- "com.sun.faces.portlet.FacesPortlet",
- "com.sun.faces.portlet.INIT_VIEW");
-
- /** . */
- static final BridgeInfo MYFACES_JSF = new BridgeInfo(
- "myfaces",
- "org.apache.myfaces.portlet.MyFacesGenericPortlet",
- "default-view");
-
- /** . */
- private final String name;
-
- /** . */
- private final String portletClassName;
-
- /** . */
- private final String initParamViewName;
-
- public BridgeInfo(String name, String portletClassName, String initParamViewName)
- {
- this.name = name;
- this.portletClassName = portletClassName;
- this.initParamViewName = initParamViewName;
- }
-
- public String getName()
- {
- return name;
- }
-
- public String getPortletClassName()
- {
- return portletClassName;
- }
-
- public String getInitParamViewName()
- {
- return initParamViewName;
- }
-}
Deleted: trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java 2007-05-23 12:35:12 UTC (rev 7314)
+++ trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java 2007-05-23 15:49:45 UTC (rev 7315)
@@ -1,91 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2006, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.faces.portlet;
-
-import org.jboss.portal.common.util.Tools;
-
-import javax.portlet.PortletConfig;
-import javax.portlet.PortletContext;
-import java.util.ResourceBundle;
-import java.util.Locale;
-import java.util.Enumeration;
-import java.util.List;
-
-/**
- * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
- * @version $Revision: 1.1 $
- */
-public class BridgePortletConfig implements PortletConfig
-{
-
- /** . */
- private final PortletConfig delegate;
-
- /** . */
- private final BridgeInfo bridgeInfo;
-
- public BridgePortletConfig(PortletConfig delegate, BridgeInfo bridgeInfo)
- {
- this.delegate = delegate;
- this.bridgeInfo = bridgeInfo;
- }
-
- public String getPortletName()
- {
- return delegate.getPortletName();
- }
-
- public PortletContext getPortletContext()
- {
- return delegate.getPortletContext();
- }
-
- public ResourceBundle getResourceBundle(Locale locale)
- {
- return delegate.getResourceBundle(locale);
- }
-
- public String getInitParameter(String name) throws IllegalArgumentException
- {
- if (name == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- if (bridgeInfo.getInitParamViewName().equals(name))
- {
- return delegate.getInitParameter("VIEW");
- }
-
- //
- return delegate.getInitParameter(name);
- }
-
- public Enumeration getInitParameterNames()
- {
- List names = Tools.toList(delegate.getInitParameterNames());
- names.add(bridgeInfo.getInitParamViewName());
- return Tools.toEnumeration(names.iterator());
- }
-}
Copied: trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridge.java (from rev 7310, trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgeInfo.java)
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridge.java (rev 0)
+++ trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridge.java 2007-05-23 15:49:45 UTC (rev 7315)
@@ -0,0 +1,76 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.faces.portlet;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class JSFMetaBridge
+{
+
+ /** . */
+ static final JSFMetaBridge SUN_JSF = new JSFMetaBridge(
+ "jsfportletbridge",
+ "com.sun.faces.portlet.FacesPortlet",
+ "com.sun.faces.portlet.INIT_VIEW"
+ );
+
+ /** . */
+ static final JSFMetaBridge MYFACES_JSF = new JSFMetaBridge(
+ "myfaces",
+ "org.apache.myfaces.portlet.MyFacesGenericPortlet",
+ "default-view"
+ );
+
+ /** . */
+ private final String name;
+
+ /** . */
+ private final String portletClassName;
+
+ /** . */
+ private final String initParamViewName;
+
+ public JSFMetaBridge(String name, String portletClassName, String initParamViewName)
+ {
+ this.name = name;
+ this.portletClassName = portletClassName;
+ this.initParamViewName = initParamViewName;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public String getPortletClassName()
+ {
+ return portletClassName;
+ }
+
+ public String getInitParamViewName()
+ {
+ return initParamViewName;
+ }
+}
Added: trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeBootstrap.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeBootstrap.java (rev 0)
+++ trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeBootstrap.java 2007-05-23 15:49:45 UTC (rev 7315)
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.faces.portlet;
+
+import org.apache.log4j.Logger;
+
+import javax.servlet.ServletContextListener;
+import javax.servlet.ServletContextEvent;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class JSFMetaBridgeBootstrap implements ServletContextListener
+{
+
+ /** . */
+ private static final Logger log = Logger.getLogger(JSFMetaBridgeBootstrap.class);
+
+ /** . */
+ private ServletContextListener listener;
+
+ public void contextInitialized(ServletContextEvent event)
+ {
+ String servletContextListenerClassName = "org.apache.myfaces.webapp.StartupServletContextListener";
+
+ //
+ //
+ try
+ {
+ Class bridgeClass = Thread.currentThread().getContextClassLoader().loadClass(servletContextListenerClassName);
+ log.debug("Obtain bridge bootstrap class " + bridgeClass.getName());
+ listener = (ServletContextListener)bridgeClass.newInstance();
+ }
+ catch (ClassNotFoundException e)
+ {
+ // It is not an error, this happens when we run with Sun RI
+ log.debug("Bridge bootstrap not available " + servletContextListenerClassName, e);
+ }
+ catch (IllegalAccessException e)
+ {
+ log.error("Bridge bootstrap not accessible " + servletContextListenerClassName, e);
+ }
+ catch (InstantiationException e)
+ {
+ log.error("Bridge bootstrap not instantiable " + servletContextListenerClassName, e);
+ }
+
+ //
+ if (listener != null)
+ {
+ log.debug("About to initialize the bridge bootstrap");
+ listener.contextInitialized(event);
+ }
+ }
+
+ public void contextDestroyed(ServletContextEvent event)
+ {
+ if (listener != null)
+ {
+ log.debug("About to destroy the bridge bootstrap");
+ listener.contextDestroyed(event);
+ }
+ }
+}
Added: trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeFactory.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeFactory.java (rev 0)
+++ trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgeFactory.java 2007-05-23 15:49:45 UTC (rev 7315)
@@ -0,0 +1,68 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.faces.portlet;
+
+import org.apache.log4j.Logger;
+
+import javax.faces.FactoryFinder;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class JSFMetaBridgeFactory
+{
+
+ /** . */
+ private static final Logger log = Logger.getLogger(JSFMetaBridgeFactory.class);
+
+ public static JSFMetaBridge getMetaBridge()
+ {
+ JSFMetaBridge metaBridge = null;
+
+ //
+ String className = FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY).getClass().getName();
+ if ("com.sun.faces.application.ApplicationFactoryImpl".equals(className))
+ {
+ metaBridge = JSFMetaBridge.SUN_JSF;
+ }
+ else if ("org.apache.myfaces.application.ApplicationFactoryImpl".equals(className))
+ {
+ metaBridge = JSFMetaBridge.MYFACES_JSF;
+ }
+
+ //
+ if (metaBridge != null)
+ {
+ log.debug("Detected JSF bridge " + metaBridge.getName());
+ }
+ else
+ {
+ log.warn("No bridge detected for application factory " + className);
+ }
+
+ //
+ return metaBridge;
+ }
+
+}
Modified: trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortlet.java
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortlet.java 2007-05-23 12:35:12 UTC (rev 7314)
+++ trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortlet.java 2007-05-23 15:49:45 UTC (rev 7315)
@@ -32,7 +32,6 @@
import javax.portlet.PortletSecurityException;
import javax.portlet.RenderRequest;
import javax.portlet.RenderResponse;
-import javax.faces.FactoryFinder;
import java.io.IOException;
/**
@@ -48,66 +47,56 @@
private static final Logger log = Logger.getLogger(JSFMetaBridgePortlet.class);
/** . */
- private Portlet bridge;
+ private Portlet bridgePortlet;
public void init(PortletConfig config) throws PortletException
{
- BridgeInfo bridgeInfo;
- String className = FactoryFinder.getFactory(FactoryFinder.APPLICATION_FACTORY).getClass().getName();
- if ("com.sun.faces.application.ApplicationFactoryImpl".equals(className))
+ JSFMetaBridge metaBridge = JSFMetaBridgeFactory.getMetaBridge();
+
+ //
+ if (metaBridge == null)
{
- bridgeInfo = BridgeInfo.SUN_JSF;
+ throw new PortletException("No bridge meta data available");
}
- else if ("org.apache.myfaces.application.ApplicationFactoryImpl".equals(className))
- {
- bridgeInfo = BridgeInfo.MYFACES_JSF;
- }
- else
- {
- throw new PortletException("No bridge detected for application factory " + className);
- }
//
- log.debug("Detected JSF bridge " + bridgeInfo.getName());
-
- //
try
{
- Class bridgeClass = Thread.currentThread().getContextClassLoader().loadClass(bridgeInfo.getPortletClassName());
+ Class bridgeClass = Thread.currentThread().getContextClassLoader().loadClass(metaBridge.getPortletClassName());
log.debug("Obtain bridge class " + bridgeClass.getName());
- bridge = (Portlet)bridgeClass.newInstance();
+ bridgePortlet = (Portlet)bridgeClass.newInstance();
}
catch (ClassNotFoundException e)
{
- log.error("Bridge class not available " + bridgeInfo.getPortletClassName(), e);
+ log.error("Bridge class not available " + metaBridge.getPortletClassName(), e);
}
catch (IllegalAccessException e)
{
- log.error("Bridge class not accessible", e);
+ log.error("Bridge class not accessible" + metaBridge.getPortletClassName(), e);
}
catch (InstantiationException e)
{
- log.error("Bridge class not instantiable", e);
+ log.error("Bridge class not instantiable" + metaBridge.getPortletClassName(), e);
}
- //
- PortletConfig bridgeConfig = new BridgePortletConfig(config, bridgeInfo);
- bridge.init(bridgeConfig);
+ // Proceed to life cycle
+ PortletConfig bridgeConfig = new JSFMetaBridgePortletConfig(config, metaBridge);
+ bridgePortlet.init(bridgeConfig);
}
public void processAction(ActionRequest request, ActionResponse response) throws PortletException, PortletSecurityException, IOException
{
- bridge.processAction(request, response);
+ bridgePortlet.processAction(request, response);
}
public void render(RenderRequest request, RenderResponse response) throws PortletException, PortletSecurityException, IOException
{
- bridge.render(request, response);
+ bridgePortlet.render(request, response);
}
public void destroy()
{
- bridge.destroy();
- bridge = null;
+ bridgePortlet.destroy();
+ bridgePortlet = null;
}
}
Copied: trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortletConfig.java (from rev 7310, trunk/faces/src/main/org/jboss/portal/faces/portlet/BridgePortletConfig.java)
===================================================================
--- trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortletConfig.java (rev 0)
+++ trunk/faces/src/main/org/jboss/portal/faces/portlet/JSFMetaBridgePortletConfig.java 2007-05-23 15:49:45 UTC (rev 7315)
@@ -0,0 +1,93 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2006, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.faces.portlet;
+
+import org.jboss.portal.common.util.Tools;
+
+import javax.portlet.PortletConfig;
+import javax.portlet.PortletContext;
+import java.util.ResourceBundle;
+import java.util.Locale;
+import java.util.Enumeration;
+import java.util.List;
+
+/**
+ * Wrapper of a portlet config that provides translations of init parameters for the target bridge.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 1.1 $
+ */
+public class JSFMetaBridgePortletConfig implements PortletConfig
+{
+
+ /** . */
+ private final PortletConfig delegate;
+
+ /** . */
+ private final JSFMetaBridge metaBridge;
+
+ public JSFMetaBridgePortletConfig(PortletConfig delegate, JSFMetaBridge metaBridge)
+ {
+ this.delegate = delegate;
+ this.metaBridge = metaBridge;
+ }
+
+ public String getPortletName()
+ {
+ return delegate.getPortletName();
+ }
+
+ public PortletContext getPortletContext()
+ {
+ return delegate.getPortletContext();
+ }
+
+ public ResourceBundle getResourceBundle(Locale locale)
+ {
+ return delegate.getResourceBundle(locale);
+ }
+
+ public String getInitParameter(String name) throws IllegalArgumentException
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ if (metaBridge.getInitParamViewName().equals(name))
+ {
+ return delegate.getInitParameter("VIEW");
+ }
+
+ //
+ return delegate.getInitParameter(name);
+ }
+
+ public Enumeration getInitParameterNames()
+ {
+ List names = Tools.toList(delegate.getInitParameterNames());
+ names.add(metaBridge.getInitParamViewName());
+ return Tools.toEnumeration(names.iterator());
+ }
+}
Modified: trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml 2007-05-23 12:35:12 UTC (rev 7314)
+++ trunk/wsrp/src/resources/portal-wsrp-war/WEB-INF/web.xml 2007-05-23 15:49:45 UTC (rev 7315)
@@ -158,9 +158,10 @@
<load-on-startup>1</load-on-startup>
</servlet>
- <!-- Bootstrap MyFaces -->
+ <!-- The JSF meta bridge bootstrap -->
<listener>
- <listener-class>org.apache.myfaces.webapp.StartupServletContextListener</listener-class>
+ <display-name> Faces Meta Bridge Bootstrap</display-name>
+ <listener-class>org.jboss.portal.faces.portlet.JSFMetaBridgeBootstrap</listener-class>
</listener>
</web-app>
18 years, 11 months
JBoss Portal SVN: r7314 - trunk/core/src/main/org/jboss/portal/core/controller/ajax.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2007-05-23 08:35:12 -0400 (Wed, 23 May 2007)
New Revision: 7314
Modified:
trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
Log:
minor update of ajax response handler
Modified: trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2007-05-23 12:25:16 UTC (rev 7313)
+++ trunk/core/src/main/org/jboss/portal/core/controller/ajax/AjaxResponseHandler.java 2007-05-23 12:35:12 UTC (rev 7314)
@@ -69,6 +69,7 @@
import org.jboss.portal.theme.page.WindowResult;
import org.jboss.portal.theme.page.WindowContext;
import org.jboss.portal.theme.page.Region;
+import org.apache.log4j.Logger;
import java.io.StringWriter;
import java.util.Set;
@@ -116,6 +117,9 @@
// }
/** . */
+ private static final Logger log = Logger.getLogger(AjaxResponseHandler.class);
+
+ /** . */
private PortalObjectContainer portalObjectContainer;
/** . */
@@ -254,15 +258,8 @@
ctx.applyChanges();
//
- if (fullRefresh)
+ if (!fullRefresh)
{
- ViewPageCommand rpc = new ViewPageCommand(page.getId());
- String url = controllerContext.renderURL(rpc, null, null);
- UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(url);
- return new AjaxResponse(dresp);
- }
- else
- {
ArrayList windowToRefresh = new ArrayList();
for (Iterator i = page.getChildren(PortalObject.WINDOW_MASK).iterator();i.hasNext();)
{
@@ -347,13 +344,25 @@
}
catch (Exception e)
{
- e.printStackTrace();
+ log.error("An error occured during the computation of window markup", e);
+
+ //
+ fullRefresh = true;
}
}
//
- return new AjaxResponse(updatePage);
+ if (!fullRefresh)
+ {
+ return new AjaxResponse(updatePage);
+ }
}
+
+ // We perform a full refresh
+ ViewPageCommand rpc = new ViewPageCommand(page.getId());
+ String url = controllerContext.renderURL(rpc, null, null);
+ UpdatePageLocationResponse dresp = new UpdatePageLocationResponse(url);
+ return new AjaxResponse(dresp);
}
else
{
18 years, 11 months
JBoss Portal SVN: r7313 - trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-05-23 08:25:16 -0400 (Wed, 23 May 2007)
New Revision: 7313
Modified:
trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml
Log:
- Added explicit ProducerInfo properties type to solve an issue with Hibernate 3.2.3 (plus it should have been there to start with).
Modified: trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml
===================================================================
--- trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml 2007-05-23 12:18:02 UTC (rev 7312)
+++ trunk/wsrp/src/resources/portal-wsrp-sar/conf/consumer/hibernate/domain.hbm.xml 2007-05-23 12:25:16 UTC (rev 7313)
@@ -28,7 +28,7 @@
<hibernate-mapping>
<class name="org.jboss.portal.wsrp.consumer.ProducerInfo" table="JBP_PRODUCER_INFO">
<cache usage="@portal.hibernate.cache.usage@"/>
- <id name="key" column="PK" access="field">
+ <id name="key" column="PK" access="field" type="java.lang.Long">
<generator class="native">
<param name="sequence">wsrpconsumer_seq</param>
</generator>
@@ -47,9 +47,9 @@
not-null="false"
cascade="all"
lazy="false"/>
- <property name="expirationCacheSeconds" column="EXPIRATION_CACHE_SECONDS"/>
- <property name="active" not-null="true"/>
- <property name="id" not-null="true" unique="true"/>
+ <property name="expirationCacheSeconds" column="EXPIRATION_CACHE_SECONDS" type="java.lang.Integer"/>
+ <property name="active" not-null="true" type="boolean"/>
+ <property name="id" not-null="true" unique="true" type="java.lang.String"/>
</class>
<class name="org.jboss.portal.wsrp.consumer.EndpointConfigurationInfo" table="JBP_ENDPOINT_INFO">
18 years, 11 months
JBoss Portal SVN: r7312 - trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-05-23 08:18:02 -0400 (Wed, 23 May 2007)
New Revision: 7312
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
Log:
JBPORTAL-1452: The "Security" and "Preferences" actions show their screens below the portlet instance list
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-05-23 12:14:46 UTC (rev 7311)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/instances.xhtml 2007-05-23 12:18:02 UTC (rev 7312)
@@ -10,6 +10,8 @@
<ui:define name="content">
+ <c:if test="#{instancemgr.selectedPlugin == null}">
+
<h:form>
<table id="instancesTable2" width="100%">
@@ -58,6 +60,7 @@
</ul>
</h:form>
+ </c:if>
<c:if test="#{instancemgr.selectedPlugin != null}">
18 years, 11 months
JBoss Portal SVN: r7311 - trunk/wsrp/src/main/org/jboss/portal/wsrp/services.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2007-05-23 08:14:46 -0400 (Wed, 23 May 2007)
New Revision: 7311
Modified:
trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
Log:
- Added close implementation for AS 4.2 (uses WSDL4j 1.6+) compatibility.
Modified: trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java
===================================================================
--- trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-05-23 12:08:55 UTC (rev 7310)
+++ trunk/wsrp/src/main/org/jboss/portal/wsrp/services/RemoteSOAPInvokerServiceFactory.java 2007-05-23 12:14:46 UTC (rev 7311)
@@ -202,6 +202,11 @@
this.wsdlURL = wsdlFile;
}
+ public void close()
+ {
+ // nothing to do since we don't hold any resources
+ }
+
public InputSource getBaseInputSource()
{
log.info("getBaseInputSource [wsdlUrl=" + wsdlURL + "]");
18 years, 11 months
JBoss Portal SVN: r7310 - trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2007-05-23 08:08:55 -0400 (Wed, 23 May 2007)
New Revision: 7310
Modified:
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageTheme.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalTheme.xhtml
trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindowTheme.xhtml
Log:
JBPORTAL-1444: The "Please set the display options for the portal: " label at the top of the screen should be replaced with the title "Theme Properties".
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageTheme.xhtml 2007-05-23 10:33:40 UTC (rev 7309)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPageTheme.xhtml 2007-05-23 12:08:55 UTC (rev 7310)
@@ -5,9 +5,7 @@
xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="objectTemplate.xhtml">
<ui:define name="content">
- <h3>Please set the display options for the page:
- <h:outputText value="#{portalobjectmgr.selectedObject.name}"/>
- </h3>
+ <h3>Page theme properties:</h3>
<ui:decorate template="common/editTheme.xhtml">
<ui:define name="form_submit">
<h:form>
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalTheme.xhtml 2007-05-23 10:33:40 UTC (rev 7309)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editPortalTheme.xhtml 2007-05-23 12:08:55 UTC (rev 7310)
@@ -7,8 +7,7 @@
<ui:composition template="objectTemplate.xhtml">
<ui:define name="content">
-
- <h3>Please set the display options for the portal: <h:outputText value="#{portalobjectmgr.selectedObject.name}"/></h3>
+ <h3>Portal theme properties:</h3>
<p>The settings defined here will be applied to the whole portal including all the pages and windows unless they have been assigned with different settings</p>
<br/>
<ui:decorate template="common/editTheme.xhtml">
Modified: trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindowTheme.xhtml
===================================================================
--- trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindowTheme.xhtml 2007-05-23 10:33:40 UTC (rev 7309)
+++ trunk/core-admin/src/resources/portal-admin-war/WEB-INF/jsf/editWindowTheme.xhtml 2007-05-23 12:08:55 UTC (rev 7310)
@@ -5,9 +5,7 @@
xmlns:f="http://java.sun.com/jsf/core">
<ui:composition template="objectTemplate.xhtml">
<ui:define name="content">
- <h3>Please set the display options for the window:
- <h:outputText value="#{portalobjectmgr.selectedObject.name}"/>
- </h3>
+ <h3>Window theme properties:</h3>
<ui:decorate template="common/editWindowTheme.xhtml">
<ui:define name="form_submit">
<h:form>
18 years, 11 months
JBoss Portal SVN: r7309 - trunk/build.
by portal-commits@lists.jboss.org
Author: bdaw
Date: 2007-05-23 06:33:40 -0400 (Wed, 23 May 2007)
New Revision: 7309
Modified:
trunk/build/build.xml
Log:
deploy-all target to deploy them all :)
Modified: trunk/build/build.xml
===================================================================
--- trunk/build/build.xml 2007-05-23 10:22:32 UTC (rev 7308)
+++ trunk/build/build.xml 2007-05-23 10:33:40 UTC (rev 7309)
@@ -286,6 +286,34 @@
<delete file="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar"/>
</target>
+ <target name="deploy-all"
+ description="Deploy all archives."
+ depends="most">
+ <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+ <copy file="../core/output/lib/jboss-portal.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <copy file="../core-admin/output/lib//portal-admin.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <copy file="../core-cms/output/lib/portal-cms.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <copy file="../core-management/output/lib/portal-management.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <copy file="../core-samples/output/lib/portal-samples.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <!--<copy file="../core-search/output/lib/portal-search.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>-->
+ <copy file="../widget/output/lib/widget.war" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ <copy file="../wsrp/output/lib/portal-wsrp.sar" todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true"/>
+ </target>
+
+ <target name="undeploy-all"
+ description="Deploy all archives."
+ depends="init">
+ <require file="${jboss.home}/server/${portal.deploy.dir}"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar"/>
+ <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-search.sar"/>-->
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/widget.war"/>
+ <delete file="${jboss.home}/server/${portal.deploy.dir}/portal-wsrp.sar"/>
+ </target>
+
<target name="exploded-deploy"
description="Deploy exploded sar."
depends="main">
18 years, 11 months