svn commit: r1070546 - /struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderActionsTest.java
Author: jafl Date: Mon Feb 14 16:14:15 2011 New Revision: 1070546 URL: http://svn.apache.org/viewvc?rev=1070546&view=rev Log: WW-3514 remove blank lines Modified: struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderActionsTest.java Modified: struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderActionsTest.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderActionsTest.java?rev=1070546&r1=1070545&r2=1070546&view=diff == --- struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderActionsTest.java (original) +++ struts/struts2/trunk/xwork-core/src/test/java/com/opensymphony/xwork2/config/providers/XmlConfigurationProviderActionsTest.java Mon Feb 14 16:14:15 2011 @@ -175,8 +175,6 @@ public class XmlConfigurationProviderAct // assertions assertEquals(1, actionConfigs.size()); assertEquals(barWithPackageDefaultClassRefConfig, actionConfigs.get("Bar")); - - } public void testDefaultActionClass() throws Exception { @@ -201,7 +199,6 @@ public class XmlConfigurationProviderAct // assertions assertEquals(7, actionConfigs.size()); assertEquals(barWithoutClassNameConfig, actionConfigs.get("BarWithoutClassName")); - }
svn commit: r1070550 - in /struts/struts2/trunk/plugins/json/src/main: java/org/apache/struts2/json/JSONInterceptor.java java/org/apache/struts2/json/JSONResult.java java/org/apache/struts2/json/JSONU
Author: jafl Date: Mon Feb 14 16:18:28 2011 New Revision: 1070550 URL: http://svn.apache.org/viewvc?rev=1070550&view=rev Log: WW-3514 remove JSONUtil.PATTERN_PREFIX; add JSONInterceptor.setExcludeWildcards() Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONResult.java struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONUtil.java struts/struts2/trunk/plugins/json/src/main/resources/struts-plugin.xml Modified: struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java URL: http://svn.apache.org/viewvc/struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java?rev=1070550&r1=1070549&r2=1070550&view=diff == --- struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java (original) +++ struts/struts2/trunk/plugins/json/src/main/java/org/apache/struts2/json/JSONInterceptor.java Mon Feb 14 16:18:28 2011 @@ -189,8 +189,8 @@ public class JSONInterceptor extends Abs // could be a numeric value response.setId(id.toString()); -// the map is going to have: 'params', 'method' and 'id' (what is the id -// for?) +// the map is going to have: 'params', 'method' and 'id' (for the +// client to identify the response) Class clazz = object.getClass(); // parameters @@ -405,6 +405,23 @@ public class JSONInterceptor extends Abs } /** + * Sets a comma-delimited list of wildcard expressions to match + * properties that should be excluded from the JSON output. + * + * @param commaDelim + *A comma-delimited list of wildcard expressions + */ +public void setExcludeWildcards(String commaDelim) { +Set excludePatterns = JSONUtil.asSet(commaDelim); +if (excludePatterns != null) { +this.excludeProperties = new ArrayList(excludePatterns.size()); +for (String pattern : excludePatterns) { + this.excludeProperties.add(WildcardUtil.compileWildcardPattern(pattern)); +} +} +} + +/** * Sets a comma-delimited list of regular expressions to match properties * that should be included from the JSON output. * @@ -412,24 +429,21 @@ public class JSONInterceptor extends Abs *A comma-delimited list of regular expressions */ public void setIncludeProperties(String commaDelim) { -includeProperties = JSONUtil.processIncludePatterns(JSONUtil.asSet(commaDelim), JSONUtil.REGEXP_PATTERN, JSONUtil.getIncludePatternData()); +includeProperties = JSONUtil.processIncludePatterns(JSONUtil.asSet(commaDelim), JSONUtil.REGEXP_PATTERN); } /** * Sets a comma-delimited list of wildcard expressions to match - * properties that should be included from the JSON output. Since the - * patterns are only used for the JSON-RPC response, you only need to - * specify the elements inside your result object (and "result." is - * automatically prepended). + * properties that should be included from the JSON output. The + * standard boilerplate (id, error, debug) are automatically included, + * as appropriate, so you only need to provide patterns for the + * contents of "result". * * @param commaDelim - *A comma-delimited list of regular expressions + *A comma-delimited list of wildcard expressions */ public void setIncludeWildcards(String commaDelim) { -Map> includePatternData = JSONUtil.getIncludePatternData(); - includePatternData.get(JSONUtil.PATTERN_PREFIX).put(JSONUtil.WILDCARD_PATTERN, "result."); -includeProperties = JSONUtil.processIncludePatterns(JSONUtil.asSet(commaDelim), JSONUtil.WILDCARD_PATTERN, includePatternData); - +includeProperties = JSONUtil.processIncludePatterns(JSONUtil.asSet(commaDelim), JSONUtil.WILDCARD_PATTERN); if (includeProperties != null) { includeProperties.add(Pattern.compile("id")); includeProperties.add(Pattern.compile("result")); @@ -439,16 +453,17 @@ public class JSONInterceptor extends Abs } /** - * Returns the appropriate set of includes. + * Returns the appropriate set of includes, based on debug setting. + * Derived classes can override if there are additional, custom + * debug-only parameters. */ -private List getIncludeProperties() -{ +protected List getIncludeProperties() { if (includeProperties != null && getDebug()) { List list = new ArrayList(includeProperties); +list.add(Pattern.compile("debug")); list.add(WildcardUtil.compileWildcardPattern("e
[CONF] Confluence Changes in the last 24 hours
This is a daily summary of all recent changes in Confluence. - Updated Spaces: - Apache Archiva (https://cwiki.apache.org/confluence/display/ARCHIVA) Pages - Test created by chris (05:53 AM) https://cwiki.apache.org/confluence/display/ARCHIVA/Test Apache Camel (https://cwiki.apache.org/confluence/display/CAMEL) Pages - Articles edited by davsclaus (09:58 AM) https://cwiki.apache.org/confluence/display/CAMEL/Articles Apache Chemistry (https://cwiki.apache.org/confluence/display/CMIS) Pages - DotCMIS edited by fmui (08:52 AM) https://cwiki.apache.org/confluence/display/CMIS/DotCMIS Apache CXF Documentation (https://cwiki.apache.org/confluence/display/CXF20DOC) Pages - 2.4 Migration Guide edited by dkulp (04:55 PM) https://cwiki.apache.org/confluence/display/CXF20DOC/2.4+Migration+Guide Apache Directory client API (https://cwiki.apache.org/confluence/display/DIRAPI) Pages - DN API edited by elecharny (09:13 PM) https://cwiki.apache.org/confluence/display/DIRAPI/DN+API Apache Directory Development (https://cwiki.apache.org/confluence/display/DIRxDEV) Pages - Releasing Shared edited by seelmann (03:39 AM) https://cwiki.apache.org/confluence/display/DIRxDEV/Releasing+Shared Apache Directory Server v1.5 (https://cwiki.apache.org/confluence/display/DIRxSRVx11) Pages - 4.1. Embedding ApacheDS into an application edited by seelmann (06:05 PM) https://cwiki.apache.org/confluence/display/DIRxSRVx11/4.1.+Embedding+ApacheDS+into+an+application Apache Felix (https://cwiki.apache.org/confluence/display/FELIX) Pages - Release Management (Nexus) edited by gnodet (01:46 PM) https://cwiki.apache.org/confluence/display/FELIX/Release+Management+%28Nexus%29 Apache Geronimo v3.0 (https://cwiki.apache.org/confluence/display/GMOxDOC30) Pages - Apache Geronimo v3.0 documentation development status edited by chirun...@gmail.com (08:39 PM) https://cwiki.apache.org/confluence/display/GMOxDOC30/Apache+Geronimo+v3.0+documentation+development+status Apache Karaf (https://cwiki.apache.org/confluence/display/KARAF) Pages - 6.10. JRE packages tuning created by nanthrax (10:47 AM) https://cwiki.apache.org/confluence/display/KARAF/6.10.+JRE+packages+tuning Apache Mahout (https://cwiki.apache.org/confluence/display/MAHOUT) Pages - System Requirements edited by kizzy101 (12:23 AM) https://cwiki.apache.org/confluence/display/MAHOUT/System+Requirements Apache ActiveMQ NMS (https://cwiki.apache.org/confluence/display/NMS) Pages - FAQ edited by tabish121 (06:14 PM) https://cwiki.apache.org/confluence/display/NMS/FAQ NMS edited by tabish121 (06:01 PM) https://cwiki.apache.org/confluence/display/NMS/NMS Download edited by tabish121 (05:49 PM) https://cwiki.apache.org/confluence/display/NMS/Download MSMQ Examples created by tabish121 (05:46 PM) https://cwiki.apache.org/confluence/display/NMS/MSMQ+Examples EMS Examples created by tabish121 (05:46 PM) https://cwiki.apache.org/confluence/display/NMS/EMS+Examples WCF Examples created by tabish121 (05:45 PM) https://cwiki.apache.org/confluence/display/NMS/WCF+Examples Support edited by tabish121 (05:41 PM) https://cwiki.apache.org/confluence/display/NMS/Support NMS API edited by tabish121 (05:13 PM) https://cwiki.apache.org/confluence/display/NMS/NMS+API NMS Providers created by tabish121 (02:36 PM) https://cwiki.apache.org/confluence/display/NMS/NMS+Providers Index edited by tabish121 (04:05 PM) https://cwiki.apache.org/confluence/display/NMS/Index Stomp Advanced Features edited by tabish121 (03:11 PM) https://cwiki.apache.org/confluence/display/NMS/Stomp+Advanced+Features Stomp Delayed and Scheduled Message Feature created by tabish121 (03:10 PM) https://cwiki.apache.org/confluence/display/NMS/Stomp+Delayed+and+Scheduled+Message+Feature Stomp Message Features created by tabish121 (03:07 PM) https://cwiki.apache.org/confluence/display/NMS/Stomp+Message+Features ActiveMQ Delay and Schedule Message Feature created by tabish121 (03:03 PM) https://cwiki.apache.org/confluence/display