Author: keith Date: Wed Feb 18 08:59:47 2009 New Revision: 31077 URL: http://wso2.org/svn/browse/wso2?view=rev&revision=31077
Log: Adding in a annotation to control ignoreUncited. Fix for MASHUP-1137 Modified: branches/mashup/java/1.5/java/modules/core/src/org/wso2/mashup/MashupConstants.java branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptOperationsAnnotationParser.java Modified: branches/mashup/java/1.5/java/modules/core/src/org/wso2/mashup/MashupConstants.java URL: http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/modules/core/src/org/wso2/mashup/MashupConstants.java?rev=31077&r1=31076&r2=31077&view=diff ============================================================================== --- branches/mashup/java/1.5/java/modules/core/src/org/wso2/mashup/MashupConstants.java (original) +++ branches/mashup/java/1.5/java/modules/core/src/org/wso2/mashup/MashupConstants.java Wed Feb 18 08:59:47 2009 @@ -223,6 +223,8 @@ // function foo () {} public static final String VISIBLE_ANNOTATION = "visible"; + public static final String IGNORE_UNCITED_ANNOTATION = "visible"; + // The value that is used by the javascript safe annotation. // e.g foo.safe = true"; // function foo () {} Modified: branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java URL: http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java?rev=31077&r1=31076&r2=31077&view=diff ============================================================================== --- branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java (original) +++ branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JSDeployer.java Wed Feb 18 08:59:47 2009 @@ -921,7 +921,8 @@ // Create a default HTTP Binding operation AxisBindingOperation httpBindingOperation = - createDefaultHTTPBindingOperation(axisOp, httpLocation, httpMethod); + createDefaultHTTPBindingOperation(axisOp, httpLocation, httpMethod, + annotationParser.isIgnoreUncited()); // We need to extract a constant value from the httpLocation so that the @@ -1066,13 +1067,15 @@ */ private AxisBindingOperation createDefaultHTTPBindingOperation(AxisOperation axisOp, String httpLocation, - String httpMethod) { + String httpMethod, + boolean ignoreUncited) { AxisBindingOperation httpBindingOperation = new AxisBindingOperation(); httpBindingOperation.setAxisOperation(axisOp); httpBindingOperation.setName(axisOp.getName()); httpBindingOperation.setParent(httpBinding); httpBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_LOCATION, httpLocation); httpBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_METHOD, httpMethod); + httpBindingOperation.setProperty(WSDL2Constants.ATTR_WHTTP_IGNORE_UNCITED, ignoreUncited); httpBinding.addChild(httpBindingOperation.getName(), httpBindingOperation); return httpBindingOperation; } Modified: branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptOperationsAnnotationParser.java URL: http://wso2.org/svn/browse/wso2/branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptOperationsAnnotationParser.java?rev=31077&r1=31076&r2=31077&view=diff ============================================================================== --- branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptOperationsAnnotationParser.java (original) +++ branches/mashup/java/1.5/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptOperationsAnnotationParser.java Wed Feb 18 08:59:47 2009 @@ -84,6 +84,9 @@ // Holds the value for httpLocation annotation private String httpLocation = null; + // Holds the value for ignoreUncited annotation + private boolean ignoreUncited = false; + private OMFactory omFactory = OMAbstractFactory.getOMFactory(); /** @@ -173,6 +176,9 @@ if (httpLocationObject instanceof String) { httpLocation = ((String) httpLocationObject).trim(); } + + Object ignoreUncitedObject = function.get(MashupConstants.IGNORE_UNCITED_ANNOTATION, function); + ignoreUncited = MashupUtils.isJSObjectTrue(ignoreUncited, ignoreUncitedObject); } /** @@ -246,4 +252,8 @@ public String getHttpLocation() { return httpLocation; } + + public boolean isIgnoreUncited() { + return ignoreUncited; + } } \ No newline at end of file _______________________________________________ Mashup-dev mailing list [email protected] https://wso2.org/cgi-bin/mailman/listinfo/mashup-dev
