Author: martinc Date: Thu Aug 4 21:28:45 2005 New Revision: 230395 URL: http://svn.apache.org/viewcvs?rev=230395&view=rev Log: Fix a couple of hundred Checkstyle complaints.
Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/config/ProcessTagsTask.java struts/sandbox/trunk/ti/src/java/org/apache/ti/config/XDocletParser.java struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ActionMapping.java struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ServletActionMapper.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/BaseResult.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerAction.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerActionInvocation.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerContext.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ProcessorException.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/RequestProcessor.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringActionProxyFactory.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringObjectFactory.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ChainRequestProcessor.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionMapping.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionProxy.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ExecuteAction.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitControllerContext.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitXWork.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ProcessActionChain.java struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/SpringConfigRuleSet.java struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/ServletDispatcherResult.java struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/StrutsTiServlet.java struts/sandbox/trunk/ti/src/java/org/apache/ti/util/ServletSourceResolver.java struts/sandbox/trunk/ti/src/java/org/apache/ti/util/SourceResolver.java Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/config/ProcessTagsTask.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/config/ProcessTagsTask.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/config/ProcessTagsTask.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/config/ProcessTagsTask.java Thu Aug 4 21:28:45 2005 @@ -31,27 +31,27 @@ private ProcessTags processTags; private File srcdir; private File destdir; - + private static final Log log = LogFactory.getLog(ProcessTagsTask.class); - + public void setSrcdir(File file) { this.srcdir = file; } - + public void setDestdir(File file) { this.destdir = file; } - + public void execute() { XDocletParser parser = new XDocletParser(); parser.init(); ProcessTags pt = new ProcessTags(); pt.setXDocletParser(parser); - + try { pt.process(srcdir, "Controller.java", destdir, "xwork.xml"); } catch (IOException ex) { ex.printStackTrace(); } } -} +} Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/config/XDocletParser.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/config/XDocletParser.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/config/XDocletParser.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/config/XDocletParser.java Thu Aug 4 21:28:45 2005 @@ -35,7 +35,7 @@ import xjavadoc.filesystem.ReaderFile; /** - * Processes xdoclet-style tags and uses a velocity template to generate + * Processes xdoclet-style tags and uses a velocity template to generate * content. */ public class XDocletParser { @@ -44,10 +44,10 @@ private Template template; private Map parameters; private static final Log log = LogFactory.getLog(XDocletParser.class); - + public void init() { VelocityEngine velocity = new VelocityEngine(); - + Properties props = new Properties(); try { props.load(getClass().getResourceAsStream("velocity.properties")); @@ -57,46 +57,46 @@ log.error("Unable to locate template to process javadoc tags", ex); }catch (Exception ex) { log.error("Unable to intialize velocity", ex); - } - + } + } - + public void setParameters(Map map) { this.parameters = map; } - + public Map getParameters() { return parameters; } - + public void setTemplateName(String name) { this.templateName = name; } - + public void generate(String name, Reader reader, Writer writer) { XJavaDoc jdoc = new XJavaDoc(); ReaderFile file = new ReaderFile(reader); - - + + String className = name.replace('/', '.'); className = className.replace('\\', '.'); className = className.substring(0, className.indexOf(".java")); - + jdoc.addAbstractFile(className, file); XClass xclass = jdoc.getXClass(className); - + Map contextMap = new HashMap(); if (parameters != null) { contextMap.putAll(parameters); - } + } VelocityContext context = new VelocityContext(contextMap); context.put("xclass", xclass); context.put("javaFile", name); - + try { template.merge(context, writer); } catch (Exception ex) { log.error("Unable to generate javadoc output", ex); - } + } } -} +} Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ActionMapping.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ActionMapping.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ActionMapping.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ActionMapping.java Thu Aug 4 21:28:45 2005 @@ -51,7 +51,7 @@ public Map getParams() { return params; } - + public String getExternalMapping() { return externalMapping; } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ServletActionMapper.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ServletActionMapper.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ServletActionMapper.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/config/mapper/ServletActionMapper.java Thu Aug 4 21:28:45 2005 @@ -33,23 +33,23 @@ * original servlet mapping to determine action mapping and reconstructed uri. */ public class ServletActionMapper implements ActionMapper { - + protected static final Log log = LogFactory.getLog(ServletActionMapper.class); - + public ActionMapping getMapping(WebContext ctx) { - + HttpServletRequest request = ((ServletWebContext)ctx).getRequest(); List mappings = (List) ctx.get(StrutsTiServlet.SERVLET_MAPPINGS_KEY); String servletPath = request.getServletPath(); return getMapping(servletPath, mappings); } - + protected ActionMapping getMapping(String servletPath, List mappings) { String uri = null; String mapping = null; for (Iterator i = mappings.iterator(); i.hasNext(); ) { mapping = (String)i.next(); - + // Try to match prefix-based mapping if (mapping.charAt(mapping.length() - 1) == '*') { String prefix = mapping.substring(0, mapping.length() - 1); @@ -58,7 +58,7 @@ log.debug("matched prefix:"+prefix); break; } - + // Try to match extension mapping } else if (mapping.charAt(0) == '*') { String ext = mapping.substring(1); @@ -69,7 +69,7 @@ } } } - + if (uri != null) { log.debug("uri:"+uri); int div = uri.lastIndexOf('/'); @@ -78,7 +78,7 @@ if (div > 0) { namespace = uri.substring(0, div); } - + return new ActionMapping(action, namespace, mapping, null); } else { // Couldn't find any action mapping @@ -87,10 +87,10 @@ } public String getUriFromActionMapping(ActionMapping mapping) { - + String ext = mapping.getExternalMapping(); int star = ext.indexOf('*'); - + StringBuffer sb = new StringBuffer(); if (star > 0) { sb.append(ext.substring(0, star)); Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/BaseResult.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/BaseResult.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/BaseResult.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/BaseResult.java Thu Aug 4 21:28:45 2005 @@ -13,16 +13,16 @@ public abstract class BaseResult implements Result { protected String location; - + public void setLocation(String loc) { this.location = loc; } - + public void execute(ActionInvocation invocation) throws Exception { // perform processing like evaluating location argument as expression doExecute(location, invocation); } - - protected abstract void doExecute(String path, ActionInvocation invocation) throws Exception; - + + protected abstract void doExecute(String path, ActionInvocation invocation) throws Exception; + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerAction.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerAction.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerAction.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerAction.java Thu Aug 4 21:28:45 2005 @@ -13,28 +13,28 @@ protected Object controller; protected Object form; - + public void setController(Object w) { this.controller = w; } - + public Object getController() { return controller; } - + public Object getForm() { return form; } - + public void setForm(Object obj) { this.form = obj; } - + public String execute() { - + // TODO return Action.SUCCESS; } - + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerActionInvocation.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerActionInvocation.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerActionInvocation.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerActionInvocation.java Thu Aug 4 21:28:45 2005 @@ -22,13 +22,13 @@ /** * Adds code to handle ControllerActions if detected - * + * * @see com.opensymphony.xwork.DefaultActionInvocation */ public class ControllerActionInvocation extends DefaultActionInvocation { private static final Log log = LogFactory.getLog(ControllerActionInvocation.class); - + protected static final Map methodsCache = Collections.synchronizedMap(new HashMap()); protected BeanFactory beanFactory; @@ -46,18 +46,18 @@ protected ControllerActionInvocation(BeanFactory factory, ActionProxy proxy, Map extraContext, boolean pushAction) throws Exception { super(proxy, extraContext, pushAction); } - + protected Object getController() { return ((ControllerAction)action).getController(); } - + public Method getActionMethod() { return actionMethod; } protected void createAction() { super.createAction(); - + if (action instanceof ControllerAction) { ctrAction = (ControllerAction)action; createActionMethod(); @@ -88,11 +88,11 @@ return super.invokeAction(action, actionConfig); } } - - + + protected void createActionMethod() { //String methodName = proxy.getMethod(); - + //if (methodName == null && actionConfig.getMethodName() == null) { // return null; //} @@ -102,15 +102,15 @@ String methodName = getProxy().getConfig().getMethodName(); Method method = null; Class ctrClass = getController().getClass(); - - - + + + Method[] methods = (Method[])methodsCache.get(ctrClass); if (methods == null) { methods = ctrClass.getMethods(); methodsCache.put(ctrClass, methods); } - + Method m; for (int x=0; x < methods.length; x++) { m = methods[x]; @@ -119,11 +119,11 @@ break; } } - + if (method == null) { throw new IllegalArgumentException("Method '" + methodName + "()' is not defined in controller '" + ctrClass + "'"); } - + actionMethod = method; } } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerContext.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerContext.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerContext.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ControllerContext.java Thu Aug 4 21:28:45 2005 @@ -26,13 +26,13 @@ * Context that adds Controller methods, using ActionContext for storage. */ public class ControllerContext { - + public static final String CONTROLLER_CONTEXT = "controllerContext"; public static void setControllerContext(ControllerContext ctx) { ActionContext.getContext().put(CONTROLLER_CONTEXT, ctx); } - + public static ControllerContext getContext() { return (ControllerContext) ActionContext.getContext().get(CONTROLLER_CONTEXT); } @@ -51,5 +51,5 @@ protected Object get(String key) { return getWebContext().get(key); - } + } } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ProcessorException.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ProcessorException.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ProcessorException.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/ProcessorException.java Thu Aug 4 21:28:45 2005 @@ -23,17 +23,17 @@ * Wraps any exception thrown during request processing */ public class ProcessorException extends RuntimeException { - + public ProcessorException(String msg) { super(msg); } - + public ProcessorException(String msg, Throwable e) { super(msg, e); } - + public ProcessorException(Throwable e) { super(e); } - + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/RequestProcessor.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/RequestProcessor.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/RequestProcessor.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/RequestProcessor.java Thu Aug 4 21:28:45 2005 @@ -29,9 +29,9 @@ public interface RequestProcessor { public void init(Map initParameters, WebContext ctx); - + public void process(WebContext ctx); - + public void destroy(); - + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringActionProxyFactory.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringActionProxyFactory.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringActionProxyFactory.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringActionProxyFactory.java Thu Aug 4 21:28:45 2005 @@ -22,11 +22,11 @@ public static final String ACTION_INVOCATION = "actionInvocation"; protected BeanFactory beanFactory; - + public void setBeanFactory(BeanFactory factory) { this.beanFactory = factory; } - + public ActionInvocation createActionInvocation(ActionProxy actionProxy) throws Exception { return new ControllerActionInvocation(beanFactory, actionProxy); } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringObjectFactory.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringObjectFactory.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringObjectFactory.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/SpringObjectFactory.java Thu Aug 4 21:28:45 2005 @@ -18,13 +18,13 @@ public class SpringObjectFactory extends ObjectFactory implements BeanFactoryAware { public static final String CONTROLLER_ACTION = "controllerAction"; - + protected BeanFactory beanFactory; - + public void setBeanFactory(BeanFactory factory) { this.beanFactory = factory; } - + /** * Build an Action of the given type */ @@ -33,7 +33,7 @@ if (obj instanceof Action) { return (Action) obj; } else { - ControllerAction action = (ControllerAction) beanFactory.getBean(CONTROLLER_ACTION); + ControllerAction action = (ControllerAction) beanFactory.getBean(CONTROLLER_ACTION); Object controller = buildBean(config.getClassName()); action.setController(controller); return action; Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ChainRequestProcessor.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ChainRequestProcessor.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ChainRequestProcessor.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ChainRequestProcessor.java Thu Aug 4 21:28:45 2005 @@ -47,12 +47,12 @@ * contain the configuration for the default commons-chain catalog(s).</p> */ protected String chainConfig = "org/apache/ti/processor/chain/chain-config-servlet.xml"; - + /** * <p>Commons Logging instance.</p> */ protected static Log log = LogFactory.getLog(ChainRequestProcessor.class); - + /** * <p>The [EMAIL PROTECTED] CatalogFactory} from which catalog containing the the * base request-processing [EMAIL PROTECTED] Command} will be retrieved.</p> @@ -71,64 +71,64 @@ * <p>The [EMAIL PROTECTED] Command} to be executed for each request.</p> */ protected Command startCmd = null; - + protected String catalogName = "struts-ti"; protected String startCmdName = "start"; protected String initCmdName = "init"; - + protected SourceResolver resolver = null; - + protected RuleSet ruleSet = null; - + protected Map initParameters = null; - + public void setSourceResolver(SourceResolver resolver) { this.resolver = resolver; } - + public void setStartCommandName(String name) { this.startCmdName = name; } - + public void setInitCommandName(String name) { this.initCmdName = name; } - + public void setCatalogName(String name) { this.catalogName = name; } - + public void setChainConfig(String name) { this.chainConfig = name; } - + public void setChainRuleSet(RuleSet ruleset) { this.ruleSet = ruleset; } - - + + public void init(Map initParameters, WebContext webContext) { this.initParameters = initParameters; - + String chain = (String)initParameters.get("chainConfig"); try { initChain(chain, webContext); - + initCatalogFactory(); - + catalog = this.catalogFactory.getCatalog(catalogName); if (catalog == null) { throw new ProcessorException("Cannot find catalog '" + catalogName + "'"); } - + Command initCmd = catalog.getCommand(initCmdName); if (initCmd == null) { throw new ProcessorException("Cannot find init command '" + startCmdName + "'"); } initCmd.execute(webContext); - + startCmd = catalog.getCommand(startCmdName); if (startCmd == null) { throw new ProcessorException("Cannot find command '" + @@ -147,16 +147,16 @@ throw new ProcessorException(t); } } - - + + public void process(WebContext ctx) { // Create and execute the command. try { if (log.isDebugEnabled()) { log.debug("Using processing chain for this request"); } - - // Add initialization parameters directly to context. + + // Add initialization parameters directly to context. ctx.putAll(initParameters); startCmd.execute(ctx); } catch (Exception e) { @@ -164,7 +164,7 @@ throw new ProcessorException(e); } } - + public void destroy() { // Release our LogFactory and Log instances (if any) ClassLoader classLoader = @@ -188,12 +188,12 @@ */ } - CatalogFactory.clear(); + CatalogFactory.clear(); catalogFactory = null; catalog = null; startCmd = null; } - + /** * <p>Parse the configuration documents specified by the * <code>chainConfig</code> init-param to configure the default @@ -232,5 +232,5 @@ this.catalogFactory = CatalogFactory.getInstance(); } - + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionMapping.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionMapping.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionMapping.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionMapping.java Thu Aug 4 21:28:45 2005 @@ -27,20 +27,20 @@ * Creates an ActionMapping and stores it in the context. */ public class CreateActionMapping implements Command { - + protected ActionMapper actionMapper; - + public void setActionMapper(ActionMapper mapper) { this.actionMapper = mapper; } - + public boolean execute(Context origctx) { WebContext ctx = (WebContext)origctx; - + ActionMapping mapping = actionMapper.getMapping(ctx); - ctx.put("actionMapping", mapping); + ctx.put("actionMapping", mapping); return false; } - - + + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionProxy.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionProxy.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionProxy.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/CreateActionProxy.java Thu Aug 4 21:28:45 2005 @@ -38,21 +38,21 @@ * Creates an ActionProxy instance */ public class CreateActionProxy implements Command { - + protected static final Log log = LogFactory.getLog(CreateActionProxy.class); - + public boolean execute(Context origctx) { WebContext ctx = (WebContext)origctx; - + ActionMapping mapping = (ActionMapping)ctx.get("actionMapping"); ActionProxy proxy = getActionProxy(ctx, mapping); ctx.put("actionProxy", proxy); return false; } - + protected ActionProxy getActionProxy(WebContext ctx, ActionMapping mapping) { - + // request map wrapping the http request objects Map requestMap = ctx.getRequestScope(); @@ -84,7 +84,7 @@ throw new ProcessorException(e); } } - + /** * Merges all application and servlet attributes into a single <tt>HashMap</tt> to represent the entire * <tt>Action</tt> context. @@ -117,6 +117,6 @@ return extraContext; } - - + + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ExecuteAction.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ExecuteAction.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ExecuteAction.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ExecuteAction.java Thu Aug 4 21:28:45 2005 @@ -28,16 +28,16 @@ * Initializes XWork by replacing default factories */ public class ExecuteAction implements Command { - + public boolean execute(Context origctx) throws Exception { ActionContext ctx = ActionContext.getContext(); ActionProxy proxy = ctx.getActionInvocation().getProxy(); - + String ret = proxy.execute(); - + origctx.put("result", ret); return false; } - - + + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitControllerContext.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitControllerContext.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitControllerContext.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitControllerContext.java Thu Aug 4 21:28:45 2005 @@ -28,14 +28,14 @@ * Intializes the ControllerContext for this request */ public class InitControllerContext implements Command { - + protected ControllerContext context; protected static final Log log = LogFactory.getLog(InitControllerContext.class); - + public void setControllerContext(ControllerContext ctx) { this.context = ctx; } - + public boolean execute(Context origctx) { ControllerContext.setControllerContext(context); return false; Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitXWork.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitXWork.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitXWork.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/InitXWork.java Thu Aug 4 21:28:45 2005 @@ -29,26 +29,26 @@ * Initializes XWork by replacing default factories */ public class InitXWork implements Command { - + protected ObjectFactory objectFactory; protected ActionProxyFactory actionProxyFactory; - + public void setObjectFactory(ObjectFactory factory) { this.objectFactory = factory; } - + public void setActionProxyFactory(ActionProxyFactory factory) { this.actionProxyFactory = factory; } - + public boolean execute(Context origctx) { WebContext ctx = (WebContext)origctx; - + ObjectFactory.setObjectFactory(objectFactory); ActionProxyFactory.setFactory(actionProxyFactory); - + return false; } - - + + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ProcessActionChain.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ProcessActionChain.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ProcessActionChain.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/ProcessActionChain.java Thu Aug 4 21:28:45 2005 @@ -29,11 +29,11 @@ * Initializes XWork by replacing default factories */ public class ProcessActionChain extends ChainBase { - + public boolean execute(Context context) throws Exception { - + ActionContext nestedContext = ActionContext.getContext(); - + ActionProxy proxy = (ActionProxy) context.get("actionProxy"); ActionContext.setContext(proxy.getInvocation().getInvocationContext()); @@ -47,6 +47,6 @@ return retCode; } - - + + } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/SpringConfigRuleSet.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/SpringConfigRuleSet.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/SpringConfigRuleSet.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/processor/chain/SpringConfigRuleSet.java Thu Aug 4 21:28:45 2005 @@ -36,11 +36,11 @@ public class SpringConfigRuleSet extends ConfigRuleSet implements BeanFactoryAware { protected BeanFactory factory; - + public void setBeanFactory(BeanFactory factory) { this.factory = factory; } - + /** * <p>Add the set of Rule instances defined in this RuleSet to the * specified <code>Digester</code> instance, associating them with @@ -54,7 +54,7 @@ super.addRuleInstances(digester); String pattern = "*/" + getCommandElement(); - + // Add rules for a command element Rule rule = new ObjectCreateRule(digester, null, getClassAttribute()) { public void begin(Attributes attrs) throws Exception { @@ -72,7 +72,7 @@ } }; rule.setDigester(digester); - + List list = digester.getRules().match(null, pattern); list.set(0, rule); } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/ServletDispatcherResult.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/ServletDispatcherResult.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/ServletDispatcherResult.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/ServletDispatcherResult.java Thu Aug 4 21:28:45 2005 @@ -55,7 +55,7 @@ if (log.isDebugEnabled()) { log.debug("Forwarding to location " + finalLocation); } - + ServletWebContext ctx = (ServletWebContext) ControllerContext.getContext().getWebContext(); //PageContext pageContext = ServletActionContext.getPageContext(); @@ -75,8 +75,8 @@ } // If we're included, then include the view - // Otherwise do forward - // This allow the page to, for example, set content type + // Otherwise do forward + // This allow the page to, for example, set content type if (!response.isCommitted() && (request.getAttribute("javax.servlet.include.servlet_path") == null)) { request.setAttribute("ti.view_uri", finalLocation); request.setAttribute("ti.request_uri", request.getRequestURI()); Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/StrutsTiServlet.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/StrutsTiServlet.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/StrutsTiServlet.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/servlet/StrutsTiServlet.java Thu Aug 4 21:28:45 2005 @@ -47,19 +47,19 @@ * @version $Rev$ $Date$ */ public class StrutsTiServlet extends HttpServlet { - + public static final String SERVLET_MAPPINGS_KEY = "servletMappings"; - + protected String springConfig = "org/apache/ti/config/spring-config-servlet.xml"; - + protected static Log log = LogFactory.getLog(StrutsTiServlet.class); - + protected BeanFactory beanFactory = null; protected List servletMappings = new ArrayList(); protected RequestProcessor processor = null; - + public void destroy() { - + processor.destroy(); beanFactory = null; processor = null; @@ -76,10 +76,10 @@ */ public void init() throws ServletException { super.init(); - + initSpring(); initServlet(); - + Map initParameters = new HashMap(); String key; for (Enumeration e = getInitParameterNames(); e.hasMoreElements(); ) { @@ -87,11 +87,11 @@ initParameters.put(key, getInitParameter(key)); } initParameters.put(SERVLET_MAPPINGS_KEY, servletMappings); - + processor = (RequestProcessor) beanFactory.getBean("requestProcessor"); processor.init(initParameters, new ServletWebContext(getServletContext(), null, null)); } - + protected void initSpring() throws ServletException { // Parse the configuration file specified by path or resource try { @@ -107,9 +107,9 @@ String msg = "Exception loading spring configuration"; log.error(msg, e); throw new UnavailableException(msg); - } + } } - + /** * <p>Perform the standard request processing for this request, and create @@ -126,20 +126,20 @@ processor.process(new ServletWebContext(getServletContext(), request, response)); } - - + + protected URL resolve(String path) throws ServletException { URL resource = null; ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { loader = this.getClass().getClassLoader(); } - + try { if (path.charAt(0) == '/') { resource = getServletContext().getResource(path); } - + if (resource == null) { if (log.isDebugEnabled()) { log.debug("Unable to locate " + path @@ -163,10 +163,10 @@ log.error(e); throw new UnavailableException("Unable to load resource at "+path); } - + return resource; } - + /** * <p>Remember a servlet mapping from our web application deployment * descriptor, if it is for this servlet.</p> @@ -181,13 +181,13 @@ + ", urlPattern=" + urlPattern); } String myServletName = getServletConfig().getServletName(); - + if (servletName != null && servletName.equals(myServletName)) { servletMappings.add(urlPattern); } } - + /** * <p>Initialize the servlet mapping under which our controller servlet * is being accessed. This will be used in the <code>&html:form></code> @@ -217,7 +217,7 @@ InputStream input = getServletContext().getResourceAsStream("/WEB-INF/web.xml"); - String err = "Unable to process web.xml"; + String err = "Unable to process web.xml"; if (input == null) { throw new ServletException(err); } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/util/ServletSourceResolver.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/util/ServletSourceResolver.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/util/ServletSourceResolver.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/util/ServletSourceResolver.java Thu Aug 4 21:28:45 2005 @@ -41,10 +41,10 @@ * <p>Commons Logging instance.</p> */ protected static Log log = LogFactory.getLog(ServletSourceResolver.class); - - public URL resolve(String path, WebContext context) + + public URL resolve(String path, WebContext context) throws IOException, MalformedURLException { - + List list = resolveList(path, context); if (list.size() > 0) { return (URL) list.get(0); @@ -52,10 +52,10 @@ return null; } } - - public List resolveList(String path, WebContext context) + + public List resolveList(String path, WebContext context) throws IOException, MalformedURLException { - + ServletContext servletContext = ((ServletWebContext)context).getContext(); ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { @@ -90,12 +90,12 @@ resolvedUrls.add(resource); } } - return resolvedUrls; + return resolvedUrls; } - - public List resolveFromList(String paths, WebContext context) + + public List resolveFromList(String paths, WebContext context) throws IOException, MalformedURLException { - + ServletContext servletContext = ((ServletWebContext)context).getContext(); ClassLoader loader = Thread.currentThread().getContextClassLoader(); if (loader == null) { @@ -144,7 +144,7 @@ resolvedUrls.add(resource); } } - return resolvedUrls; + return resolvedUrls; } } Modified: struts/sandbox/trunk/ti/src/java/org/apache/ti/util/SourceResolver.java URL: http://svn.apache.org/viewcvs/struts/sandbox/trunk/ti/src/java/org/apache/ti/util/SourceResolver.java?rev=230395&r1=230394&r2=230395&view=diff ============================================================================== --- struts/sandbox/trunk/ti/src/java/org/apache/ti/util/SourceResolver.java (original) +++ struts/sandbox/trunk/ti/src/java/org/apache/ti/util/SourceResolver.java Thu Aug 4 21:28:45 2005 @@ -31,9 +31,9 @@ public interface SourceResolver { public URL resolve(String path, WebContext context) throws IOException, MalformedURLException; - + public List resolveList(String path, WebContext context) throws IOException, MalformedURLException; - + public List resolveFromList(String paths, WebContext context) throws IOException, MalformedURLException; } --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]