JBoss Portal SVN: r9708 - in modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src: main/org/jboss/portal/identity/sso/cas and 1 other directories.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-02-01 17:58:18 -0500 (Fri, 01 Feb 2008)
New Revision: 9708
Modified:
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/etc/cas/context.xml
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/main/org/jboss/portal/identity/sso/cas/CASAuthenticationValve.java
modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/main/org/jboss/portal/identity/sso/josso/JOSSOLogoutValve.java
Log:
JBPORTAL-1848 - Portal CAS integration does not invalidate the CAS token
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/etc/cas/context.xml
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/etc/cas/context.xml 2008-02-01 21:41:57 UTC (rev 9707)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/etc/cas/context.xml 2008-02-01 22:58:18 UTC (rev 9708)
@@ -2,6 +2,7 @@
<Context>
<Valve className="org.jboss.portal.identity.sso.cas.CASAuthenticationValve"
casLogin="https://localhost/cas/login"
+ casLogout="https://localhost/cas/logout"
casValidate="https://localhost/cas/serviceValidate"
casServerName="localhost"
authType="FORM"
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/main/org/jboss/portal/identity/sso/cas/CASAuthenticationValve.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/main/org/jboss/portal/identity/sso/cas/CASAuthenticationValve.java 2008-02-01 21:41:57 UTC (rev 9707)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/main/org/jboss/portal/identity/sso/cas/CASAuthenticationValve.java 2008-02-01 22:58:18 UTC (rev 9708)
@@ -144,6 +144,9 @@
// Configuration state
/** Secure URL whereat CAS offers its login service. */
private String casLogin;
+
+ /**Secure URL to perfrom CAS signout */
+ private String casLogout;
/** Secure URL whereat CAS offers its CAS 2.0 validate service */
private String casValidate;
@@ -202,9 +205,27 @@
{
this.casLogin = casLogin;
}
+
+ /**
+ *
+ * @return
+ */
+ public String getCasLogout()
+ {
+ return casLogout;
+ }
/**
*
+ * @param casLogout
+ */
+ public void setCasLogout(String casLogout)
+ {
+ this.casLogout = casLogout;
+ }
+
+ /**
+ *
* @return
*/
public String getCasServerName()
@@ -282,7 +303,8 @@
ServletException
{
HttpServletRequest httpRequest = (HttpServletRequest) request;
- HttpSession session = httpRequest.getSession();
+ HttpSession session = httpRequest.getSession();
+ request.setAttribute("ssoEnabled", "true");
String requestURI = request.getRequestURI();
if (isSecuredURI(requestURI)
@@ -300,39 +322,47 @@
&& session.getAttribute(CAS_FILTER_USER) == null)
{
CASReceipt receipt = null;
+ boolean skip = false;
try
{
receipt = getAuthenticatedUser(httpRequest);
}
catch (CASAuthenticationException e)
{
- throw new ServletException(e);
+ skip = true;
}
- if (!isReceiptAcceptable(receipt))
+ if (!skip && !isReceiptAcceptable(receipt))
{
- throw new ServletException(
- "Authentication was technically successful but rejected as a matter of policy. ["
- + receipt + "]");
+ skip = true;
}
- session.setAttribute(CAS_FILTER_USER, receipt.getUserName());
- session.setAttribute(CAS_FILTER_RECEIPT, receipt);
-
- // perform the portal JAAS authentication
- String user = receipt.getUserName();
- request.setAttribute("ssoSuccess", new Boolean(true));
- Principal principal = ((Context) this.container).getRealm()
- .authenticate(user, (String) null);
- if (principal != null)
+ if(!skip)
{
- this.register(request, response, principal, this.authType, user,
- (String) null);
+ session.setAttribute(CAS_FILTER_USER, receipt.getUserName());
+ session.setAttribute(CAS_FILTER_RECEIPT, receipt);
+
+ // perform the portal JAAS authentication
+ String user = receipt.getUserName();
+ request.setAttribute("ssoSuccess", new Boolean(true));
+ Principal principal = ((Context) this.container).getRealm()
+ .authenticate(user, (String) null);
+ if (principal != null)
+ {
+ this.register(request, response, principal, this.authType, user,
+ (String) null);
+ }
}
}
// continue processing the request
this.getNext().invoke(request, response);
+
+ //Perform a logout on the CAS SSO Session
+ if(request.getAttribute("org.jboss.portal.logout") != null)
+ {
+ response.sendRedirect(this.casLogout);
+ }
}
/**
Modified: modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/main/org/jboss/portal/identity/sso/josso/JOSSOLogoutValve.java
===================================================================
--- modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/main/org/jboss/portal/identity/sso/josso/JOSSOLogoutValve.java 2008-02-01 21:41:57 UTC (rev 9707)
+++ modules/identity/branches/JBP_IDENTITY_BRANCH_1_0/sso/src/main/org/jboss/portal/identity/sso/josso/JOSSOLogoutValve.java 2008-02-01 22:58:18 UTC (rev 9708)
@@ -45,7 +45,8 @@
public void invoke(Request request, Response response) throws IOException,
ServletException
{
- HttpServletRequest httpRequest = (HttpServletRequest) request;
+ HttpServletRequest httpRequest = (HttpServletRequest) request;
+ request.setAttribute("ssoEnabled", "true");
Cookie jossoPortalCookie = this.findJOSSOPortalLogoutCookie(httpRequest);
if(jossoPortalCookie != null)
16 years, 8 months
JBoss Portal SVN: r9707 - modules/identity/trunk/sso/src/etc/cas.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-02-01 16:41:57 -0500 (Fri, 01 Feb 2008)
New Revision: 9707
Removed:
modules/identity/trunk/sso/src/etc/cas/jboss-service.xml
Log:
build cleanup
Deleted: modules/identity/trunk/sso/src/etc/cas/jboss-service.xml
===================================================================
--- modules/identity/trunk/sso/src/etc/cas/jboss-service.xml 2008-02-01 21:13:10 UTC (rev 9706)
+++ modules/identity/trunk/sso/src/etc/cas/jboss-service.xml 2008-02-01 21:41:57 UTC (rev 9707)
@@ -1,1343 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
- ~ 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. ~
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
-
-<server>
-
- <!-- Server configuration service -->
- <mbean
- code="org.jboss.portal.server.config.ServerConfigService"
- name="portal:service=ServerConfig"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="ConfigLocation">conf/config.xml</attribute>
- </mbean>
-
- <!-- DTD repository -->
- <mbean
- code="org.jboss.portal.server.impl.xml.EntityResolverService"
- name="portal:service=EntityResolver"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="DTDMapping">
- <properties>
- <entry key="-//JBoss Portal//DTD JBoss Portlet 2.6//EN">dtd/jboss-portlet_2_6.dtd</entry>
- <entry key="-//JBoss Portal//DTD JBoss App 2.6//EN">dtd/jboss-app_2_6.dtd</entry>
- <entry key="-//JBoss Portal//DTD Portal Object 2.6//EN">dtd/portal-object_2_6.dtd</entry>
- <entry key="-//JBoss Portal//DTD Portlet Instances 2.6//EN">dtd/portlet-instances_2_6.dtd</entry>
- </properties>
- </attribute>
- </mbean>
-
- <!-- Runtime context for running portlet container -->
- <mbean
- code="org.jboss.portal.web.jboss.JBossWebContext"
- name="portal:service=ServletContainerFactory"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
-
- <!-- Portal security services-->
- <mbean
- code="org.jboss.portal.security.impl.JBossAuthorizationDomainRegistryImpl"
- name="portal:service=AuthorizationDomainRegistry"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.security.impl.jacc.JACCPortalAuthorizationManagerFactory"
- name="portal:service=PortalAuthorizationManagerFactory"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="AuthorizationDomainRegistry"
- proxy-type="attribute">portal:service=AuthorizationDomainRegistry</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.impl.security.JBossPortletSecurityService"
- name="portal:service=PortletSecurityService"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PortalAuthorizationManagerFactory"
- proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
- <depends
- optional-attribute-name="AuthorizationDomainRegistry"
- proxy-type="attribute">portal:service=AuthorizationDomainRegistry</depends>
- </mbean>
-
- <!-- Server stack -->
- <mbean
- code="org.jboss.portal.server.aspects.server.SessionLockInterceptor"
- name="portal:service=Interceptor,type=Server,name=SessionLock"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.server.TransactionInterceptor"
- name="portal:service=Interceptor,type=Server,name=Transaction"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.impl.api.user.UserEventBridgeTriggerInterceptor"
- name="portal:service=Interceptor,type=Server,name=UserEvent"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.server.aspects.server.SignOutInterceptor"
- name="portal:service=Interceptor,type=Server,name=SessionInvalidator"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="ServletContainerFactory"
- proxy-type="attribute">portal:service=ServletContainerFactory</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.server.UserInterceptor"
- name="portal:service=Interceptor,type=Server,name=User"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="CacheUser">true</attribute>
- <depends>portal:service=Module,type=IdentityServiceController</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.server.LocaleInterceptor"
- name="portal:service=Interceptor,type=Server,name=Locale"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.server.aspects.server.ContentTypeInterceptor"
- name="portal:service=Interceptor,type=Server,name=ContentType"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
- name="portal:service=InterceptorStackFactory,type=Server"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends-list optional-attribute-name="InterceptorNames">
- <depends-list-element>portal:service=Interceptor,type=Server,name=SessionLock</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Server,name=Transaction</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Server,name=UserEvent</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Server,name=SessionInvalidator</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Server,name=User</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Server,name=Locale</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Server,name=ContentType</depends-list-element>
- </depends-list>
- </mbean>
-
- <!-- Command stack -->
- <mbean
- code="org.jboss.portal.core.aspects.controller.ControlInterceptor"
- name="portal:service=Interceptor,type=Command,name=Control"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PortalControlPolicy"
- proxy-type="attribute">portal:service=ControlPolicy,type=Portal</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.controller.ResourceAcquisitionInterceptor"
- name="portal:service=Interceptor,type=Command,name=ResourceAcquisition"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.controller.ajax.AjaxInterceptor"
- name="portal:service=Interceptor,type=Command,name=Ajax"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <!--
- this tag has to be set when context root of portal-ajax is
- different by /portal-ajax path.
- Uncomment and change it if you want to change context root for portal-ajax application
- <attribute name="TargetContextPath">/portal-ajax</attribute> -->
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.controller.NavigationalStateInterceptor"
- name="portal:service=Interceptor,type=Command,name=NavigationalState"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.controller.node.PortalNodeInterceptor"
- name="portal:service=Interceptor,type=Command,name=PortalNode"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PortalAuthorizationManagerFactory"
- proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.controller.PolicyEnforcementInterceptor"
- name="portal:service=Interceptor,type=Command,name=PolicyEnforcement"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.controller.PageCustomizerInterceptor"
- name="portal:service=Interceptor,type=Command,name=PageCustomizer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="TargetContextPath">/portal-core</attribute>
- <attribute name="HeaderPath">/WEB-INF/jsp/header/header.jsp</attribute>
- <attribute name="TabsPath">/WEB-INF/jsp/header/tabs.jsp</attribute>
- <!-- Overrides the value of core.login.namespace in config.xml -->
- <!-- attribute name="LoginNamespace">dashboard</attribute -->
- <depends
- optional-attribute-name="Config"
- proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends
- optional-attribute-name="PortalAuthorizationManagerFactory"
- proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
- <depends
- optional-attribute-name="PortalObjectContainer"
- proxy-type="attribute">portal:container=PortalObject</depends>
-
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.controller.node.EventBroadcasterInterceptor"
- name="portal:service=Interceptor,type=Command,name=EventBroadcaster"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="ListenerRegistry"
- proxy-type="attribute">portal:service=ListenerRegistry</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
- name="portal:service=InterceptorStackFactory,type=Command"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends-list optional-attribute-name="InterceptorNames">
- <depends-list-element>portal:service=Interceptor,type=Command,name=ResourceAcquisition</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Command,name=Ajax</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Command,name=NavigationalState</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Command,name=PortalNode</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Command,name=PolicyEnforcement</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Command,name=PageCustomizer</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Command,name=Control</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Command,name=EventBroadcaster</depends-list-element>
- </depends-list>
- </mbean>
-
- <!-- Instance stack -->
- <mbean
- code="org.jboss.portal.core.model.instance.InstanceSecurityInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=InstanceSecurity"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends optional-attribute-name="PortalAuthorizationManagerFactory" proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.ConsumerCacheInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=ConsumerCache"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.PortalSessionSynchronizationInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=PortalSessionSynchronization"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
- name="portal:service=InterceptorStackFactory,type=Instance"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends-list optional-attribute-name="InterceptorNames">
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=ConsumerCache</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=InstanceSecurity</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=PortalSessionSynchronization</depends-list-element>
- </depends-list>
- </mbean>
-
- <!-- Producer stack -->
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.ValveInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=Valve"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.ContextTrackerInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=ContextTracker"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.SecureTransportInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=SecureTransport"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.ContextDispatcherInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=ContextDispatcher"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="ServletContainerFactory"
- proxy-type="attribute">portal:service=ServletContainerFactory</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.PortletSessionSynchronizationInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=PortletSessionSynchronization"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.bridge.BridgeInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=Bridge"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.WindowStatesInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=WindowStates"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.ModesInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=Modes"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.aspects.portlet.ProducerCacheInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=ProducerCache"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.portlet.TransactionInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=Transaction"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.portlet.HeaderInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=Header"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.aspects.portlet.AjaxInterceptor"
- name="portal:service=Interceptor,type=Portlet,name=Ajax"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.server.impl.invocation.JBossInterceptorStackFactory"
- name="portal:service=InterceptorStackFactory,type=Producer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends-list optional-attribute-name="InterceptorNames">
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=Valve</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=SecureTransport</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=ContextDispatcher</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=ContextTracker</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=PortletSessionSynchronization</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=Bridge</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=Ajax</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=ProducerCache</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=Header</depends-list-element>
- <depends-list-element>portal:service=Interceptor,type=Portlet,name=Transaction</depends-list-element>
- </depends-list>
- </mbean>
-
- <!-- Theme and layout services -->
- <mbean
- code="org.jboss.portal.theme.impl.ThemeServiceImpl"
- name="portal:service=ThemeService"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="DefaultThemeName">renaissance</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.theme.impl.LayoutServiceImpl"
- name="portal:service=LayoutService"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="DefaultLayoutName">generic</attribute>
- <attribute name="DefaultRenderSetName">divRenderer</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.theme.impl.PageServiceImpl"
- name="portal:service=PageService"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="LayoutService"
- proxy-type="attribute">portal:service=LayoutService</depends>
- <depends
- optional-attribute-name="ThemeService"
- proxy-type="attribute">portal:service=ThemeService</depends>
- </mbean>
-
- <!--
- | Uncomment in clustered mode : replicated cache for hibernate
-
- <mbean
- code="org.jboss.cache.TreeCache"
- name="portal:service=TreeCache,type=hibernate">
- <depends>jboss:service=Naming</depends>
- <depends>jboss:service=TransactionManager</depends>
- <attribute name="TransactionManagerLookupClass">org.jboss.cache.JBossTransactionManagerLookup</attribute>
- <attribute name="IsolationLevel">REPEATABLE_READ</attribute>
- <attribute name="CacheMode">REPL_SYNC</attribute>
- <attribute name="ClusterName">portal.hibernate</attribute>
- </mbean>
-
- <mbean
- code="org.jboss.portal.jems.hibernate.JBossTreeCacheProvider"
- name="portal:service=TreeCacheProvider,type=hibernate">
- <depends optional-attribute-name="CacheName">portal:service=TreeCache,type=hibernate</depends>
- </mbean>
-
- -->
-
- <!-- Session factories -->
- <mbean
- code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
- name="portal:service=Hibernate"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
- <!-- Uncomment in clustered mode : hibernate depends on its tree cache service
- <depends>portal:service=TreeCacheProvider,type=hibernate</depends>
- -->
- <attribute name="DoChecking">true</attribute>
- <attribute name="ConfigLocation">conf/hibernate/user/hibernate.cfg.xml</attribute>
- <attribute name="SetupLocation">conf/hibernate/user/setup.txt</attribute>
- <attribute name="JNDIName">java:/portal/IdentitySessionFactory</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
- name="portal:service=Hibernate,type=Instance"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
- <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
- <!-- Uncomment in clustered mode : hibernate depends on its tree cache service
- <depends>portal:service=TreeCacheProvider,type=hibernate</depends>
- -->
- <attribute name="DoChecking">true</attribute>
- <attribute name="ConfigLocation">conf/hibernate/instance/hibernate.cfg.xml</attribute>
- <attribute name="JNDIName">java:/portal/InstanceSessionFactory</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
- name="portal:service=Hibernate,type=PortalObject"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
- <!-- Uncomment in clustered mode : hibernate depends on its tree cache service
- <depends>portal:service=TreeCacheProvider,type=hibernate</depends>
- -->
- <attribute name="DoChecking">true</attribute>
- <attribute name="ConfigLocation">conf/hibernate/portal/hibernate.cfg.xml</attribute>
- <attribute name="JNDIName">java:/portal/PortalObjectSessionFactory</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.jems.hibernate.SessionFactoryBinder"
- name="portal:service=Hibernate,type=Portlet"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss.jca:service=DataSourceBinding,name=PortalDS</depends>
- <!-- Uncomment in clustered mode : hibernate depends on its tree cache service
- <depends>portal:service=TreeCacheProvider,type=hibernate</depends>
- -->
- <attribute name="DoChecking">true</attribute>
- <attribute name="ConfigLocation">conf/hibernate/portlet/hibernate.cfg.xml</attribute>
- <attribute name="JNDIName">java:/portal/PortletSessionFactory</attribute>
- </mbean>
-
- <!--Identity-->
- <mbean
- code="org.jboss.portal.identity.service.IdentityEventManagerService"
- name="portal:service=IdentityEventManager"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.identity.service.IdentityServiceControllerImpl"
- name="portal:service=Module,type=IdentityServiceController"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=Hibernate</depends>
- <depends
- optional-attribute-name="IdentityEventBroadcaster"
- proxy-type="attribute">portal:service=IdentityEventManager</depends>
- <attribute name="JndiName">java:/portal/IdentityServiceController</attribute>
- <attribute name="RegisterMBeans">true</attribute>
- <attribute name="ConfigFile">conf/identity/identity-config.xml</attribute>
- <attribute name="DefaultConfigFile">conf/identity/standardidentity-config.xml</attribute>
- </mbean>
-
- <mbean
- code="org.jboss.portal.core.impl.mail.MailModuleImpl"
- name="portal:service=Module,type=Mail"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss:service=Mail</depends>
- <depends>portal:service=Module,type=IdentityServiceController</depends>
- <attribute name="QueueCapacity">-1</attribute>
- <attribute name="Gateway">localhost</attribute>
- <attribute name="SmtpUser"></attribute>
- <attribute name="SmtpPassword"></attribute>
- <attribute name="JavaMailDebugEnabled">false</attribute>
- <attribute name="SMTPConnectionTimeout">100000</attribute>
- <attribute name="SMTPTimeout">10000</attribute>
- <attribute name="JNDIName">java:portal/MailModule</attribute>
- </mbean>
-
- <mbean
- code="org.jboss.security.auth.login.DynamicLoginConfig"
- name="portal:service=JAASLoginModule">
- <depends optional-attribute-name="LoginConfigService">jboss.security:service=XMLLoginConfig</depends>
- <depends optional-attribute-name="SecurityManagerService">jboss.security:service=JaasSecurityManager</depends>
- <attribute name="AuthConfig">conf/login-config.xml</attribute>
- </mbean>
-
- <!-- a service to schedule activity of the users -->
- <mbean
- code="org.jboss.portal.core.identity.UsersActivityStatsServiceImpl"
- name="portal:service=Module,type=UsersActivityStatsService"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <!--
- |Uncomment in clustered mode : broadcaster will spread info about user activity in cluster
-
-
- <attribute name="ActivityBroadcasterName">portal:service=HAUserActivityNotificationBroadcaster</attribute>
-
-
- -->
- </mbean>
-
- <!--
- |Uncomment in clustered mode : broadcaster will spread info about user activity in cluster
-
-
- <mbean code="org.jboss.portal.core.identity.UserActivityNotificationBroadcaster"
- name="portal:service=HAUserActivityNotificationBroadcaster">
- <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
- </mbean>
-
-
- -->
-
- <!-- Registries -->
- <mbean
- code="org.jboss.portal.portlet.impl.container.PortletApplicationRegistryImpl"
- name="portal:service=WebAppRegistry"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
-
- <!-- Listener registry -->
- <mbean
- code="org.jboss.portal.core.event.PortalEventListenerRegistryImpl"
- name="portal:service=ListenerRegistry"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
-
- <!-- The different containers -->
-
- <mbean
- code="org.jboss.portal.core.impl.model.instance.persistent.PersistentInstanceContainerContext"
- name="portal:service=InstanceContainerContext"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=Hibernate,type=Instance</depends>
- <attribute name="SessionFactoryJNDIName">java:/portal/InstanceSessionFactory</attribute>
- <attribute name="CacheNaturalId">true</attribute>
- </mbean>
-
- <mbean
- code="org.jboss.portal.core.impl.model.instance.InstanceContainerImpl"
- name="portal:container=Instance"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="ContainerContext"
- proxy-type="attribute">portal:service=InstanceContainerContext</depends>
- <depends
- optional-attribute-name="StackFactory"
- proxy-type="attribute">portal:service=InterceptorStackFactory,type=Instance</depends>
- <depends
- optional-attribute-name="PortletInvoker"
- proxy-type="attribute">portal:service=PortletInvoker,type=Federating</depends>
- <depends
- optional-attribute-name="PortalAuthorizationManagerFactory"
- proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
- <depends
- optional-attribute-name="AuthorizationDomainRegistry"
- proxy-type="attribute">portal:service=AuthorizationDomainRegistry</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.impl.model.portal.PersistentPortalObjectContainer"
- name="portal:container=PortalObject"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=Hibernate,type=PortalObject</depends>
- <depends
- optional-attribute-name="PortalAuthorizationManagerFactory"
- proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
- <depends
- optional-attribute-name="AuthorizationDomainRegistry"
- proxy-type="attribute">portal:service=AuthorizationDomainRegistry</depends>
- <depends
- optional-attribute-name="ContentProviderRegistry"
- proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
- <attribute name="SessionFactoryJNDIName">java:/portal/PortalObjectSessionFactory</attribute>
- <attribute name="CacheNaturalId">true</attribute>
- </mbean>
-
- <!-- Customization manager -->
- <mbean
- code="org.jboss.portal.core.impl.model.CustomizationManagerService"
- name="portal:service=CustomizationManager"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PortalAuthorizationManagerFactory"
- proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
- <depends
- optional-attribute-name="InstanceContainer"
- proxy-type="attribute">portal:container=Instance</depends>
- <depends
- optional-attribute-name="PortalObjectContainer"
- proxy-type="attribute">portal:container=PortalObject</depends>
- <depends>portal:service=Module,type=IdentityServiceController</depends>
- <attribute name="DashboardContextId">dashboard</attribute>
- </mbean>
-
- <!-- The content provider framework -->
- <mbean
- code="org.jboss.portal.core.impl.model.content.ContentProviderRegistryService"
- name="portal:service=ContentProviderRegistry"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.impl.model.content.portlet.InternalPortletContentProvider"
- name="portal:service=ContentRenderer,type=portlet"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="ContentType">portlet</attribute>
- <depends
- optional-attribute-name="Registry"
- proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
- <depends
- optional-attribute-name="CustomizationManager"
- proxy-type="attribute">portal:service=CustomizationManager</depends>
- <depends
- optional-attribute-name="InstanceContainer"
- proxy-type="attribute">portal:container=Instance</depends>
- <depends
- optional-attribute-name="PortalAuthorizationManagerFactory"
- proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
- </mbean>
-
- <!-- Integrate identity -->
- <mbean
- code="org.jboss.portal.core.identity.DashboardBridge"
- name="portal:service=IdentityDashboardBridge"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="IdentityEventEmitter"
- proxy-type="attribute">portal:service=IdentityEventManager</depends>
- <depends
- optional-attribute-name="CustomizationManager"
- proxy-type="attribute">portal:service=CustomizationManager</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.identity.SecurityBridge"
- name="portal:service=IdentitySecurityBridge"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="IdentityEventEmitter"
- proxy-type="attribute">portal:service=IdentityEventManager</depends>
- <depends
- optional-attribute-name="DynamicLoginConfig"
- proxy-type="attribute">portal:service=JAASLoginModule</depends>
- </mbean>
-
- <!-- Command factories -->
- <mbean
- code="org.jboss.portal.core.controller.command.mapper.DelegatingCommandFactoryService"
- name="portal:commandFactory=Delegating"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.model.portal.DefaultPortalCommandFactory"
- name="portal:commandFactory=DefaultPortal"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="NextFactory"
- proxy-type="attribute">portal:commandFactory=Delegating</depends>
- <depends
- optional-attribute-name="Container"
- proxy-type="attribute">portal:container=PortalObject</depends>
- </mbean>
-
- <mbean
- code="org.jboss.portal.core.model.portal.command.mapping.DefaultPortalObjectPathMapper"
- name="portal:service=PortalObjectPathMapper,type=Default"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Container"
- proxy-type="attribute">portal:container=PortalObject</depends>
- <attribute name="Namespace"><![CDATA[]]></attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.core.model.portal.PortalObjectCommandFactory"
- name="portal:commandFactory=PortalObject"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Mapper"
- proxy-type="attribute">portal:service=PortalObjectPathMapper,type=Default</depends>
- </mbean>
-
- <mbean
- code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
- name="portal:commandFactory=Delegate,path=portal"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Path">/portal</attribute>
- <depends
- optional-attribute-name="DelegatingFactory"
- proxy-type="attribute">portal:commandFactory=Delegating</depends>
- <depends
- optional-attribute-name="DelegateFactory"
- proxy-type="attribute">portal:commandFactory=PortalObject</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.controller.command.mapper.SignOutCommandFactoryService"
- name="portal:commandFactory=SignOut"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
- name="portal:commandFactory=Delegate,path=signout"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Path">/signout</attribute>
- <depends
- optional-attribute-name="DelegatingFactory"
- proxy-type="attribute">portal:commandFactory=Delegating</depends>
- <depends
- optional-attribute-name="DelegateFactory"
- proxy-type="attribute">portal:commandFactory=SignOut</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.model.portal.command.mapping.DashboardPortalObjectPathMapper"
- name="portal:service=PortalObjectPathMapper,type=Dashboard"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="CustomizationManager"
- proxy-type="attribute">portal:service=CustomizationManager</depends>
- <depends
- optional-attribute-name="Container"
- proxy-type="attribute">portal:container=PortalObject</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.model.portal.PortalObjectCommandFactory"
- name="portal:commandFactory=Dashboard"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Mapper"
- proxy-type="attribute">portal:service=PortalObjectPathMapper,type=Dashboard</depends>
- </mbean>
-
- <mbean
- code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
- name="portal:commandFactory=Delegate,path=dashboard"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Path">/dashboard</attribute>
- <depends
- optional-attribute-name="DelegatingFactory"
- proxy-type="attribute">portal:commandFactory=Delegating</depends>
- <depends
- optional-attribute-name="DelegateFactory"
- proxy-type="attribute">portal:commandFactory=Dashboard</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.controller.ajax.AjaxCommandFactory"
- name="portal:commandFactory=Ajax"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.controller.command.mapper.CommandFactoryDelegate"
- name="portal:commandFactory=Delegate,path=ajax"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Path">/ajax</attribute>
- <depends
- optional-attribute-name="DelegatingFactory"
- proxy-type="attribute">portal:commandFactory=Delegating</depends>
- <depends
- optional-attribute-name="DelegateFactory"
- proxy-type="attribute">portal:commandFactory=Ajax</depends>
- </mbean>
-
- <!-- URL factories -->
- <mbean
- code="org.jboss.portal.core.controller.command.mapper.DelegatingURLFactoryService"
- name="portal:urlFactory=Delegating"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.model.portal.PortalObjectURLFactory"
- name="portal:urlFactory=PortalObject,type=Default"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Namespace"><![CDATA[]]></attribute>
- <attribute name="Path">/portal</attribute>
- <depends
- optional-attribute-name="Factory"
- proxy-type="attribute">portal:urlFactory=Delegating</depends>
- <depends
- optional-attribute-name="Mapper"
- proxy-type="attribute">portal:service=PortalObjectPathMapper,type=Default</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.controller.command.mapper.SignOutURLFactory"
- name="portal:urlFactory=SignOut"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Path">/signout</attribute>
- <depends
- optional-attribute-name="Factory"
- proxy-type="attribute">portal:urlFactory=Delegating</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.model.portal.PortalObjectURLFactory"
- name="portal:urlFactory=PortalObject,type=Dashboard"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Namespace">dashboard</attribute>
- <attribute name="Path">/dashboard</attribute>
- <depends
- optional-attribute-name="Factory"
- proxy-type="attribute">portal:urlFactory=Delegating</depends>
- <depends
- optional-attribute-name="Mapper"
- proxy-type="attribute">portal:service=PortalObjectPathMapper,type=Dashboard</depends>
- </mbean>
-
- <!-- The federating portlet invoker -->
- <mbean
- code="org.jboss.portal.portlet.federation.impl.FederatingPortletInvokerService"
- name="portal:service=PortletInvoker,type=Federating"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
-
- <!-- The portlet container invoker -->
- <mbean
- code="org.jboss.portal.portlet.container.PortletContainerInvoker"
- name="portal:service=PortletInvoker,type=Container"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="StackFactory"
- proxy-type="attribute">portal:service=InterceptorStackFactory,type=Producer</depends>
- <depends
- optional-attribute-name="Registry"
- proxy-type="attribute">portal:service=WebAppRegistry</depends>
- </mbean>
-
- <!-- The producer portlet invoker -->
- <mbean
- code="org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager"
- name="portal:service=PersistenceManager,type=Producer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=Hibernate,type=Portlet</depends>
- <attribute name="SessionFactoryJNDIName">java:/portal/PortletSessionFactory</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.impl.state.StateManagementPolicyService"
- name="portal:service=StateManagementPolicy,type=Producer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="PersistLocally">true</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.portlet.impl.state.StateConverterV0"
- name="portal:service=StateConverter,type=Producer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
- <mbean
- code="org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker"
- name="portal:service=PortletInvoker,type=Producer"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PortletInvoker"
- proxy-type="attribute">portal:service=PortletInvoker,type=Container</depends>
- <depends
- optional-attribute-name="PersistenceManager"
- proxy-type="attribute">portal:service=PersistenceManager,type=Producer</depends>
- <depends
- optional-attribute-name="StateManagementPolicy"
- proxy-type="attribute">portal:service=StateManagementPolicy,type=Producer</depends>
- <depends
- optional-attribute-name="StateConverter"
- proxy-type="attribute">portal:service=StateConverter,type=Producer</depends>
- </mbean>
-
- <!-- Register the state portlet invoker on the federating portlet invoker -->
- <mbean
- code="org.jboss.portal.portlet.federation.impl.PortletInvokerRegistrationService"
- name="portal:service=PortletInvokerRegistration,id=local"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <attribute name="Id">local</attribute>
- <depends
- optional-attribute-name="PortletInvoker"
- proxy-type="attribute">portal:service=PortletInvoker,type=Producer</depends>
- <depends
- optional-attribute-name="FederatingPortletInvoker"
- proxy-type="attribute">portal:service=PortletInvoker,type=Federating</depends>
- </mbean>
-
- <!-- The classic response handler -->
- <mbean
- code="org.jboss.portal.core.controller.classic.ClassicResponseHandler"
- name="portal:service=ResponseHandler,type=Classic"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- </mbean>
-
- <!-- The ajax response handler -->
- <mbean
- code="org.jboss.portal.core.controller.ajax.AjaxResponseHandler"
- name="portal:service=ResponseHandler,type=Ajax"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PageService"
- proxy-type="attribute">portal:service=PageService</depends>
- <depends
- optional-attribute-name="PortalObjectContainer"
- proxy-type="attribute">portal:container=PortalObject</depends>
- </mbean>
-
- <!-- The response handler selector -->
- <mbean
- code="org.jboss.portal.core.controller.handler.ResponseHandlerSelector"
- name="portal:service=ResponseHandler,type=Selector"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="ClassicResponseHandler"
- proxy-type="attribute">portal:service=ResponseHandler,type=Classic</depends>
- <depends
- optional-attribute-name="AjaxResponseHandler"
- proxy-type="attribute">portal:service=ResponseHandler,type=Ajax</depends>
- </mbean>
-
- <!-- -->
- <mbean
- code="org.jboss.portal.core.model.portal.control.page.DefaultPageControlPolicy"
- name="portal:service=ControlPolicy,type=Page"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PortalObjectContainer"
- proxy-type="attribute">portal:container=PortalObject</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.core.model.portal.control.portal.DefaultPortalControlPolicy"
- name="portal:service=ControlPolicy,type=Portal"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PortalObjectContainer"
- proxy-type="attribute">portal:container=PortalObject</depends>
- </mbean>
-
- <!-- The controller -->
- <mbean
- code="org.jboss.portal.core.controller.Controller"
- name="portal:service=Controller"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="PageService"
- proxy-type="attribute">portal:service=PageService</depends>
- <depends
- optional-attribute-name="CommandFactory"
- proxy-type="attribute">portal:commandFactory=DefaultPortal</depends>
- <depends
- optional-attribute-name="URLFactory"
- proxy-type="attribute">portal:urlFactory=Delegating</depends>
- <depends
- optional-attribute-name="StackFactory"
- proxy-type="attribute">portal:service=InterceptorStackFactory,type=Command</depends>
- <depends
- optional-attribute-name="PortalObjectContainer"
- proxy-type="attribute">portal:container=PortalObject</depends>
- <depends
- optional-attribute-name="InstanceContainer"
- proxy-type="attribute">portal:container=Instance</depends>
- <depends
- optional-attribute-name="PortalAuthorizationManagerFactory"
- proxy-type="attribute">portal:service=PortalAuthorizationManagerFactory</depends>
- <depends
- optional-attribute-name="CustomizationManager"
- proxy-type="attribute">portal:service=CustomizationManager</depends>
- <depends
- optional-attribute-name="ContentRendererRegistry"
- proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
- <depends
- optional-attribute-name="ResponseHandler"
- proxy-type="attribute">portal:service=ResponseHandler,type=Selector</depends>
- <depends
- optional-attribute-name="PageControlPolicy"
- proxy-type="attribute">portal:service=ControlPolicy,type=Page</depends>
- </mbean>
-
- <!-- The controller factory -->
- <mbean
- code="org.jboss.portal.server.impl.RequestControllerFactoryImpl"
- name="portal:service=ControllerFactory"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Controller"
- proxy-type="attribute">portal:service=Controller</depends>
- </mbean>
-
- <!-- -->
- <mbean
- code="org.jboss.portal.server.impl.ServerImpl"
- name="portal:service=Server"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Config"
- proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends
- optional-attribute-name="ServletContainerFactory"
- proxy-type="attribute">portal:service=ServletContainerFactory</depends>
- </mbean>
-
- <!-- -->
- <mbean
- code="org.jboss.portal.server.deployment.jboss.ServerDeployer"
- name="portal:deployer=PortalWebApp">
- <depends>jboss.system:service=MainDeployer</depends>
- <depends>portal:container=PortalObject</depends>
- <depends>portal:container=Instance</depends>
- <depends
- optional-attribute-name="PortalServer"
- proxy-type="attribute">portal:service=Server</depends>
- </mbean>
-
- <!-- Portal object deployment factory -->
- <!--
- | Uncomment in cluster mode : have the deployment of objects run as a clustered singleton
-
- <mbean
- code="org.jboss.portal.jems.as.system.LifecycleInvoker"
- name="portal:service=Controller,target=ObjectDeploymentFactory"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss.ha:service=HASingletonDeployer,type=Barrier</depends>
- <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
- <depends>portal:container=PortalObject</depends>
- <attribute name="Target">portal:deploymentFactory=Object</attribute>
- <attribute name="OnStart">registerFactory</attribute>
- <attribute name="OnStop">unregisterFactory</attribute>
- </mbean>
-
- -->
- <mbean
- code="org.jboss.portal.core.deployment.jboss.ObjectDeploymentFactory"
- name="portal:deploymentFactory=Object"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Deployer"
- proxy-type="attribute">portal:deployer=PortalWebApp</depends>
- <depends
- optional-attribute-name="PortalObjectContainer"
- proxy-type="attribute">portal:container=PortalObject</depends>
- <depends
- optional-attribute-name="ContentProviderRegistry"
- proxy-type="attribute">portal:service=ContentProviderRegistry</depends>
- <depends
- optional-attribute-name="PortalObjectEntityResolver"
- proxy-type="attribute">portal:service=EntityResolver</depends>
- <attribute name="SetupLocation">conf/data/default-object.xml</attribute>
- <!-- Set to false in clustered mode, otherwise set to true -->
- <attribute name="RegistrationControlledByService">true</attribute>
- </mbean>
-
- <!-- -->
- <!--
- | Uncomment in cluster mode : have the creation of instances run as a clustered singleton
-
- <mbean
- code="org.jboss.portal.jems.as.system.LifecycleInvoker"
- name="portal:service=Controller,target=PortletAppDeploymentFactory"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>jboss.ha:service=HASingletonDeployer,type=Barrier</depends>
- <depends>jboss:service=${jboss.partition.name:DefaultPartition}</depends>
- <depends>portal:container=PortalObject</depends>
- <attribute name="Target">portal:deploymentFactory=PortletApp</attribute>
- <attribute name="OnStart">enableCreateInstances</attribute>
- <attribute name="OnStop">disableCreateInstances</attribute>
- </mbean>
-
- -->
- <mbean
- code="org.jboss.portal.core.deployment.jboss.PortletAppDeploymentFactory"
- name="portal:deploymentFactory=PortletApp"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <!--
- <depends>jboss.ha:service=HASingletonDeployer</depends>
- -->
- <depends>portal:service=PortletInvokerRegistration,id=local</depends>
- <depends
- optional-attribute-name="Deployer"
- proxy-type="attribute">portal:deployer=PortalWebApp</depends>
- <depends
- optional-attribute-name="WebAppRegistry"
- proxy-type="attribute">portal:service=WebAppRegistry</depends>
- <depends
- optional-attribute-name="Config"
- proxy-type="attribute">portal:service=ServerConfig</depends>
- <depends
- optional-attribute-name="PortletSecurityService"
- proxy-type="attribute">portal:service=PortletSecurityService</depends>
- <depends
- optional-attribute-name="InstanceContainer"
- proxy-type="attribute">portal:container=Instance</depends>
- <depends
- optional-attribute-name="JBossPortletEntityResolver"
- proxy-type="attribute">portal:service=EntityResolver</depends>
- <depends
- optional-attribute-name="PortalObjectEntityResolver"
- proxy-type="attribute">portal:service=EntityResolver</depends>
- <depends
- optional-attribute-name="PortletInstancesEntityResolver"
- proxy-type="attribute">portal:service=EntityResolver</depends>
- <attribute name="StandardJBossApplicationMetaDataLocation">conf/standardjboss-portlet.xml</attribute>
- <attribute name="PortletAPIFactoryClassName">org.jboss.portlet.JBossAPIFactory</attribute>
- <attribute
- name="PortletInfoFactoryClassName">org.jboss.portal.core.impl.portlet.info.CorePortletInfoFactory</attribute>
- <!-- Set to false in clustered mode, otherwise set to true -->
- <attribute name="CreateInstances">true</attribute>
- </mbean>
- <mbean
- code="org.jboss.portal.theme.deployment.jboss.LayoutDeploymentFactory"
- name="portal:deploymentFactory=Layout"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Deployer"
- proxy-type="attribute">portal:deployer=PortalWebApp</depends>
- <depends
- optional-attribute-name="LayoutService"
- proxy-type="attribute">portal:service=LayoutService</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.theme.deployment.jboss.LayoutFeaturesDeploymentFactory"
- name="portal:deploymentFactory=LayoutFeatures"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Deployer"
- proxy-type="attribute">portal:deployer=PortalWebApp</depends>
- <depends
- optional-attribute-name="LayoutService"
- proxy-type="attribute">portal:service=LayoutService</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.theme.deployment.jboss.ThemeDeploymentFactory"
- name="portal:deploymentFactory=Theme"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="Deployer"
- proxy-type="attribute">portal:deployer=PortalWebApp</depends>
- <depends
- optional-attribute-name="ThemeService"
- proxy-type="attribute">portal:service=ThemeService</depends>
- </mbean>
- <mbean
- code="org.jboss.portal.server.deployment.WebAppAdapter"
- name="portal:deployer=Adapter"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends
- optional-attribute-name="InterceptedDeployer">jboss.web:service=WebServer</depends>
- <depends
- optional-attribute-name="Deployer"
- proxy-type="attribute">portal:deployer=PortalWebApp</depends>
- <depends
- optional-attribute-name="JBossAppEntityResolver"
- proxy-type="attribute">portal:service=EntityResolver</depends>
- </mbean>
-
- <mbean
- code="org.jboss.portal.identity.sso.cas.CASAuthenticationService"
- name="portal:service=Module,type=CASAuthenticationService"
- xmbean-dd=""
- xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
- <xmbean/>
- <depends>portal:service=Module,type=IdentityServiceController</depends>
- <attribute name="HavingRole"></attribute>
- </mbean>
-
-</server>
16 years, 8 months
JBoss Portal SVN: r9706 - modules/portlet/trunk/test/src/test/resources/test.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-01 16:13:10 -0500 (Fri, 01 Feb 2008)
New Revision: 9706
Modified:
modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
Log:
- make current url listener tests more robust
Modified: modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-02-01 20:46:11 UTC (rev 9705)
+++ modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-02-01 21:13:10 UTC (rev 9706)
@@ -4,10 +4,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
-<!--
- -->
-<!--Spec TCK Assertions tests-->
-<!--
+ <!--Spec TCK Assertions tests-->
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr168-tck-dispatcher.war"/>
@@ -53,9 +50,7 @@
<property name="archiveId" value="test-jsr168-tck-windowstates.war"/>
</generic>
- -->
-<!--API Tests-->
-<!--
+ <!--API Tests-->
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr168-api-actionrequest.war"/>
@@ -109,9 +104,7 @@
<property name="archiveId" value="test-jsr168-api-windowstate.war"/>
</generic>
- -->
-<!--Ext Tests-->
-<!--
+ <!--Ext Tests-->
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr168-ext-portletconfig.war"/>
@@ -153,9 +146,7 @@
<property name="archiveId" value="test-jsr168-ext-taglib.war"/>
</generic>
- -->
-<!--Spec TCK Assertions tests-->
-<!--
+ <!--Spec TCK Assertions tests-->
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-tck-dispatcher.war"/>
@@ -188,24 +179,18 @@
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-tck-resourceserving.war"/>
</generic>
--->
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-tck-portleturl.war"/>
</generic>
-<!--
- -->
-<!--Spec API Assertions tests-->
-<!--
+ <!--Spec API Assertions tests-->
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-api-event.war"/>
</generic>
- -->
-<!--Ext Assertions tests-->
-<!--
+ <!--Ext Assertions tests-->
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-ext-portletrequests.war"/>
@@ -218,7 +203,6 @@
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-ext-dispatcher.war"/>
</generic>
--->
<!--Misc Tests-->
<!--
16 years, 8 months
JBoss Portal SVN: r9705 - in modules/portlet/trunk: portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api and 2 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-01 15:46:11 -0500 (Fri, 01 Feb 2008)
New Revision: 9705
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLRenderer.java
Modified:
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletParameterMap.java
modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/BaseURLImpl.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/CallbackQueue.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/PortletURLSnapshot.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListenerTestCase.java
modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
Log:
- make current url listener tests more robust
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletParameterMap.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletParameterMap.java 2008-02-01 20:15:37 UTC (rev 9704)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/PortletParameterMap.java 2008-02-01 20:46:11 UTC (rev 9705)
@@ -45,24 +45,28 @@
private NavigationInfo navigationInfo;
/** . */
- private Map<String, PortletParameter> entries = new HashMap<String, PortletParameter>();
+ private Map<String, PortletParameter> entries;
/** . */
- private Set<String> publicEntryRemovals = new HashSet<String>();
+ private Set<String> publicEntryRemovals;
/** . */
- private TypedMap<String, String[], String, PortletParameter> combinedMap = new TypedMap<String, String[], String, PortletParameter>(entries, keyConverter, valueConverter);
+ private TypedMap<String, String[], String, PortletParameter> combinedMap;
public PortletParameterMap(NavigationInfo navigationInfo)
{
this.navigationInfo = navigationInfo;
+ this.entries = new HashMap<String, PortletParameter>();
+ this.publicEntryRemovals = new HashSet<String>();
+ this.combinedMap = new TypedMap<String, String[], String, PortletParameter>(entries, keyConverter, valueConverter);
}
public PortletParameterMap(PortletParameterMap original)
{
this.navigationInfo = original.navigationInfo;
this.entries = new HashMap<String, PortletParameter>(original.entries);
- this.publicEntryRemovals = new HashSet<String>(publicEntryRemovals);
+ this.publicEntryRemovals = new HashSet<String>(original.publicEntryRemovals);
+ this.combinedMap = new TypedMap<String, String[], String, PortletParameter>(entries, keyConverter, valueConverter);
}
public String getParameterValue(String name)
Modified: modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/BaseURLImpl.java
===================================================================
--- modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/BaseURLImpl.java 2008-02-01 20:15:37 UTC (rev 9704)
+++ modules/portlet/trunk/portlet/src/main/java/org/jboss/portal/portlet/impl/jsr168/api/BaseURLImpl.java 2008-02-01 20:46:11 UTC (rev 9705)
@@ -26,6 +26,8 @@
import org.jboss.portal.portlet.spi.PortletInvocationContext;
import org.jboss.portal.portlet.impl.jsr168.PortletApplicationImpl;
import org.jboss.portal.common.NotYetImplemented;
+import org.jboss.portal.common.io.WriterCharWriter;
+import org.jboss.portal.common.text.EntityEncoder;
import javax.portlet.BaseURL;
import javax.portlet.PortletSecurityException;
@@ -102,12 +104,12 @@
public void write(Writer writer) throws IOException
{
- throw new NotYetImplemented();
+ writer.write(toString());
}
public void write(Writer writer, boolean b) throws IOException
{
- throw new NotYetImplemented();
+ EntityEncoder.FULL.encode(toString(), new WriterCharWriter(writer));
}
public void addProperty(String s, String s1)
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/CallbackQueue.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/CallbackQueue.java 2008-02-01 20:15:37 UTC (rev 9704)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/CallbackQueue.java 2008-02-01 20:46:11 UTC (rev 9705)
@@ -45,6 +45,11 @@
return queue.removeFirst();
}
+ public static void clear()
+ {
+ queue.clear();
+ }
+
public static int size()
{
return queue.size();
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/PortletURLSnapshot.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/PortletURLSnapshot.java 2008-02-01 20:15:37 UTC (rev 9704)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/PortletURLSnapshot.java 2008-02-01 20:46:11 UTC (rev 9705)
@@ -29,7 +29,6 @@
import javax.portlet.PortletURL;
import javax.portlet.ResourceURL;
import java.util.Map;
-import java.util.LinkedList;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
@@ -62,6 +61,9 @@
/** . */
final Map<String, String[]> parameters;
+ /** . */
+ final String cacheability;
+
public static PortletURLSnapshot createActionURL(String source, PortletURL actionURL)
{
return new PortletURLSnapshot(source, ACTION, actionURL);
@@ -82,14 +84,14 @@
return new PortletURLSnapshot(source, ACTION, portletMode, windowState, parameters);
}
- public static PortletURLSnapshot createRenderRL(String source, PortletMode portletMode, WindowState windowState, Map<String, String[]> parameters)
+ public static PortletURLSnapshot createRenderURL(String source, PortletMode portletMode, WindowState windowState, Map<String, String[]> parameters)
{
return new PortletURLSnapshot(source, RENDER, portletMode, windowState, parameters);
}
- public static PortletURLSnapshot createResourceURL(String source, Map<String, String[]> parameters)
+ public static PortletURLSnapshot createResourceURL(String source, Map<String, String[]> parameters, String cacheability)
{
- return new PortletURLSnapshot(source, parameters);
+ return new PortletURLSnapshot(source, parameters, cacheability);
}
private PortletURLSnapshot(String source, int type, PortletURL portletURL)
@@ -99,15 +101,17 @@
this.portletMode = portletURL.getPortletMode();
this.windowState = portletURL.getWindowState();
this.parameters = portletURL.getParameterMap();
+ this.cacheability = null;
}
- private PortletURLSnapshot(String source, ResourceURL portletURL)
+ private PortletURLSnapshot(String source, ResourceURL resourceURL)
{
this.source = source;
this.type = RESOURCE;
this.portletMode = null;
this.windowState = null;
- this.parameters = portletURL.getParameterMap();
+ this.parameters = resourceURL.getParameterMap();
+ this.cacheability = resourceURL.getCacheability();
}
private PortletURLSnapshot(String source, int type, PortletMode portletMode, WindowState windowState, Map<String, String[]> parameters)
@@ -117,15 +121,17 @@
this.portletMode = portletMode;
this.windowState = windowState;
this.parameters = parameters;
+ this.cacheability = null;
}
- private PortletURLSnapshot(String source, Map<String, String[]> parameters)
+ private PortletURLSnapshot(String source, Map<String, String[]> parameters, String cacheability)
{
this.source = source;
this.type = RESOURCE;
this.portletMode = null;
this.windowState = null;
this.parameters = parameters;
+ this.cacheability = cacheability;
}
public void assertEquals(PortletURLSnapshot actual)
@@ -140,7 +146,7 @@
}
if (type == RESOURCE)
{
-
+ Assert.assertEquals(cacheability, actual.cacheability);
}
else
{
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListenerTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListenerTestCase.java 2008-02-01 20:15:37 UTC (rev 9704)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListenerTestCase.java 2008-02-01 20:46:11 UTC (rev 9705)
@@ -25,11 +25,15 @@
import org.jboss.portal.unit.annotations.TestCase;
import org.jboss.portal.unit.PortletTestCase;
import org.jboss.portal.unit.PortletTestContext;
+import org.jboss.portal.unit.Assertion;
import org.jboss.portal.unit.actions.PortletRenderTestAction;
+import org.jboss.portal.unit.actions.PortletResourceTestAction;
import org.jboss.portal.test.portlet.framework.UTP1;
import org.jboss.unit.driver.DriverResponse;
import org.jboss.unit.driver.response.EndTestResponse;
import static org.jboss.unit.api.Assert.*;
+import org.jboss.unit.api.Assert;
+import org.jboss.unit.remote.driver.handler.http.response.InvokeGetResponse;
import javax.portlet.Portlet;
import javax.portlet.RenderRequest;
@@ -37,14 +41,22 @@
import javax.portlet.PortletException;
import javax.portlet.PortletURL;
import javax.portlet.PortletMode;
+import javax.portlet.ResourceURL;
+import javax.portlet.BaseURL;
+import javax.portlet.PortletRequest;
+import javax.portlet.MimeResponse;
+import javax.portlet.ResourceRequest;
+import javax.portlet.ResourceResponse;
import java.io.IOException;
+import java.io.StringWriter;
import java.util.HashMap;
+import java.util.Collections;
/**
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-@TestCase
+(a)TestCase({Assertion.JSR286_47,Assertion.JSR286_48,Assertion.JSR286_49,Assertion.JSR286_51})
public class URLGenerationListenerTestCase
{
public URLGenerationListenerTestCase(PortletTestCase seq)
@@ -53,31 +65,125 @@
{
protected DriverResponse run(Portlet portlet, RenderRequest request, RenderResponse response, PortletTestContext context) throws PortletException, IOException
{
- PortletURL actionURL = response.createActionURL();
+ test(response, URLRenderer.ToString);
+ test(response, URLRenderer.Write);
+ test(response, URLRenderer.WriteXMLEspaced);
- URLGenerationListener1.delegate = CallbackQueue.createListener("l1");
- URLGenerationListener2.delegate = CallbackQueue.createListener("l2");
-
//
- actionURL.toString();
- PortletURLSnapshot actionSnapshot1 = CallbackQueue.next();
- PortletURLSnapshot actionSnapshot2 = CallbackQueue.next();
- assertEquals(0, CallbackQueue.size());
- actionSnapshot1.assertEquals(PortletURLSnapshot.createActionURL("l1", null, null, new HashMap<String, String[]>()));
- actionSnapshot2.assertEquals(PortletURLSnapshot.createActionURL("l2", null, null, new HashMap<String, String[]>()));
+ return new InvokeGetResponse(response.createResourceURL().toString());
+ }
+ });
+ seq.bindAction(1, UTP1.RESOURCE_JOIN_POINT, new PortletResourceTestAction()
+ {
+ protected DriverResponse run(Portlet portlet, ResourceRequest request, ResourceResponse response, PortletTestContext context) throws PortletException, IOException
+ {
+ test(response, URLRenderer.ToString);
+ test(response, URLRenderer.Write);
+ test(response, URLRenderer.WriteXMLEspaced);
//
- actionURL.setPortletMode(PortletMode.EDIT);
- actionURL.toString();
- actionSnapshot1 = CallbackQueue.next();
- actionSnapshot2 = CallbackQueue.next();
- assertEquals(0, CallbackQueue.size());
- actionSnapshot1.assertEquals(PortletURLSnapshot.createActionURL("l1", PortletMode.EDIT, null, new HashMap<String, String[]>()));
- actionSnapshot2.assertEquals(PortletURLSnapshot.createActionURL("l2", PortletMode.EDIT, null, new HashMap<String, String[]>()));
-
- //
return new EndTestResponse();
}
});
}
+
+ protected DriverResponse test(MimeResponse response, URLRenderer renderer) throws PortletException, IOException
+ {
+ CallbackQueue.clear();
+ PortletURL actionURL = response.createActionURL();
+ URLGenerationListener1.delegate = CallbackQueue.createListener("l1");
+ URLGenerationListener2.delegate = CallbackQueue.createListener("l2");
+ assertEquals(0, CallbackQueue.size());
+
+ // Assert initial state
+ renderer.render(actionURL);
+ PortletURLSnapshot actionSnapshot1 = CallbackQueue.next();
+ PortletURLSnapshot actionSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ actionSnapshot1.assertEquals(PortletURLSnapshot.createActionURL("l1", null, null, new HashMap<String, String[]>()));
+ actionSnapshot2.assertEquals(PortletURLSnapshot.createActionURL("l2", null, null, new HashMap<String, String[]>()));
+
+ // Assert portlet mode change is propagated
+ actionURL.setPortletMode(PortletMode.EDIT);
+ renderer.render(actionURL);
+ actionSnapshot1 = CallbackQueue.next();
+ actionSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ actionSnapshot1.assertEquals(PortletURLSnapshot.createActionURL("l1", PortletMode.EDIT, null, new HashMap<String, String[]>()));
+ actionSnapshot2.assertEquals(PortletURLSnapshot.createActionURL("l2", PortletMode.EDIT, null, new HashMap<String, String[]>()));
+
+ // Assert parameter change is propagated
+ actionURL.setParameter("foo", "bar");
+ renderer.render(actionURL);
+ actionSnapshot1 = CallbackQueue.next();
+ actionSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ actionSnapshot1.assertEquals(PortletURLSnapshot.createActionURL("l1", PortletMode.EDIT, null, Collections.singletonMap("foo", new String[]{"bar"})));
+ actionSnapshot2.assertEquals(PortletURLSnapshot.createActionURL("l2", PortletMode.EDIT, null, Collections.singletonMap("foo", new String[]{"bar"})));
+
+ //
+ PortletURL renderURL = response.createRenderURL();
+ assertEquals(0, CallbackQueue.size());
+
+ // Assert initial state
+ renderer.render(renderURL);
+ PortletURLSnapshot renderSnapshot1 = CallbackQueue.next();
+ PortletURLSnapshot renderSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ renderSnapshot1.assertEquals(PortletURLSnapshot.createRenderURL("l1", null, null, new HashMap<String, String[]>()));
+ renderSnapshot2.assertEquals(PortletURLSnapshot.createRenderURL("l2", null, null, new HashMap<String, String[]>()));
+
+ // Assert portlet mode change is propagated
+ renderURL.setPortletMode(PortletMode.EDIT);
+ renderer.render(renderURL);
+ renderSnapshot1 = CallbackQueue.next();
+ renderSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ renderSnapshot1.assertEquals(PortletURLSnapshot.createRenderURL("l1", PortletMode.EDIT, null, new HashMap<String, String[]>()));
+ renderSnapshot2.assertEquals(PortletURLSnapshot.createRenderURL("l2", PortletMode.EDIT, null, new HashMap<String, String[]>()));
+
+ // Assert parameter change is propagated
+ renderURL.setParameter("foo", "bar");
+ renderer.render(renderURL);
+ renderSnapshot1 = CallbackQueue.next();
+ renderSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ renderSnapshot1.assertEquals(PortletURLSnapshot.createRenderURL("l1", PortletMode.EDIT, null, Collections.singletonMap("foo", new String[]{"bar"})));
+ renderSnapshot2.assertEquals(PortletURLSnapshot.createRenderURL("l2", PortletMode.EDIT, null, Collections.singletonMap("foo", new String[]{"bar"})));
+
+ //
+ ResourceURL resourceURL = response.createResourceURL();
+ assertEquals(0, CallbackQueue.size());
+
+ // Assert initial state
+ resourceURL.toString();
+ PortletURLSnapshot resourceSnapshot1 = CallbackQueue.next();
+ PortletURLSnapshot resourceSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ resourceSnapshot1.assertEquals(PortletURLSnapshot.createResourceURL("l1", new HashMap<String, String[]>(), ResourceURL.PAGE));
+ resourceSnapshot2.assertEquals(PortletURLSnapshot.createResourceURL("l2", new HashMap<String, String[]>(), ResourceURL.PAGE));
+
+ // Assert cacheability change is propagated
+ resourceURL.setCacheability(ResourceURL.PORTLET);
+ resourceURL.toString();
+ resourceSnapshot1 = CallbackQueue.next();
+ resourceSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ resourceSnapshot1.assertEquals(PortletURLSnapshot.createResourceURL("l1", new HashMap<String, String[]>(), ResourceURL.PORTLET));
+ resourceSnapshot2.assertEquals(PortletURLSnapshot.createResourceURL("l2", new HashMap<String, String[]>(), ResourceURL.PORTLET));
+
+ // Assert parameter change is propagated
+ resourceURL.setParameter("foo", "bar");
+ resourceURL.toString();
+ resourceSnapshot1 = CallbackQueue.next();
+ resourceSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ resourceSnapshot1.assertEquals(PortletURLSnapshot.createResourceURL("l1", Collections.singletonMap("foo", new String[]{"bar"}), ResourceURL.PORTLET));
+ resourceSnapshot2.assertEquals(PortletURLSnapshot.createResourceURL("l2", Collections.singletonMap("foo", new String[]{"bar"}), ResourceURL.PORTLET));
+
+ //
+ return new EndTestResponse();
+ }
+
+
}
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLRenderer.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLRenderer.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLRenderer.java 2008-02-01 20:46:11 UTC (rev 9705)
@@ -0,0 +1,80 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.tck.portleturl;
+
+import static org.jboss.unit.api.Assert.createFailure;
+
+import javax.portlet.BaseURL;
+import java.io.StringWriter;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public interface URLRenderer
+{
+ String render(BaseURL url);
+
+ URLRenderer ToString = new URLRenderer()
+ {
+ public String render(BaseURL url)
+ {
+ return url.toString();
+ }
+ };
+
+ URLRenderer Write = new URLRenderer()
+ {
+ public String render(BaseURL url)
+ {
+ try
+ {
+ StringWriter s = new StringWriter();
+ url.write(s);
+ return s.toString();
+ }
+ catch (IOException e)
+ {
+ throw createFailure(e);
+ }
+ }
+ };
+
+ URLRenderer WriteXMLEspaced = new URLRenderer()
+ {
+ public String render(BaseURL url)
+ {
+ try
+ {
+ StringWriter s = new StringWriter();
+ url.write(s, false);
+ return s.toString();
+ }
+ catch (IOException e)
+ {
+ throw createFailure(e);
+ }
+ }
+ };
+}
Modified: modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml
===================================================================
--- modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-02-01 20:15:37 UTC (rev 9704)
+++ modules/portlet/trunk/test/src/test/resources/test/remote-jboss-unit.xml 2008-02-01 20:46:11 UTC (rev 9705)
@@ -4,7 +4,10 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:jboss:jboss-unit:1.0 jboss-unit_1_0.xsd">
- <!--Spec TCK Assertions tests-->
+<!--
+ -->
+<!--Spec TCK Assertions tests-->
+<!--
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr168-tck-dispatcher.war"/>
@@ -50,7 +53,9 @@
<property name="archiveId" value="test-jsr168-tck-windowstates.war"/>
</generic>
- <!--API Tests-->
+ -->
+<!--API Tests-->
+<!--
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr168-api-actionrequest.war"/>
@@ -104,7 +109,9 @@
<property name="archiveId" value="test-jsr168-api-windowstate.war"/>
</generic>
- <!--Ext Tests-->
+ -->
+<!--Ext Tests-->
+<!--
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr168-ext-portletconfig.war"/>
@@ -146,7 +153,9 @@
<property name="archiveId" value="test-jsr168-ext-taglib.war"/>
</generic>
- <!--Spec TCK Assertions tests-->
+ -->
+<!--Spec TCK Assertions tests-->
+<!--
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-tck-dispatcher.war"/>
@@ -179,18 +188,24 @@
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-tck-resourceserving.war"/>
</generic>
+-->
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-tck-portleturl.war"/>
</generic>
- <!--Spec API Assertions tests-->
+<!--
+ -->
+<!--Spec API Assertions tests-->
+<!--
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-api-event.war"/>
</generic>
- <!--Ext Assertions tests-->
+ -->
+<!--Ext Assertions tests-->
+<!--
<generic>
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-ext-portletrequests.war"/>
@@ -203,6 +218,7 @@
<class name="org.jboss.unit.remote.driver.RemoteTestDriverClient"/>
<property name="archiveId" value="test-jsr286-ext-dispatcher.war"/>
</generic>
+-->
<!--Misc Tests-->
<!--
16 years, 8 months
JBoss Portal SVN: r9704 - modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-02-01 15:15:37 -0500 (Fri, 01 Feb 2008)
New Revision: 9704
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java
Log:
- Moved PortletController.deliverEvent to PortletRequestHandler as it's only used there.
- Removed useless calls to downcastRequest in PortletRequestHandler.
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java 2008-02-01 20:04:09 UTC (rev 9703)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletController.java 2008-02-01 20:15:37 UTC (rev 9704)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.portlet.test.controller;
-import org.apache.log4j.Logger;
import org.jboss.portal.Mode;
import org.jboss.portal.WindowState;
import org.jboss.portal.common.util.MarkupInfo;
@@ -40,30 +39,23 @@
import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
import org.jboss.portal.portlet.impl.spi.AbstractUserContext;
import org.jboss.portal.portlet.impl.spi.AbstractWindowContext;
-import org.jboss.portal.portlet.info.NavigationInfo;
-import org.jboss.portal.portlet.info.ParameterInfo;
-import org.jboss.portal.portlet.invocation.EventInvocation;
import org.jboss.portal.portlet.invocation.RenderInvocation;
import org.jboss.portal.portlet.invocation.response.ErrorResponse;
import org.jboss.portal.portlet.invocation.response.FragmentResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
import org.jboss.portal.portlet.invocation.response.ResponseProperties;
-import org.jboss.portal.portlet.invocation.response.UpdateNavigationalStateResponse;
import org.jboss.portal.portlet.spi.PortalContext;
import org.jboss.portal.portlet.test.PageNavigationalState;
import org.jboss.portal.portlet.test.PortletURLRenderer;
-import org.jboss.portal.portlet.test.TestEventContext;
import org.jboss.portal.portlet.test.TestInstanceContext;
import org.jboss.portal.portlet.test.TestRenderContext;
import org.jboss.portal.portlet.test.WindowNavigationalState;
-import org.jboss.portal.portlet.test.event.Event;
import org.jboss.portal.web.IllegalRequestException;
import org.w3c.dom.Element;
import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
-import javax.xml.namespace.QName;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.UnsupportedEncodingException;
@@ -88,16 +80,10 @@
// private final boolean redirectAfterAction = true;
/** . */
- private final Logger log;
-
- /** . */
private final PortalContext portalContext;
public PortletController() throws IllegalRequestException, UnsupportedEncodingException
{
- //
- this.log = Logger.getLogger(PortletController.class);
-
Map<String, String> portalProperties = new HashMap<String, String>();
portalProperties.put("javax.portlet.markup.head.element.support", "true");
@@ -128,64 +114,6 @@
handler.handle(controllerRequest);
}
- PortletInvocationResponse deliverEvent(
- PortletControllerContext context,
- Event event,
- PageNavigationalState pageNS,
- List<Cookie> requestCookies) throws PortletInvokerException
- {
- Portlet portlet = context.getPortlet(event.getPortletContext().getId());
- HttpServletRequest req = context.getClientRequest();
- HttpServletResponse resp = context.getClientResponse();
- WindowNavigationalState windowNS = pageNS.getWindowNavigationalState(portlet.getContext().getId());
- PortletURLRenderer renderer = new PortletURLRenderer(pageNS, windowNS, portlet, req, resp);
-
- //
- if (windowNS == null)
- {
- windowNS = new WindowNavigationalState();
- }
-
- //
- ParameterMap publicNS = pageNS.getPublicNavigationalState(portlet);
-
- //
- TestInstanceContext instanceContext = new TestInstanceContext(req, portlet.getContext(), true);
- TestEventContext actionContext = new TestEventContext(
- renderer,
- windowNS.getMode(),
- windowNS.getWindowState(),
- windowNS.getPortletNavigationalState(),
- publicNS,
- MARKUP_INFO,
- event.getName(),
- event.getPayload());
- EventInvocation eventInvocation = new EventInvocation(actionContext);
-
- //
- eventInvocation.setClientContext(new AbstractClientContext(req, requestCookies));
- eventInvocation.setServerContext(new AbstractServerContext(req, resp));
- eventInvocation.setInstanceContext(instanceContext);
- eventInvocation.setUserContext(new AbstractUserContext(req));
- eventInvocation.setWindowContext(new AbstractWindowContext(portlet.getContext().getId()));
- eventInvocation.setPortalContext(getPortalContext());
- eventInvocation.setSecurityContext(new AbstractSecurityContext(req));
- eventInvocation.setTarget(instanceContext.getTarget());
-
- //
- try
- {
- return context.invoke(eventInvocation);
- }
- catch (PortletInvokerException e)
- {
- log.error("Error during event invocation", e);
-
- //
- return null;
- }
- }
-
/**
* @param context
* @param pageProperties properties that needs to be rendered on this page
@@ -382,71 +310,6 @@
}
}
- void updateNavigationalState(
- PortletControllerContext context,
- String portletId,
- UpdateNavigationalStateResponse update,
- PageNavigationalState pageState) throws PortletInvokerException
- {
- Portlet portlet = context.getPortlet(portletId);
-
- //
- WindowNavigationalState windowNS = pageState.getWindowNavigationalState(portletId);
-
- //
- if (windowNS == null)
- {
- windowNS = new WindowNavigationalState();
- }
-
- //
- Mode mode = windowNS.getMode();
- if (update.getMode() != null)
- {
- mode = update.getMode();
- }
- WindowState windowState = windowNS.getWindowState();
- if (update.getWindowState() != null)
- {
- windowState = update.getWindowState();
- }
- StateString portletNS = windowNS.getPortletNavigationalState();
- if (update.getNavigationalState() != null)
- {
- portletNS = update.getNavigationalState();
- }
- windowNS = new WindowNavigationalState(portletNS, mode, windowState);
- pageState.setWindowNavigationalState(portletId, windowNS);
-
- // Now update shared state scoped at page
- Map<String, String[]> publicNS = update.getPublicNavigationalStateUpdates();
- if (publicNS != null)
- {
- NavigationInfo navigationInfo = portlet.getInfo().getNavigation();
- Map<QName, String[]> pageNS = pageState.getPageNavigationalState();
- for (Map.Entry<String, String[]> entry : publicNS.entrySet())
- {
- String id = entry.getKey();
- ParameterInfo parameterInfo = navigationInfo.getPublicParameter(id);
-
- //
- if (parameterInfo != null)
- {
- QName name = parameterInfo.getName();
- String[] value = entry.getValue();
- if (value.length > 0)
- {
- pageNS.put(name, value);
- }
- else
- {
- pageNS.remove(name);
- }
- }
- }
- }
- }
-
PortalContext getPortalContext()
{
return portalContext;
Modified: modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java
===================================================================
--- modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java 2008-02-01 20:04:09 UTC (rev 9703)
+++ modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/PortletRequestHandler.java 2008-02-01 20:15:37 UTC (rev 9704)
@@ -10,13 +10,17 @@
import org.jboss.portal.portlet.Portlet;
import org.jboss.portal.portlet.PortletContext;
import org.jboss.portal.portlet.PortletInvokerException;
+import org.jboss.portal.portlet.StateString;
import org.jboss.portal.portlet.impl.spi.AbstractClientContext;
import org.jboss.portal.portlet.impl.spi.AbstractRequestContext;
import org.jboss.portal.portlet.impl.spi.AbstractSecurityContext;
import org.jboss.portal.portlet.impl.spi.AbstractServerContext;
import org.jboss.portal.portlet.impl.spi.AbstractUserContext;
import org.jboss.portal.portlet.impl.spi.AbstractWindowContext;
+import org.jboss.portal.portlet.info.NavigationInfo;
+import org.jboss.portal.portlet.info.ParameterInfo;
import org.jboss.portal.portlet.invocation.ActionInvocation;
+import org.jboss.portal.portlet.invocation.EventInvocation;
import org.jboss.portal.portlet.invocation.response.ErrorResponse;
import org.jboss.portal.portlet.invocation.response.HTTPRedirectionResponse;
import org.jboss.portal.portlet.invocation.response.PortletInvocationResponse;
@@ -26,16 +30,21 @@
import org.jboss.portal.portlet.test.PageNavigationalState;
import org.jboss.portal.portlet.test.PortletURLRenderer;
import org.jboss.portal.portlet.test.TestActionContext;
+import org.jboss.portal.portlet.test.TestEventContext;
import org.jboss.portal.portlet.test.TestInstanceContext;
+import org.jboss.portal.portlet.test.WindowNavigationalState;
import static org.jboss.portal.portlet.test.controller.PortletController.*;
import org.jboss.portal.portlet.test.event.Event;
import org.jboss.portal.portlet.test.event.EventControllerContext;
+import javax.servlet.http.Cookie;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
+import javax.xml.namespace.QName;
import java.io.IOException;
import java.util.LinkedList;
import java.util.List;
+import java.util.Map;
/**
* @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
@@ -58,10 +67,8 @@
return (PortletRequest)request;
}
- void processResponse(PortletRequest request, PortletInvocationResponse response) throws IOException, PortletInvokerException
+ void processResponse(PortletRequest portletRequest, PortletInvocationResponse response) throws IOException, PortletInvokerException
{
- PortletRequest portletRequest = downcastRequest(request);
-
PortletControllerContext context = portletRequest.controllerContext;
//
@@ -93,7 +100,7 @@
if (response instanceof UpdateNavigationalStateResponse)
{
UpdateNavigationalStateResponse updateResponse = (UpdateNavigationalStateResponse)response;
- controller.updateNavigationalState(context, portletRequest.portletId, updateResponse, portletRequest.pageState);
+ updateNavigationalState(context, portletRequest.portletId, updateResponse, portletRequest.pageState);
//
ResponseProperties update = updateResponse.getProperties();
@@ -122,7 +129,7 @@
Event event = eventQueue.removeFirst();
//
- PortletInvocationResponse eventResponse = controller.deliverEvent(context, event, portletRequest.pageState, requestProperties.getCookies());
+ PortletInvocationResponse eventResponse = deliverEvent(context, event, portletRequest.pageState, requestProperties.getCookies());
//
if (eventResponse instanceof UpdateNavigationalStateResponse)
@@ -130,7 +137,7 @@
UpdateNavigationalStateResponse update = (UpdateNavigationalStateResponse)eventResponse;
// Update ns
- controller.updateNavigationalState(context, event.getPortletContext().getId(), update, portletRequest.pageState);
+ updateNavigationalState(context, event.getPortletContext().getId(), update, portletRequest.pageState);
// Add events if any
for (StateResponse.Event portletEvent : update.getEvents())
@@ -197,10 +204,8 @@
controller.render(context, requestProperties, portletRequest.pageState);
}
- PortletInvocationResponse invoke(PortletRequest controllerRequest) throws PortletInvokerException
+ PortletInvocationResponse invoke(PortletRequest portletRequest) throws PortletInvokerException
{
- PortletRequest portletRequest = downcastRequest(controllerRequest);
-
PortletControllerContext context = portletRequest.controllerContext;
Portlet portlet = context.getPortlet(portletRequest.portletId);
HttpServletRequest req = context.getClientRequest();
@@ -284,4 +289,122 @@
}
}
+ private PortletInvocationResponse deliverEvent(PortletControllerContext context, Event event,
+ PageNavigationalState pageNS, List<Cookie> requestCookies)
+ throws PortletInvokerException
+ {
+ Portlet portlet = context.getPortlet(event.getPortletContext().getId());
+ HttpServletRequest req = context.getClientRequest();
+ HttpServletResponse resp = context.getClientResponse();
+ WindowNavigationalState windowNS = pageNS.getWindowNavigationalState(portlet.getContext().getId());
+ PortletURLRenderer renderer = new PortletURLRenderer(pageNS, windowNS, portlet, req, resp);
+
+ //
+ if (windowNS == null)
+ {
+ windowNS = new WindowNavigationalState();
+ }
+
+ //
+ ParameterMap publicNS = pageNS.getPublicNavigationalState(portlet);
+
+ //
+ TestInstanceContext instanceContext = new TestInstanceContext(req, portlet.getContext(), true);
+ TestEventContext actionContext = new TestEventContext(
+ renderer,
+ windowNS.getMode(),
+ windowNS.getWindowState(),
+ windowNS.getPortletNavigationalState(),
+ publicNS,
+ MARKUP_INFO,
+ event.getName(),
+ event.getPayload());
+ EventInvocation eventInvocation = new EventInvocation(actionContext);
+
+ //
+ eventInvocation.setClientContext(new AbstractClientContext(req, requestCookies));
+ eventInvocation.setServerContext(new AbstractServerContext(req, resp));
+ eventInvocation.setInstanceContext(instanceContext);
+ eventInvocation.setUserContext(new AbstractUserContext(req));
+ eventInvocation.setWindowContext(new AbstractWindowContext(portlet.getContext().getId()));
+ eventInvocation.setPortalContext(controller.getPortalContext());
+ eventInvocation.setSecurityContext(new AbstractSecurityContext(req));
+ eventInvocation.setTarget(instanceContext.getTarget());
+
+ //
+ try
+ {
+ return context.invoke(eventInvocation);
+ }
+ catch (PortletInvokerException e)
+ {
+ log.error("Error during event invocation", e);
+
+ //
+ return null;
+ }
+ }
+
+ private void updateNavigationalState(PortletControllerContext context, String portletId,
+ UpdateNavigationalStateResponse update, PageNavigationalState pageState)
+ throws PortletInvokerException
+ {
+ Portlet portlet = context.getPortlet(portletId);
+
+ //
+ WindowNavigationalState windowNS = pageState.getWindowNavigationalState(portletId);
+
+ //
+ if (windowNS == null)
+ {
+ windowNS = new WindowNavigationalState();
+ }
+
+ //
+ Mode mode = windowNS.getMode();
+ if (update.getMode() != null)
+ {
+ mode = update.getMode();
+ }
+ WindowState windowState = windowNS.getWindowState();
+ if (update.getWindowState() != null)
+ {
+ windowState = update.getWindowState();
+ }
+ StateString portletNS = windowNS.getPortletNavigationalState();
+ if (update.getNavigationalState() != null)
+ {
+ portletNS = update.getNavigationalState();
+ }
+ windowNS = new WindowNavigationalState(portletNS, mode, windowState);
+ pageState.setWindowNavigationalState(portletId, windowNS);
+
+ // Now update shared state scoped at page
+ Map<String, String[]> publicNS = update.getPublicNavigationalStateUpdates();
+ if (publicNS != null)
+ {
+ NavigationInfo navigationInfo = portlet.getInfo().getNavigation();
+ Map<QName, String[]> pageNS = pageState.getPageNavigationalState();
+ for (Map.Entry<String, String[]> entry : publicNS.entrySet())
+ {
+ String id = entry.getKey();
+ ParameterInfo parameterInfo = navigationInfo.getPublicParameter(id);
+
+ //
+ if (parameterInfo != null)
+ {
+ QName name = parameterInfo.getName();
+ String[] value = entry.getValue();
+ if (value.length > 0)
+ {
+ pageNS.put(name, value);
+ }
+ else
+ {
+ pageNS.remove(name);
+ }
+ }
+ }
+ }
+ }
}
16 years, 8 months
JBoss Portal SVN: r9703 - in modules/identity/trunk/sso: src/main/java/org/jboss/portal/identity/sso/josso and 1 other directory.
by portal-commits@lists.jboss.org
Author: sohil.shah(a)jboss.com
Date: 2008-02-01 15:04:09 -0500 (Fri, 01 Feb 2008)
New Revision: 9703
Modified:
modules/identity/trunk/sso/build.xml
modules/identity/trunk/sso/pom.xml
modules/identity/trunk/sso/src/main/java/org/jboss/portal/identity/sso/josso/JOSSOLogoutValve.java
Log:
build cleanup
Modified: modules/identity/trunk/sso/build.xml
===================================================================
--- modules/identity/trunk/sso/build.xml 2008-02-01 18:10:37 UTC (rev 9702)
+++ modules/identity/trunk/sso/build.xml 2008-02-01 20:04:09 UTC (rev 9703)
@@ -44,26 +44,30 @@
http://repository.jboss.com/cas/3.0.7/lib/casclient-lenient.jar
-->
<target name="install-cas">
+ <!-- portal-cas sar file setup -->
+ <jar destfile="target/portal-cas.sar">
+ <fileset dir="src/resources/portal-cas-sso-sar"/>
+ <fileset dir="target" includes="identity-sso-*-SNAPSHOT.jar"/>
+ <fileset file="${cas.client.jar}"/>
+ </jar>
+ <copy todir="${jboss.home}/server/${cas.deploy.dir}" overwrite="true">
+ <fileset file="target/portal-cas.sar"/>
+ </copy>
+
<!-- jboss portal integration with the CAS Authentication server -->
- <copy tofile="${JBOSS_HOME}/server/${cas.deploy.dir}/cas.war/WEB-INF/lib/portal-identity-sso-lib.jar" overwrite="true">
+ <copy tofile="${jboss.home}/server/${cas.deploy.dir}/cas.war/WEB-INF/lib/portal-identity-sso-lib.jar" overwrite="true">
<fileset dir="target" includes="identity-sso-*-SNAPSHOT.jar"/>
</copy>
- <copy todir="${JBOSS_HOME}/server/${cas.deploy.dir}/cas.war/WEB-INF" overwrite="true">
+ <copy todir="${jboss.home}/server/${cas.deploy.dir}/cas.war/WEB-INF" overwrite="true">
<fileset dir="src/etc/cas" includes="deployerConfigContext.xml"/>
</copy>
<!-- core jboss portal changes -->
- <copy todir="${JBOSS_HOME}/server/${cas.deploy.dir}/jboss-portal.sar/portal-server.war/WEB-INF" overwrite="true">
+ <copy todir="${jboss.home}/server/${cas.deploy.dir}/jboss-portal.sar/portal-server.war/WEB-INF" overwrite="true">
<fileset dir="src/etc/cas" includes="context.xml"/>
- </copy>
- <!-- jboss-service.xml override -->
- <copy todir="${JBOSS_HOME}/server/${cas.deploy.dir}/jboss-portal.sar/META-INF" overwrite="true">
- <fileset dir="src/etc/cas" includes="jboss-service.xml"/>
- </copy>
- <!-- add cas-client to jboss portal -->
- <copy todir="${JBOSS_HOME}/server/${cas.deploy.dir}/jboss-portal.sar/lib" file="${cas.client.jar}" overwrite="true"/>
+ </copy>
<!-- add portal-identity-sso-lib.jar to jboss portal -->
- <copy tofile="${JBOSS_HOME}/server/${cas.deploy.dir}/jboss-portal.sar/lib/portal-identity-sso-lib.jar" overwrite="true">
+ <copy tofile="${jboss.home}/server/${cas.deploy.dir}/jboss-portal.sar/lib/portal-identity-sso-lib.jar" overwrite="true">
<fileset dir="target" includes="identity-sso-*-SNAPSHOT.jar"/>
</copy>
</target>
@@ -77,63 +81,74 @@
It also deploys any custom configuration/dependencies into the JOSSO war file which is the
JOSSO Authentication Server
-->
- <target name="install-josso">
- <require file="${jboss.home}/server/${portal.deploy.dir}"/>
-
+ <target name="install-josso">
<!-- portal-josso sar file setup -->
- <copy todir="${jboss.home}/server/${portal.deploy.dir}" overwrite="true">
- <fileset dir="${build.lib}" includes="portal-josso.sar"/>
- </copy>
+ <jar destfile="target/portal-josso.sar">
+ <fileset dir="src/resources/portal-josso-sso-sar"/>
+ <fileset dir="target" includes="identity-sso-*-SNAPSHOT.jar"/>
+ </jar>
+ <copy todir="${jboss.home}/server/${josso.deploy.dir}" overwrite="true">
+ <fileset file="target/portal-josso.sar"/>
+ </copy>
<!-- core josso integration with JBoss AS setup -->
- <copy todir="${jboss.home}/server/${portal.deploy.dir}/../conf" overwrite="true">
- <fileset dir="${build.etc}/josso" includes="josso-agent-config.xml, josso-config.xml, login-config.xml"/>
+ <copy todir="${jboss.home}/server/${josso.deploy.dir}/../conf" overwrite="true">
+ <fileset dir="src/etc/josso" includes="josso-agent-config.xml, josso-config.xml, login-config.xml"/>
</copy>
- <copy todir="${jboss.home}/server/${portal.deploy.dir}/jbossweb-tomcat55.sar" overwrite="true">
- <fileset dir="${build.etc}/josso" includes="server.xml"/>
- <fileset dir="${josso.josso.lib}" includes="josso-1.5.jar, josso-common-1.5.jar, josso-jboss4-plugin-1.5.jar, josso-tomcat55-plugin-1.5.jar"/>
+ <copy todir="${jboss.home}/server/${josso.deploy.dir}/jbossweb-tomcat55.sar" overwrite="true">
+ <fileset dir="src/etc/josso" includes="server.xml"/>
+ <fileset file="${josso.jar}"/>
+ <fileset file="${josso-common.jar}"/>
+ <fileset file="${josso-jboss4-plugin.jar}"/>
+ <fileset file="${josso-tomcat55-plugin.jar}"/>
+ <fileset file="${commons-configuration.jar}"/>
+ <fileset file="${xmldb-common.jar}"/>
+ <fileset file="${axis.jar}"/>
+ <fileset file="${commons-discovery.jar}"/>
</copy>
<!-- jboss portal integration with the josso authentication server -->
- <copy todir="${jboss.home}/server/${portal.deploy.dir}/josso.war/WEB-INF/classes" overwrite="true">
- <fileset dir="${build.etc}/josso" includes="josso-gateway-config.xml"/>
+ <copy todir="${jboss.home}/server/${josso.deploy.dir}/josso.war/WEB-INF/classes" overwrite="true">
+ <fileset dir="src/etc/josso" includes="josso-gateway-config.xml"/>
</copy>
- <copy todir="${jboss.home}/server/${portal.deploy.dir}/josso.war/WEB-INF/lib" overwrite="true">
- <fileset dir="${build.lib}" includes="portal-identity-sso-lib.jar"/>
+ <copy tofile="${jboss.home}/server/${josso.deploy.dir}/josso.war/WEB-INF/lib/portal-identity-sso-lib.jar" overwrite="true">
+ <fileset dir="target" includes="identity-sso-*-SNAPSHOT.jar"/>
</copy>
<!-- core jboss portal changes -->
- <copy todir="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar/portal-server.war" overwrite="true">
- <fileset dir="${build.etc}/josso" includes="login.jsp, error.jsp"/>
+ <copy todir="${jboss.home}/server/${josso.deploy.dir}/jboss-portal.sar/portal-server.war" overwrite="true">
+ <fileset dir="src/etc/josso" includes="login.jsp, error.jsp"/>
</copy>
- <copy todir="${jboss.home}/server/${portal.deploy.dir}/jboss-portal.sar/portal-server.war/WEB-INF" overwrite="true">
- <fileset dir="${build.etc}/josso" includes="context.xml"/>
- </copy>
+ <copy todir="${jboss.home}/server/${josso.deploy.dir}/jboss-portal.sar/portal-server.war/WEB-INF" overwrite="true">
+ <fileset dir="src/etc/josso" includes="context.xml"/>
+ </copy>
+ <!-- add portal-identity-sso-lib.jar to jboss portal -->
+ <copy tofile="${jboss.home}/server/${josso.deploy.dir}/jboss-portal.sar/lib/portal-identity-sso-lib.jar" overwrite="true">
+ <fileset dir="target" includes="identity-sso-*-SNAPSHOT.jar"/>
+ </copy>
</target>
<!-- ================================================================== -->
<!-- Testing and Reporting. -->
<!-- ================================================================== -->
+ <!--
+ TODO: convert this to a JBoss Unit based test suite
+ -->
+ <!--
<target name="package-tests">
- <jar jarfile="${build.lib}/portal-identity-sso-test-lib.jar">
- <fileset dir="${build.classes}"/>
- <fileset dir="${build.resources}/portal-identity-test-jar"/>
+ <jar jarfile="target/portal-identity-sso-test-lib.jar">
+ <fileset dir="target/test-classes"/>
+ <fileset dir="src/resources/portal-identity-test-jar"/>
</jar>
</target>
<target name="tests" depends="package-tests">
- <execute-tests>
- <!--
- <x-sysproperty>
- <jvmarg value="-Xdebug"/>
- <jvmarg value="-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=y"/>
- </x-sysproperty>
- -->
+ <execute-tests>
<x-test>
<test todir="${test.reports}" name="org.jboss.portal.test.identity.sso.CASTestCase"/>
<test todir="${test.reports}" name="org.jboss.portal.test.identity.sso.JOSSOTestCase"/>
</x-test>
<x-classpath>
- <pathelement location="${build.lib}/portal-identity-sso-test-lib.jar"/>
+ <pathelement location="target/portal-identity-sso-test-lib.jar"/>
<path refid="jboss.microcontainer.classpath"/>
<path refid="jboss.jbossxb.classpath"/>
<path refid="jbossas/core.libs.classpath"/>
@@ -148,26 +163,27 @@
</x-classpath>
</execute-tests>
</target>
- <target name="reports">
- <mkdir dir="${build.reports}"/>
- <mkdir dir="${build.reports}/html"/>
- <property name="test.reports" value="${module.output}/tests"/>
- <junitreport todir="${build.reports}">
+ <target name="reports" depends="tests">
+ <mkdir dir="target/tests/reports"/>
+ <mkdir dir="target/tests/reports/html"/>
+ <property name="test.reports" value="target/tests/reports"/>
+ <junitreport todir="target/tests/reports/junit">
<fileset dir="${test.reports}">
<include name="TEST-*.xml"/>
</fileset>
- <report format="frames" todir="${build.reports}/html"/>
+ <report format="frames" todir="target/tests/reports/html"/>
</junitreport>
</target>
- <target name="reports-noframes">
- <mkdir dir="${build.reports}"/>
- <mkdir dir="${build.reports}/html"/>
- <property name="test.reports" value="${module.output}/tests"/>
- <junitreport todir="${build.reports}">
- <fileset dir="${test.reports}">
- <include name="TEST-*.xml"/>
- </fileset>
- <report format="noframes" todir="${build.reports}/html"/>
- </junitreport>
- </target>
+ <target name="reports-noframes" depends="tests">
+ <mkdir dir="target/tests/reports"/>
+ <mkdir dir="target/tests/reports/html"/>
+ <property name="test.reports" value="target/tests/reports"/>
+ <junitreport todir="target/tests/reports/junit">
+ <fileset dir="${test.reports}">
+ <include name="TEST-*.xml"/>
+ </fileset>
+ <report format="noframes" todir="target/tests/reports/html"/>
+ </junitreport>
+ </target>
+ -->
</project>
Modified: modules/identity/trunk/sso/pom.xml
===================================================================
--- modules/identity/trunk/sso/pom.xml 2008-02-01 18:10:37 UTC (rev 9702)
+++ modules/identity/trunk/sso/pom.xml 2008-02-01 20:04:09 UTC (rev 9703)
@@ -23,9 +23,17 @@
</dependency>
<dependency>
<groupId>josso</groupId>
+ <artifactId>josso-common</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>josso</groupId>
<artifactId>josso-tomcat55-plugin</artifactId>
</dependency>
<dependency>
+ <groupId>josso</groupId>
+ <artifactId>josso-jboss4-plugin</artifactId>
+ </dependency>
+ <dependency>
<groupId>ja-sig-cas</groupId>
<artifactId>cas-server</artifactId>
</dependency>
@@ -40,6 +48,26 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-discovery</groupId>
+ <artifactId>commons-discovery</artifactId>
+ <version>0.4</version>
+ </dependency>
+ <dependency>
+ <groupId>xmldb</groupId>
+ <artifactId>xmldb-common</artifactId>
+ <version>20021220</version>
+ </dependency>
+ <dependency>
+ <groupId>axis</groupId>
+ <artifactId>axis</artifactId>
+ <version>1.4</version>
</dependency>
</dependencies>
@@ -50,11 +78,16 @@
<artifactId>maven-antrun-extended-plugin</artifactId>
<version>1.13</version>
<executions>
+ <!--
+ Development time task for installing CAS into your local Portal setup
+ -->
+ <!--
<execution>
<id>install-cas</id>
<phase>install</phase>
<configuration>
<tasks>
+ <property name="jboss.home" value="/home/soshah/appServers/jboss-4.2.1.GA"/>
<property name="cas.deploy.dir" value="cas-01/deploy"/>
<property name="cas.client.jar" value="${settings.localRepository}/ja-sig-cas/cas-client/${version.cas}/cas-client-${version.cas}.jar"/>
<ant antfile="${basedir}/build.xml">
@@ -66,6 +99,36 @@
<goal>run</goal>
</goals>
</execution>
+ -->
+ <!--
+ Development time task for installing JOSSO into your local Portal setup
+ -->
+ <!--
+ <execution>
+ <id>install-josso</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <property name="jboss.home" value="/home/soshah/appServers/jboss-4.0.5.GA"/>
+ <property name="josso.deploy.dir" value="josso-01/deploy"/>
+ <property name="josso.jar" value="${settings.localRepository}/josso/josso/${version.josso}/josso-${version.josso}.jar"/>
+ <property name="josso-common.jar" value="${settings.localRepository}/josso/josso-common/${version.josso}/josso-common-${version.josso}.jar"/>
+ <property name="josso-tomcat55-plugin.jar" value="${settings.localRepository}/josso/josso-tomcat55-plugin/${version.josso}/josso-tomcat55-plugin-${version.josso}.jar"/>
+ <property name="josso-jboss4-plugin.jar" value="${settings.localRepository}/josso/josso-jboss4-plugin/${version.josso}/josso-jboss4-plugin-${version.josso}.jar"/>
+ <property name="commons-configuration.jar" value="${settings.localRepository}/commons-configuration/commons-configuration/1.2/commons-configuration-1.2.jar"/>
+ <property name="commons-discovery.jar" value="${settings.localRepository}/commons-discovery/commons-discovery/0.4/commons-discovery-0.4.jar"/>
+ <property name="xmldb-common.jar" value="${settings.localRepository}/xmldb/xmldb-common/20021220/xmldb-common-20021220.jar"/>
+ <property name="axis.jar" value="${settings.localRepository}/axis/axis/1.4/axis-1.4.jar"/>
+ <ant antfile="${basedir}/build.xml">
+ <target name="install-josso"/>
+ </ant>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ -->
</executions>
</plugin>
</plugins>
Modified: modules/identity/trunk/sso/src/main/java/org/jboss/portal/identity/sso/josso/JOSSOLogoutValve.java
===================================================================
--- modules/identity/trunk/sso/src/main/java/org/jboss/portal/identity/sso/josso/JOSSOLogoutValve.java 2008-02-01 18:10:37 UTC (rev 9702)
+++ modules/identity/trunk/sso/src/main/java/org/jboss/portal/identity/sso/josso/JOSSOLogoutValve.java 2008-02-01 20:04:09 UTC (rev 9703)
@@ -45,7 +45,8 @@
public void invoke(Request request, Response response) throws IOException,
ServletException
{
- HttpServletRequest httpRequest = (HttpServletRequest) request;
+ HttpServletRequest httpRequest = (HttpServletRequest) request;
+ request.setAttribute("ssoEnabled", "true");
Cookie jossoPortalCookie = this.findJOSSOPortalLogoutCookie(httpRequest);
if(jossoPortalCookie != null)
16 years, 8 months
JBoss Portal SVN: r9702 - in modules/common/trunk/common/src: main/java/org/jboss/portal/common/text and 1 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-01 13:10:37 -0500 (Fri, 01 Feb 2008)
New Revision: 9702
Added:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/EntityEncoder.java
modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/text/EntityEncoderTestCase.java
Modified:
modules/common/trunk/common/src/main/java/org/jboss/portal/common/markup/MarkupAttribute.java
modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/AbstractCharEncoder.java
modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/CharBuffer.java
modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/CharEncoder.java
Log:
- adapted the existing 2.6 entity table as a common CharEncoder
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/markup/MarkupAttribute.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/markup/MarkupAttribute.java 2008-02-01 14:07:31 UTC (rev 9701)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/markup/MarkupAttribute.java 2008-02-01 18:10:37 UTC (rev 9702)
@@ -156,7 +156,7 @@
// Patches the encoder to let '/' not being encoded
encoder = new AbstractCharEncoder()
{
- public void encode(char c, CharWriter writer) throws EncodingException
+ protected void safeEncode(char c, CharWriter writer) throws EncodingException
{
if (c == '/')
{
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/AbstractCharEncoder.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/AbstractCharEncoder.java 2008-02-01 14:07:31 UTC (rev 9701)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/AbstractCharEncoder.java 2008-02-01 18:10:37 UTC (rev 9702)
@@ -31,22 +31,88 @@
public void encode(char[] chars, int off, int len, CharWriter writer) throws EncodingException
{
- for (int i = off;i < len;i++)
+ if (chars == null)
{
- encode(chars[i], writer);
+ throw new IllegalArgumentException();
}
+ if (writer == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (off < 0)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (off + len > chars.length)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ safeEncode(chars, off, len, writer);
}
public void encode(char[] chars, CharWriter writer) throws EncodingException
{
- encode(chars, 0, chars.length, writer);
+ if (chars == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (writer == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ safeEncode(chars, writer);
}
public void encode(CharSequence s, CharWriter writer) throws EncodingException
{
+ if (s == null)
+ {
+ throw new IllegalArgumentException();
+ }
+ if (writer == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ safeEncode(s, writer);
+ }
+
+ public void encode(char c, CharWriter writer) throws EncodingException
+ {
+ if (writer == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ safeEncode(c, writer);
+ }
+
+ protected void safeEncode(char[] chars, int off, int len, CharWriter writer) throws EncodingException
+ {
+ for (int i = off;i < len;i++)
+ {
+ safeEncode(chars[i], writer);
+ }
+ }
+
+ protected void safeEncode(char[] chars, CharWriter writer) throws EncodingException
+ {
+ safeEncode(chars, 0, chars.length, writer);
+ }
+
+ protected void safeEncode(CharSequence s, CharWriter writer) throws EncodingException
+ {
for (int i = 0;i < s.length();i++)
{
- encode(s.charAt(i), writer);
+ safeEncode(s.charAt(i), writer);
}
}
+
+ protected abstract void safeEncode(char c, CharWriter writer) throws EncodingException;
}
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/CharBuffer.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/CharBuffer.java 2008-02-01 14:07:31 UTC (rev 9701)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/CharBuffer.java 2008-02-01 18:10:37 UTC (rev 9702)
@@ -23,7 +23,7 @@
package org.jboss.portal.common.text;
/**
- * A simple char buffer.
+ * A simple char buffer that implements the <code>CharWriter</code> interface
*
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 7228 $
Modified: modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/CharEncoder.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/CharEncoder.java 2008-02-01 14:07:31 UTC (rev 9701)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/CharEncoder.java 2008-02-01 18:10:37 UTC (rev 9702)
@@ -23,13 +23,48 @@
package org.jboss.portal.common.text;
/**
+ * Defines an interface for encoding chars.
+ *
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 1.1 $
*/
public interface CharEncoder
{
- void encode(char c, CharWriter writer) throws EncodingException;
- void encode(char[] chars, int off, int len, CharWriter writer) throws EncodingException;
- void encode(char[] chars, CharWriter writer) throws EncodingException;
- void encode(CharSequence s, CharWriter writer) throws EncodingException;
+ /**
+ *
+ * @param c the char to encode
+ * @param writer the writer to use
+ * @throws IllegalArgumentException if any argument is null
+ * @throws EncodingException an encoding exception
+ */
+ void encode(char c, CharWriter writer) throws IllegalArgumentException, EncodingException;
+
+ /**
+ *
+ * @param chars the chars to encode
+ * @param off the offset in the char array
+ * @param len the lenght of chars to encode
+ * @param writer the writer to use
+ * @throws IllegalArgumentException if any argument is null or if the bounds not valid in the provided array
+ * @throws EncodingException an encoding exception
+ */
+ void encode(char[] chars, int off, int len, CharWriter writer) throws IllegalArgumentException, EncodingException;
+
+ /**
+ *
+ * @param chars the chars to encode
+ * @param writer the writer to use
+ * @throws IllegalArgumentException if any argument is null
+ * @throws EncodingException an encoding exception
+ */
+ void encode(char[] chars, CharWriter writer) throws IllegalArgumentException, EncodingException;
+
+ /**
+ *
+ * @param s the sequence to encode
+ * @param writer the writer to use
+ * @throws IllegalArgumentException if any argument is null
+ * @throws EncodingException an encoding exception
+ */
+ void encode(CharSequence s, CharWriter writer) throws IllegalArgumentException, EncodingException;
}
Added: modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/EntityEncoder.java
===================================================================
--- modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/EntityEncoder.java (rev 0)
+++ modules/common/trunk/common/src/main/java/org/jboss/portal/common/text/EntityEncoder.java 2008-02-01 18:10:37 UTC (rev 9702)
@@ -0,0 +1,381 @@
+/******************************************************************************
+ * 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.common.text;
+
+/**
+ * This encoder performs lookup for converting a char to its HTML entity representation.
+ *
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class EntityEncoder extends AbstractCharEncoder
+{
+
+ protected void safeEncode(char c, CharWriter writer) throws EncodingException
+ {
+ String s = charToEntity[c];
+
+ //
+ if (s != null)
+ {
+ writer.append('&');
+ writer.append(s);
+ writer.append(';');
+ }
+ else
+ {
+ writer.append(c);
+ }
+ }
+
+ public void safeEncode(char[] chars, int off, int len, CharWriter writer) throws EncodingException
+ {
+ // The index of the last copied char
+ int previous = off;
+
+ //
+ int to = off + len;
+
+ // Perform lookup char by char
+ for (int current = off; current < to; current++)
+ {
+ // Lookup
+ String replacement = lookup(chars[current]);
+
+ // Do we have a replacement
+ if (replacement != null)
+ {
+ // We lazy create the result
+
+ // Append the previous chars if any
+ writer.append(chars, previous, current - previous);
+
+ // Append the replaced entity
+ writer.append('&').append(replacement).append(';');
+
+ // Update the previous pointer
+ previous = current + 1;
+ }
+ }
+
+ //
+ writer.append(chars, previous, chars.length - previous);
+ }
+
+ /** All HTML entities. */
+ public static final EntityEncoder FULL = new EntityEncoder();
+
+ /** All HTML entities except the HTML chars which are used to do HTML itself. */
+ public static final EntityEncoder BASIC = new BasicEntityTable();
+
+ private static class BasicEntityTable extends EntityEncoder
+ {
+ public BasicEntityTable()
+ {
+ remove('<');
+ remove('>');
+ remove('"');
+ remove('&');
+ }
+ }
+
+ /** . */
+ private String[] charToEntity = new String[65536];
+
+ protected EntityEncoder()
+ {
+ put(160, "nbsp");
+ put(161, "iexcl");
+ put(162, "cent");
+ put(163, "pound");
+ put(164, "curren");
+ put(165, "yen");
+ put(166, "brvbar");
+ put(167, "sect");
+ put(168, "uml");
+ put(169, "copy");
+ put(170, "ordf");
+ put(171, "laquo");
+ put(172, "not");
+ put(173, "shy");
+ put(174, "reg");
+ put(175, "macr");
+ put(176, "deg");
+ put(177, "plusmn");
+ put(178, "sup2");
+ put(179, "sup3");
+ put(180, "acute");
+ put(181, "micro");
+ put(182, "para");
+ put(183, "middot");
+ put(184, "cedil");
+ put(185, "sup1");
+ put(186, "ordm");
+ put(187, "raquo");
+ put(188, "frac14");
+ put(189, "frac12");
+ put(190, "frac34");
+ put(191, "iquest");
+ put(192, "Agrave");
+ put(193, "Aacute");
+ put(194, "Acirc");
+ put(195, "Atilde");
+ put(196, "Auml");
+ put(197, "Aring");
+ put(198, "AElig");
+ put(199, "Ccedil");
+ put(200, "Egrave");
+ put(201, "Eacute");
+ put(202, "Ecirc");
+ put(203, "Euml");
+ put(204, "Igrave");
+ put(205, "Iacute");
+ put(206, "Icirc");
+ put(207, "Iuml");
+ put(208, "ETH");
+ put(209, "Ntilde");
+ put(210, "Ograve");
+ put(211, "Oacute");
+ put(212, "Ocirc");
+ put(213, "Otilde");
+ put(214, "Ouml");
+ put(215, "times");
+ put(216, "Oslash");
+ put(217, "Ugrave");
+ put(218, "Uacute");
+ put(219, "Ucirc");
+ put(220, "Uuml");
+ put(221, "Yacute");
+ put(222, "THORN");
+ put(223, "szlig");
+ put(224, "agrave");
+ put(225, "aacute");
+ put(226, "acirc");
+ put(227, "atilde");
+ put(228, "auml");
+ put(229, "aring");
+ put(230, "aelig");
+ put(231, "ccedil");
+ put(232, "egrave");
+ put(233, "eacute");
+ put(234, "ecirc");
+ put(235, "euml");
+ put(236, "igrave");
+ put(237, "iacute");
+ put(238, "icirc");
+ put(239, "iuml");
+ put(240, "eth");
+ put(241, "ntilde");
+ put(242, "ograve");
+ put(243, "oacute");
+ put(244, "ocirc");
+ put(245, "otilde");
+ put(246, "ouml");
+ put(247, "divide");
+ put(248, "oslash");
+ put(249, "ugrave");
+ put(250, "uacute");
+ put(251, "ucirc");
+ put(252, "uuml");
+ put(253, "yacute");
+ put(254, "thorn");
+ put(255, "yuml");
+ put(402, "fnof");
+ put(913, "Alpha");
+ put(914, "Beta");
+ put(915, "Gamma");
+ put(916, "Delta");
+ put(917, "Epsilon");
+ put(918, "Zeta");
+ put(919, "Eta");
+ put(920, "Theta");
+ put(921, "Iota");
+ put(922, "Kappa");
+ put(923, "Lambda");
+ put(924, "Mu");
+ put(925, "Nu");
+ put(926, "Xi");
+ put(927, "Omicron");
+ put(928, "Pi");
+ put(929, "Rho");
+ put(931, "Sigma");
+ put(932, "Tau");
+ put(933, "Upsilon");
+ put(934, "Phi");
+ put(935, "Chi");
+ put(936, "Psi");
+ put(937, "Omega");
+ put(945, "alpha");
+ put(946, "beta");
+ put(947, "gamma");
+ put(948, "delta");
+ put(949, "epsilon");
+ put(950, "zeta");
+ put(951, "eta");
+ put(952, "theta");
+ put(953, "iota");
+ put(954, "kappa");
+ put(955, "lambda");
+ put(956, "mu");
+ put(957, "nu");
+ put(958, "xi");
+ put(959, "omicron");
+ put(960, "pi");
+ put(961, "rho");
+ put(962, "sigmaf");
+ put(963, "sigma");
+ put(964, "tau");
+ put(965, "upsilon");
+ put(966, "phi");
+ put(967, "chi");
+ put(968, "psi");
+ put(969, "omega");
+ put(977, "thetasym");
+ put(978, "upsih");
+ put(982, "piv");
+ put(8226, "bull");
+ put(8230, "hellip");
+ put(8242, "prime");
+ put(8243, "Prime");
+ put(8254, "oline");
+ put(8260, "frasl");
+ put(8472, "weierp");
+ put(8465, "image");
+ put(8476, "real");
+ put(8482, "trade");
+ put(8501, "alefsym");
+ put(8592, "larr");
+ put(8593, "uarr");
+ put(8594, "rarr");
+ put(8595, "darr");
+ put(8596, "harr");
+ put(8629, "crarr");
+ put(8656, "lArr");
+ put(8657, "uArr");
+ put(8658, "rArr");
+ put(8659, "dArr");
+ put(8660, "hArr");
+ put(8704, "forall");
+ put(8706, "part");
+ put(8707, "exist");
+ put(8709, "empty");
+ put(8711, "nabla");
+ put(8712, "isin");
+ put(8713, "notin");
+ put(8715, "ni");
+ put(8719, "prod");
+ put(8721, "sum");
+ put(8722, "minus");
+ put(8727, "lowast");
+ put(8730, "radic");
+ put(8733, "prop");
+ put(8734, "infin");
+ put(8736, "ang");
+ put(8743, "and");
+ put(8744, "or");
+ put(8745, "cap");
+ put(8746, "cup");
+ put(8747, "int");
+ put(8756, "there4");
+ put(8764, "sim");
+ put(8773, "cong");
+ put(8776, "asymp");
+ put(8800, "ne");
+ put(8801, "equiv");
+ put(8804, "le");
+ put(8805, "ge");
+ put(8834, "sub");
+ put(8835, "sup");
+ put(8836, "nsub");
+ put(8838, "sube");
+ put(8839, "supe");
+ put(8853, "oplus");
+ put(8855, "otimes");
+ put(8869, "perp");
+ put(8901, "sdot");
+ put(8968, "lceil");
+ put(8969, "rceil");
+ put(8970, "lfloor");
+ put(8971, "rfloor");
+ put(9001, "lang");
+ put(9002, "rang");
+ put(9674, "loz");
+ put(9824, "spades");
+ put(9827, "clubs");
+ put(9829, "hearts");
+ put(9830, "diams");
+ put(34, "quot");
+ put(38, "amp");
+ put(60, "lt");
+ put(62, "gt");
+ put(338, "OElig");
+ put(339, "oelig");
+ put(352, "Scaron");
+ put(353, "scaron");
+ put(376, "Yuml");
+ put(710, "circ");
+ put(732, "tilde");
+ put(8194, "ensp");
+ put(8195, "emsp");
+ put(8201, "thinsp");
+ put(8204, "zwnj");
+ put(8205, "zwj");
+ put(8206, "lrm");
+ put(8207, "rlm");
+ put(8211, "ndash");
+ put(8212, "mdash");
+ put(8216, "lsquo");
+ put(8217, "rsquo");
+ put(8218, "sbquo");
+ put(8220, "ldquo");
+ put(8221, "rdquo");
+ put(8222, "bdquo");
+ put(8224, "dagger");
+ put(8225, "Dagger");
+ put(8240, "permil");
+ put(8249, "lsaquo");
+ put(8250, "rsaquo");
+ put(8364, "euro");
+ }
+
+ protected final void put(int c, String entity)
+ {
+ charToEntity[c] = entity;
+ }
+
+ protected final void remove(int c)
+ {
+ charToEntity[c] = null;
+ }
+
+ /**
+ * Returns null if no entity is found or return the converted entity.
+ *
+ * @param c the char to encode
+ * @return the corresponding encoded string or null
+ */
+ public final String lookup(char c)
+ {
+ return charToEntity[c];
+ }
+}
Added: modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/text/EntityEncoderTestCase.java
===================================================================
--- modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/text/EntityEncoderTestCase.java (rev 0)
+++ modules/common/trunk/common/src/test/java/org/jboss/portal/test/common/text/EntityEncoderTestCase.java 2008-02-01 18:10:37 UTC (rev 9702)
@@ -0,0 +1,60 @@
+/******************************************************************************
+ * 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.test.common.text;
+
+import junit.framework.TestCase;
+import org.jboss.portal.common.text.EntityEncoder;
+import org.jboss.portal.common.text.CharBuffer;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class EntityEncoderTestCase extends TestCase
+{
+
+ public void testChar()
+ {
+ CharBuffer buffer = new CharBuffer();
+ EntityEncoder.FULL.encode('&', buffer);
+ assertEquals("&", buffer.asString(true));
+ EntityEncoder.FULL.encode('c', buffer);
+ assertEquals("c", buffer.asString(true));
+ }
+
+ public void testString()
+ {
+ test("&", "&");
+ test("&bar", "&bar");
+ test("foo&", "foo&");
+ test("foo&bar", "foo&bar");
+ }
+
+ private void test(String expected, String actual)
+ {
+ CharBuffer buffer = new CharBuffer();
+ EntityEncoder.FULL.encode(actual, buffer);
+ assertEquals(expected, buffer.asString());
+ }
+
+}
16 years, 8 months
JBoss Portal SVN: r9701 - modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-02-01 09:07:31 -0500 (Fri, 01 Feb 2008)
New Revision: 9701
Added:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/CallbackQueue.java
Modified:
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/PortletURLSnapshot.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener1.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener2.java
modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListenerTestCase.java
Log:
- update the url gen listener test cases to scale more in # of test cases to write
Added: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/CallbackQueue.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/CallbackQueue.java (rev 0)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/CallbackQueue.java 2008-02-01 14:07:31 UTC (rev 9701)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * 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.test.portlet.jsr286.tck.portleturl;
+
+import org.jboss.unit.api.Assert;
+
+import javax.portlet.PortletURLGenerationListener;
+import javax.portlet.PortletURL;
+import javax.portlet.ResourceURL;
+import java.util.LinkedList;
+
+/**
+ * @author <a href="mailto:julien@jboss.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class CallbackQueue
+{
+
+ /** . */
+ private static LinkedList<PortletURLSnapshot> queue = new LinkedList<PortletURLSnapshot>();
+
+ public static PortletURLSnapshot next()
+ {
+ Assert.assertTrue(queue.size() > 0);
+ return queue.removeFirst();
+ }
+
+ public static int size()
+ {
+ return queue.size();
+ }
+
+ public static PortletURLGenerationListener createListener(final String id)
+ {
+ return new PortletURLGenerationListener()
+ {
+ public void filterActionURL(PortletURL portletURL)
+ {
+ queue.addLast(PortletURLSnapshot.createActionURL(id, portletURL));
+ }
+
+ public void filterRenderURL(PortletURL portletURL)
+ {
+ queue.addLast(PortletURLSnapshot.createRenderURL(id, portletURL));
+ }
+
+ public void filterResourceURL(ResourceURL resourceURL)
+ {
+ queue.addLast(PortletURLSnapshot.createResourceURL(id, resourceURL));
+ }
+ };
+ }
+}
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/PortletURLSnapshot.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/PortletURLSnapshot.java 2008-02-01 08:10:37 UTC (rev 9700)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/PortletURLSnapshot.java 2008-02-01 14:07:31 UTC (rev 9701)
@@ -39,20 +39,6 @@
{
/** . */
- public static LinkedList<PortletURLSnapshot> queue = new LinkedList<PortletURLSnapshot>();
-
- public static PortletURLSnapshot next()
- {
- Assert.assertTrue(queue.size() > 0);
- return queue.removeFirst();
- }
-
- public static int size()
- {
- return queue.size();
- }
-
- /** . */
private static final int ACTION = 0;
/** . */
@@ -62,7 +48,7 @@
private static final int RESOURCE = 2;
/** . */
- final Class source;
+ final String source;
/** . */
final int type;
@@ -76,37 +62,37 @@
/** . */
final Map<String, String[]> parameters;
- public static PortletURLSnapshot createActionURL(Class source, PortletURL actionURL)
+ public static PortletURLSnapshot createActionURL(String source, PortletURL actionURL)
{
return new PortletURLSnapshot(source, ACTION, actionURL);
}
- public static PortletURLSnapshot createRenderURL(Class source, PortletURL renderURL)
+ public static PortletURLSnapshot createRenderURL(String source, PortletURL renderURL)
{
return new PortletURLSnapshot(source, RENDER, renderURL);
}
- public static PortletURLSnapshot createResourceURL(Class source, ResourceURL resourceURL)
+ public static PortletURLSnapshot createResourceURL(String source, ResourceURL resourceURL)
{
return new PortletURLSnapshot(source, resourceURL);
}
- public static PortletURLSnapshot createActionURL(Class source, PortletMode portletMode, WindowState windowState, Map<String, String[]> parameters)
+ public static PortletURLSnapshot createActionURL(String source, PortletMode portletMode, WindowState windowState, Map<String, String[]> parameters)
{
return new PortletURLSnapshot(source, ACTION, portletMode, windowState, parameters);
}
- public static PortletURLSnapshot createRenderRL(Class source, PortletMode portletMode, WindowState windowState, Map<String, String[]> parameters)
+ public static PortletURLSnapshot createRenderRL(String source, PortletMode portletMode, WindowState windowState, Map<String, String[]> parameters)
{
return new PortletURLSnapshot(source, RENDER, portletMode, windowState, parameters);
}
- public static PortletURLSnapshot createResourceURL(Class source, Map<String, String[]> parameters)
+ public static PortletURLSnapshot createResourceURL(String source, Map<String, String[]> parameters)
{
return new PortletURLSnapshot(source, parameters);
}
- private PortletURLSnapshot(Class source, int type, PortletURL portletURL)
+ private PortletURLSnapshot(String source, int type, PortletURL portletURL)
{
this.source = source;
this.type = type;
@@ -115,7 +101,7 @@
this.parameters = portletURL.getParameterMap();
}
- private PortletURLSnapshot(Class source, ResourceURL portletURL)
+ private PortletURLSnapshot(String source, ResourceURL portletURL)
{
this.source = source;
this.type = RESOURCE;
@@ -124,7 +110,7 @@
this.parameters = portletURL.getParameterMap();
}
- private PortletURLSnapshot(Class source, int type, PortletMode portletMode, WindowState windowState, Map<String, String[]> parameters)
+ private PortletURLSnapshot(String source, int type, PortletMode portletMode, WindowState windowState, Map<String, String[]> parameters)
{
this.source = source;
this.type = type;
@@ -133,7 +119,7 @@
this.parameters = parameters;
}
- private PortletURLSnapshot(Class source, Map<String, String[]> parameters)
+ private PortletURLSnapshot(String source, Map<String, String[]> parameters)
{
this.source = source;
this.type = RESOURCE;
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener.java 2008-02-01 08:10:37 UTC (rev 9700)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener.java 2008-02-01 14:07:31 UTC (rev 9701)
@@ -31,21 +31,36 @@
* @author <a href="mailto:julien@jboss.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-public class URLGenerationListener implements PortletURLGenerationListener
+public abstract class URLGenerationListener implements PortletURLGenerationListener
{
public void filterActionURL(PortletURL portletURL)
{
- PortletURLSnapshot.queue.addLast(PortletURLSnapshot.createActionURL(getClass(), portletURL));
+ PortletURLGenerationListener delegate = getListener();
+ if (delegate != null)
+ {
+ delegate.filterActionURL(portletURL);
+ }
}
public void filterRenderURL(PortletURL portletURL)
{
- PortletURLSnapshot.queue.addLast(PortletURLSnapshot.createRenderURL(getClass(), portletURL));
+ PortletURLGenerationListener delegate = getListener();
+ if (delegate != null)
+ {
+ delegate.filterRenderURL(portletURL);
+ }
}
public void filterResourceURL(ResourceURL resourceURL)
{
- PortletURLSnapshot.queue.addLast(PortletURLSnapshot.createResourceURL(getClass(), resourceURL));
+ PortletURLGenerationListener delegate = getListener();
+ if (delegate != null)
+ {
+ delegate.filterResourceURL(resourceURL);
+ }
}
+
+ protected abstract PortletURLGenerationListener getListener();
+
}
\ No newline at end of file
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener1.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener1.java 2008-02-01 08:10:37 UTC (rev 9700)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener1.java 2008-02-01 14:07:31 UTC (rev 9701)
@@ -33,4 +33,12 @@
*/
public class URLGenerationListener1 extends URLGenerationListener
{
+
+ /** . */
+ public static PortletURLGenerationListener delegate;
+
+ protected PortletURLGenerationListener getListener()
+ {
+ return delegate;
+ }
}
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener2.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener2.java 2008-02-01 08:10:37 UTC (rev 9700)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListener2.java 2008-02-01 14:07:31 UTC (rev 9701)
@@ -33,4 +33,12 @@
*/
public class URLGenerationListener2 extends URLGenerationListener
{
+
+ /** . */
+ public static PortletURLGenerationListener delegate;
+
+ protected PortletURLGenerationListener getListener()
+ {
+ return delegate;
+ }
}
\ No newline at end of file
Modified: modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListenerTestCase.java
===================================================================
--- modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListenerTestCase.java 2008-02-01 08:10:37 UTC (rev 9700)
+++ modules/portlet/trunk/portlet/src/test/java/org/jboss/portal/test/portlet/jsr286/tck/portleturl/URLGenerationListenerTestCase.java 2008-02-01 14:07:31 UTC (rev 9701)
@@ -55,22 +55,25 @@
{
PortletURL actionURL = response.createActionURL();
+ URLGenerationListener1.delegate = CallbackQueue.createListener("l1");
+ URLGenerationListener2.delegate = CallbackQueue.createListener("l2");
+
//
actionURL.toString();
- PortletURLSnapshot actionSnapshot1 = PortletURLSnapshot.next();
- PortletURLSnapshot actionSnapshot2 = PortletURLSnapshot.next();
- assertEquals(0, PortletURLSnapshot.size());
- actionSnapshot1.assertEquals(PortletURLSnapshot.createActionURL(URLGenerationListener1.class, null, null, new HashMap<String, String[]>()));
- actionSnapshot2.assertEquals(PortletURLSnapshot.createActionURL(URLGenerationListener2.class, null, null, new HashMap<String, String[]>()));
+ PortletURLSnapshot actionSnapshot1 = CallbackQueue.next();
+ PortletURLSnapshot actionSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ actionSnapshot1.assertEquals(PortletURLSnapshot.createActionURL("l1", null, null, new HashMap<String, String[]>()));
+ actionSnapshot2.assertEquals(PortletURLSnapshot.createActionURL("l2", null, null, new HashMap<String, String[]>()));
//
actionURL.setPortletMode(PortletMode.EDIT);
actionURL.toString();
- actionSnapshot1 = PortletURLSnapshot.next();
- actionSnapshot2 = PortletURLSnapshot.next();
- assertEquals(0, PortletURLSnapshot.size());
- actionSnapshot1.assertEquals(PortletURLSnapshot.createActionURL(URLGenerationListener1.class, PortletMode.EDIT, null, new HashMap<String, String[]>()));
- actionSnapshot2.assertEquals(PortletURLSnapshot.createActionURL(URLGenerationListener2.class, PortletMode.EDIT, null, new HashMap<String, String[]>()));
+ actionSnapshot1 = CallbackQueue.next();
+ actionSnapshot2 = CallbackQueue.next();
+ assertEquals(0, CallbackQueue.size());
+ actionSnapshot1.assertEquals(PortletURLSnapshot.createActionURL("l1", PortletMode.EDIT, null, new HashMap<String, String[]>()));
+ actionSnapshot2.assertEquals(PortletURLSnapshot.createActionURL("l2", PortletMode.EDIT, null, new HashMap<String, String[]>()));
//
return new EndTestResponse();
16 years, 8 months
JBoss Portal SVN: r9700 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-02-01 03:10:37 -0500 (Fri, 01 Feb 2008)
New Revision: 9700
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
Log:
changing heading "from sources" to "from the sources"
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-02-01 08:04:52 UTC (rev 9699)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-02-01 08:10:37 UTC (rev 9700)
@@ -187,7 +187,7 @@
</sect2>
</sect1>
<sect1 id="install_source">
- <title>Installing from Sources</title>
+ <title>Installing from the Sources</title>
<sect2>
<title>Getting the Sources</title>
<para>
16 years, 8 months
JBoss Portal SVN: r9699 - docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules.
by portal-commits@lists.jboss.org
Author: mmcallis
Date: 2008-02-01 03:04:52 -0500 (Fri, 01 Feb 2008)
New Revision: 9699
Modified:
docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
Log:
2.3.3. Building and Deploying from the Sources
small spelling corrections/wording changes
Modified: docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml
===================================================================
--- docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-02-01 07:49:00 UTC (rev 9698)
+++ docs/branches/JBoss_Portal_Branch_2_6/referenceGuide/en/modules/installation.xml 2008-02-01 08:04:52 UTC (rev 9699)
@@ -286,7 +286,7 @@
</para>
<para>
<screen>
-export JBOSS_HOME=/path/to/installation/
+export JBOSS_HOME=/path/to/jboss/installation/
</screen>
</para>
</listitem>
@@ -314,8 +314,7 @@
<title>Building and Deploying from the Sources</title>
<para>
During the first build, third-party libraries will be obtained from an online
- repository, so you must be connected to the Internet, and if you are behind a proxy server, you also
- need to define your proxy server address and proxy server port number. If you are running Linux, add the following line to the <filename>JBOSS_INSTALLATION_DIRECTORY/bin/run.sh</filename> file:
+ repository, so you must be connected to the Internet, and if you are behind a proxy server, you need to define your proxy server address and proxy server port number. If you are running Linux, add the following line to the <filename>JBOSS_INSTALLATION_DIRECTORY/bin/run.sh</filename> file:
</para>
<para>
<screen>
@@ -333,7 +332,7 @@
<para>
Replace <replaceable>proxy-hostname</replaceable> with the proxy server's hostname, and <replaceable>proxy-port</replaceable> with the correct proxy server port number.
</para>
- <para>To build and deploy JBoss Portal from the sources, change into the <filename>JBOSS_PORTAL_HOME_DIRECTORY/build/</filename> directory. Microsoft Windows users need to run the <command>build.bat deploy</command> command, and Linux users need to run the <command>./build.sh deploy</command> command.
+ <para>To build and deploy JBoss Portal from the sources, change into the <filename>JBOSS_PORTAL_HOME_DIRECTORY/build/</filename> directory. Then, Microsoft Windows users need to run the <command>build.bat deploy</command> command, and Linux users need to run the <command>./build.sh deploy</command> command.
</para>
<para>
At the end of the build process, the <filename>jboss-portal.sar</filename> file is copied into the <filename>JBOSS_HOME/server/default/deploy/</filename> directory:
@@ -374,7 +373,7 @@
</orderedlist>
</para>
<para>
- To build the clustered version on Microsoft Windows, repeat the above steps, replacing <command>./build.sh</command> with <command>build.bat</command>.
+ To build the clustered version on Microsoft Windows, repeat the previous steps, replacing <command>./build.sh</command> with <command>build.bat</command>.
</para>
</sect2>
<sect2>
16 years, 8 months