Author: julien(a)jboss.com
Date: 2007-03-15 13:16:43 -0400 (Thu, 15 Mar 2007)
New Revision: 6692
Modified:
trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java
trunk/common/src/main/org/jboss/portal/common/invocation/Scope.java
trunk/core/src/main/org/jboss/portal/core/controller/ControllerCommand.java
trunk/portlet/src/main/org/jboss/portal/portlet/invocation/PortletInvocation.java
trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java
Log:
define common scope in the Scope class as constants
Modified: trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java
===================================================================
--- trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java 2007-03-15
17:08:49 UTC (rev 6691)
+++ trunk/cms/src/main/org/jboss/portal/cms/impl/jcr/JCRCommandContext.java 2007-03-15
17:16:43 UTC (rev 6692)
@@ -36,7 +36,7 @@
*/
public class JCRCommandContext extends AbstractInvocationContext
{
- public static final Scope scope = new Scope("Thread");
+ public static final Scope scope = Scope.THREAD_SCOPE;
private final Session session;
Modified: trunk/common/src/main/org/jboss/portal/common/invocation/Scope.java
===================================================================
--- trunk/common/src/main/org/jboss/portal/common/invocation/Scope.java 2007-03-15
17:08:49 UTC (rev 6691)
+++ trunk/common/src/main/org/jboss/portal/common/invocation/Scope.java 2007-03-15
17:16:43 UTC (rev 6692)
@@ -31,6 +31,18 @@
public class Scope
{
+ /** Principal scope. */
+ public static final Scope PRINCIPAL_SCOPE = new Scope("principal");
+
+ /** Request scope. */
+ public static final Scope REQUEST_SCOPE = new Scope("request");
+
+ /** Thread scope. */
+ public static final Scope THREAD_SCOPE = new Scope("thread");
+
+ /** Session scope. */
+ public static final Scope SESSION_SCOPE = new Scope("session");
+
/** The value. */
private final String value;
Modified: trunk/core/src/main/org/jboss/portal/core/controller/ControllerCommand.java
===================================================================
--- trunk/core/src/main/org/jboss/portal/core/controller/ControllerCommand.java 2007-03-15
17:08:49 UTC (rev 6691)
+++ trunk/core/src/main/org/jboss/portal/core/controller/ControllerCommand.java 2007-03-15
17:16:43 UTC (rev 6692)
@@ -42,13 +42,13 @@
{
/** . */
- public static final Scope PRINCIPAL_SCOPE = new Scope("principal");
+ public static final Scope PRINCIPAL_SCOPE = Scope.PRINCIPAL_SCOPE;
/** . */
- public static final Scope SESSION_SCOPE = new Scope("session");
+ public static final Scope SESSION_SCOPE = Scope.SESSION_SCOPE;
/** . */
- public static final Scope REQUEST_SCOPE = new Scope("request");
+ public static final Scope REQUEST_SCOPE = Scope.REQUEST_SCOPE;
/** . */
public static final Scope NAVIGATIONAL_STATE_SCOPE = new
Scope("navigationalstate");
Modified:
trunk/portlet/src/main/org/jboss/portal/portlet/invocation/PortletInvocation.java
===================================================================
---
trunk/portlet/src/main/org/jboss/portal/portlet/invocation/PortletInvocation.java 2007-03-15
17:08:49 UTC (rev 6691)
+++
trunk/portlet/src/main/org/jboss/portal/portlet/invocation/PortletInvocation.java 2007-03-15
17:16:43 UTC (rev 6692)
@@ -49,10 +49,10 @@
{
/** The portal principal scope. */
- public static final Scope PRINCIPAL_SCOPE = new Scope("principal");
+ public static final Scope PRINCIPAL_SCOPE = Scope.PRINCIPAL_SCOPE;
/** The request scope. */
- public static final Scope REQUEST_SCOPE = ServerInvocation.REQUEST_SCOPE;
+ public static final Scope REQUEST_SCOPE = Scope.REQUEST_SCOPE;
/** The request properties . */
public static final Scope REQUEST_PROPERTIES_SCOPE = new
Scope("request_properties");
Modified: trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java
===================================================================
--- trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java 2007-03-15
17:08:49 UTC (rev 6691)
+++ trunk/server/src/main/org/jboss/portal/server/ServerInvocation.java 2007-03-15
17:16:43 UTC (rev 6692)
@@ -34,13 +34,13 @@
{
/** . */
- public static final Scope PRINCIPAL_SCOPE = new Scope("principal");
+ public static final Scope PRINCIPAL_SCOPE = Scope.PRINCIPAL_SCOPE;
/** . */
- public static final Scope SESSION_SCOPE = new Scope("session");
+ public static final Scope SESSION_SCOPE = Scope.SESSION_SCOPE;
/** . */
- public static final Scope REQUEST_SCOPE = new Scope("request");
+ public static final Scope REQUEST_SCOPE = Scope.REQUEST_SCOPE;
/** . */
public static final Scope NAVIGATIONAL_STATE_SCOPE = new
Scope("navigationalstate");