You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by hu...@apache.org on 2006/11/06 16:02:22 UTC
svn commit: r471756 [12/31] - in /struts/struts2/trunk: apps/blank/
apps/blank/src/main/java/example/ apps/blank/src/test/java/example/
apps/mailreader/src/main/java/mailreader2/
apps/portlet/src/main/java/org/apache/struts2/portlet/example/ apps/portl...
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/VelocityResult.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher;
@@ -60,7 +63,7 @@
*
* <li><b>location (default)</b> - the location of the template to process.</li>
*
- * <li><b>parse</b> - true by default. If set to false, the location param will
+ * <li><b>parse</b> - true by default. If set to false, the location param will
* not be parsed for Ognl expressions.</li>
*
* </ul>
@@ -81,17 +84,17 @@
*/
public class VelocityResult extends StrutsResultSupport {
- private static final long serialVersionUID = 7268830767762559424L;
-
- private static final Log log = LogFactory.getLog(VelocityResult.class);
-
- public VelocityResult() {
- super();
- }
-
- public VelocityResult(String location) {
- super(location);
- }
+ private static final long serialVersionUID = 7268830767762559424L;
+
+ private static final Log log = LogFactory.getLog(VelocityResult.class);
+
+ public VelocityResult() {
+ super();
+ }
+
+ public VelocityResult(String location) {
+ super(location);
+ }
/**
* Creates a Velocity context from the action, loads a Velocity template and executes the
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapper.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapper.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.mapper;
@@ -39,10 +42,10 @@
* <!-- END SNIPPET: javadoc -->
*/
public interface ActionMapper {
-
+
/**
* Gets an action mapping for the current request
- *
+ *
* @param request The servlet request
* @param config The current configuration manager
* @return The appropriate action mapping
@@ -51,7 +54,7 @@
/**
* Converts an ActionMapping into a URI string
- *
+ *
* @param mapping The action mapping
* @return The URI string that represents this mapping
*/
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapperFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapperFactory.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapperFactory.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapperFactory.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.mapper;
@@ -43,7 +46,7 @@
/**
* Gets an instance of the ActionMapper
- *
+ *
* @return The action mapper
*/
public static ActionMapper getMapper() {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapping.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapping.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapping.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/ActionMapping.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.mapper;
@@ -43,7 +46,7 @@
/**
* Constructs an ActionMapping with a default result
- *
+ *
* @param result The default result
*/
public ActionMapping(Result result) {
@@ -52,7 +55,7 @@
/**
* Constructs an ActionMapping with its values
- *
+ *
* @param name The action name
* @param namespace The action namespace
* @param method The method
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/CompositeActionMapper.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
- * $Id: ActionMapper.java 449367 2006-09-24 06:49:04Z mrdon $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.mapper;
@@ -36,11 +39,11 @@
/**
* <!-- START SNIPPET: description -->
- *
- * A composite action mapper that is capable of delegating to a series of {@link ActionMapper} if the former
+ *
+ * A composite action mapper that is capable of delegating to a series of {@link ActionMapper} if the former
* failed to obtained a valid {@link ActionMapping} or uri.
* <p/>
- * It is configured through struts.properties.
+ * It is configured through struts.properties.
* <p/>
* For example, with the following entries in struts.properties
* <p/>
@@ -51,17 +54,17 @@
* struts.mapper.composite.3=org.apache.struts2.dispatcher.mapper.Restful2ActionMapper
* </pre>
* <p/>
- * When {@link CompositeActionMapper#getMapping(HttpServletRequest, ConfigurationManager)} or
- * {@link CompositeActionMapper#getUriFromActionMapping(ActionMapping)} is invoked,
- * {@link CompositeActionMapper} would go through these {@link ActionMapper}s in sequence
- * starting from {@link ActionMapper} identified by 'struts.mapper.composite.1', followed by
+ * When {@link CompositeActionMapper#getMapping(HttpServletRequest, ConfigurationManager)} or
+ * {@link CompositeActionMapper#getUriFromActionMapping(ActionMapping)} is invoked,
+ * {@link CompositeActionMapper} would go through these {@link ActionMapper}s in sequence
+ * starting from {@link ActionMapper} identified by 'struts.mapper.composite.1', followed by
* 'struts.mapper.composite.2' and finally 'struts.mapper.composite.3' (in this case) until either
* one of the {@link ActionMapper} return a valid result (not null) or it runs out of {@link ActionMapper}
- * in which case it will just return null for both
- * {@link CompositeActionMapper#getMapping(HttpServletRequest, ConfigurationManager)} and
+ * in which case it will just return null for both
+ * {@link CompositeActionMapper#getMapping(HttpServletRequest, ConfigurationManager)} and
* {@link CompositeActionMapper#getUriFromActionMapping(ActionMapping)} methods.
* <p/>
- *
+ *
* For example with the following in struts.properties :-
* <pre>
* struts.mapper.class=org.apache.struts2.dispatcher.mapper.CompositeActionMapper
@@ -71,201 +74,201 @@
* </pre>
* <p/>
* <code>CompositeActionMapper</code> will be configured with 3 ActionMapper, namely
- * "DefaultActionMapper", "MyActionMapper" and "MyAnotherActionMapper".
+ * "DefaultActionMapper", "MyActionMapper" and "MyAnotherActionMapper".
* <code>CompositeActionMapper</code> would consult each of them in order described above.
- *
+ *
* <!-- END SNIPPET: description -->
- *
+ *
* @see ActionMapper
* @see ActionMapperFactory
* @see ActionMapping
* @see IndividualActionMapperEntry
- *
+ *
* @version $Date$ $Id$
*/
public class CompositeActionMapper implements ActionMapper {
- private static final Log LOG = LogFactory.getLog(CompositeActionMapper.class);
-
- protected List<IndividualActionMapperEntry> orderedActionMappers;
-
-
- public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
-
- for (IndividualActionMapperEntry actionMapperEntry: getOrderedActionMapperEntries()) {
- ActionMapping actionMapping = actionMapperEntry.actionMapper.getMapping(request, configManager);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Using ActionMapper from entry ["+actionMapperEntry.propertyName+"="+actionMapperEntry.propertyValue+"]");
- }
- if (actionMapping == null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("ActionMapper from entry ["+actionMapperEntry.propertyName+"="+actionMapperEntry.propertyValue+"] failed to return an ActionMapping (null)");
- }
- }
- else {
- return actionMapping;
- }
- }
- if (LOG.isDebugEnabled()) {
- LOG.debug("exhausted from ActionMapper that could return an ActionMapping");
- }
- return null;
- }
-
- public String getUriFromActionMapping(ActionMapping mapping) {
-
- for (IndividualActionMapperEntry actionMapperEntry: getOrderedActionMapperEntries()) {
- String uri = actionMapperEntry.actionMapper.getUriFromActionMapping(mapping);
- if (LOG.isDebugEnabled()) {
- LOG.debug("Using ActionMapper from entry ["+actionMapperEntry.propertyName+"="+actionMapperEntry.propertyValue+"]");
- }
- if (uri == null) {
- if (LOG.isDebugEnabled()) {
- LOG.debug("ActionMapper from entry ["+actionMapperEntry.propertyName+"="+actionMapperEntry.propertyValue+"] failed to return a uri (null)");
- }
- }
- else {
- return uri;
- }
- }
- if (LOG.isDebugEnabled()) {
- LOG.debug("exhausted from ActionMapper that could return a uri");
- }
- return null;
- }
-
-
- protected List<IndividualActionMapperEntry> getOrderedActionMapperEntries() {
- if (this.orderedActionMappers == null || FileManager.isReloadingConfigs()) {
-
- List<IndividualActionMapperEntry> actionMapperEntriesContainer = new ArrayList<IndividualActionMapperEntry>();
- Iterator settings = Settings.list();
- while(settings.hasNext()) {
- String setting = settings.next().toString();
- if (setting.startsWith(StrutsConstants.STRUTS_MAPPER_COMPOSITE)) {
- try {
- int order = Integer.valueOf(setting.substring(StrutsConstants.STRUTS_MAPPER_COMPOSITE.length(), setting.length()));
- String propertyValue = Settings.get(setting);
- if (propertyValue != null && propertyValue.trim().length() > 0) {
- actionMapperEntriesContainer.add(
- new IndividualActionMapperEntry(order, setting, propertyValue));
- }
- else {
- LOG.warn("Ignoring property "+setting+" that contains no value");
- }
- }
- catch(NumberFormatException e) {
- LOG.warn("Ignoring malformed property "+setting);
- }
- }
- }
-
- Collections.sort(actionMapperEntriesContainer, new Comparator<IndividualActionMapperEntry>() {
- public int compare(IndividualActionMapperEntry o1, IndividualActionMapperEntry o2) {
- return o1.compareTo(o2);
- }
- });
-
-
- ObjectFactory objectFactory = ObjectFactory.getObjectFactory();
- List<IndividualActionMapperEntry> result = new ArrayList<IndividualActionMapperEntry>();
- for (IndividualActionMapperEntry entry: actionMapperEntriesContainer) {
- String actionMapperClassName = entry.propertyValue;
- try {
- // Let us get ClassCastException if it does not implement ActionMapper
- ActionMapper actionMapper = (ActionMapper) objectFactory.buildBean(actionMapperClassName, null);
- result.add(new IndividualActionMapperEntry(entry.order, entry.propertyName, entry.propertyValue, actionMapper));
- }
- catch(Exception e) {
- LOG.warn("failed to create action mapper "+actionMapperClassName+", ignoring it", e);
- }
- }
-
- this.orderedActionMappers = result;
- }
-
- return this.orderedActionMappers;
- }
-
-
- /**
- * A value object (holder) that holds information regarding {@link ActionMapper} this {@link CompositeActionMapper}
- * is capable of delegating to.
- * <p/>
- * The information stored are :-
- * <ul>
- * <li> order</li>
- * <li> propertyValue</li>
- * <li> propertyName</li>
- * <li> actionMapper</li>
- * </ul>
- *
- * eg. if we have the following entry in struts.properties
- * <pre>
- * struts.mapper.composite.1=foo.bar.ActionMapper1
- * struts.mapper.composite.2=foo.bar.ActionMapper2
- * struts.mapper.composite.3=foo.bar.ActionMapper3
- * </pre>
- *
- * <table border="1">
- * <tr>
- * <td>order</td>
- * <td>propertyName</td>
- * <td>propertyValue</td>
- * <td>actionMapper</td>
- * </tr>
- * <tr>
- * <td>1</td>
- * <td>struts.mapper.composite.1</td>
- * <td>foo.bar.ActionMapper1</td>
- * <td>instance of foo.bar.ActionMapper1</td>
- * </tr>
- * <tr>
- * <td>2</td>
- * <td>struts.mapper.composite.2</td>
- * <td>foo.bar.ActionMapper2</td>
- * <td>instance of foo.bar.ActionMapper2</td>
- * </tr>
- * <tr>
- * <td>3</td>
- * <td>struts.mapper.composite.3</td>
- * <td>foo.bar.ActionMapper3</td>
- * <td>instance of foo.bar.ActionMapper3</td>
- * </tr>
- * </table>
- *
- * @version $Date$ $Id$
- */
- public class IndividualActionMapperEntry implements Comparable<IndividualActionMapperEntry> {
-
- public Integer order;
- public String propertyValue;
- public String propertyName;
- public ActionMapper actionMapper;
-
-
- private IndividualActionMapperEntry(Integer order, String propertyName, String propertyValue) {
- assert(order != null);
- assert(propertyValue != null);
- assert(propertyName != null);
- this.order = order;
- this.propertyValue = propertyValue;
- this.propertyName = propertyName;
- }
-
- public IndividualActionMapperEntry(Integer order, String propertyName, String propertyValue, ActionMapper actionMapper) {
- assert(order != null);
- assert(propertyValue != null);
- assert(propertyName != null);
- assert(actionMapper != null);
- this.order = order;
- this.propertyValue = propertyValue;
- this.propertyName = propertyName;
- this.actionMapper = actionMapper;
- }
-
- public int compareTo(IndividualActionMapperEntry o) {
- return order - o.order;
- }
- }
+ private static final Log LOG = LogFactory.getLog(CompositeActionMapper.class);
+
+ protected List<IndividualActionMapperEntry> orderedActionMappers;
+
+
+ public ActionMapping getMapping(HttpServletRequest request, ConfigurationManager configManager) {
+
+ for (IndividualActionMapperEntry actionMapperEntry: getOrderedActionMapperEntries()) {
+ ActionMapping actionMapping = actionMapperEntry.actionMapper.getMapping(request, configManager);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Using ActionMapper from entry ["+actionMapperEntry.propertyName+"="+actionMapperEntry.propertyValue+"]");
+ }
+ if (actionMapping == null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("ActionMapper from entry ["+actionMapperEntry.propertyName+"="+actionMapperEntry.propertyValue+"] failed to return an ActionMapping (null)");
+ }
+ }
+ else {
+ return actionMapping;
+ }
+ }
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("exhausted from ActionMapper that could return an ActionMapping");
+ }
+ return null;
+ }
+
+ public String getUriFromActionMapping(ActionMapping mapping) {
+
+ for (IndividualActionMapperEntry actionMapperEntry: getOrderedActionMapperEntries()) {
+ String uri = actionMapperEntry.actionMapper.getUriFromActionMapping(mapping);
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("Using ActionMapper from entry ["+actionMapperEntry.propertyName+"="+actionMapperEntry.propertyValue+"]");
+ }
+ if (uri == null) {
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("ActionMapper from entry ["+actionMapperEntry.propertyName+"="+actionMapperEntry.propertyValue+"] failed to return a uri (null)");
+ }
+ }
+ else {
+ return uri;
+ }
+ }
+ if (LOG.isDebugEnabled()) {
+ LOG.debug("exhausted from ActionMapper that could return a uri");
+ }
+ return null;
+ }
+
+
+ protected List<IndividualActionMapperEntry> getOrderedActionMapperEntries() {
+ if (this.orderedActionMappers == null || FileManager.isReloadingConfigs()) {
+
+ List<IndividualActionMapperEntry> actionMapperEntriesContainer = new ArrayList<IndividualActionMapperEntry>();
+ Iterator settings = Settings.list();
+ while(settings.hasNext()) {
+ String setting = settings.next().toString();
+ if (setting.startsWith(StrutsConstants.STRUTS_MAPPER_COMPOSITE)) {
+ try {
+ int order = Integer.valueOf(setting.substring(StrutsConstants.STRUTS_MAPPER_COMPOSITE.length(), setting.length()));
+ String propertyValue = Settings.get(setting);
+ if (propertyValue != null && propertyValue.trim().length() > 0) {
+ actionMapperEntriesContainer.add(
+ new IndividualActionMapperEntry(order, setting, propertyValue));
+ }
+ else {
+ LOG.warn("Ignoring property "+setting+" that contains no value");
+ }
+ }
+ catch(NumberFormatException e) {
+ LOG.warn("Ignoring malformed property "+setting);
+ }
+ }
+ }
+
+ Collections.sort(actionMapperEntriesContainer, new Comparator<IndividualActionMapperEntry>() {
+ public int compare(IndividualActionMapperEntry o1, IndividualActionMapperEntry o2) {
+ return o1.compareTo(o2);
+ }
+ });
+
+
+ ObjectFactory objectFactory = ObjectFactory.getObjectFactory();
+ List<IndividualActionMapperEntry> result = new ArrayList<IndividualActionMapperEntry>();
+ for (IndividualActionMapperEntry entry: actionMapperEntriesContainer) {
+ String actionMapperClassName = entry.propertyValue;
+ try {
+ // Let us get ClassCastException if it does not implement ActionMapper
+ ActionMapper actionMapper = (ActionMapper) objectFactory.buildBean(actionMapperClassName, null);
+ result.add(new IndividualActionMapperEntry(entry.order, entry.propertyName, entry.propertyValue, actionMapper));
+ }
+ catch(Exception e) {
+ LOG.warn("failed to create action mapper "+actionMapperClassName+", ignoring it", e);
+ }
+ }
+
+ this.orderedActionMappers = result;
+ }
+
+ return this.orderedActionMappers;
+ }
+
+
+ /**
+ * A value object (holder) that holds information regarding {@link ActionMapper} this {@link CompositeActionMapper}
+ * is capable of delegating to.
+ * <p/>
+ * The information stored are :-
+ * <ul>
+ * <li> order</li>
+ * <li> propertyValue</li>
+ * <li> propertyName</li>
+ * <li> actionMapper</li>
+ * </ul>
+ *
+ * eg. if we have the following entry in struts.properties
+ * <pre>
+ * struts.mapper.composite.1=foo.bar.ActionMapper1
+ * struts.mapper.composite.2=foo.bar.ActionMapper2
+ * struts.mapper.composite.3=foo.bar.ActionMapper3
+ * </pre>
+ *
+ * <table border="1">
+ * <tr>
+ * <td>order</td>
+ * <td>propertyName</td>
+ * <td>propertyValue</td>
+ * <td>actionMapper</td>
+ * </tr>
+ * <tr>
+ * <td>1</td>
+ * <td>struts.mapper.composite.1</td>
+ * <td>foo.bar.ActionMapper1</td>
+ * <td>instance of foo.bar.ActionMapper1</td>
+ * </tr>
+ * <tr>
+ * <td>2</td>
+ * <td>struts.mapper.composite.2</td>
+ * <td>foo.bar.ActionMapper2</td>
+ * <td>instance of foo.bar.ActionMapper2</td>
+ * </tr>
+ * <tr>
+ * <td>3</td>
+ * <td>struts.mapper.composite.3</td>
+ * <td>foo.bar.ActionMapper3</td>
+ * <td>instance of foo.bar.ActionMapper3</td>
+ * </tr>
+ * </table>
+ *
+ * @version $Date$ $Id$
+ */
+ public class IndividualActionMapperEntry implements Comparable<IndividualActionMapperEntry> {
+
+ public Integer order;
+ public String propertyValue;
+ public String propertyName;
+ public ActionMapper actionMapper;
+
+
+ private IndividualActionMapperEntry(Integer order, String propertyName, String propertyValue) {
+ assert(order != null);
+ assert(propertyValue != null);
+ assert(propertyName != null);
+ this.order = order;
+ this.propertyValue = propertyValue;
+ this.propertyName = propertyName;
+ }
+
+ public IndividualActionMapperEntry(Integer order, String propertyName, String propertyValue, ActionMapper actionMapper) {
+ assert(order != null);
+ assert(propertyValue != null);
+ assert(propertyName != null);
+ assert(actionMapper != null);
+ this.order = order;
+ this.propertyValue = propertyValue;
+ this.propertyName = propertyName;
+ this.actionMapper = actionMapper;
+ }
+
+ public int compareTo(IndividualActionMapperEntry o) {
+ return order - o.order;
+ }
+ }
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/DefaultActionMapper.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.mapper;
@@ -36,48 +39,48 @@
/**
* <!-- START SNIPPET: javadoc -->
- *
+ *
* Default action mapper implementation, using the standard *.[ext] (where ext
* usually "action") pattern. The extension is looked up from the Struts
* configuration key <b>struts.action.exection</b>.
- *
+ *
* <p/> To help with dealing with buttons and other related requirements, this
* mapper (and other {@link ActionMapper}s, we hope) has the ability to name a
* button with some predefined prefix and have that button name alter the
* execution behaviour. The four prefixes are:
- *
+ *
* <ul>
- *
+ *
* <li>Method prefix - <i>method:default</i></li>
- *
+ *
* <li>Action prefix - <i>action:dashboard</i></li>
- *
+ *
* <li>Redirect prefix - <i>redirect:cancel.jsp</i></li>
- *
+ *
* <li>Redirect-action prefix - <i>redirect-action:cancel</i></li>
- *
+ *
* </ul>
- *
+ *
* <p/> In addition to these four prefixes, this mapper also understands the
* action naming pattern of <i>foo!bar</i> in either the extension form (eg:
* foo!bar.action) or in the prefix form (eg: action:foo!bar). This syntax tells
* this mapper to map to the action named <i>foo</i> and the method <i>bar</i>.
- *
+ *
* <!-- END SNIPPET: javadoc -->
- *
+ *
* <p/> <b>Method Prefix</b> <p/>
- *
+ *
* <!-- START SNIPPET: method -->
- *
+ *
* With method-prefix, instead of calling baz action's execute() method (by
* default if it isn't overriden in struts.xml to be something else), the baz
* action's anotherMethod() will be called. A very elegant way determine which
* button is clicked. Alternatively, one would have submit button set a
* particular value on the action when clicked, and the execute() method decides
* on what to do with the setted value depending on which button is clicked.
- *
+ *
* <!-- END SNIPPET: method -->
- *
+ *
* <pre>
* <!-- START SNIPPET: method-example -->
* <a:form action="baz">
@@ -87,18 +90,18 @@
* </a:form>
* <!-- END SNIPPET: method-example -->
* </pre>
- *
+ *
* <p/> <b>Action prefix</b> <p/>
- *
+ *
* <!-- START SNIPPET: action -->
- *
+ *
* With action-prefix, instead of executing baz action's execute() method (by
* default if it isn't overriden in struts.xml to be something else), the
* anotherAction action's execute() method (assuming again if it isn't overriden
* with something else in struts.xml) will be executed.
- *
+ *
* <!-- END SNIPPET: action -->
- *
+ *
* <pre>
* <!-- START SNIPPET: action-example -->
* <a:form action="baz">
@@ -108,18 +111,18 @@
* </a:form>
* <!-- END SNIPPET: action-example -->
* </pre>
- *
+ *
* <p/> <b>Redirect prefix</b> <p/>
- *
+ *
* <!-- START SNIPPET: redirect -->
- *
+ *
* With redirect-prefix, instead of executing baz action's execute() method (by
* default it isn't overriden in struts.xml to be something else), it will get
* redirected to, in this case to www.google.com. Internally it uses
* ServletRedirectResult to do the task.
- *
+ *
* <!-- END SNIPPET: redirect -->
- *
+ *
* <pre>
* <!-- START SNIPPET: redirect-example -->
* <a:form action="baz">
@@ -129,19 +132,19 @@
* </a:form>
* <!-- END SNIPPET: redirect-example -->
* </pre>
- *
+ *
* <p/> <b>Redirect-action prefix</b> <p/>
- *
+ *
* <!-- START SNIPPET: redirect-action -->
- *
+ *
* With redirect-action-prefix, instead of executing baz action's execute()
* method (by default it isn't overriden in struts.xml to be something else), it
* will get redirected to, in this case 'dashboard.action'. Internally it uses
* ServletRedirectResult to do the task and read off the extension from the
* struts.properties.
- *
+ *
* <!-- END SNIPPET: redirect-action -->
- *
+ *
* <pre>
* <!-- START SNIPPET: redirect-action-example -->
* <a:form action="baz">
@@ -151,7 +154,7 @@
* </a:form>
* <!-- END SNIPPET: redirect-action-example -->
* </pre>
- *
+ *
*/
public class DefaultActionMapper implements ActionMapper {
@@ -164,7 +167,7 @@
static final String REDIRECT_ACTION_PREFIX = "redirect-action:";
private boolean allowDynamicMethodCalls = true;
-
+
private boolean allowSlashesInActionNames = false;
private PrefixTrie prefixTrie = null;
@@ -174,12 +177,12 @@
allowDynamicMethodCalls = "true".equals(Settings
.get(StrutsConstants.STRUTS_ENABLE_DYNAMIC_METHOD_INVOCATION));
}
-
+
if (Settings.isSet(StrutsConstants.STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES)) {
allowSlashesInActionNames = "true".equals(Settings
.get(StrutsConstants.STRUTS_ENABLE_SLASHES_IN_ACTION_NAMES));
}
-
+
prefixTrie = new PrefixTrie() {
{
put(METHOD_PREFIX, new ParameterAction() {
@@ -233,7 +236,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.struts2.dispatcher.mapper.ActionMapper#getMapping(javax.servlet.http.HttpServletRequest)
*/
public ActionMapping getMapping(HttpServletRequest request,
@@ -270,7 +273,7 @@
/**
* Special parameters, as described in the class-level comment, are searched
* for and handled.
- *
+ *
* @param request
* The request
* @param mapping
@@ -294,7 +297,7 @@
/**
* Parses the name and namespace from the uri
- *
+ *
* @param uri
* The uri
* @param mapping
@@ -329,21 +332,21 @@
name = uri.substring(namespace.length() + 1);
}
-
+
if (!allowSlashesInActionNames && name != null) {
int pos = name.lastIndexOf('/');
if (pos > -1 && pos < name.length() - 1) {
name = name.substring(pos + 1);
}
}
-
+
mapping.setNamespace(namespace);
mapping.setName(name);
}
/**
* Drops the extension from the action name
- *
+ *
* @param name
* The action name
* @return The action name without its extension
@@ -392,7 +395,7 @@
/**
* Gets the uri from the request
- *
+ *
* @param request
* The request
* @return The uri
@@ -416,7 +419,7 @@
/*
* (non-Javadoc)
- *
+ *
* @see org.apache.struts2.dispatcher.mapper.ActionMapper#getUriFromActionMapping(org.apache.struts2.dispatcher.mapper.ActionMapping)
*/
public String getUriFromActionMapping(ActionMapping mapping) {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
- * $Id: RestfulActionMapper.java 449367 2006-09-24 06:49:04Z mrdon $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.mapper;
@@ -28,8 +31,8 @@
import org.apache.commons.logging.LogFactory;
/**
- * <!-- START SNIPPET: description -->
- *
+ * <!-- START SNIPPET: description -->
+ *
* Improved restful action mapper that adds several ReST-style improvements to
* action mapping, but supports fully-customized URL's via XML. The two primary
* ReST enhancements are:
@@ -74,7 +77,7 @@
* http://ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-it
* </a>
* </p>
- *
+ *
* <!-- END SNIPPET: description -->
*/
public class Restful2ActionMapper extends DefaultActionMapper {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.mapper;
@@ -34,7 +37,7 @@
/**
* <!-- START SNIPPET: description -->
- *
+ *
* A custom action mapper using the following format:
* <p/>
* <p/>
@@ -55,7 +58,7 @@
* <p/>
* Your action just needs a setArticleId() method, and requests such as /article/1, /article/2, etc will all map
* to that URL pattern.
- *
+ *
* <!-- END SNIPPET: description -->
*
*/
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/JakartaMultiPartRequest.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.multipart;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequest.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequest.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequest.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequest.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.multipart;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/multipart/MultiPartRequestWrapper.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.dispatcher.multipart;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ActionContextImpl.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ActionContextImpl.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ActionContextImpl.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ActionContextImpl.java Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// Copyright 2006 Google Inc. All Rights Reserved.
package org.apache.struts2.impl;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/InterceptorAdapter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/InterceptorAdapter.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/InterceptorAdapter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/InterceptorAdapter.java Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// Copyright 2006 Google Inc. All Rights Reserved.
package org.apache.struts2.impl;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/MessagesImpl.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/MessagesImpl.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/MessagesImpl.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/MessagesImpl.java Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// Copyright 2006 Google Inc. All Rights Reserved.
package org.apache.struts2.impl;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/RequestContextImpl.java Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// Copyright 2006 Google Inc. All Rights Reserved.
package org.apache.struts2.impl;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ResultAdapter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ResultAdapter.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ResultAdapter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ResultAdapter.java Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// Copyright 2006 Google Inc. All Rights Reserved.
package org.apache.struts2.impl;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxy.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxy.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxy.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxy.java Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// Copyright 2006 Google Inc. All Rights Reserved.
package org.apache.struts2.impl;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxyFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxyFactory.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxyFactory.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsActionProxyFactory.java Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// Copyright 2006 Google Inc. All Rights Reserved.
package org.apache.struts2.impl;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsObjectFactory.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsObjectFactory.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsObjectFactory.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/StrutsObjectFactory.java Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// Copyright 2006 Google Inc. All Rights Reserved.
package org.apache.struts2.impl;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ValueStackAdapter.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ValueStackAdapter.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ValueStackAdapter.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/impl/ValueStackAdapter.java Mon Nov 6 07:01:43 2006
@@ -1,3 +1,23 @@
+/*
+ * $Id$
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
// Copyright 2006 Google Inc. All Rights Reserved.
package org.apache.struts2.impl;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ApplicationAware.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ApplicationAware.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ApplicationAware.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ApplicationAware.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.interceptor;
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/BackgroundProcess.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/BackgroundProcess.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/BackgroundProcess.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/BackgroundProcess.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.interceptor;
@@ -26,10 +29,10 @@
*
*/
public class BackgroundProcess implements Serializable {
-
- private static final long serialVersionUID = 3884464776311686443L;
-
- protected Object action;
+
+ private static final long serialVersionUID = 3884464776311686443L;
+
+ protected Object action;
protected ActionInvocation invocation;
protected String result;
protected Exception exception;
@@ -37,7 +40,7 @@
/**
* Constructs a background process
- *
+ *
* @param threadName The thread name
* @param invocation The action invocation
* @param threadPriority The thread priority
@@ -97,7 +100,7 @@
/**
* Retrieves the action invocation.
- *
+ *
* @return the action invocation
*/
public ActionInvocation getInvocation() {
@@ -106,7 +109,7 @@
/**
* Gets the result of the background process.
- *
+ *
* @return the result; <tt>null</tt> if not done.
*/
public String getResult() {
@@ -115,7 +118,7 @@
/**
* Gets the exception if any was thrown during the execution of the background process.
- *
+ *
* @return the exception or <tt>null</tt> if no exception was thrown.
*/
public Exception getException() {
@@ -124,7 +127,7 @@
/**
* Returns the status of the background process.
- *
+ *
* @return <tt>true</tt> if finished, <tt>false</tt> otherwise
*/
public boolean isDone() {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CheckboxInterceptor.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
- * $Id: CheckboxListTest.java 439747 2006-09-03 09:22:46Z mrdon $
+ * $Id: $
*
- * Copyright 2006 The Apache Software Foundation.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
*
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
*
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.interceptor;
@@ -28,7 +31,7 @@
/**
* <!-- START SNIPPET: description -->
* Looks for a hidden identification field that specifies the original value of the checkbox.
- * If the checkbox isn't submitted, insert it into the parameters as if it was with the value
+ * If the checkbox isn't submitted, insert it into the parameters as if it was with the value
* of 'false'.
* <!-- END SNIPPET: description -->
* <p/>
@@ -43,10 +46,10 @@
* <!-- END SNIPPET: extending -->
*/
public class CheckboxInterceptor implements Interceptor {
-
+
/** Auto-generated serialization id */
private static final long serialVersionUID = -586878104807229585L;
-
+
private String uncheckedValue = Boolean.FALSE.toString();
public void destroy() {
@@ -82,7 +85,7 @@
/**
* Overrides the default value for an unchecked checkbox
- *
+ *
* @param uncheckedValue The uncheckedValue to set
*/
public void setUncheckedValue(String uncheckedValue) {
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/CreateSessionInterceptor.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.interceptor;
@@ -32,18 +35,18 @@
* This is particular usefull when using the <@s.token> tag in freemarker templates.
* The tag <b>do</b> require that a HttpSession is already created since freemarker commits
* the response to the client immediately.
- *
+ *
* <!-- END SNIPPET: description -->
*
* <p/> <u>Interceptor parameters:</u>
*
*
* <!-- START SNIPPET: extending -->
- *
+ *
* <ul>
- * <li>none</li>
+ * <li>none</li>
* </ul>
- *
+ *
* <!-- END SNIPPET: extending -->
*
*
@@ -61,32 +64,32 @@
*
* <pre>
* <!-- START SNIPPET: example -->
- *
+ *
* <action name="someAction" class="com.examples.SomeAction">
* <interceptor-ref name="create-session"/>
* <interceptor-ref name="defaultStack"/>
* <result name="input">input_with_token_tag.ftl</result>
* </action>
- *
+ *
* <!-- END SNIPPET: example -->
* </pre>
- *
+ *
* @version $Date$ $Id$
*/
public class CreateSessionInterceptor extends AbstractInterceptor {
-
- private static final long serialVersionUID = -4590322556118858869L;
-
- private static final Log _log = LogFactory.getLog(CreateSessionInterceptor.class);
-
-
+
+ private static final long serialVersionUID = -4590322556118858869L;
+
+ private static final Log _log = LogFactory.getLog(CreateSessionInterceptor.class);
+
+
/* (non-Javadoc)
* @see com.opensymphony.xwork2.interceptor.Interceptor#intercept(com.opensymphony.xwork2.ActionInvocation)
*/
public String intercept(ActionInvocation invocation) throws Exception {
- _log.debug("Creating HttpSession");
- ServletActionContext.getRequest().getSession(true);
+ _log.debug("Creating HttpSession");
+ ServletActionContext.getRequest().getSession(true);
return invocation.invoke();
- }
+ }
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/ExecuteAndWaitInterceptor.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.interceptor;
@@ -159,17 +162,17 @@
*
*/
public class ExecuteAndWaitInterceptor extends MethodFilterInterceptor {
-
- private static final long serialVersionUID = -2754639196749652512L;
- private static final Log LOG = LogFactory.getLog(ExecuteAndWaitInterceptor.class);
+ private static final long serialVersionUID = -2754639196749652512L;
+
+ private static final Log LOG = LogFactory.getLog(ExecuteAndWaitInterceptor.class);
public static final String KEY = "__execWait";
public static final String WAIT = "wait";
protected int delay;
protected int delaySleepInterval = 100; // default sleep 100 millis before checking if background process is done
protected boolean executeAfterValidationPass = false;
-
+
private int threadPriority = Thread.NORM_PRIORITY;
/* (non-Javadoc)
@@ -180,7 +183,7 @@
/**
* Creates a new background process
- *
+ *
* @param name The process name
* @param actionInvocation The action invocation
* @param threadPriority The thread priority
@@ -322,12 +325,12 @@
/**
* Whether to start the background process after the second pass (first being validation)
* or not
- *
+ *
* @param executeAfterValidationPass the executeAfterValidationPass to set
*/
public void setExecuteAfterValidationPass(boolean executeAfterValidationPass) {
this.executeAfterValidationPass = executeAfterValidationPass;
}
-
-
+
+
}
Modified: struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java
URL: http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java?view=diff&rev=471756&r1=471755&r2=471756
==============================================================================
--- struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java (original)
+++ struts/struts2/trunk/core/src/main/java/org/apache/struts2/interceptor/FileUploadInterceptor.java Mon Nov 6 07:01:43 2006
@@ -1,19 +1,22 @@
/*
* $Id$
*
- * Copyright 2006 The Apache Software Foundation.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
*/
package org.apache.struts2.interceptor;
@@ -156,10 +159,10 @@
*
*/
public class FileUploadInterceptor extends AbstractInterceptor {
-
- private static final long serialVersionUID = -4764627478894962478L;
-
- protected static final Log log = LogFactory.getLog(FileUploadInterceptor.class);
+
+ private static final long serialVersionUID = -4764627478894962478L;
+
+ protected static final Log log = LogFactory.getLog(FileUploadInterceptor.class);
private static final String DEFAULT_DELIMITER = ",";
private static final String DEFAULT_MESSAGE = "no.message.found";
@@ -169,7 +172,7 @@
/**
* Sets the allowed mimetypes
- *
+ *
* @param allowedTypes A comma-delimited list of types
*/
public void setAllowedTypes(String allowedTypes) {
@@ -181,7 +184,7 @@
/**
* Sets the maximum size of an uploaded file
- *
+ *
* @param maximumSize The maximum size in bytes
*/
public void setMaximumSize(Long maximumSize) {