JBoss Portal SVN: r11147 - branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-06-25 11:41:53 -0400 (Wed, 25 Jun 2008)
New Revision: 11147
Modified:
branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
Log:
- Fix PortletManagement tests.
- More generification.
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2008-06-25 15:38:35 UTC (rev 11146)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/src/main/org/jboss/portal/wsrp/producer/PortletManagementHandler.java 2008-06-25 15:41:53 UTC (rev 11147)
@@ -25,8 +25,6 @@
import org.jboss.portal.common.i18n.LocalizedString;
import org.jboss.portal.common.util.Tools;
-import org.jboss.portal.common.value.StringValue;
-import org.jboss.portal.common.value.Value;
import org.jboss.portal.portlet.InvalidPortletIdException;
import org.jboss.portal.portlet.NoSuchPortletException;
import org.jboss.portal.portlet.Portlet;
@@ -96,8 +94,8 @@
}
public PortletDescriptionResponse getPortletDescription(GetPortletDescription getPortletDescription)
- throws AccessDeniedFault, InvalidHandleFault, InvalidUserCategoryFault, InconsistentParametersFault,
- MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
+ throws AccessDeniedFault, InvalidHandleFault, InvalidUserCategoryFault, InconsistentParametersFault,
+ MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
{
WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(getPortletDescription, GET_PORTLET_DESCRIPTION);
Registration registration = producer.getRegistrationOrFailIfInvalid(getPortletDescription.getRegistrationContext());
@@ -114,8 +112,8 @@
}
public PortletPropertyDescriptionResponse getPortletPropertyDescription(GetPortletPropertyDescription getPortletPropertyDescription)
- throws MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
- AccessDeniedFault, InvalidHandleFault, OperationFailedFault, RemoteException
+ throws MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault, InvalidRegistrationFault,
+ AccessDeniedFault, InvalidHandleFault, OperationFailedFault, RemoteException
{
WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(getPortletPropertyDescription, GET_PORTLET_PROPERTY_DESCRIPTION);
@@ -161,8 +159,8 @@
}
public PortletContext clonePortlet(ClonePortlet clonePortlet) throws InvalidUserCategoryFault, AccessDeniedFault,
- OperationFailedFault, InvalidHandleFault, InvalidRegistrationFault, InconsistentParametersFault,
- MissingParametersFault, RemoteException
+ OperationFailedFault, InvalidHandleFault, InvalidRegistrationFault, InconsistentParametersFault,
+ MissingParametersFault, RemoteException
{
WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(clonePortlet, "ClonePortlet");
@@ -184,17 +182,17 @@
catch (NoSuchPortletException e)
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
- "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
+ "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
}
catch (InvalidPortletIdException e)
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INCONSISTENT_PARAMETERS,
- "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
+ "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
}
catch (PortletInvokerException e)
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
- "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
+ "Failed to create clone for portlet '" + portletContext.getPortletHandle(), e);
}
finally
{
@@ -203,7 +201,7 @@
}
public DestroyPortletsResponse destroyPortlets(DestroyPortlets destroyPortlets) throws InconsistentParametersFault,
- MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
+ MissingParametersFault, InvalidRegistrationFault, OperationFailedFault, RemoteException
{
WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(destroyPortlets, "DestroyPortlets");
@@ -244,7 +242,7 @@
catch (PortletInvokerException e)
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
- "Failed to destroy clones", e);
+ "Failed to destroy clones", e);
}
finally
{
@@ -253,8 +251,8 @@
}
public PortletContext setPortletProperties(SetPortletProperties setPortletProperties) throws OperationFailedFault,
- InvalidHandleFault, MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault,
- AccessDeniedFault, InvalidRegistrationFault, RemoteException
+ InvalidHandleFault, MissingParametersFault, InconsistentParametersFault, InvalidUserCategoryFault,
+ AccessDeniedFault, InvalidRegistrationFault, RemoteException
{
WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(setPortletProperties, "SetPortletProperties");
@@ -312,24 +310,24 @@
{
RegistrationLocal.setRegistration(registration);
org.jboss.portal.portlet.PortletContext resultContext =
- producer.getInvoker().setProperties(WSRPUtils.convertToPortalPortletContext(portletContext),
- (PropertyChange[])changes.toArray(new PropertyChange[0]));
+ producer.getInvoker().setProperties(WSRPUtils.convertToPortalPortletContext(portletContext),
+ (PropertyChange[])changes.toArray(new PropertyChange[0]));
return WSRPUtils.convertToWSRPPortletContext(resultContext);
}
catch (NoSuchPortletException e)
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
- "Failed to set properties for portlet '" + portletContext.getPortletHandle() + "'", e);
+ "Failed to set properties for portlet '" + portletContext.getPortletHandle() + "'", e);
}
catch (InvalidPortletIdException e)
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INCONSISTENT_PARAMETERS,
- "Failed to set properties for portlet '" + portletContext.getPortletHandle() + "'", e);
+ "Failed to set properties for portlet '" + portletContext.getPortletHandle() + "'", e);
}
catch (PortletInvokerException e)
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.OPERATION_FAILED,
- "Failed to set properties for portlet '" + portletContext.getPortletHandle() + "'", e);
+ "Failed to set properties for portlet '" + portletContext.getPortletHandle() + "'", e);
}
finally
{
@@ -341,8 +339,8 @@
}
public PropertyList getPortletProperties(GetPortletProperties getPortletProperties) throws InvalidHandleFault,
- MissingParametersFault, InvalidRegistrationFault, AccessDeniedFault, OperationFailedFault,
- InconsistentParametersFault, InvalidUserCategoryFault, RemoteException
+ MissingParametersFault, InvalidRegistrationFault, AccessDeniedFault, OperationFailedFault,
+ InconsistentParametersFault, InvalidUserCategoryFault, RemoteException
{
WSRPExceptionFactory.throwOperationFailedFaultIfValueIsMissing(getPortletProperties, GET_PORTLET_PROPERTIES);
@@ -355,7 +353,7 @@
checkUserAuthorization(userContext);
String[] names = getPortletProperties.getNames();
- Set keys = getKeysFromNames(names);
+ Set<String> keys = getKeysFromNames(names);
try
{
@@ -385,18 +383,24 @@
int i = 0;
PreferenceInfo prefInfo;
String key;
- Value value;
+ List<String> values;
LocalizedString displayName;
for (Iterator entries = properties.entrySet().iterator(); entries.hasNext(); i++)
{
Map.Entry entry = (Map.Entry)entries.next();
key = (String)entry.getKey();
- value = (Value)entry.getValue();
+ values = (List<String>)entry.getValue();
prefInfo = info.getPreferences().getPreference(key);
displayName = prefInfo.getDisplayName();
String lang = WSRPUtils.toString(displayName.getDefaultLocale());
- resProperties[i] = WSRPTypeFactory.createProperty(key, lang, value.asString()); //todo: check what we should use key
+
+ // todo: support multi-valued properties
+ if(values.size() != 1)
+ {
+ throw new UnsupportedOperationException("Currently doesn't support multi-valued properties!");
+ }
+ resProperties[i] = WSRPTypeFactory.createProperty(key, lang, values.get(0)); //todo: check what we should use key
}
result.setProperties(resProperties);
@@ -407,7 +411,7 @@
catch (PortletInvokerException e)
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
- "Could not retrieve properties for portlet '" + portletContext + "'", e);
+ "Could not retrieve properties for portlet '" + portletContext + "'", e);
}
finally
{
@@ -424,14 +428,14 @@
}
}
- private Set getKeysFromNames(String[] names)
+ private Set<String> getKeysFromNames(String[] names)
{
- Set keys = null;
+ Set<String> keys = null;
if (names != null)
{
if (names.length == 0)
{
- keys = Collections.EMPTY_SET;
+ keys = Collections.emptySet();
}
else
{
@@ -466,7 +470,7 @@
catch (PortletInvokerException e)
{
throw WSRPExceptionFactory.throwSOAPFaultException(WSRPExceptionFactory.INVALID_HANDLE,
- "Could not retrieve portlet '" + portletContext.getPortletHandle() + "'", e);
+ "Could not retrieve portlet '" + portletContext.getPortletHandle() + "'", e);
}
finally
{
17 years, 10 months
JBoss Portal SVN: r11146 - in branches/JBoss_Portal_Branch_2_6/core-cms/src: resources/portal-cms-war/WEB-INF/classes and 1 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-25 11:38:35 -0400 (Wed, 25 Jun 2008)
New Revision: 11146
Modified:
branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/searchResults.jsp
Log:
JBPORTAL-2053: CMS Search fails when a Lucene syntax is entered but not understood by the converter
Propagate the error in a clean manner to the user interface
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2008-06-25 15:38:17 UTC (rev 11145)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2008-06-25 15:38:35 UTC (rev 11146)
@@ -55,6 +55,7 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.UserModule;
import org.jboss.portal.search.FederatedQuery;
+import org.jboss.portal.search.QueryConversionException;
import org.jboss.portal.search.impl.jcr.JCRQuery;
import org.jboss.portal.search.impl.jcr.JCRQueryConverter;
import org.jboss.portal.security.PortalPermission;
@@ -350,6 +351,11 @@
e.printStackTrace();
files = new ArrayList();
}
+ catch (QueryConversionException e)
+ {
+ files = new ArrayList();
+ rReq.setAttribute("conversionError", Boolean.TRUE);
+ }
rReq.setAttribute("files", files);
rReq.setAttribute("textQuery", textQuery);
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-06-25 15:38:17 UTC (rev 11145)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-06-25 15:38:35 UTC (rev 11146)
@@ -120,4 +120,7 @@
CMS_INTRODUCTION=Introduction
CMS_HELP=The CMS Portlet displays content from the file store inside a portlet window, or, in the case of binary content, outside of the portlet window altogether
CMS_TO_MODIFY=To modify how this portlet behaves, please
-CMS_CLICK_HERE=click here
\ No newline at end of file
+CMS_CLICK_HERE=click here
+CMS_SELECT_ACTION=Select Action
+
+CMS_QUERYERROR=The query you entered is not valid>>>>>>> .merge-right.r11144
Modified: branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/searchResults.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/searchResults.jsp 2008-06-25 15:38:17 UTC (rev 11145)
+++ branches/JBoss_Portal_Branch_2_6/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/searchResults.jsp 2008-06-25 15:38:35 UTC (rev 11146)
@@ -43,8 +43,16 @@
</form>
</div>
+<%
+Boolean error = (Boolean)request.getAttribute("conversionError");
+if (error != null && error)
+{
+%>
+<div class="portlet-msg-error">${n:i18n("CMS_QUERYERROR")}: <%= request.getAttribute("textQuery") %></div>
<%
+}
+
List files = (List)request.getAttribute("files");
String createDate = "";
String modifiedDate = "";
17 years, 10 months
JBoss Portal SVN: r11145 - branches/JBoss_Portal_Branch_2_6/search/src/main/org/jboss/portal/search/impl/jcr.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-25 11:38:17 -0400 (Wed, 25 Jun 2008)
New Revision: 11145
Modified:
branches/JBoss_Portal_Branch_2_6/search/src/main/org/jboss/portal/search/impl/jcr/JCRQueryConverter.java
Log:
JBPORTAL-2053: CMS Search fails when a Lucene syntax is entered but not understood by the converter
Propagate the error in a clean manner to the user interface
Modified: branches/JBoss_Portal_Branch_2_6/search/src/main/org/jboss/portal/search/impl/jcr/JCRQueryConverter.java
===================================================================
--- branches/JBoss_Portal_Branch_2_6/search/src/main/org/jboss/portal/search/impl/jcr/JCRQueryConverter.java 2008-06-25 15:34:41 UTC (rev 11144)
+++ branches/JBoss_Portal_Branch_2_6/search/src/main/org/jboss/portal/search/impl/jcr/JCRQueryConverter.java 2008-06-25 15:38:17 UTC (rev 11145)
@@ -35,7 +35,7 @@
public class JCRQueryConverter extends AbstractQueryConverter
{
- public Query convert(FederatedQuery query)
+ public Query convert(FederatedQuery query) throws QueryConversionException
{
if (query == null)
{
@@ -43,18 +43,12 @@
}
StringBuffer result = new StringBuffer();
result.append("//*[");
- try
- {
- if (super.convert(query) != null)
- {
- result.append(((JCRQuery)super.convert(query)).getJcrQuery());
- }
- }
- catch (QueryConversionException e)
+ if (super.convert(query) != null)
{
- e.printStackTrace();
+ result.append(((JCRQuery)super.convert(query)).getJcrQuery());
}
+
result.append("]");
return new JCRQuery(result.toString());
}
17 years, 10 months
JBoss Portal SVN: r11144 - in branches/JBoss_Portal_Branch_2_7: core-cms/src/resources/portal-cms-war/WEB-INF/classes and 2 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-25 11:34:41 -0400 (Wed, 25 Jun 2008)
New Revision: 11144
Modified:
branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/searchResults.jsp
branches/JBoss_Portal_Branch_2_7/search/src/main/org/jboss/portal/search/impl/jcr/JCRQueryConverter.java
Log:
JBPORTAL-2053: CMS Search fails when a Lucene syntax is entered but not understood by the converter
Propagate the error in a clean manner to the user interface
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2008-06-25 14:48:07 UTC (rev 11143)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/main/org/jboss/portal/core/cms/ui/admin/CMSAdminPortlet.java 2008-06-25 15:34:41 UTC (rev 11144)
@@ -55,6 +55,7 @@
import org.jboss.portal.identity.User;
import org.jboss.portal.identity.UserModule;
import org.jboss.portal.search.FederatedQuery;
+import org.jboss.portal.search.QueryConversionException;
import org.jboss.portal.search.impl.jcr.JCRQuery;
import org.jboss.portal.search.impl.jcr.JCRQueryConverter;
import org.jboss.portal.security.PortalPermission;
@@ -350,6 +351,11 @@
e.printStackTrace();
files = new ArrayList();
}
+ catch (QueryConversionException e)
+ {
+ files = new ArrayList();
+ rReq.setAttribute("conversionError", Boolean.TRUE);
+ }
rReq.setAttribute("files", files);
rReq.setAttribute("textQuery", textQuery);
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-06-25 14:48:07 UTC (rev 11143)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/classes/Resource.properties 2008-06-25 15:34:41 UTC (rev 11144)
@@ -121,4 +121,6 @@
CMS_HELP=The CMS Portlet displays content from the file store inside a portlet window, or, in the case of binary content, outside of the portlet window altogether
CMS_TO_MODIFY=To modify how this portlet behaves, please
CMS_CLICK_HERE=click here
-CMS_SELECT_ACTION=Select Action
\ No newline at end of file
+CMS_SELECT_ACTION=Select Action
+
+CMS_QUERYERROR=The query you entered is not valid
\ No newline at end of file
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/searchResults.jsp
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/searchResults.jsp 2008-06-25 14:48:07 UTC (rev 11143)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/src/resources/portal-cms-war/WEB-INF/jsp/cms/admin/searchResults.jsp 2008-06-25 15:34:41 UTC (rev 11144)
@@ -43,8 +43,16 @@
</form>
</div>
+<%
+Boolean error = (Boolean)request.getAttribute("conversionError");
+if (error != null && error)
+{
+%>
+<div class="portlet-msg-error">${n:i18n("CMS_QUERYERROR")}: <%= request.getAttribute("textQuery") %></div>
<%
+}
+
List files = (List)request.getAttribute("files");
String createDate = "";
String modifiedDate = "";
Modified: branches/JBoss_Portal_Branch_2_7/search/src/main/org/jboss/portal/search/impl/jcr/JCRQueryConverter.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/search/src/main/org/jboss/portal/search/impl/jcr/JCRQueryConverter.java 2008-06-25 14:48:07 UTC (rev 11143)
+++ branches/JBoss_Portal_Branch_2_7/search/src/main/org/jboss/portal/search/impl/jcr/JCRQueryConverter.java 2008-06-25 15:34:41 UTC (rev 11144)
@@ -35,7 +35,7 @@
public class JCRQueryConverter extends AbstractQueryConverter
{
- public Query convert(FederatedQuery query)
+ public Query convert(FederatedQuery query) throws QueryConversionException
{
if (query == null)
{
@@ -43,18 +43,12 @@
}
StringBuffer result = new StringBuffer();
result.append("//*[");
- try
- {
- if (super.convert(query) != null)
- {
- result.append(((JCRQuery)super.convert(query)).getJcrQuery());
- }
- }
- catch (QueryConversionException e)
+ if (super.convert(query) != null)
{
- e.printStackTrace();
+ result.append(((JCRQuery)super.convert(query)).getJcrQuery());
}
+
result.append("]");
return new JCRQuery(result.toString());
}
17 years, 10 months
JBoss Portal SVN: r11143 - branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-25 10:48:07 -0400 (Wed, 25 Jun 2008)
New Revision: 11143
Modified:
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validate_email.xml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_approval_workflow.xml
branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_workflow.xml
Log:
Turning off the scheduling service for the moment. Faced this issue: JBPM-1289
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validate_email.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validate_email.xml 2008-06-25 14:16:35 UTC (rev 11142)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validate_email.xml 2008-06-25 14:48:07 UTC (rev 11143)
@@ -31,8 +31,10 @@
</transition>
</start-state>
<state name="validate_email">
- <timer name="time_to_expire" duedate="2 days" transition="timedOut" />
- <transition name="validated" to="end">
+ <!--
+ <timer name="time_to_expire" duedate="2 days" transition="timedOut" />
+ -->
+ <transition name="validated" to="end">
<action class="org.jboss.portal.core.identity.services.workflow.impl.UpdateEmailAction"/>
</transition>
<transition name="timedOut" to="end"/>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_approval_workflow.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_approval_workflow.xml 2008-06-25 14:16:35 UTC (rev 11142)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_approval_workflow.xml 2008-06-25 14:48:07 UTC (rev 11143)
@@ -31,7 +31,9 @@
</transition>
</start-state>
<state name="validate_email">
- <timer name="time_to_expire" duedate="2 days" transition="timedOut" />
+ <!--
+ <timer name="time_to_expire" duedate="2 days" transition="timedOut" />
+ -->
<transition name="validated" to="admin_approval"/>
<transition name="timedOut" to="end"/>
</state>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_workflow.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_workflow.xml 2008-06-25 14:16:35 UTC (rev 11142)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/src/resources/portal-identity-sar/conf/processes/jbp_identity_validation_workflow.xml 2008-06-25 14:48:07 UTC (rev 11143)
@@ -31,7 +31,9 @@
</transition>
</start-state>
<state name="validate_email">
+ <!--
<timer name="time_to_expire" duedate="2 days" transition="timedOut" />
+ -->
<transition name="validated" to="end">
<action class="org.jboss.portal.core.identity.services.workflow.impl.CreateUserAction"/>
</transition>
17 years, 10 months
JBoss Portal SVN: r11142 - in modules/presentation/trunk: portal/src/main/java/org/jboss/portal/presentation/portal and 3 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-06-25 10:16:35 -0400 (Wed, 25 Jun 2008)
New Revision: 11142
Added:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItem.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItemContext.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItemState.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/SimpleElement.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/SimpleStructure.java
Removed:
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObject.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObjectContext.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutState.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectElement.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectStructure.java
Modified:
modules/presentation/trunk/build/pom.xml
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelAdapter.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelImporter.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutElement.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStore.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStructure.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/StructureElement.java
modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/object/PageNode.java
Log:
- minor refactor
- use portlet 2.1.0 SNAPSHOT since at some time I forgot to add the PublicParameterPortlet to portlet 2.0.0-SNAPSHOT (my bad).
Modified: modules/presentation/trunk/build/pom.xml
===================================================================
--- modules/presentation/trunk/build/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/build/pom.xml 2008-06-25 14:16:35 UTC (rev 11142)
@@ -33,7 +33,7 @@
<version.portlet-api>2.0</version.portlet-api>
<version.jboss.portal.common>1.2.0</version.jboss.portal.common>
- <version.jboss.portal.portlet>2.0.0</version.jboss.portal.portlet>
+ <version.jboss.portal.portlet>2.1.0-SNAPSHOT</version.jboss.portal.portlet>
<version.jboss.portal.web>1.2.0</version.jboss.portal.web>
<version.jboss.unit>1.2.0.Beta2</version.jboss.unit>
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/PresentationServerImpl.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -27,7 +27,7 @@
import org.jboss.portal.presentation.portal.model.object.WindowNode;
import org.jboss.portal.presentation.portal.model.object.PageNode;
import org.jboss.portal.presentation.portal.model.object.PortalNodeManager;
-import org.jboss.portal.presentation.portal.model.layout.ObjectElement;
+import org.jboss.portal.presentation.portal.model.layout.SimpleElement;
import org.jboss.portal.presentation.portal.model.content.PageContentContextImpl;
import org.jboss.portal.presentation.impl.state.structural.adapter.StructuralAdapter;
import org.jboss.portal.presentation.portal.content.protocol.ContentAction;
@@ -90,9 +90,9 @@
public ContentFragment renderWindow(PresentationClient client, String windowId) throws PresentationServerException
{
- ObjectElement element = (ObjectElement)structuralAdapter.getNode(windowId);
+ SimpleElement element = (SimpleElement)structuralAdapter.getNode(windowId);
- WindowNode window = (WindowNode)portalNodeManager.getNode(element.getObjectRef());
+ WindowNode window = (WindowNode)portalNodeManager.getNode(element.getRef());
Content content = window.getContent();
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelAdapter.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelAdapter.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelAdapter.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -27,10 +27,10 @@
import org.jboss.portal.presentation.portal.model.layout.LayoutElement;
import org.jboss.portal.presentation.portal.model.layout.StructureElement;
import org.jboss.portal.presentation.portal.model.layout.NestedStructure;
-import org.jboss.portal.presentation.portal.model.layout.ObjectStructure;
+import org.jboss.portal.presentation.portal.model.layout.SimpleStructure;
import org.jboss.portal.presentation.portal.model.layout.LayoutStore;
-import org.jboss.portal.presentation.portal.model.layout.LayoutObject;
-import org.jboss.portal.presentation.portal.model.layout.ObjectElement;
+import org.jboss.portal.presentation.portal.model.layout.LayoutItem;
+import org.jboss.portal.presentation.portal.model.layout.SimpleElement;
import org.jboss.portal.presentation.portal.model.object.PortalNodeManager;
import org.jboss.portal.presentation.portal.model.object.PortalNode;
import org.jboss.portal.presentation.portal.model.object.PageNode;
@@ -79,7 +79,7 @@
}
else if (id.startsWith("structure."))
{
- return layoutStore.getObject(id.substring(10));
+ return layoutStore.getItem(id.substring(10));
}
else
{
@@ -104,8 +104,8 @@
}
else
{
- ObjectStructure objectStructure = (ObjectStructure)layout;
- String objectId = objectStructure.getObjectRef();
+ SimpleStructure simpleStructure = (SimpleStructure)layout;
+ String objectId = simpleStructure.getObjectRef();
return nodeManager.getNode(objectId);
}
}
@@ -121,12 +121,9 @@
{
if (o instanceof PageNode)
{
- String layoutStructureId = ((PageNode)o).getLayoutStructureId();
+ LayoutStructure layoutStructure = (LayoutStructure)layoutStore.findItemByRef(((PageNode)o).getId());
//
- LayoutStructure layoutStructure = (LayoutStructure)layoutStore.getObject(layoutStructureId);
-
- //
return layoutStructure.getElements();
}
else
@@ -157,9 +154,9 @@
{
return "node." + ((PortalNode)o).getId();
}
- else if (o instanceof LayoutObject)
+ else if (o instanceof LayoutItem)
{
- return "structure." + ((LayoutObject)o).getId();
+ return "structure." + ((LayoutItem)o).getId();
}
else
{
@@ -179,7 +176,7 @@
{
return UIPane.class;
}
- else if (o instanceof ObjectElement)
+ else if (o instanceof SimpleElement)
{
return UIWindow.class;
}
@@ -200,10 +197,10 @@
{
return ((PortalNode)o).getName();
}
- else if (o instanceof LayoutObject)
+ else if (o instanceof LayoutItem)
{
// no natural name, for now use id
- return ((LayoutObject)o).getId();
+ return ((LayoutItem)o).getId();
}
else
{
@@ -218,12 +215,9 @@
PageNode page = (PageNode)o;
//
- String layoutStructureId = ((PageNode)o).getLayoutStructureId();
+ LayoutStructure layoutStructure = (LayoutStructure)layoutStore.findItemByRef(((PageNode)o).getId());
//
- LayoutStructure layoutStructure = (LayoutStructure)layoutStore.getObject(layoutStructureId);
-
- //
Map<String, Serializable> properties = new HashMap<String, Serializable>(page.getProperties());
//
@@ -236,14 +230,14 @@
{
return ((PortalNode)o).getProperties();
}
- else if (o instanceof LayoutObject)
+ else if (o instanceof LayoutItem)
{
- if (o instanceof ObjectElement)
+ if (o instanceof SimpleElement)
{
- ObjectElement element = (ObjectElement)o;
+ SimpleElement element = (SimpleElement)o;
//
- String windowId = element.getObjectRef();
+ String windowId = element.getRef();
//
WindowNode window = (WindowNode)nodeManager.getNode(windowId);
@@ -259,7 +253,7 @@
}
else
{
- return ((LayoutObject)o).getState().getProperties();
+ return ((LayoutItem)o).getState().getProperties();
}
}
else
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelImporter.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelImporter.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/ModelImporter.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -173,9 +173,6 @@
LayoutStructure pageStructure = layoutStore.createStructure(page.getId());
//
- page.setLayoutStructureId(pageStructure.getId());
-
- //
importLayout(page, pageStructure, element);
}
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutElement.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutElement.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutElement.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -28,7 +28,7 @@
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-public abstract class LayoutElement extends LayoutObject
+public abstract class LayoutElement extends LayoutItem
{
/** The structure to which this element belongs. */
Copied: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItem.java (from rev 11001, modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObject.java)
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItem.java (rev 0)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItem.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -0,0 +1,87 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.portal.model.layout;
+
+import org.jboss.portal.common.NotYetImplemented;
+
+import java.io.Serializable;
+
+/**
+ * An item part of the layout system.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public abstract class LayoutItem
+{
+
+ /** . */
+ private LayoutItemContext context;
+
+ protected LayoutItem()
+ {
+ }
+
+ LayoutItemContext getContext()
+ {
+ return context;
+ }
+
+ void register(LayoutItemContext context)
+ {
+ this.context = context;
+ }
+
+ void unregister()
+ {
+ throw new NotYetImplemented("No need for now");
+ }
+
+ public final String getId()
+ {
+ if (context == null)
+ {
+ throw new IllegalStateException();
+ }
+
+ //
+ return context.getId();
+ }
+
+ /**
+ * Returns the state of the layout object.
+ *
+ * @return the state
+ */
+ public abstract LayoutItemState getState();
+
+ public Serializable getProperty(String name)
+ {
+ return getState().getProperty(name);
+ }
+
+ public void setProperty(String name, Serializable value)
+ {
+ getState().setProperty(name, value);
+ }
+}
Copied: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItemContext.java (from rev 11001, modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObjectContext.java)
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItemContext.java (rev 0)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItemContext.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -0,0 +1,64 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.portal.model.layout;
+
+/**
+ * The context of a layout item that is not exposed.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+class LayoutItemContext
+{
+
+ /** . */
+ private final LayoutStore store;
+
+ /** . */
+ private final String id;
+
+ /** . */
+ private final LayoutItem item;
+
+ LayoutItemContext(LayoutStore store, String id, LayoutItem item)
+ {
+ this.store = store;
+ this.id = id;
+ this.item = item;
+ }
+
+ LayoutItem getObject()
+ {
+ return item;
+ }
+
+ String getId()
+ {
+ return id;
+ }
+
+ void register(LayoutItem item)
+ {
+ store.register(item);
+ }
+}
Copied: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItemState.java (from rev 11001, modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutState.java)
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItemState.java (rev 0)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutItemState.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -0,0 +1,84 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.portal.model.layout;
+
+import java.io.Serializable;
+import java.util.Map;
+import java.util.HashMap;
+import java.util.Collections;
+
+/**
+ * A generic state of layout items.
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class LayoutItemState
+{
+
+ /** The properties. */
+ private final Map<String, Serializable> properties;
+
+ /** . */
+ private final Map<String, Serializable> immutableProperties;
+
+ LayoutItemState()
+ {
+ this.properties = new HashMap<String, Serializable>();
+ this.immutableProperties = Collections.unmodifiableMap(properties);
+ }
+
+ public Map<String, Serializable> getProperties()
+ {
+ return immutableProperties;
+ }
+
+ public Serializable getProperty(String name)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ return properties.get(name);
+ }
+
+ public void setProperty(String name, Serializable value)
+ {
+ if (name == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ if (value != null)
+ {
+ properties.put(name, value);
+ }
+ else
+ {
+ properties.remove(name);
+ }
+ }
+}
Deleted: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObject.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObject.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObject.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -1,87 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.portal.model.layout;
-
-import org.jboss.portal.common.NotYetImplemented;
-
-import java.io.Serializable;
-
-/**
- * An object part of the layout system.
- *
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public abstract class LayoutObject
-{
-
- /** . */
- private LayoutObjectContext context;
-
- protected LayoutObject()
- {
- }
-
- LayoutObjectContext getContext()
- {
- return context;
- }
-
- void register(LayoutObjectContext context)
- {
- this.context = context;
- }
-
- void unregister()
- {
- throw new NotYetImplemented("No need for now");
- }
-
- public final String getId()
- {
- if (context == null)
- {
- throw new IllegalStateException();
- }
-
- //
- return context.getId();
- }
-
- /**
- * Returns the state of the layout object.
- *
- * @return the state
- */
- public abstract LayoutState getState();
-
- public Serializable getProperty(String name)
- {
- return getState().getProperty(name);
- }
-
- public void setProperty(String name, Serializable value)
- {
- getState().setProperty(name, value);
- }
-}
Deleted: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObjectContext.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObjectContext.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutObjectContext.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -1,62 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.portal.model.layout;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class LayoutObjectContext
-{
-
- /** . */
- private final LayoutStore store;
-
- /** . */
- private final String id;
-
- /** . */
- private final LayoutObject object;
-
- LayoutObjectContext(LayoutStore store, String id, LayoutObject object)
- {
- this.store = store;
- this.id = id;
- this.object = object;
- }
-
- LayoutObject getObject()
- {
- return object;
- }
-
- String getId()
- {
- return id;
- }
-
- void register(LayoutObject object)
- {
- store.register(object);
- }
-}
Deleted: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutState.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutState.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutState.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -1,84 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.portal.model.layout;
-
-import java.io.Serializable;
-import java.util.Map;
-import java.util.HashMap;
-import java.util.Collections;
-
-/**
- * A generic state of layout objects.
- *
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class LayoutState
-{
-
- /** The properties. */
- private final Map<String, Serializable> properties;
-
- /** . */
- private final Map<String, Serializable> immutableProperties;
-
- LayoutState()
- {
- this.properties = new HashMap<String, Serializable>();
- this.immutableProperties = Collections.unmodifiableMap(properties);
- }
-
- public Map<String, Serializable> getProperties()
- {
- return immutableProperties;
- }
-
- public Serializable getProperty(String name)
- {
- if (name == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- return properties.get(name);
- }
-
- public void setProperty(String name, Serializable value)
- {
- if (name == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- if (value != null)
- {
- properties.put(name, value);
- }
- else
- {
- properties.remove(name);
- }
- }
-}
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStore.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStore.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStore.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -37,11 +37,14 @@
private final AtomicLong sequence = new AtomicLong();
/** . */
- private final Map<String, LayoutObjectContext> contexts = new ConcurrentHashMap<String, LayoutObjectContext>();
+ private final Map<String, LayoutItemContext> contextsById = new ConcurrentHashMap<String, LayoutItemContext>();
- public ObjectStructure createStructure(String objectRef)
+ /** . */
+ private final Map<String, LayoutItemContext> contextsByObjectRef = new ConcurrentHashMap<String, LayoutItemContext>();
+
+ public SimpleStructure createStructure(String objectRef)
{
- ObjectStructure structure = new ObjectStructure(objectRef);
+ SimpleStructure structure = new SimpleStructure(objectRef);
//
register(structure);
@@ -50,22 +53,61 @@
return structure;
}
- public LayoutObject getObject(String id)
+ /**
+ * Locate a layout object by its id.
+ *
+ * @param id the layout object id
+ * @return a layout object
+ */
+ public LayoutItem getItem(String id)
{
- LayoutObjectContext context = contexts.get(id);
+ LayoutItemContext context = contextsById.get(id);
//
return context != null ? context.getObject() : null;
}
- void register(LayoutObject object)
+ /**
+ * Locate a layout object by the reference.
+ *
+ * @param ref the reference
+ * @return a layout object
+ */
+ public LayoutItem findItemByRef(String ref)
{
- LayoutObjectContext context = new LayoutObjectContext(this, Long.toString(sequence.getAndIncrement()), object);
+ LayoutItemContext context = contextsByObjectRef.get(ref);
//
- contexts.put(context.getId(), context);
+ return context != null ? context.getObject() : null;
+ }
+ void register(LayoutItem item)
+ {
+ LayoutItemContext context = new LayoutItemContext(this, Long.toString(sequence.getAndIncrement()), item);
+
//
- object.register(context);
+ contextsById.put(context.getId(), context);
+
+ //
+ String objectRef = null;
+
+ //
+ if (item instanceof SimpleStructure)
+ {
+ objectRef = ((SimpleStructure)item).getObjectRef();
+ }
+ else if (item instanceof SimpleElement)
+ {
+ objectRef = ((SimpleElement)item).getRef();
+ }
+
+ //
+ if (objectRef != null)
+ {
+ contextsByObjectRef.put(objectRef, context);
+ }
+
+ //
+ item.register(context);
}
}
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStructure.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStructure.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/LayoutStructure.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -31,19 +31,19 @@
* @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
* @version $Revision: 630 $
*/
-public class LayoutStructure extends LayoutObject
+public class LayoutStructure extends LayoutItem
{
/** The elements of the structure. */
private final Collection<LayoutElement> elements;
/** The state. */
- final LayoutState state;
+ final LayoutItemState state;
LayoutStructure()
{
this.elements = new ArrayList<LayoutElement>();
- this.state = new LayoutState();
+ this.state = new LayoutItemState();
}
public Collection<LayoutElement> getElements()
@@ -51,9 +51,9 @@
return elements;
}
- public ObjectElement addObjectElement(String objectRef)
+ public SimpleElement addObjectElement(String objectRef)
{
- ObjectElement element = new ObjectElement(objectRef);
+ SimpleElement element = new SimpleElement(objectRef);
//
addElement(element);
@@ -88,7 +88,7 @@
getContext().register(element);
}
- public LayoutState getState()
+ public LayoutItemState getState()
{
return state;
}
Deleted: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectElement.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectElement.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectElement.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -1,53 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.portal.model.layout;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ObjectElement extends LayoutElement
-{
-
- /** . */
- private final String objectRef;
-
- /** . */
- private final LayoutState state;
-
- ObjectElement(String objectRef)
- {
- this.objectRef = objectRef;
- this.state = new LayoutState();
- }
-
- public String getObjectRef()
- {
- return objectRef;
- }
-
- public LayoutState getState()
- {
- return state;
- }
-}
Deleted: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectStructure.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectStructure.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectStructure.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -1,50 +0,0 @@
-/******************************************************************************
- * JBoss, a division of Red Hat *
- * Copyright 2008, Red Hat Middleware, LLC, and individual *
- * contributors as indicated by the @authors tag. See the *
- * copyright.txt in the distribution for a full listing of *
- * individual contributors. *
- * *
- * This is free software; you can redistribute it and/or modify it *
- * under the terms of the GNU Lesser General Public License as *
- * published by the Free Software Foundation; either version 2.1 of *
- * the License, or (at your option) any later version. *
- * *
- * This software is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Lesser General Public License for more details. *
- * *
- * You should have received a copy of the GNU Lesser General Public *
- * License along with this software; if not, write to the Free *
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
- * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
- ******************************************************************************/
-package org.jboss.portal.presentation.portal.model.layout;
-
-/**
- * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
- * @version $Revision: 630 $
- */
-public class ObjectStructure extends LayoutStructure
-{
-
- /** . */
- private final String objectRef;
-
- ObjectStructure(String objectRef)
- {
- if (objectRef == null)
- {
- throw new IllegalArgumentException();
- }
-
- //
- this.objectRef = objectRef;
- }
-
- public String getObjectRef()
- {
- return objectRef;
- }
-}
Copied: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/SimpleElement.java (from rev 11001, modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectElement.java)
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/SimpleElement.java (rev 0)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/SimpleElement.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -0,0 +1,53 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.portal.model.layout;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class SimpleElement extends LayoutElement
+{
+
+ /** . */
+ private final String ref;
+
+ /** . */
+ private final LayoutItemState state;
+
+ SimpleElement(String ref)
+ {
+ this.ref = ref;
+ this.state = new LayoutItemState();
+ }
+
+ public String getRef()
+ {
+ return ref;
+ }
+
+ public LayoutItemState getState()
+ {
+ return state;
+ }
+}
Copied: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/SimpleStructure.java (from rev 11001, modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/ObjectStructure.java)
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/SimpleStructure.java (rev 0)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/SimpleStructure.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -0,0 +1,50 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.presentation.portal.model.layout;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class SimpleStructure extends LayoutStructure
+{
+
+ /** . */
+ private final String objectRef;
+
+ SimpleStructure(String objectRef)
+ {
+ if (objectRef == null)
+ {
+ throw new IllegalArgumentException();
+ }
+
+ //
+ this.objectRef = objectRef;
+ }
+
+ public String getObjectRef()
+ {
+ return objectRef;
+ }
+}
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/StructureElement.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/StructureElement.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/layout/StructureElement.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -39,7 +39,7 @@
this.nestedStructure = new NestedStructure(this);
}
- void register(LayoutObjectContext context)
+ void register(LayoutItemContext context)
{
super.register(context);
@@ -55,7 +55,7 @@
/**
* The implementation delegates the state to the nested structure.
*/
- public LayoutState getState()
+ public LayoutItemState getState()
{
return nestedStructure.state;
}
Modified: modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/object/PageNode.java
===================================================================
--- modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/object/PageNode.java 2008-06-25 14:09:20 UTC (rev 11141)
+++ modules/presentation/trunk/portal/src/main/java/org/jboss/portal/presentation/portal/model/object/PageNode.java 2008-06-25 14:16:35 UTC (rev 11142)
@@ -32,24 +32,11 @@
public class PageNode extends PortalNode
{
- /** . */
- private String layoutStructureId;
-
public PageNode(String name, PortalNodeManager structuralStateContext)
{
super(name, structuralStateContext);
}
- public String getLayoutStructureId()
- {
- return layoutStructureId;
- }
-
- public void setLayoutStructureId(String layoutStructureId)
- {
- this.layoutStructureId = layoutStructureId;
- }
-
public Class<? extends UIObject> getType()
{
return UIPage.class;
17 years, 10 months
JBoss Portal SVN: r11141 - in modules/portlet/trunk: bridge and 14 other directories.
by portal-commits@lists.jboss.org
Author: julien(a)jboss.com
Date: 2008-06-25 10:09:20 -0400 (Wed, 25 Jun 2008)
New Revision: 11141
Added:
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/CharsetPortlet.java
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/EncodingPortlet.java
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/PrivateParameterPortlet.java
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/PublicParameterPortlet.java
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/SessionCounterPortlet.java
modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/SessionPortlet.java
Modified:
modules/portlet/trunk/bridge/pom.xml
modules/portlet/trunk/build/distrib/distrib.xml
modules/portlet/trunk/build/pom.xml
modules/portlet/trunk/controller/pom.xml
modules/portlet/trunk/docs/pom.xml
modules/portlet/trunk/docs/user-guide/pom.xml
modules/portlet/trunk/federation/pom.xml
modules/portlet/trunk/jsr168api/pom.xml
modules/portlet/trunk/management/pom.xml
modules/portlet/trunk/mc/pom.xml
modules/portlet/trunk/pom.xml
modules/portlet/trunk/portal/pom.xml
modules/portlet/trunk/portlet/pom.xml
modules/portlet/trunk/releaseLibs.sh
modules/portlet/trunk/samples/pom.xml
modules/portlet/trunk/test/pom.xml
Log:
update portlet trunk to 2.1.0 snapshot and added a few basic portlet samples migrated from core samples
Modified: modules/portlet/trunk/bridge/pom.xml
===================================================================
--- modules/portlet/trunk/bridge/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/bridge/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/build/distrib/distrib.xml
===================================================================
--- modules/portlet/trunk/build/distrib/distrib.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/build/distrib/distrib.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -2,9 +2,9 @@
<property name="source.dir" value="../.."/>
<property name="src.docs.dir" value="${source.dir}/docs"/>
- <property name="pc.release.version" value="2.0.0.CR3"/>
- <property name="demo.release.version" value="2.0.0.CR3"/>
- <property name="maven.version" value="2.0.0-SNAPSHOT"/>
+ <property name="pc.release.version" value="2.1.0.CR1"/>
+ <property name="demo.release.version" value="2.1.0.CR1"/>
+ <property name="maven.version" value="2.1.0-SNAPSHOT"/>
<!-- -->
<property name="pc.release.name" value="jboss-portletcontainer-${pc.release.version}"/>
Modified: modules/portlet/trunk/build/pom.xml
===================================================================
--- modules/portlet/trunk/build/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/build/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -18,7 +18,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<packaging>pom</packaging>
<name>JBoss Portal Portlet Module</name>
<description>JBoss Portal Portlet Module</description>
@@ -33,8 +33,8 @@
<version.jboss-logging>2.0.4.GA</version.jboss-logging>
<version.jbossxb>2.0.0.CR8</version.jbossxb>
<version.jboss-remoting>2.2.1.GA</version.jboss-remoting>
- <version.jboss.portal.common>1.2.0-SNAPSHOT</version.jboss.portal.common>
- <version.jboss.portal.web>1.2.0-SNAPSHOT</version.jboss.portal.web>
+ <version.jboss.portal.common>1.2.0</version.jboss.portal.common>
+ <version.jboss.portal.web>1.2.0</version.jboss.portal.web>
<version.jboss.unit>1.2.0.Beta2</version.jboss.unit>
<version.log4j>1.2.14</version.log4j>
<version.apache.commons-logging>1.1.1</version.apache.commons-logging>
Modified: modules/portlet/trunk/controller/pom.xml
===================================================================
--- modules/portlet/trunk/controller/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/controller/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/docs/pom.xml
===================================================================
--- modules/portlet/trunk/docs/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/docs/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -4,7 +4,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<artifactId>docs-aggregator</artifactId>
Modified: modules/portlet/trunk/docs/user-guide/pom.xml
===================================================================
--- modules/portlet/trunk/docs/user-guide/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/docs/user-guide/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -11,7 +11,7 @@
</parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>user-guide-${translation}</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>User_Guide_(${translation})</name>
Modified: modules/portlet/trunk/federation/pom.xml
===================================================================
--- modules/portlet/trunk/federation/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/federation/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/jsr168api/pom.xml
===================================================================
--- modules/portlet/trunk/jsr168api/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/jsr168api/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/management/pom.xml
===================================================================
--- modules/portlet/trunk/management/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/management/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/mc/pom.xml
===================================================================
--- modules/portlet/trunk/mc/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/mc/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/pom.xml
===================================================================
--- modules/portlet/trunk/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -5,7 +5,7 @@
<artifactId>module-aggregator</artifactId>
<packaging>pom</packaging>
<name>JBoss Portal Portlet Module Aggregator</name>
- <version>2.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<url>http://labs.jboss.com/jbossportal</url>
<dependencies/>
Modified: modules/portlet/trunk/portal/pom.xml
===================================================================
--- modules/portlet/trunk/portal/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/portal/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/portlet/pom.xml
===================================================================
--- modules/portlet/trunk/portlet/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/portlet/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Modified: modules/portlet/trunk/releaseLibs.sh
===================================================================
--- modules/portlet/trunk/releaseLibs.sh 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/releaseLibs.sh 2008-06-25 14:09:20 UTC (rev 11141)
@@ -21,9 +21,9 @@
echo "Releasing to Portal thirdparty"
fi
-cp bridge/target/portlet-bridge-2.0.0-SNAPSHOT.jar $loc/portal-portlet-bridge-lib.jar
-cp controller/target/portlet-controller-2.0.0-SNAPSHOT.jar $loc/portal-portlet-controller-lib.jar
-cp federation/target/portlet-federation-2.0.0-SNAPSHOT.jar $loc/portal-portlet-federation-lib.jar
-cp management/target/portlet-management-2.0.0-SNAPSHOT.jar $loc/portal-portlet-management-lib.jar
-cp portlet/target/portlet-portlet-2.0.0-SNAPSHOT.jar $loc/portal-portlet-lib.jar
-cp samples/target/portlet-samples-2.0.0-SNAPSHOT.jar $loc/portal-portlet-samples-lib.jar
+cp bridge/target/portlet-bridge-2.1.0-SNAPSHOT.jar $loc/portal-portlet-bridge-lib.jar
+cp controller/target/portlet-controller-2.1.0-SNAPSHOT.jar $loc/portal-portlet-controller-lib.jar
+cp federation/target/portlet-federation-2.1.0-SNAPSHOT.jar $loc/portal-portlet-federation-lib.jar
+cp management/target/portlet-management-2.1.0-SNAPSHOT.jar $loc/portal-portlet-management-lib.jar
+cp portlet/target/portlet-portlet-2.1.0-SNAPSHOT.jar $loc/portal-portlet-lib.jar
+cp samples/target/portlet-samples-2.1.0-SNAPSHOT.jar $loc/portal-portlet-samples-lib.jar
Modified: modules/portlet/trunk/samples/pom.xml
===================================================================
--- modules/portlet/trunk/samples/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/samples/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -13,6 +13,10 @@
<dependencies>
<dependency>
+ <groupId>org.jboss.portal.common</groupId>
+ <artifactId>common-common</artifactId>
+ </dependency>
+ <dependency>
<groupId>javax.portlet</groupId>
<artifactId>portlet-api</artifactId>
</dependency>
Added: modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/CharsetPortlet.java
===================================================================
--- modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/CharsetPortlet.java (rev 0)
+++ modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/CharsetPortlet.java 2008-06-25 14:09:20 UTC (rev 11141)
@@ -0,0 +1,278 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.samples.basic;
+
+import org.jboss.portal.common.text.EntityEncoder;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.ActionResponse;
+import javax.portlet.ActionRequest;
+import java.io.PrintWriter;
+import java.io.IOException;
+
+/**
+ * This portlet is used to display a form that helps to test the charset handling by the portal and the client. When a
+ * fault occurs it may be the client fault (for instance the char with unicode value 160 fail the test in firefox but
+ * succeds in IE6).
+ *
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class CharsetPortlet extends GenericPortlet
+{
+
+ public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, PortletSecurityException, IOException
+ {
+ String fromString = req.getParameter("from");
+ String toString = req.getParameter("to");
+ int from;
+ int to;
+ try
+ {
+ from = Integer.parseInt(fromString);
+ to = Integer.parseInt(toString);
+ }
+ catch (NumberFormatException ignore)
+ {
+ from = 65;
+ to = 256;
+ }
+ resp.setRenderParameter("from", "" + from);
+ resp.setRenderParameter("to", "" + to);
+
+ //
+ String text = req.getParameter("text");
+ if (text != null)
+ {
+ StringBuffer buffer = new StringBuffer();
+ for (int i = from; i < to; i++)
+ {
+ char c = (char)i;
+ if (useChar(c))
+ {
+ buffer.append(c);
+ }
+ }
+ String expectedText = buffer.toString();
+ boolean same = expectedText.equals(text);
+ if (!same)
+ {
+ getPortletContext().log("The input does not match the expected string");
+ getPortletContext().log("Expected string " + expectedText);
+ getPortletContext().log("Received string " + text);
+ }
+ resp.setRenderParameter("same", "" + same);
+ }
+ }
+
+
+ protected void doHelp(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
+ {
+ //
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ writer.print("This portlet shows different ways to properly display and submit unicode text");
+ }
+
+ protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
+ {
+ String sameString = req.getParameter("same");
+ Boolean same = null;
+ if ("true".equalsIgnoreCase(sameString))
+ {
+ same = Boolean.TRUE;
+ }
+ else if ("false".equalsIgnoreCase(sameString))
+ {
+ same = Boolean.FALSE;
+ }
+
+ //
+ String fromString = req.getParameter("from");
+ String toString = req.getParameter("to");
+ int from = 65;
+ int to = 256;
+ try
+ {
+ from = Integer.parseInt(fromString);
+ to = from + 16;
+ to = Integer.parseInt(toString);
+ }
+ catch (NumberFormatException ignore)
+ {
+ //
+ }
+
+ //
+ if (to <= from)
+ {
+ to = from + 16;
+ }
+
+ //
+ StringBuffer escapedText = new StringBuffer();
+ StringBuffer text = new StringBuffer();
+ for (int i = from; i < to; i++)
+ {
+ char c = (char)i;
+ if (useChar(c))
+ {
+ text.append(c);
+ String s = EntityEncoder.FULL.lookup(c);
+ if (s == null)
+ {
+ escapedText.append(c);
+ }
+ else
+ {
+ escapedText.append("&").append(s).append(";");
+ }
+ }
+ }
+
+ //
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ writer.println("<div style=\"border-top:solid 1px\">Testing range:</div>");
+ writer.print(
+ "<div>" +
+ "<form action=\"" + resp.createActionURL() + "\" method=\"post\"\">" +
+ "<input type=\"text\" name=\"from\" value=\"" + from + "\"/>" +
+ "<input type=\"text\" name=\"to\" value=\"" + to + "\"/>" +
+ "<input type=\"submit\" value=\"change\"/>" +
+ "</form>" +
+ "</div>");
+
+ //
+ writer.println("<div style=\"border-top:solid 1px\">Test processAction() with a textarea field:</div>");
+ writer.println(
+ "<div>" +
+ "<form action=\"" + resp.createActionURL() + "\" accept-charset=\"" + resp.getCharacterEncoding() + "\" method=\"post\">" +
+ "<input type=\"hidden\" name=\"from\" value=\"" + from + "\"/>" +
+ "<input type=\"hidden\" name=\"to\" value=\"" + to + "\"/>" +
+ "<textarea name=\"text\" cols=\"20\" rows=\"10\" wrap=\"virtual\">" + escapedText + "</textarea>" +
+ "<input type=\"submit\" value=\"check\"/>" +
+ "</form>" +
+ "</div>");
+
+ //
+ writer.println("<div style=\"border-top:solid 1px\">Test processAction() with a text field:</div>");
+ writer.println(
+ "<div>" +
+ "<form action=\"" + resp.createActionURL() + "\" accept-charset=\"" + resp.getCharacterEncoding() + "\" method=\"post\">" +
+ "<input type=\"hidden\" name=\"from\" value=\"" + from + "\"/>" +
+ "<input type=\"hidden\" name=\"to\" value=\"" + to + "\"/>" +
+ "<input type=\"text\" name=\"text\" value=\"" + escapedText + "\"/>" +
+ "<input type=\"submit\" value=\"check\"/>" +
+ "</form>" +
+ "</div>");
+
+ //
+ PortletURL url = resp.createActionURL();
+ url.setParameter("text", text.toString());
+ writer.println("<div style=\"border-top:solid 1px\">Test processAction() with a portlet parameter:</div>");
+ writer.println(
+ "<div>" +
+ "<form action=\"" + url + "\" accept-charset=\"" + resp.getCharacterEncoding() + "\" method=\"post\">" +
+ "<input type=\"hidden\" name=\"from\" value=\"" + from + "\"/>" +
+ "<input type=\"hidden\" name=\"to\" value=\"" + to + "\"/>" +
+ "<input type=\"submit\" value=\"check\"/>" +
+ "</form>" +
+ "</div>");
+
+ //
+ PortletURL url2 = resp.createActionURL();
+ url2.setParameter("text", text.toString());
+ url2.setParameter("from", "" + from);
+ url2.setParameter("to", "" + to);
+ writer.println("<div style=\"border-top:solid 1px\"><a href=\"" + url2 + "\">Test</a> processAction() with a portlet parameter:</div>");
+
+ //
+ if (same != null)
+ {
+ writer.print("<div style=\"color:red;margin-top:2em;margin-bottom:2em\">Test result: ");
+ if (same == Boolean.TRUE)
+ {
+ writer.print("The input matched the expected result");
+ }
+ else if (same == Boolean.FALSE)
+ {
+ writer.print("The input did not matched the expected result");
+ }
+ writer.print("</div>");
+ }
+
+ //
+ writer.close();
+ }
+
+ public static boolean useChar(char c)
+ {
+ switch (Character.getType(c))
+ {
+ case Character.LOWERCASE_LETTER: // Ll
+ case Character.UPPERCASE_LETTER: // Lu
+ case Character.TITLECASE_LETTER: // Lt
+ case Character.MODIFIER_LETTER: // Lm
+ case Character.OTHER_LETTER: // Lo
+ case Character.NON_SPACING_MARK: // Mn
+ case Character.ENCLOSING_MARK: // Me
+ case Character.COMBINING_SPACING_MARK: // Mc
+ case Character.DECIMAL_DIGIT_NUMBER: // Nd
+ case Character.LETTER_NUMBER: // Nl
+ case Character.OTHER_NUMBER: // No
+ case Character.SPACE_SEPARATOR: // Zs
+ case Character.LINE_SEPARATOR: // Zl
+ case Character.PARAGRAPH_SEPARATOR: // Zp
+ case Character.DASH_PUNCTUATION: // Pd
+ case Character.START_PUNCTUATION: // Ps
+ case Character.END_PUNCTUATION: // Pe
+ case Character.CONNECTOR_PUNCTUATION: // Pc
+ case Character.OTHER_PUNCTUATION: // Po
+ case Character.INITIAL_QUOTE_PUNCTUATION: // Pi
+ case Character.FINAL_QUOTE_PUNCTUATION: // Pf
+ case Character.MATH_SYMBOL: // Sm
+ case Character.CURRENCY_SYMBOL: // Sc
+ case Character.MODIFIER_SYMBOL: // Sk
+ case Character.OTHER_SYMBOL: // So
+ return true;
+ default:
+ case Character.UNASSIGNED: // Cn
+ case Character.CONTROL: // Cc
+ case Character.FORMAT: // Cf
+ case Character.PRIVATE_USE: // Co
+ case Character.SURROGATE: // Cs
+ return false;
+ }
+ }
+
+}
Added: modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/EncodingPortlet.java
===================================================================
--- modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/EncodingPortlet.java (rev 0)
+++ modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/EncodingPortlet.java 2008-06-25 14:09:20 UTC (rev 11141)
@@ -0,0 +1,104 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.samples.basic;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.RenderRequest;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.ActionRequest;
+import javax.portlet.ActionResponse;
+import java.io.PrintWriter;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class EncodingPortlet extends GenericPortlet
+{
+
+ public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, PortletSecurityException, IOException
+ {
+ resp.setRenderParameter("text", req.getParameter("text"));
+ req.getPortletSession().setAttribute("text", req.getParameter("text"));
+
+ }
+
+ protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, PortletSecurityException, IOException
+ {
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ String param = req.getParameter("text");
+ String attr = (String)req.getPortletSession().getAttribute("text");
+
+ //
+ writer.print(
+ "<div> Text to pass : " +
+ "<form action=\"" + resp.createRenderURL() + "\" method=\"post\"\">" +
+ "<input type=\"text\" name=\"text\" value=\"\"/>" +
+ "<input type=\"submit\" value=\"Submit to render phase\"/>" +
+ "</form>" +
+ "<form action=\"" + resp.createActionURL() + "\" method=\"post\"\">" +
+ "<input type=\"text\" name=\"text\" value=\"\"/>" +
+ "<input type=\"submit\" value=\"Submit to action phase\"/>" +
+ "</form>" +
+ "</div>");
+
+ //
+ writer.println(
+ "<div>" + "Text retrieved from request parameter: " +
+ "</div>" +
+ "<div>" +
+ "<textarea name=\"text\" cols=\"20\" rows=\"4\" wrap=\"virtual\">");
+
+ if (param != null)
+ {
+ writer.println(param);
+ }
+
+ writer.println(
+ "</textarea>" +
+ "</div>");
+
+ writer.println(
+ "<div>" + "Text retrieved from portlet session (value set during Action Phase): " +
+ "</div>" +
+ "<div>" +
+ "<textarea name=\"text\" cols=\"20\" rows=\"4\" wrap=\"virtual\">");
+
+ if (attr != null)
+ {
+ writer.println(attr);
+ }
+
+ writer.println(
+ "</textarea>" +
+ "</div>");
+
+ //
+ writer.close();
+ }
+}
Added: modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/PrivateParameterPortlet.java
===================================================================
--- modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/PrivateParameterPortlet.java (rev 0)
+++ modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/PrivateParameterPortlet.java 2008-06-25 14:09:20 UTC (rev 11141)
@@ -0,0 +1,119 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.samples.basic;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletException;
+import javax.portlet.RenderRequest;
+import javax.portlet.PortletURL;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionResponse;
+import javax.portlet.ActionRequest;
+import java.util.Enumeration;
+import java.io.PrintWriter;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PrivateParameterPortlet extends GenericPortlet
+{
+
+ public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, IOException
+ {
+ for (Enumeration e = req.getParameterNames(); e.hasMoreElements();)
+ {
+ String name = (String)e.nextElement();
+ String value = req.getParameter(name);
+ if (!"name".equals(name) && !"value".equals(name))
+ {
+ resp.setRenderParameter(name, value);
+ }
+ }
+ String name = req.getParameter("name");
+ String value = req.getParameter("value");
+ if (name != null && value != null)
+ {
+ resp.setRenderParameter(name, value);
+ }
+ }
+
+ public void render(RenderRequest req, RenderResponse resp) throws PortletException, IOException
+ {
+ String color = req.getParameter("color");
+ if (color == null)
+ {
+ color = "white";
+ }
+
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ PortletURL renderURL = resp.createRenderURL();
+
+ //
+ renderURL.setParameter("color", "blue");
+ String blueURL = renderURL.toString();
+
+ //
+ renderURL.setParameter("color", "red");
+ String redURL = renderURL.toString();
+
+ //
+ renderURL.setParameter("color", "white");
+ String whiteURL = renderURL.toString();
+
+ //
+ writer.print("<a href=\"" + blueURL + "\">blue</a> -");
+ writer.print("<a href=\"" + redURL + "\">red</a> -");
+ writer.print("<a href=\"" + whiteURL + "\">white</a><br/>");
+
+ //
+ writer.print("Parameters :<br/>");
+ writer.print("<table bgcolor=\"" + color + "\">");
+ writer.print("<tr><td>Name</td><td>value</td></tr>");
+ for (Enumeration e = req.getParameterNames(); e.hasMoreElements();)
+ {
+ String name = (String)e.nextElement();
+ String value = req.getParameter(name);
+ writer.print("<tr><td>" + name + "</td><td>" + value + "</td></tr>");
+ }
+ writer.print("</table>");
+
+ //
+ PortletURL actionURL = resp.createActionURL();
+ writer.print("<form action=\"" + actionURL.toString() + "\" method=\"post\">");
+ writer.print("<input type=\"text\" name=\"name\"/>");
+ writer.print("<input type=\"text\" name=\"value\"/>");
+ writer.print("<input type=\"submit\" value=\"add\"/>");
+ writer.print("</form>");
+
+ //
+ writer.print("<a href=\"" + req.getContextPath() + "/test.txt\">test</a>");
+
+ //
+ writer.close();
+ }
+}
Added: modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/PublicParameterPortlet.java
===================================================================
--- modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/PublicParameterPortlet.java (rev 0)
+++ modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/PublicParameterPortlet.java 2008-06-25 14:09:20 UTC (rev 11141)
@@ -0,0 +1,118 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.samples.basic;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.ActionRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletURL;
+import javax.portlet.PortletException;
+import javax.portlet.ProcessAction;
+import javax.portlet.RenderRequest;
+import java.util.Enumeration;
+import java.util.Map;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class PublicParameterPortlet extends GenericPortlet
+{
+
+ @ProcessAction(name="update")
+ public void update(ActionRequest req, ActionResponse resp) throws PortletException, IOException
+ {
+ Map<String, String[]> publicParameters = req.getPublicParameterMap();
+
+ //
+ for (Map.Entry<String, String[]> actionParameter : req.getPrivateParameterMap().entrySet())
+ {
+ String parameterName = actionParameter.getKey();
+ String parameterValue = actionParameter.getValue()[0];
+ String[] publicValues = publicParameters.get(parameterName);
+
+ //
+ if (parameterValue.length() > 0)
+ {
+ if (publicValues == null || !publicValues[0].equals(parameterValue))
+ {
+ resp.setRenderParameter(parameterName, parameterValue);
+ }
+ }
+ else if (publicValues != null)
+ {
+ resp.removePublicRenderParameter(parameterName);
+ }
+ }
+ }
+
+ public void render(RenderRequest req, RenderResponse resp) throws PortletException, IOException
+ {
+ PortletURL actionURL = resp.createActionURL();
+ actionURL.setParameter(ActionRequest.ACTION_NAME, "update");
+
+ //
+ PrintWriter writer = resp.getWriter();
+ writer.print("<form action=\"" + actionURL + "\" method=\"POST\"><table>");
+
+ //
+ for (Enumeration<String> e = getPortletConfig().getPublicRenderParameterNames();e.hasMoreElements();)
+ {
+ String parameterName = e.nextElement();
+
+ //
+ String parameterValue = req.getParameter(parameterName);
+
+ //
+ writer.print("<tr><td>" + parameterName + "</td><td>");
+
+ if (parameterValue != null)
+ {
+ writer.print("<input type=\"text\" name=\"" + parameterName + "\" width=\"36\" value=\"" + parameterValue + "\"/>");
+
+ //
+ PortletURL renderURL = resp.createRenderURL();
+ renderURL.removePublicRenderParameter(parameterName);
+ writer.println("<a href=\"" + renderURL + "\">Remove</>");
+ }
+ else
+ {
+ writer.print("<input type=\"text\" name=\"" + parameterName + "\" width=\"36\" value=\"\"/>");
+ }
+ writer.println();
+
+ writer.println("</td>");
+
+ }
+
+ writer.println("<input type=\"submit\" value=\"Update\"/>");
+
+ writer.print("</table></form>");
+
+ //
+ writer.close();
+ }
+}
Added: modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/SessionCounterPortlet.java
===================================================================
--- modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/SessionCounterPortlet.java (rev 0)
+++ modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/SessionCounterPortlet.java 2008-06-25 14:09:20 UTC (rev 11141)
@@ -0,0 +1,73 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.samples.basic;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.ActionRequest;
+import javax.portlet.PortletSecurityException;
+import javax.portlet.ActionResponse;
+import javax.portlet.RenderRequest;
+import javax.portlet.RenderResponse;
+import javax.portlet.PortletException;
+import javax.portlet.PortletSession;
+import java.io.PrintWriter;
+import java.io.IOException;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class SessionCounterPortlet extends GenericPortlet
+{
+ public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, IOException
+ {
+ }
+
+ protected void doView(RenderRequest req, RenderResponse resp) throws PortletException, IOException
+ {
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ PortletSession session = req.getPortletSession();
+ int count = 0;
+ if (session.getAttribute("count") != null)
+ {
+ count = (Integer)session.getAttribute("count") + 1;
+ }
+ session.setAttribute("count", count);
+ writer.write("<p>");
+ writer.write("<div class=\"portlet-section-header\">Render call count</div>");
+ writer.write("<div class=\"portlet-section-body\">");
+ writer.write("<div>" + count + "</div>");
+ writer.write("</div>");
+ writer.write("</p>");
+
+ writer.write("<div class=\"portlet-section-header\">Render call count</div>");
+ writer.write("<div><a href=\"" + resp.createActionURL() + "\">action</a></div");
+ writer.write("<div><a href=\"" + resp.createRenderURL() + "\">render</a></div");
+
+ //
+ writer.close();
+ }
+}
Added: modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/SessionPortlet.java
===================================================================
--- modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/SessionPortlet.java (rev 0)
+++ modules/portlet/trunk/samples/src/main/java/org/jboss/portal/portlet/samples/basic/SessionPortlet.java 2008-06-25 14:09:20 UTC (rev 11141)
@@ -0,0 +1,123 @@
+/******************************************************************************
+ * JBoss, a division of Red Hat *
+ * Copyright 2008, Red Hat Middleware, LLC, and individual *
+ * contributors as indicated by the @authors tag. See the *
+ * copyright.txt in the distribution for a full listing of *
+ * individual contributors. *
+ * *
+ * This is free software; you can redistribute it and/or modify it *
+ * under the terms of the GNU Lesser General Public License as *
+ * published by the Free Software Foundation; either version 2.1 of *
+ * the License, or (at your option) any later version. *
+ * *
+ * This software is distributed in the hope that it will be useful, *
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of *
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
+ * Lesser General Public License for more details. *
+ * *
+ * You should have received a copy of the GNU Lesser General Public *
+ * License along with this software; if not, write to the Free *
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA *
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org. *
+ ******************************************************************************/
+package org.jboss.portal.portlet.samples.basic;
+
+import javax.portlet.GenericPortlet;
+import javax.portlet.PortletURL;
+import javax.portlet.PortletSession;
+import javax.portlet.ActionResponse;
+import javax.portlet.PortletException;
+import javax.portlet.RenderResponse;
+import javax.portlet.ActionRequest;
+import javax.portlet.RenderRequest;
+import java.io.PrintWriter;
+import java.io.IOException;
+import java.util.Enumeration;
+
+/**
+ * @author <a href="mailto:julien@jboss-portal.org">Julien Viet</a>
+ * @version $Revision: 630 $
+ */
+public class SessionPortlet extends GenericPortlet
+{
+
+ public void processAction(ActionRequest req, ActionResponse resp) throws PortletException, IOException
+ {
+ String name = req.getParameter("name");
+ String value = req.getParameter("value");
+ boolean portletScope = req.getParameter("portlet") != null;
+ if (name != null && value != null)
+ {
+ req.getPortletSession().setAttribute(name, value, portletScope ? PortletSession.PORTLET_SCOPE : PortletSession.APPLICATION_SCOPE);
+ }
+ if (req.getParameter("invalidate") != null)
+ {
+ req.getPortletSession().invalidate();
+ }
+ }
+
+ public void render(RenderRequest req, RenderResponse resp) throws PortletException, IOException
+ {
+ PortletSession session = req.getPortletSession(false);
+ PortletURL purl = resp.createActionURL();
+
+ //
+ resp.setContentType("text/html");
+ PrintWriter writer = resp.getWriter();
+
+ //
+ if (session == null)
+ {
+ writer.println("No session");
+ }
+ else
+ {
+ writer.println("Session id = " + session.getId());
+ writer.println("<br/>");
+
+ //
+ print(session, PortletSession.PORTLET_SCOPE, writer);
+ writer.println("<br/>");
+
+ //
+ print(session, PortletSession.APPLICATION_SCOPE, writer);
+ writer.println("<br/>");
+
+ }
+
+ //
+ writer.println("<form action=\"" + purl.toString() + "\" method=\"post\">");
+ writer.println("<input type=\"text\" name=\"name\"/>");
+ writer.println("<input type=\"text\" name=\"value\"/>");
+ writer.println("<input type=\"submit\" name=\"portlet\" value=\"Add to portlet scope\"/>");
+ writer.println("<input type=\"submit\" name=\"application\" value=\"Add to application scope\"/>");
+ writer.println("</form><br/>");
+
+ //
+ purl.setParameter("invalidate", "true");
+ writer.println("<a href=\"" + purl.toString() + "\">invalidate</a><br/>");
+ }
+
+ private void print(PortletSession session, int scope, PrintWriter writer)
+ {
+ String scopeName = PortletSession.PORTLET_SCOPE == scope ? "portlet" : "application";
+ writer.println("<p style='border-bottom: 2px dashed #999;'>Session attributes for " + scopeName + " scope:</p>");
+ Enumeration e = session.getAttributeNames(scope);
+ if (e.hasMoreElements())
+ {
+ writer.println("<table style='border: 1px solid #333;'>");
+ writer.println("<tr class='portlet-table-header'><th>name</th><th>value</th>");
+ for (; e.hasMoreElements();)
+ {
+ String name = (String)e.nextElement();
+ Object value = session.getAttribute(name, scope);
+ writer.println("<tr><td>" + name + "</td><td>" + value + "</td>");
+ }
+ writer.println("</table>");
+ }
+ else
+ {
+ writer.println("<p>No attributes in " + scopeName + " scope!</p>");
+ }
+ }
+}
Modified: modules/portlet/trunk/test/pom.xml
===================================================================
--- modules/portlet/trunk/test/pom.xml 2008-06-25 13:25:00 UTC (rev 11140)
+++ modules/portlet/trunk/test/pom.xml 2008-06-25 14:09:20 UTC (rev 11141)
@@ -3,7 +3,7 @@
<parent>
<groupId>org.jboss.portal.portlet</groupId>
<artifactId>module-parent</artifactId>
- <version>2.0.0-SNAPSHOT</version>
+ <version>2.1.0-SNAPSHOT</version>
<relativePath>../build/pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
17 years, 10 months
JBoss Portal SVN: r11140 - in branches/JBoss_Portal_Branch_2_7: core and 4 other directories.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-25 09:25:00 -0400 (Wed, 25 Jun 2008)
New Revision: 11140
Modified:
branches/JBoss_Portal_Branch_2_7/cms/.classpath
branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
branches/JBoss_Portal_Branch_2_7/core/.classpath
branches/JBoss_Portal_Branch_2_7/workflow/.classpath
branches/JBoss_Portal_Branch_2_7/wsrp/.classpath
Log:
Eclipse update
Modified: branches/JBoss_Portal_Branch_2_7/cms/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/cms/.classpath 2008-06-25 13:15:42 UTC (rev 11139)
+++ branches/JBoss_Portal_Branch_2_7/cms/.classpath 2008-06-25 13:25:00 UTC (rev 11140)
@@ -11,7 +11,7 @@
<classpathentry kind="lib" path="/thirdparty/antlr/lib/antlr-2.7.6.jar"/>
<classpathentry kind="lib" path="/thirdparty/cglib/lib/cglib.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-logging/lib/commons-logging.jar"/>
- <classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar" sourcepath="/hibernate"/>
<classpathentry kind="lib" path="/thirdparty/hsqldb/lib/hsqldb.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
@@ -37,12 +37,12 @@
<classpathentry combineaccessrules="false" kind="src" path="/workflow"/>
<classpathentry kind="lib" path="/thirdparty/jackrabbit/lib/jackrabbit-core.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/security"/>
- <classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/search"/>
<classpathentry kind="lib" path="/thirdparty/apache-lucene/lib/lucene.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/test/lib/portal-test-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/apache-ant/lib/ant.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbpm/jpdl/lib/jbpm-jpdl.jar" sourcepath="/jbpm"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-06-25 13:15:42 UTC (rev 11139)
+++ branches/JBoss_Portal_Branch_2_7/core/.classpath 2008-06-25 13:25:00 UTC (rev 11140)
@@ -38,7 +38,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/theme"/>
<classpathentry combineaccessrules="false" kind="src" path="/registration"/>
<classpathentry combineaccessrules="false" kind="src" path="/workflow"/>
- <classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/portlet-server"/>
<classpathentry kind="lib" path="/thirdparty/apache-xerces/lib/xml-apis.jar"/>
<classpathentry kind="lib" path="/thirdparty/freemarker/lib/freemarker.jar"/>
Modified: branches/JBoss_Portal_Branch_2_7/core-cms/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-06-25 13:15:42 UTC (rev 11139)
+++ branches/JBoss_Portal_Branch_2_7/core-cms/.classpath 2008-06-25 13:25:00 UTC (rev 11140)
@@ -16,7 +16,6 @@
<classpathentry combineaccessrules="false" kind="src" path="/workflow"/>
<classpathentry kind="lib" path="/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/security"/>
- <classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/core-admin"/>
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/search"/>
@@ -27,5 +26,6 @@
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/portlet/lib/portal-portlet-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbpm/jpdl/lib/jbpm-jpdl.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/core-identity/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-06-25 13:15:42 UTC (rev 11139)
+++ branches/JBoss_Portal_Branch_2_7/core-identity/.classpath 2008-06-25 13:25:00 UTC (rev 11140)
@@ -14,7 +14,6 @@
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
<classpathentry kind="con" path="org.eclipse.jdt.junit.JUNIT_CONTAINER/3"/>
<classpathentry kind="lib" path="/thirdparty/freemarker/lib/freemarker.jar"/>
- <classpathentry combineaccessrules="false" kind="src" path="/core-cms"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-aspect-library.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common-client.jar"/>
@@ -33,8 +32,6 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jnpserver.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/namespace.jar"/>
<classpathentry kind="lib" path="/thirdparty/jcaptcha/lib/jcaptcha.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm-identity.jar"/>
<classpathentry kind="lib" path="/thirdparty/facelets/lib/jsf-facelets.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
@@ -48,5 +45,6 @@
<classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-jsf/lib/jsf-impl.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-jstl/lib/jstl.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbpm/jpdl/lib/jbpm-jpdl.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/workflow/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/workflow/.classpath 2008-06-25 13:15:42 UTC (rev 11139)
+++ branches/JBoss_Portal_Branch_2_7/workflow/.classpath 2008-06-25 13:25:00 UTC (rev 11140)
@@ -10,8 +10,8 @@
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-common.jar"/>
<classpathentry kind="lib" path="/thirdparty/sun-servlet/lib/servlet-api.jar"/>
<classpathentry kind="lib" path="/thirdparty/junit/lib/junit.jar"/>
- <classpathentry kind="lib" path="/thirdparty/jbpm/jaronly/lib/jbpm.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/identity/lib/portal-identity-lib.jar"/>
+ <classpathentry kind="lib" path="/thirdparty/jbpm/jpdl/lib/jbpm-jpdl.jar"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Modified: branches/JBoss_Portal_Branch_2_7/wsrp/.classpath
===================================================================
--- branches/JBoss_Portal_Branch_2_7/wsrp/.classpath 2008-06-25 13:15:42 UTC (rev 11139)
+++ branches/JBoss_Portal_Branch_2_7/wsrp/.classpath 2008-06-25 13:25:00 UTC (rev 11140)
@@ -22,7 +22,6 @@
<classpathentry kind="lib" path="/thirdparty/ibm-wsdl4j/lib/wsdl4j.jar"/>
<classpathentry kind="lib" path="/thirdparty/jbossas/core-libs/lib/jboss-xml-binding.jar"/>
<classpathentry combineaccessrules="false" kind="src" path="/jems"/>
- <classpathentry combineaccessrules="false" kind="src" path="/core"/>
<classpathentry combineaccessrules="false" kind="src" path="/registration"/>
<classpathentry kind="lib" path="/thirdparty/hibernate/lib/hibernate3.jar"/>
<classpathentry kind="lib" path="/thirdparty/jboss-portal/modules/common/lib/portal-common-lib.jar"/>
@@ -35,5 +34,6 @@
<classpathentry kind="lib" path="/thirdparty/apache-fileupload/lib/commons-fileupload.jar"/>
<classpathentry kind="lib" path="/tools/lib/xercesImpl.jar"/>
<classpathentry kind="lib" path="/thirdparty/portlet/lib/portlet-api.jar"/>
+ <classpathentry combineaccessrules="false" kind="src" path="/core"/>
<classpathentry kind="output" path="output/classes"/>
</classpath>
17 years, 10 months
JBoss Portal SVN: r11139 - branches/JBoss_Portal_Branch_2_7/workflow/src/resources/portal-workflow-sar/META-INF.
by portal-commits@lists.jboss.org
Author: thomas.heute(a)jboss.com
Date: 2008-06-25 09:15:42 -0400 (Wed, 25 Jun 2008)
New Revision: 11139
Modified:
branches/JBoss_Portal_Branch_2_7/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml
Log:
Turning off the scheduling service for the moment. Faced this issue: JBPM-1289
Modified: branches/JBoss_Portal_Branch_2_7/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml 2008-06-25 00:06:46 UTC (rev 11138)
+++ branches/JBoss_Portal_Branch_2_7/workflow/src/resources/portal-workflow-sar/META-INF/jboss-service.xml 2008-06-25 13:15:42 UTC (rev 11139)
@@ -34,6 +34,7 @@
<attribute name="JNDIName">java:/portal/workflow/WorkFlowSessionFactory</attribute>
</mbean>
+<!--
<mbean code="org.jboss.portal.workflow.service.JbpmThreadService"
name="portal:service=Thread,type=WorkflowService">
<depends optional-attribute-name="WorkflowService" proxy-type="attribute">
@@ -41,7 +42,8 @@
</depends>
<attribute name="SchedulerInterval">60000</attribute>
</mbean>
-
+ -->
+
<!-- Workflow service -->
<mbean code="org.jboss.portal.workflow.service.WorkflowServiceImpl"
name="portal:service=Workflow,type=WorkflowService"
@@ -54,7 +56,7 @@
<jbpm-configuration>
<jbpm-context>
<service name="persistence" factory="org.jbpm.persistence.db.DbPersistenceServiceFactory" />
- <service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" />
+ <!--service name="scheduler" factory="org.jbpm.scheduler.db.DbSchedulerServiceFactory" /-->
<service name="message" factory="org.jbpm.msg.db.DbMessageServiceFactory" />
<service name="tx" factory="org.jbpm.tx.TxServiceFactory"/>
</jbpm-context>
17 years, 10 months
JBoss Portal SVN: r11138 - in branches/JBoss_Portal_Branch_2_7: core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance and 2 other directories.
by portal-commits@lists.jboss.org
Author: chris.laprun(a)jboss.com
Date: 2008-06-24 20:06:46 -0400 (Tue, 24 Jun 2008)
New Revision: 11138
Added:
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/EmptyPortletInterceptorStackFactory.java
Modified:
branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml
branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml
branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java
Log:
- Properly handle case when interceptor stack is empty.
- Added EmpyPortletInterceptorStackFactory to replace EmptyInterceptorStackFactory in common that is not compatible with new interceptor stacks and use it in test beans definitions.
- Replaced portletInvoker property by next property in test beans definitions.
- Minor clean-ups.
- All tests pass except for some WSRP tests which I still need to investigate.
Modified: branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2008-06-24 18:39:53 UTC (rev 11137)
+++ branches/JBoss_Portal_Branch_2_7/core/src/main/org/jboss/portal/core/impl/model/instance/InstanceContainerImpl.java 2008-06-25 00:06:46 UTC (rev 11138)
@@ -22,10 +22,6 @@
******************************************************************************/
package org.jboss.portal.core.impl.model.instance;
-import org.jboss.portal.common.invocation.InterceptorStackFactory;
-import org.jboss.portal.common.invocation.Invocation;
-import org.jboss.portal.common.invocation.InvocationException;
-import org.jboss.portal.common.invocation.InvocationHandler;
import org.jboss.portal.core.model.instance.DuplicateInstanceException;
import org.jboss.portal.core.model.instance.Instance;
import org.jboss.portal.core.model.instance.InstanceContainer;
@@ -54,7 +50,6 @@
import org.jboss.portal.security.spi.provider.PermissionFactory;
import org.jboss.portal.security.spi.provider.PermissionRepository;
import org.jboss.portal.security.spi.provider.SecurityConfigurationException;
-import org.jboss.portal.server.impl.invocation.JBossPortletInterceptorStackFactory;
import org.jboss.portal.server.impl.invocation.PortletInterceptorStack;
import org.jboss.portal.server.impl.invocation.PortletInterceptorStackFactory;
@@ -74,8 +69,7 @@
* @version $Revision$
*/
public class InstanceContainerImpl extends AbstractJBossService
- implements InstanceContainer, AuthorizationDomain, DomainConfigurator,
- PermissionRepository, PermissionFactory
+ implements InstanceContainer, AuthorizationDomain, DomainConfigurator, PermissionRepository, PermissionFactory
{
@@ -96,8 +90,7 @@
{
public PortletInvocationResponse invoke(PortletInvocation invocation) throws IllegalArgumentException, PortletInvokerException
{
- PortletInvocation portletInvocation = (PortletInvocation)invocation;
- return portletInvoker.invoke(portletInvocation);
+ return portletInvoker.invoke(invocation);
}
};
@@ -329,8 +322,8 @@
// Collect portlet info to destroy for logging purpose
StringBuffer destroyLog = new StringBuffer("About to destroy portlets for instance=").
- append(definition.getInstanceId()).
- append(" [");
+ append(definition.getInstanceId()).
+ append(" [");
//
List toDestroy = new ArrayList(customizations.size());
@@ -370,8 +363,8 @@
if (failures.size() > 0)
{
StringBuffer failureLog = new StringBuffer("Some portlet were not properly destroyed for instance=").
- append(definition.getInstanceId()).
- append(" [");
+ append(definition.getInstanceId()).
+ append(" [");
for (Iterator i = failures.iterator(); i.hasNext();)
{
DestroyCloneFailure failure = (DestroyCloneFailure)i.next();
@@ -417,30 +410,35 @@
PortletInvocationResponse invoke(PortletInvocation invocation) throws PortletInvokerException
{
PortletInterceptorStack stack = stackFactory.getInterceptorStack();
- try
+ if (stack.getLength() != 0)
{
- stack.getInterceptor(stack.getLength()-1).setNext(handler);
- return stack.getInterceptor(0).invoke(invocation);
- }
- catch (Exception e)
- {
- if (e instanceof PortletInvokerException)
+ try
{
- throw (PortletInvokerException)e;
+ stack.getInterceptor(stack.getLength() - 1).setNext(handler);
+ return stack.getInterceptor(0).invoke(invocation);
}
- else if (e instanceof RuntimeException)
+ catch (Exception e)
{
- throw (RuntimeException)e;
+ if (e instanceof PortletInvokerException)
+ {
+ throw (PortletInvokerException)e;
+ }
+ else if (e instanceof RuntimeException)
+ {
+ throw (RuntimeException)e;
+ }
+ else
+ {
+ throw new PortletInvokerException(e);
+ }
}
- else
+ finally
{
- throw new PortletInvokerException(e);
+ stack.getInterceptor(stack.getLength() - 1).setNext(null);
}
}
- finally
- {
- stack.getInterceptor(stack.getLength()-1).setNext(null);
- }
+
+ return portletInvoker.invoke(invocation);
}
//**********************************************************************
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml 2008-06-24 18:39:53 UTC (rev 11137)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/persistent-jboss-beans.xml 2008-06-25 00:06:46 UTC (rev 11138)
@@ -47,11 +47,9 @@
</constructor>
</bean>
- <bean name="JNDISupport" class="org.jboss.portal.test.framework.embedded.JNDISupport">
- </bean>
+ <bean name="JNDISupport" class="org.jboss.portal.test.framework.embedded.JNDISupport"/>
- <bean name="TransactionManagerSupport" class="org.jboss.portal.test.framework.embedded.TransactionManagerSupport">
- </bean>
+ <bean name="TransactionManagerSupport" class="org.jboss.portal.test.framework.embedded.TransactionManagerSupport"/>
<bean name="ConnectionManagerSupport" class="org.jboss.portal.test.framework.embedded.ConnectionManagerSupport">
<property name="transactionManager"><inject bean="TransactionManagerSupport" property="transactionManager"/></property>
@@ -84,8 +82,7 @@
<property name="jNDIName">java:/PortletSessionFactory</property>
</bean>
- <bean name="StateConverter" class="org.jboss.portal.portlet.impl.state.StateConverterV0">
- </bean>
+ <bean name="StateConverter" class="org.jboss.portal.portlet.impl.state.StateConverterV0"/>
<bean name="StateManagementPolicy" class="org.jboss.portal.portlet.impl.state.StateManagementPolicyService">
<property name="persistLocally"><inject bean="TestCaseConfig" property="persistLocally"/></property>
</bean>
@@ -97,13 +94,12 @@
</bean>
<bean name="Producer" class="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker">
<property name="persistenceManager"><inject bean="PersistenceManager"/></property>
- <property name="portletInvoker"><inject bean="PortletContainer"/></property>
+ <property name="next"><inject bean="PortletContainer"/></property>
<property name="stateManagementPolicy"><inject bean="StateManagementPolicy"/></property>
<property name="stateConverter"><inject bean="StateConverter"/></property>
</bean>
- <bean name="StackFactory" class="org.jboss.portal.common.invocation.EmptyInterceptorStackFactory">
- </bean>
+ <bean name="StackFactory" class="org.jboss.portal.server.impl.invocation.EmptyPortletInterceptorStackFactory"/>
<bean name="ContainerContext"
class="org.jboss.portal.core.impl.model.instance.persistent.PersistentInstanceContainerContext">
<property name="sessionFactoryJNDIName">java:/InstanceSessionFactory</property>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml 2008-06-24 18:39:53 UTC (rev 11137)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/model/instance/transient-jboss-beans.xml 2008-06-25 00:06:46 UTC (rev 11138)
@@ -47,11 +47,9 @@
</constructor>
</bean>
- <bean name="JNDISupport" class="org.jboss.portal.test.framework.embedded.JNDISupport">
- </bean>
+ <bean name="JNDISupport" class="org.jboss.portal.test.framework.embedded.JNDISupport"/>
- <bean name="TransactionManagerSupport" class="org.jboss.portal.test.framework.embedded.TransactionManagerSupport">
- </bean>
+ <bean name="TransactionManagerSupport" class="org.jboss.portal.test.framework.embedded.TransactionManagerSupport"/>
<bean name="ConnectionManagerSupport" class="org.jboss.portal.test.framework.embedded.ConnectionManagerSupport">
<property name="transactionManager"><inject bean="TransactionManagerSupport" property="transactionManager"/></property>
@@ -84,8 +82,7 @@
<property name="jNDIName">java:/PortletSessionFactory</property>
</bean>
- <bean name="StateConverter" class="org.jboss.portal.portlet.impl.state.StateConverterV0">
- </bean>
+ <bean name="StateConverter" class="org.jboss.portal.portlet.impl.state.StateConverterV0"/>
<bean name="StateManagementPolicy" class="org.jboss.portal.portlet.impl.state.StateManagementPolicyService">
<property name="persistLocally"><inject bean="TestCaseConfig" property="persistLocally"/></property>
</bean>
@@ -93,19 +90,16 @@
class="org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager">
<property name="sessionFactoryJNDIName">java:/PortletSessionFactory</property>
</bean>
- <bean name="PortletContainer" class="org.jboss.portal.test.core.model.instance.PortletInvokerSupport">
- </bean>
+ <bean name="PortletContainer" class="org.jboss.portal.test.core.model.instance.PortletInvokerSupport"/>
<bean name="Producer" class="org.jboss.portal.portlet.state.producer.ProducerPortletInvoker">
<property name="persistenceManager"><inject bean="PersistenceManager"/></property>
- <property name="portletInvoker"><inject bean="PortletContainer"/></property>
+ <property name="next"><inject bean="PortletContainer"/></property>
<property name="stateManagementPolicy"><inject bean="StateManagementPolicy"/></property>
<property name="stateConverter"><inject bean="StateConverter"/></property>
</bean>
- <bean name="StackFactory" class="org.jboss.portal.common.invocation.EmptyInterceptorStackFactory">
- </bean>
- <bean name="ContainerContext" class="org.jboss.portal.core.impl.model.instance.TransientContainerContext">
- </bean>
+ <bean name="StackFactory" class="org.jboss.portal.server.impl.invocation.EmptyPortletInterceptorStackFactory"/>
+ <bean name="ContainerContext" class="org.jboss.portal.core.impl.model.instance.TransientContainerContext"/>
<bean name="InstanceContainer" class="org.jboss.portal.core.impl.model.instance.InstanceContainerImpl">
<property name="cloneOnCreate"><inject bean="TestCaseConfig" property="cloneOnCreate"/></property>
<property name="portletInvoker"><inject bean="Producer"/></property>
Modified: branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml
===================================================================
--- branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml 2008-06-24 18:39:53 UTC (rev 11137)
+++ branches/JBoss_Portal_Branch_2_7/core/src/resources/portal-core-test-jar/org/jboss/portal/test/core/state/jboss-beans.xml 2008-06-25 00:06:46 UTC (rev 11138)
@@ -41,11 +41,9 @@
</constructor>
</bean>
- <bean name="JNDISupport" class="org.jboss.portal.test.framework.embedded.JNDISupport">
- </bean>
+ <bean name="JNDISupport" class="org.jboss.portal.test.framework.embedded.JNDISupport"/>
- <bean name="TransactionManagerSupport" class="org.jboss.portal.test.framework.embedded.TransactionManagerSupport">
- </bean>
+ <bean name="TransactionManagerSupport" class="org.jboss.portal.test.framework.embedded.TransactionManagerSupport"/>
<bean name="ConnectionManagerSupport" class="org.jboss.portal.test.framework.embedded.ConnectionManagerSupport">
<property name="transactionManager"><inject bean="TransactionManagerSupport" property="transactionManager"/></property>
@@ -68,23 +66,20 @@
<property name="jNDIName">java:/SessionFactory</property>
</bean>
- <bean name="StateConverter" class="org.jboss.portal.portlet.impl.state.StateConverterV0">
- </bean>
+ <bean name="StateConverter" class="org.jboss.portal.portlet.impl.state.StateConverterV0"/>
- <bean name="StateManagementPolicy" class="org.jboss.portal.core.impl.portlet.state.StateManagementPolicyImpl">
- </bean>
+ <bean name="StateManagementPolicy" class="org.jboss.portal.core.impl.portlet.state.StateManagementPolicyImpl"/>
<bean name="PersistenceManager"
class="org.jboss.portal.core.impl.portlet.state.PersistentPortletStatePersistenceManager">
<property name="sessionFactoryJNDIName">java:/SessionFactory</property>
</bean>
- <bean name="PortletContainer" class="org.jboss.portal.test.core.model.instance.PortletInvokerSupport">
- </bean>
+ <bean name="PortletContainer" class="org.jboss.portal.test.core.model.instance.PortletInvokerSupport"/>
<bean name="Producer" class="org.jboss.portal.core.impl.portlet.state.ProducerPortletInvoker">
<property name="persistenceManager"><inject bean="PersistenceManager"/></property>
- <property name="portletInvoker"><inject bean="PortletContainer"/></property>
+ <property name="next"><inject bean="PortletContainer"/></property>
<property name="stateManagementPolicy"><inject bean="StateManagementPolicy"/></property>
<property name="stateConverter"><inject bean="StateConverter"/></property>
</bean>
Added: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/EmptyPortletInterceptorStackFactory.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/EmptyPortletInterceptorStackFactory.java (rev 0)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/EmptyPortletInterceptorStackFactory.java 2008-06-25 00:06:46 UTC (rev 11138)
@@ -0,0 +1,36 @@
+/*
+* JBoss, a division of Red Hat
+* Copyright 2008, Red Hat Middleware, LLC, and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+
+package org.jboss.portal.server.impl.invocation;
+
+/**
+ * @author <a href="mailto:chris.laprun@jboss.com">Chris Laprun</a>
+ * @version $Revision$
+ */
+public class EmptyPortletInterceptorStackFactory implements PortletInterceptorStackFactory
+{
+ public PortletInterceptorStack getInterceptorStack()
+ {
+ return JBossPortletInterceptorStack.EMPTY_STACK;
+ }
+}
+
Modified: branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java
===================================================================
--- branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java 2008-06-24 18:39:53 UTC (rev 11137)
+++ branches/JBoss_Portal_Branch_2_7/server/src/main/org/jboss/portal/server/impl/invocation/PortletInterceptorStack.java 2008-06-25 00:06:46 UTC (rev 11138)
@@ -22,7 +22,6 @@
******************************************************************************/
package org.jboss.portal.server.impl.invocation;
-import org.jboss.portal.common.invocation.Interceptor;
import org.jboss.portal.portlet.PortletInvokerInterceptor;
/**
@@ -32,7 +31,7 @@
public interface PortletInterceptorStack
{
/**
- * Returns the stack length.
+ * Returns the stack length.
*
* @return the length
*/
@@ -46,7 +45,5 @@
* @throws ArrayIndexOutOfBoundsException if the index is not valid
*/
PortletInvokerInterceptor getInterceptor(int index) throws ArrayIndexOutOfBoundsException;
-
-
}
17 years, 10 months