svn commit: r1422939 - /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java

2012-12-17 Thread lukaszlenart
Author: lukaszlenart
Date: Mon Dec 17 14:16:32 2012
New Revision: 1422939

URL: http://svn.apache.org/viewvc?rev=1422939&view=rev
Log:
Adds additional example how to use the mapper - thanks to Antonios Gkogkakis

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java

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?rev=1422939&r1=1422938&r2=1422939&view=diff
==
--- 
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 Dec 17 14:16:32 2012
@@ -21,18 +21,16 @@
 
 package org.apache.struts2.dispatcher.mapper;
 
-import java.net.URLDecoder;
-import java.util.HashMap;
-import java.util.StringTokenizer;
-
-import javax.servlet.http.HttpServletRequest;
-
-import org.apache.struts2.StrutsConstants;
-
 import com.opensymphony.xwork2.config.ConfigurationManager;
 import com.opensymphony.xwork2.inject.Inject;
 import com.opensymphony.xwork2.util.logging.Logger;
 import com.opensymphony.xwork2.util.logging.LoggerFactory;
+import org.apache.struts2.StrutsConstants;
+
+import javax.servlet.http.HttpServletRequest;
+import java.net.URLDecoder;
+import java.util.HashMap;
+import java.util.StringTokenizer;
 
 /**
  * 
@@ -92,6 +90,54 @@ import com.opensymphony.xwork2.util.logg
  * 
  *
  * 
+ *
+ * 
+ *
+ * To use the Restful2ActionMapper in an existing struts application we have 
to change
+ * the strus.mapper.class constant and let it point to the Restful2ActionMapper
+ * {code:xml}
+ * 
+ * {code}
+ *
+ * The problem with the above approach is that we may break existing actions 
because
+ * the Restful2ActionMapper tries to guess the method name using conventions
+ * that aren't applicable to normal action classes.
+ *
+ * To overcome the above problem, we have to use a different action mapper 
depending on the url we want to process.
+ * REST actions will be processed by the Restful2ActionMapper and non-REST 
actions by the {@link DefaultActionMapper}
+ *
+ * To achieve that we have to rely on nampespaces and the {@link 
PrefixBasedActionMapper} that can choose
+ * which action mapper to use for a particular url based on a prefix (the 
action namespace).
+ *
+ * To put everything together, we create a package for our rest actions
+ * {code:xml}
+ * 
+ *   interceptor config
+ *
+ *   {0}
+ *   results
+ *
+ *   
+ * 
+ * {code}
+ *
+ * All other actions remain in their existing packages and namespaces
+ * we use the PrefixBasedActionMapper telling it to use the 
Restful2ActionMapper for actions
+ * in the /rest namespace and the DefaultActionMapper for all other actions
+ *
+ * {code:xml}
+ * 
+ * 
+ * {code}
+ *
+ * For the Restful2ActionMapper to work we also have to set
+ *
+ * {code:xml}
+ * 
+ * 
+ * {code}
+ *
+ * 
  */
 public class Restful2ActionMapper extends DefaultActionMapper {
 
@@ -102,7 +148,6 @@ public class Restful2ActionMapper extend
 public Restful2ActionMapper() {
setSlashesInActionNames("true");
 }
-
 
 /*
 * (non-Javadoc)




svn commit: r1422955 - in /struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper: Restful2ActionMapper.java RestfulActionMapper.java

2012-12-17 Thread lukaszlenart
Author: lukaszlenart
Date: Mon Dec 17 14:50:18 2012
New Revision: 1422955

URL: http://svn.apache.org/viewvc?rev=1422955&view=rev
Log:
Moves documentation to the wiki

Modified:

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/Restful2ActionMapper.java

struts/struts2/trunk/core/src/main/java/org/apache/struts2/dispatcher/mapper/RestfulActionMapper.java

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?rev=1422955&r1=1422954&r2=1422955&view=diff
==
--- 
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 Dec 17 14:50:18 2012
@@ -33,111 +33,8 @@ import java.util.HashMap;
 import java.util.StringTokenizer;
 
 /**
- * 
- *
- * 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:
- * 
- *  If the method is not specified (via '!' or 'method:' prefix), the 
method is
- *  "guessed" at using ReST-style conventions that examine the URL and the 
HTTP
- *  method.
- *  Parameters are extracted from the action name, if parameter name/value 
pairs
- *  are specified using PARAM_NAME/PARAM_VALUE syntax.
- * 
- * 
- * These two improvements allow a GET request for 
'category/action/movie/Thrillers' to
- * be mapped to the action name 'movie' with an id of 'Thrillers' with an 
extra parameter
- * named 'category' with a value of 'action'.  A single action mapping can 
then handle
- * all CRUD operations using wildcards, e.g.
- * 
- * 
- *   
- * {0}
- * ...
- *   
- * 
- * 
- *   This mapper supports the following parameters:
- * 
- * 
- *   struts.mapper.idParameterName - If set, this value will 
be the name
- *   of the parameter under which the id is stored.  The id will then be 
removed
- *   from the action name.  This allows restful actions to not require 
wildcards.
- *   
- * 
- * 
- * The following URL's will invoke its methods:
- * 
- *  
- *  GET:/movie/   => method="index"
- *  GET:/movie/Thrillers  => method="view", 
id="Thrillers"
- *  GET:/movie/Thrillers!edit => method="edit", 
id="Thrillers"
- *  GET:/movie/new=> method="editNew"
- *  POST:   /movie/   => method="create"
- *  PUT:/movie/Thrillers  => method="update", 
id="Thrillers"
- *  DELETE: /movie/Thrillers  => method="remove", 
id="Thrillers"
- * 
- * 
- * To simulate the HTTP methods PUT and DELETE, since they aren't supported by 
HTML,
- * the HTTP parameter "__http_method" will be used.
- * 
- * 
- * The syntax and design for this feature was inspired by the ReST support in 
Ruby on Rails.
- * See http://ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-it";>
- * 
http://ryandaigle.com/articles/2006/08/01/whats-new-in-edge-rails-simply-restful-support-and-how-to-use-it
- * 
- * 
- *
- * 
- *
- * 
- *
- * To use the Restful2ActionMapper in an existing struts application we have 
to change
- * the strus.mapper.class constant and let it point to the Restful2ActionMapper
- * {code:xml}
- * 
- * {code}
- *
- * The problem with the above approach is that we may break existing actions 
because
- * the Restful2ActionMapper tries to guess the method name using conventions
- * that aren't applicable to normal action classes.
- *
- * To overcome the above problem, we have to use a different action mapper 
depending on the url we want to process.
- * REST actions will be processed by the Restful2ActionMapper and non-REST 
actions by the {@link DefaultActionMapper}
- *
- * To achieve that we have to rely on nampespaces and the {@link 
PrefixBasedActionMapper} that can choose
- * which action mapper to use for a particular url based on a prefix (the 
action namespace).
- *
- * To put everything together, we create a package for our rest actions
- * {code:xml}
- * 
- *   interceptor config
- *
- *   {0}
- *   results
- *
- *   
- * 
- * {code}
- *
- * All other actions remain in their existing packages and namespaces
- * we use the PrefixBasedActionMapper telling it to use the 
Restful2ActionMapper for actions
- * in the /rest namespace and the DefaultActionMapper for all other actions
- *
- * {code:xml}
- * 
- * 
- * {code}
- *
- * For the Restful2ActionMapper to work we also have to set
- *
- * {code:xml}
- * 
- * 
- * {code}
- *
- * 
+ * Extended version of {@link RestfulActionMapper}, see documen

svn commit: r1422977 - /struts/site/branches/site2fluidomigration/src/site/xdoc/index.xml

2012-12-17 Thread lukaszlenart
Author: lukaszlenart
Date: Mon Dec 17 15:19:18 2012
New Revision: 1422977

URL: http://svn.apache.org/viewvc?rev=1422977&view=rev
Log:
Adds information about IRC channel

Modified:
struts/site/branches/site2fluidomigration/src/site/xdoc/index.xml

Modified: struts/site/branches/site2fluidomigration/src/site/xdoc/index.xml
URL: 
http://svn.apache.org/viewvc/struts/site/branches/site2fluidomigration/src/site/xdoc/index.xml?rev=1422977&r1=1422976&r2=1422977&view=diff
==
--- struts/site/branches/site2fluidomigration/src/site/xdoc/index.xml (original)
+++ struts/site/branches/site2fluidomigration/src/site/xdoc/index.xml Mon Dec 
17 15:19:18 2012
@@ -46,6 +46,9 @@ limitations under the License.
 
 
 
+
+   Official IRC channel: #struts
+
 
 
 https://www.facebook.com/apachestruts"; data-send="true" 
data-width="450" data-show-faces="false">




[CONF] Confluence Changes in the last 24 hours

2012-12-17 Thread confluence
This is a daily summary of all recent changes in Confluence.

-
Updated Spaces:
-


Apache Ambari (Incubating) (https://cwiki.apache.org/confluence/display/AMBARI)

Pages
-
Ambari-666 Development edited by  sposetti  (11:16 AM)
https://cwiki.apache.org/confluence/display/AMBARI/Ambari-666+Development



Apache ActiveMQ CPP (https://cwiki.apache.org/confluence/display/AMQCPP)

Pages
-
ActiveMQ-CPP 3.5.0 Release created by tabish121 (10:20 AM)
https://cwiki.apache.org/confluence/display/AMQCPP/ActiveMQ-CPP+3.5.0+Release

Download edited by  tabish121  (10:16 AM)
https://cwiki.apache.org/confluence/display/AMQCPP/Download



Apache Camel (https://cwiki.apache.org/confluence/display/CAMEL)

Pages
-
Composed Message Processor edited by  mazzag  (11:23 AM)
https://cwiki.apache.org/confluence/display/CAMEL/Composed+Message+Processor

Camel 2.11.0 Release edited by  davsclaus  (10:05 AM)
https://cwiki.apache.org/confluence/display/CAMEL/Camel+2.11.0+Release

Netty edited by  davsclaus  (09:57 AM)
https://cwiki.apache.org/confluence/display/CAMEL/Netty

Bindy edited by  davsclaus  (05:24 AM)
https://cwiki.apache.org/confluence/display/CAMEL/Bindy

Articles edited by  davsclaus  (05:10 AM)
https://cwiki.apache.org/confluence/display/CAMEL/Articles



Apache Cloudstack (https://cwiki.apache.org/confluence/display/CLOUDSTACK)

Pages
-
Ability to delete or archive Events and Alerts edited by  
sanjay.tripa...@citrix.com  (04:05 AM)
https://cwiki.apache.org/confluence/display/CLOUDSTACK/Ability+to+delete+or+archive+Events+and+Alerts



Apache CXF Documentation (https://cwiki.apache.org/confluence/display/CXF20DOC)

Pages
-
JAXRS Services Configuration edited by  sergey_beryozkin  (07:36 AM)
https://cwiki.apache.org/confluence/display/CXF20DOC/JAXRS+Services+Configuration

Annotations edited by  cohei...@apache.org  (06:06 AM)
https://cwiki.apache.org/confluence/display/CXF20DOC/Annotations



Apache Flex (https://cwiki.apache.org/confluence/display/FLEX)

Pages
-
Compiling Apache Flex for different Locales and different versions of the Flash 
Player created by jmclean (06:24 PM)
https://cwiki.apache.org/confluence/display/FLEX/Compiling+Apache+Flex+for+different+Locales+and+different+versions+of+the+Flash+Player

Release Guide for the SDK edited by  cframpton  (01:49 PM)
https://cwiki.apache.org/confluence/display/FLEX/Release+Guide+for+the+SDK

AS to JS translation table edited by  e...@ixsoftware.nl  (12:43 PM)
https://cwiki.apache.org/confluence/display/FLEX/AS+to+JS+translation+table


Comments
https://cwiki.apache.org/confluence/display/FLEX/AS+to+JS+translation+table (4)

Apache HCatalog (https://cwiki.apache.org/confluence/display/HCATALOG)

Pages
-
HCatMix edited by  amala...@gmail.com  (04:28 PM)
https://cwiki.apache.org/confluence/display/HCATALOG/HCatMix



Apache Kafka (https://cwiki.apache.org/confluence/display/KAFKA)

Pages
-
Offset Management edited by  jkreps  (11:15 PM)
https://cwiki.apache.org/confluence/display/KAFKA/Offset+Management



OFBiz (Open For Business) Project Open Wiki 
(https://cwiki.apache.org/confluence/display/OFBIZ)

Pages
-
Securing user password - Make it pattern driven. created by 
meetsumit...@gmail.com (07:37 AM)
https://cwiki.apache.org/confluence/display/OFBIZ/Securing+user+password+-+Make+it+pattern+driven.



Apache OpenOffice Community 
(https://cwiki.apache.org/confluence/display/OOOUSERS)

Pages
-
Events Calendar edited by  liushenf  (10:16 PM)
https://cwiki.apache.org/confluence/display/OOOUSERS/Events+Calendar

FOSDEM 2013 Proposals edited by  regina  (11:30 AM)
https://cwiki.apache.org/confluence/display/OOOUSERS/FOSDEM+2013+Proposals

AOO 4.0 IAccessible2 edited by  steve.yin  (08:47 AM)
https://cwiki.apache.org/confluence/display/OOOUSERS/AOO+4.0+IAccessible2

AOO 3.4.1 Respin for additional languages edited by  jsc  (05:47 AM)
https://cwiki.apache.org/confluence/display/OOOUSERS/AOO+3.4.1+Respin+for+additional+languages

AOO 4.0 Release Planning edited by  liushenf  (02:16 AM)
https://cwiki.apache.org/confluence/display/OOOUSERS/AOO+4.0+Release+Planning

AOO 4.1 Release Planning edited by  liushenf  (02:12 AM)
https://cwiki.apache.org/confluence/display/OOOUSERS/AOO