Author: julien(a)jboss.com
Date: 2008-02-27 18:49:05 -0500 (Wed, 27 Feb 2008)
New Revision: 10144
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/response/PortletResponse.java
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/response/ResourceResponse.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ControllerResponseRendererFactory.java
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/ControllerFilter.java
Log:
encapsulate public fields
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/response/PortletResponse.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/response/PortletResponse.java 2008-02-27
23:33:14 UTC (rev 10143)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/response/PortletResponse.java 2008-02-27
23:49:05 UTC (rev 10144)
@@ -44,7 +44,7 @@
public static final int CONSUMED_EVENT_FLOODED = 3;
/** . */
- public final PortletInvocationResponse response;
+ private final PortletInvocationResponse response;
/** . */
private final int eventDistributionStatus;
@@ -59,4 +59,9 @@
{
return eventDistributionStatus;
}
+
+ public PortletInvocationResponse getResponse()
+ {
+ return response;
+ }
}
Modified:
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/response/ResourceResponse.java
===================================================================
---
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/response/ResourceResponse.java 2008-02-27
23:33:14 UTC (rev 10143)
+++
modules/portlet/trunk/controller/src/main/java/org/jboss/portal/portlet/controller/response/ResourceResponse.java 2008-02-27
23:49:05 UTC (rev 10144)
@@ -33,10 +33,15 @@
{
/** . */
- public PortletInvocationResponse response;
+ private final PortletInvocationResponse response;
public ResourceResponse(PortletInvocationResponse response)
{
this.response = response;
}
+
+ public PortletInvocationResponse getResponse()
+ {
+ return response;
+ }
}
\ No newline at end of file
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ControllerResponseRendererFactory.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ControllerResponseRendererFactory.java 2008-02-27
23:33:14 UTC (rev 10143)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/controller/ControllerResponseRendererFactory.java 2008-02-27
23:49:05 UTC (rev 10144)
@@ -77,20 +77,20 @@
}
else if (response instanceof PortletResponse)
{
- return getRenderer(((PortletResponse)response).response);
+ return getRenderer(((PortletResponse)response).getResponse());
}
else if (response instanceof ResourceResponse)
{
ResourceResponse resourceResponse = (ResourceResponse)response;
//
- if (resourceResponse.response instanceof FragmentResponse)
+ if (resourceResponse.getResponse() instanceof FragmentResponse)
{
- return new ResourceRenderer((FragmentResponse)resourceResponse.response,
sendNoContentResponseOnEmptyResource);
+ return new ResourceRenderer((FragmentResponse)resourceResponse.getResponse(),
sendNoContentResponseOnEmptyResource);
}
else
{
- return getRenderer(((PortletResponse)response).response);
+ return getRenderer(((PortletResponse)response).getResponse());
}
}
Modified:
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/ControllerFilter.java
===================================================================
---
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/ControllerFilter.java 2008-02-27
23:33:14 UTC (rev 10143)
+++
modules/portlet/trunk/test/src/main/java/org/jboss/portal/portlet/test/jsp/ControllerFilter.java 2008-02-27
23:49:05 UTC (rev 10144)
@@ -158,7 +158,7 @@
else if (controllerResponse instanceof ResourceResponse)
{
ResourceResponse resourceResponse = (ResourceResponse)controllerResponse;
- PortletInvocationResponse pir = resourceResponse.response;
+ PortletInvocationResponse pir = resourceResponse.getResponse();
//
if (pir instanceof FragmentResponse)
@@ -218,7 +218,7 @@
else if (controllerResponse instanceof PortletResponse)
{
PortletResponse portletResponse = (PortletResponse)controllerResponse;
- PortletInvocationResponse pir = portletResponse.response;
+ PortletInvocationResponse pir = portletResponse.getResponse();
//
if (pir instanceof ErrorResponse)
Show replies by date