Author: keith
Date: Tue Apr 22 19:21:19 2008
New Revision: 15987
Log:
Code reformating changes
Modified:
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptOperationsAnnotationParser.java
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptServiceAnnotationParser.java
Modified:
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptOperationsAnnotationParser.java
==============================================================================
---
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptOperationsAnnotationParser.java
(original)
+++
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptOperationsAnnotationParser.java
Tue Apr 22 19:21:19 2008
@@ -46,7 +46,7 @@
* reverse.documentation = "Simple string or html markup (xml node, xml
nodelist)";
* reverse.httpMethod = "GET";
* reverse.httpLocation = "reverse/{first}/{second}";
- *
+ * <p/>
* function reverse(first, last) {
* return (last + " " + first);
* }
@@ -86,7 +86,8 @@
/**
* Given a JavaScript function object and functionName extract all the
defined annotations and
* populates its private variables
- * @param function The JavaScript function object
+ *
+ * @param function The JavaScript function object
* @param functionName The JavaScript function name
* @throws DeploymentException Thrown in case any annotations are not in
the expected form
*/
@@ -140,10 +141,14 @@
Object httpMethodObject = function.get("httpMethod", function);
if (httpMethodObject instanceof String) {
String httpMethodString = ((String) httpMethodObject).trim();
- if (!(HTTPConstants.HEADER_GET.equalsIgnoreCase(httpMethodString)
|| HTTPConstants.HEADER_POST.equalsIgnoreCase(httpMethodString)
- ||
HTTPConstants.HEADER_PUT.equalsIgnoreCase(httpMethodString) ||
HTTPConstants.HEADER_DELETE.equalsIgnoreCase(httpMethodString))) {
- throw new DeploymentException("Invalid httpMethod annotation
on operation " + operationName
- + ". The httpMthod annotation can accept only the
values GET, POST, PUT or DELETE");
+ if (!(HTTPConstants.HEADER_GET.equalsIgnoreCase(httpMethodString)
||
+
HTTPConstants.HEADER_POST.equalsIgnoreCase(httpMethodString)
+ ||
HTTPConstants.HEADER_PUT.equalsIgnoreCase(httpMethodString) ||
+
HTTPConstants.HEADER_DELETE.equalsIgnoreCase(httpMethodString))) {
+ throw new DeploymentException(
+ "Invalid httpMethod annotation on operation " +
operationName
+ + ". The httpMthod annotation can accept only
the values " +
+ "GET, POST, PUT or DELETE");
}
httpMethod = httpMethodString;
}
@@ -157,6 +162,7 @@
/**
* Getter for operationName
+ *
* @return String representing the operationName
*/
public String getOperationName() {
@@ -165,6 +171,7 @@
/**
* Getter for visible
+ *
* @return boolean representing visibility of the function
*/
public boolean isVisible() {
@@ -173,6 +180,7 @@
/**
* Getter for outputType
+ *
* @return Object A Javascript object that conatins the outputType
annotation value
*/
public Object getOutputTypeNameObject() {
@@ -181,6 +189,7 @@
/**
* Getter for inputTypes
+ *
* @return Object A Javascript object that conatins the inputTypes
annotation value
*/
public Object getInputTypesNameObject() {
@@ -189,6 +198,7 @@
/**
* Getter for safe
+ *
* @return Boolean representing the safety of the function
*/
public Boolean isSafe() {
@@ -197,6 +207,7 @@
/**
* Getter for documentation
+ *
* @return OMNode representing the documentation of the operation
*/
public OMNode getDocumentation() {
@@ -205,6 +216,7 @@
/**
* Getter for httpMethod
+ *
* @return String representing the httpMethod
*/
public String getHttpMethod() {
@@ -213,6 +225,7 @@
/**
* Getter for httpLocation
+ *
* @return String representing the httpLocation
*/
public String getHttpLocation() {
Modified:
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptServiceAnnotationParser.java
==============================================================================
---
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptServiceAnnotationParser.java
(original)
+++
trunk/mashup/java/modules/javascriptdeployer/src/org/wso2/mashup/deployer/JavaScriptServiceAnnotationParser.java
Tue Apr 22 19:21:19 2008
@@ -39,43 +39,43 @@
* this.documentation = "Simple string or html markup";
* this.scope = "reverse";
* this.init=init;
- *
+ * <p/>
* function init() {
* // Do some stuff upon deployment
* print("init");
* }
- *
+ * <p/>
* OR
- *
+ * <p/>
* this.init= function init() {
* // Do some stuff upon deployment
* print("init");
* }
- *
+ * <p/>
* this.destroy=destroy;
* function destroy() {
* // Do some stuff upon undeployment
* print("destroy");
* }
- *
+ * <p/>
* OR
- *
+ * <p/>
* this.destroy= function destroy() {
* // Do some stuff upon undeployment
* print("destroy");
* }
- *
+ * <p/>
* this.undispatched= function bar(){
* // Do something here
* }
- *
+ * <p/>
* OR
- *
+ * <p/>
* this.undispatched= "bar";
* function bar(){
* // Do something here
- * }
- *
+ * }
+ * <p/>
* </pre>
* <p/>
* For more details visit <a
@@ -188,6 +188,7 @@
/**
* Getter for the schemaTargetNamespace
+ *
* @return String representing the schemaTargetNamespace
*/
public String getSchemaTargetNamespace() {
@@ -196,6 +197,7 @@
/**
* Getter for the targetNamespace
+ *
* @return String representing the targetNamespace
*/
public String getTargetNamespace() {
@@ -204,6 +206,7 @@
/**
* Getter for the serviceName
+ *
* @return String representing the serviceName
*/
public String getServiceName() {
@@ -212,6 +215,7 @@
/**
* Getter for the serviceScope
+ *
* @return String representing the serviceScope
*/
public String getServiceScope() {
@@ -220,6 +224,7 @@
/**
* Getter for the service Documentation
+ *
* @return OMNode representing the service Documentation
*/
public OMNode getServiceDocumentation() {
@@ -228,6 +233,7 @@
/**
* Getter for init
+ *
* @return Function representing the init operation
*/
public Function getInit() {
@@ -236,6 +242,7 @@
/**
* Getter for destroy
+ *
* @return Function representing the destroy operation
*/
public Function getDestroy() {
@@ -244,6 +251,7 @@
/**
* Getter for undispatched
+ *
* @return String representing the undispatched operation
*/
public String getUndispatched() {
_______________________________________________
Mashup-dev mailing list
[email protected]
http://www.wso2.org/cgi-bin/mailman/listinfo/mashup-dev