portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jy...@apache.org
Subject cvs commit: jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/mvc/controller ControllerServlet.java
Date Tue, 16 Mar 2004 02:02:44 GMT
jyang       2004/03/15 18:02:44

  Modified:    cornerstone/src/java/org/apache/cornerstone/framework/mvc/action
                        BasePresentationAction.java
               cornerstone/src/java/org/apache/cornerstone/framework/mvc/controller
                        ControllerServlet.java
  Log:
  use mini implementation manager of Cornerstone
  PR:
  Obtained from:
  Submitted by:	
  Reviewed by:	
  CVS: ----------------------------------------------------------------------
  CVS: PR:
  CVS:   If this change addresses a PR in the problem report tracking
  CVS:   database, then enter the PR number(s) here.
  CVS: Obtained from:
  CVS:   If this change has been taken from another system, such as NCSA,
  CVS:   then name the system in this line, otherwise delete it.
  CVS: Submitted by:
  CVS:   If this code has been contributed to Apache by someone else; i.e.,
  CVS:   they sent us a patch or a new module, then include their name/email
  CVS:   address here. If this is your work then delete this line.
  CVS: Reviewed by:
  CVS:   If we are doing pre-commit code reviews and someone else has
  CVS:   reviewed your changes, include their name(s) here.
  CVS:   If you have not had it reviewed then delete this line.
  
  Revision  Changes    Path
  1.4       +6 -3      jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/mvc/action/BasePresentationAction.java
  
  Index: BasePresentationAction.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/mvc/action/BasePresentationAction.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BasePresentationAction.java	8 Mar 2004 00:57:24 -0000	1.3
  +++ BasePresentationAction.java	16 Mar 2004 02:02:44 -0000	1.4
  @@ -22,6 +22,7 @@
   import org.apache.cornerstone.framework.action.BaseAction;
   import org.apache.cornerstone.framework.api.action.ActionException;
   import org.apache.cornerstone.framework.api.action.IAction;
  +import org.apache.cornerstone.framework.api.action.IActionManager;
   import org.apache.cornerstone.framework.api.context.IContext;
   import org.apache.cornerstone.framework.bean.helper.BeanHelper;
   import org.apache.cornerstone.framework.bean.visitor.BeanJSConverter;
  @@ -165,7 +166,8 @@
           if (isExitNameAction(exitValue))
           {
               String actionName = exitValue.substring(ACTION_PREFIX.length());
  -            IAction action = Cornerstone.getActionManager().createActionByName(actionName);
  +            IActionManager actionManager = (IActionManager) Cornerstone.getImplementation(IActionManager.class);
  +            IAction action = actionManager.createActionByName(actionName);
               _Logger.debug("chaining to action '" + actionName + "'");
               context.setValue(PREVIOUS_RESULT, result);
               return action.invoke(context);
  @@ -246,7 +248,8 @@
           {
               String authorizerName = getConfigProperty(CONFIG_AUTHORIZER_NAME);
               // create every time because actions are not reentrant 
  -            IAction authorizer = Cornerstone.getActionManager().createActionByName(authorizerName);
  +            IActionManager actionManager = (IActionManager) Cornerstone.getImplementation(IActionManager.class);
  +            IAction authorizer = actionManager.createActionByName(authorizerName);
               return authorizer;
           }
           else
  
  
  
  1.4       +4 -4      jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/mvc/controller/ControllerServlet.java
  
  Index: ControllerServlet.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed-2/cornerstone/src/java/org/apache/cornerstone/framework/mvc/controller/ControllerServlet.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- ControllerServlet.java	8 Mar 2004 00:58:05 -0000	1.3
  +++ ControllerServlet.java	16 Mar 2004 02:02:44 -0000	1.4
  @@ -22,19 +22,18 @@
   import java.util.Iterator;
   import java.util.List;
   import java.util.Properties;
  -
   import javax.servlet.ServletConfig;
   import javax.servlet.ServletException;
   import javax.servlet.http.HttpServlet;
   import javax.servlet.http.HttpServletRequest;
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpSession;
  -
   import org.apache.cornerstone.framework.action.BaseAction;
   import org.apache.cornerstone.framework.api.action.ActionException;
   import org.apache.cornerstone.framework.api.action.IAction;
   import org.apache.cornerstone.framework.api.action.IActionManager;
   import org.apache.cornerstone.framework.api.context.IContext;
  +import org.apache.cornerstone.framework.api.singleton.ISingletonManager;
   import org.apache.cornerstone.framework.constant.Constant;
   import org.apache.cornerstone.framework.core.ClassUtil;
   import org.apache.cornerstone.framework.init.Cornerstone;
  @@ -75,7 +74,8 @@
           {
               throw new ServletException(CONFIG_ACTION_MANAGER_INSTANCE_CLASS_NAME + "undefined
in " + getClass().getName() + ".properties");
           }
  -        _actionManager = (IActionManager) Cornerstone.getSingletonManager().getSingleton(actionManagerClassName);
  +        ISingletonManager singletonManager = (ISingletonManager) Cornerstone.getImplementation(ISingletonManager.class);
  +        _actionManager = (IActionManager) singletonManager.getSingleton(actionManagerClassName);
   
           // action session context
           _sessionContextClassName = _config.getProperty(CONFIG_SESSION_CONTEXT_INSTANCE_CLASS_NAME);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message