airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sma...@apache.org
Subject svn commit: r1438310 [1/3] - in /airavata/trunk/modules: airavata-client/src/main/java/org/apache/airavata/client/api/ airavata-client/src/main/java/org/apache/airavata/client/api/builder/ commons/utils/src/main/java/org/apache/airavata/common/context/...
Date Fri, 25 Jan 2013 03:43:21 GMT
Author: smarru
Date: Fri Jan 25 03:43:20 2013
New Revision: 1438310

URL: http://svn.apache.org/viewvc?rev=1438310&view=rev
Log:
Adding the missing license headers

Modified:
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/DescriptorRecordAlreadyExistsException.java
    airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/builder/DescriptorBuilder.java
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/RequestContext.java
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/WorkflowContext.java
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DerbyUtil.java
    airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/SecurityUtil.java
    airavata/trunk/modules/distribution/xbaya-gui/src/main/java/org/apache/airavata/distribution/xbaya/jnlp/Main.java
    airavata/trunk/modules/integration-tests/src/main/java/org/apache/airavata/integration/Man.java
    airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
    airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
    airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/ServletRequestHelper.java
    airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/local/LocalUserStore.java
    airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/utils/WebAppUtil.java
    airavata/trunk/modules/rest/service/src/test/java/org/apache/airavata/services/registry/rest/security/AbstractAuthenticatorTest.java
    airavata/trunk/modules/rest/service/src/test/java/org/apache/airavata/services/registry/rest/security/MyHttpServletRequest.java
    airavata/trunk/modules/rest/service/src/test/java/org/apache/airavata/services/registry/rest/security/basic/BasicAccessAuthenticatorTest.java
    airavata/trunk/modules/rest/service/src/test/java/org/apache/airavata/services/registry/rest/security/local/LocalUserStoreTest.java
    airavata/trunk/modules/rest/service/src/test/java/org/apache/airavata/services/registry/rest/security/session/SessionAuthenticatorTest.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/AbstractAuthenticator.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/AbstractDatabaseAuthenticator.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/AuthenticationException.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/Authenticator.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/Authoriser.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/UserStore.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/UserStoreException.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/configurations/AbstractConfigurationReader.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReader.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/userstore/AbstractJDBCUserStore.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/userstore/JDBCUserStore.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/userstore/LDAPUserStore.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/userstore/SessionDBUserStore.java
    airavata/trunk/modules/security/src/main/java/org/apache/airavata/security/util/PasswordDigester.java
    airavata/trunk/modules/security/src/test/java/org/apache/airavata/security/configurations/AuthenticatorConfigurationReaderTest.java
    airavata/trunk/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator1.java
    airavata/trunk/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator2.java
    airavata/trunk/modules/security/src/test/java/org/apache/airavata/security/configurations/TestDBAuthenticator3.java

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/DescriptorRecordAlreadyExistsException.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/DescriptorRecordAlreadyExistsException.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/DescriptorRecordAlreadyExistsException.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/DescriptorRecordAlreadyExistsException.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.client.api;
 
 /**
@@ -10,6 +31,7 @@ public class DescriptorRecordAlreadyExis
     public DescriptorRecordAlreadyExistsException(Throwable e) {
         super(e);
     }
+
     public DescriptorRecordAlreadyExistsException(String message) {
         super(message, null);
     }

Modified: airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/builder/DescriptorBuilder.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/builder/DescriptorBuilder.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/builder/DescriptorBuilder.java (original)
+++ airavata/trunk/modules/airavata-client/src/main/java/org/apache/airavata/client/api/builder/DescriptorBuilder.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.client.api.builder;
 
 import org.apache.airavata.client.api.AiravataAPIInvocationException;
@@ -10,65 +31,67 @@ import org.apache.xmlbeans.SchemaType;
 import java.util.List;
 
 /**
- * This class provides set of utility methods to create descriptors. Following descriptors are
- * included.
+ * This class provides set of utility methods to create descriptors. Following descriptors are included.
  * <ol>
- *     <li>HostDescription - org.apache.airavata.commons.gfac.type.HostDescription</li>
+ * <li>HostDescription - org.apache.airavata.commons.gfac.type.HostDescription</li>
  * </ol>
  */
 public class DescriptorBuilder {
 
-    private static final String IP_ADDRESS_VALIDATION_STRING
-            = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$";
-
-    private static final String HOST_NAME_VALIDATION_STRING
-            = "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$";
+    private static final String IP_ADDRESS_VALIDATION_STRING = "^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$";
 
+    private static final String HOST_NAME_VALIDATION_STRING = "^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9\\-]*[A-Za-z0-9])$";
 
     /**
-     * Builds a host descriptor object. Host descriptor gives information about application
-     * hosted machine.
-     * @param type The host type. Following types are available at the moment.
-     *             <ol>
-     *             <li>org.apache.airavata.schemas.gfac.GlobusHostType</li>
-     *             <li>org.apache.airavata.schemas.gfac.Ec2HostType</li>
-     *             <li>org.apache.airavata.schemas.gfac.GsisshHostType</li>
-     *             <li>org.apache.airavata.schemas.gfac.UnicoreHostType</li>
-     *             </ol>
-     * @param hostName An unique id given to hosted machine. This could be any name. But should be unique across the
-     *                 workflow.
-     * @param hostAddress This is the IP address where application is running. This should be a valid IP address or
-     *                    valid host name.
+     * Builds a host descriptor object. Host descriptor gives information about application hosted machine.
+     * 
+     * @param type
+     *            The host type. Following types are available at the moment.
+     *            <ol>
+     *            <li>org.apache.airavata.schemas.gfac.GlobusHostType</li>
+     *            <li>org.apache.airavata.schemas.gfac.Ec2HostType</li>
+     *            <li>org.apache.airavata.schemas.gfac.GsisshHostType</li>
+     *            <li>org.apache.airavata.schemas.gfac.UnicoreHostType</li>
+     *            </ol>
+     * @param hostName
+     *            An unique id given to hosted machine. This could be any name. But should be unique across the
+     *            workflow.
+     * @param hostAddress
+     *            This is the IP address where application is running. This should be a valid IP address or valid host
+     *            name.
      * @return The org.apache.airavata.commons.gfac.type.HostDescription object.
-     * @throws AiravataAPIInvocationException If provided host address does not comply with IP address format or
-     *          host name format.
+     * @throws AiravataAPIInvocationException
+     *             If provided host address does not comply with IP address format or host name format.
      */
-    public HostDescription buildHostDescription (HostDescriptionType type, String hostName, String hostAddress)
-            throws AiravataAPIInvocationException{
+    public HostDescription buildHostDescription(HostDescriptionType type, String hostName, String hostAddress)
+            throws AiravataAPIInvocationException {
 
         return buildHostDescription(type.schemaType(), hostName, hostAddress);
 
     }
 
     /**
-     * Builds a host descriptor object. Host descriptor gives information about application
-     * hosted machine.
-     * @param schemaType The host type as per the schema. All available schema types are listed
-     *                   in org.apache.xmlbeans.SchemaType
-     * @param hostName An unique id given to hosted machine. This could be any name. But should be unique across the
-     *                 workflow.
-     * @param hostAddress This is the IP address where application is running. This should be a valid IP address or
-     *                    valid host name.
+     * Builds a host descriptor object. Host descriptor gives information about application hosted machine.
+     * 
+     * @param schemaType
+     *            The host type as per the schema. All available schema types are listed in
+     *            org.apache.xmlbeans.SchemaType
+     * @param hostName
+     *            An unique id given to hosted machine. This could be any name. But should be unique across the
+     *            workflow.
+     * @param hostAddress
+     *            This is the IP address where application is running. This should be a valid IP address or valid host
+     *            name.
      * @return The org.apache.airavata.commons.gfac.type.HostDescription object.
-     * @throws AiravataAPIInvocationException If provided host address does not comply with IP address format or
-     *          host name format.
+     * @throws AiravataAPIInvocationException
+     *             If provided host address does not comply with IP address format or host name format.
      */
-    public HostDescription buildHostDescription (SchemaType schemaType, String hostName, String hostAddress)
-            throws AiravataAPIInvocationException{
+    public HostDescription buildHostDescription(SchemaType schemaType, String hostName, String hostAddress)
+            throws AiravataAPIInvocationException {
 
         if (!validateHostAddress(hostAddress)) {
-            throw new AiravataAPIInvocationException("Invalid host address. Host address should be " +
-                    "either an IP address or a valid host name.");
+            throw new AiravataAPIInvocationException("Invalid host address. Host address should be "
+                    + "either an IP address or a valid host name.");
         }
 
         HostDescription hostDescription = new HostDescription(schemaType);
@@ -81,16 +104,19 @@ public class DescriptorBuilder {
 
     /**
      * Create an input parameter.
-     * @param parameterName The input parameter name.
-     * @param parameterDescription A short description about the input parameter.
-     * @param parameterDataType Input parameter type. E.g :- String, Integer etc ..
-     *                          All possible types are define in DataType.Enum class.
-     *                          E.g :- DataType.String
+     * 
+     * @param parameterName
+     *            The input parameter name.
+     * @param parameterDescription
+     *            A short description about the input parameter.
+     * @param parameterDataType
+     *            Input parameter type. E.g :- String, Integer etc .. All possible types are define in DataType.Enum
+     *            class. E.g :- DataType.String
      * @see org.apache.airavata.schemas.gfac.DataType.Enum
      * @return Encapsulating InputParameterType object.
      */
-    public InputParameterType buildInputParameterType (String parameterName, String parameterDescription,
-                                                  DataType.Enum parameterDataType) {
+    public InputParameterType buildInputParameterType(String parameterName, String parameterDescription,
+            DataType.Enum parameterDataType) {
 
         InputParameterType parameter = InputParameterType.Factory.newInstance();
         parameter.setParameterName(parameterName);
@@ -106,16 +132,19 @@ public class DescriptorBuilder {
 
     /**
      * Create an input parameter.
-     * @param parameterName The input parameter name.
-     * @param parameterDescription A short description about the input parameter.
-     * @param parameterDataType Input parameter type. E.g :- String, Integer etc ..
-     *                          All possible types are define in DataType.Enum class.
-     *                          E.g :- DataType.String
+     * 
+     * @param parameterName
+     *            The input parameter name.
+     * @param parameterDescription
+     *            A short description about the input parameter.
+     * @param parameterDataType
+     *            Input parameter type. E.g :- String, Integer etc .. All possible types are define in DataType.Enum
+     *            class. E.g :- DataType.String
      * @see org.apache.airavata.schemas.gfac.DataType.Enum
      * @return Encapsulating InputParameterType object.
      */
-    public OutputParameterType buildOutputParameterType (String parameterName, String parameterDescription,
-                                                  DataType.Enum parameterDataType) {
+    public OutputParameterType buildOutputParameterType(String parameterName, String parameterDescription,
+            DataType.Enum parameterDataType) {
 
         OutputParameterType parameter = OutputParameterType.Factory.newInstance();
         parameter.setParameterName(parameterName);
@@ -130,47 +159,47 @@ public class DescriptorBuilder {
     }
 
     /**
-     * Creates a ServiceDescription object. This includes information about the service. Mainly we
-     * are focusing on following details about the service.
+     * Creates a ServiceDescription object. This includes information about the service. Mainly we are focusing on
+     * following details about the service.
      * <ol>
-     *     <li>A name for service</li>
-     *     <li>A short description about the service</li>
-     *     <li>A what are input data types</li>
-     *     <li>A what are output data types</li>
+     * <li>A name for service</li>
+     * <li>A short description about the service</li>
+     * <li>A what are input data types</li>
+     * <li>A what are output data types</li>
      * </ol>
-     * @param serviceName Name of the service.
-     * @param description A short description about the service.
-     * @param inputParameterTypes Input parameter types.
-     * @param outputParameterTypes Output parameter types.
+     * 
+     * @param serviceName
+     *            Name of the service.
+     * @param description
+     *            A short description about the service.
+     * @param inputParameterTypes
+     *            Input parameter types.
+     * @param outputParameterTypes
+     *            Output parameter types.
      * @return A ServiceDescription object with above information encapsulated.
      */
-    public ServiceDescription buildServiceDescription (String serviceName, String description,
-                                                       List<InputParameterType> inputParameterTypes,
-                                                       List<OutputParameterType> outputParameterTypes) {
+    public ServiceDescription buildServiceDescription(String serviceName, String description,
+            List<InputParameterType> inputParameterTypes, List<OutputParameterType> outputParameterTypes) {
 
         ServiceDescription serviceDescription = new ServiceDescription();
         serviceDescription.getType().setName(serviceName);
         serviceDescription.getType().setDescription(description);
 
-
-        serviceDescription.getType().
-                setInputParametersArray(inputParameterTypes.toArray(
-                        new InputParameterType[inputParameterTypes.size()]));
-        serviceDescription.getType().
-                setOutputParametersArray(outputParameterTypes.toArray(
-                        new OutputParameterType[outputParameterTypes.size()]));
+        serviceDescription.getType().setInputParametersArray(
+                inputParameterTypes.toArray(new InputParameterType[inputParameterTypes.size()]));
+        serviceDescription.getType().setOutputParametersArray(
+                outputParameterTypes.toArray(new OutputParameterType[outputParameterTypes.size()]));
 
         return serviceDescription;
 
     }
 
-    public ApplicationDescription buildApplicationDeploymentDescription (String applicationName,
-                                                                                   String executablePath,
-                                                                                   String workingDirectory) {
+    public ApplicationDescription buildApplicationDeploymentDescription(String applicationName, String executablePath,
+            String workingDirectory) {
 
         ApplicationDescription applicationDeploymentDescription = new ApplicationDescription();
-        ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType
-                = applicationDeploymentDescription.getType();
+        ApplicationDeploymentDescriptionType applicationDeploymentDescriptionType = applicationDeploymentDescription
+                .getType();
         applicationDeploymentDescriptionType.addNewApplicationName().setStringValue(applicationName);
         applicationDeploymentDescriptionType.setExecutableLocation(executablePath);
         applicationDeploymentDescriptionType.setScratchWorkingDirectory(workingDirectory);
@@ -179,8 +208,6 @@ public class DescriptorBuilder {
 
     }
 
-
-
     private boolean validateHostAddress(String hostAddress) {
         return hostAddress.matches(IP_ADDRESS_VALIDATION_STRING) || hostAddress.matches(HOST_NAME_VALIDATION_STRING);
     }

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/RequestContext.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/RequestContext.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/RequestContext.java (original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/RequestContext.java Fri Jan 25 03:43:20 2013
@@ -1,10 +1,29 @@
+/*
+ *
+ * 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.airavata.common.context;
 
 /**
- * The request context class. This will be local to a thread.
- * User data that needs to propagate relevant to a request will be stored here.
- * We use thread local globals to store request data.
- * Currently we only store user identity.
+ * The request context class. This will be local to a thread. User data that needs to propagate relevant to a request
+ * will be stored here. We use thread local globals to store request data. Currently we only store user identity.
  */
 public class RequestContext {
 
@@ -34,5 +53,4 @@ public class RequestContext {
      */
     private String gatewayId;
 
-
 }

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/WorkflowContext.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/WorkflowContext.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/WorkflowContext.java (original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/context/WorkflowContext.java Fri Jan 25 03:43:20 2013
@@ -1,10 +1,30 @@
+/*
+ *
+ * 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.airavata.common.context;
 
 /**
- * The workflow context class. This will be local to a thread.
- * Workflow data that needs to propagate relevant to a request will be stored here.
- * We use thread local globals to store request data.
- * Currently we only store user identity.
+ * The workflow context class. This will be local to a thread. Workflow data that needs to propagate relevant to a
+ * request will be stored here. We use thread local globals to store request data. Currently we only store user
+ * identity.
  */
 public class WorkflowContext {
 
@@ -12,8 +32,10 @@ public class WorkflowContext {
 
     /**
      * Sets the context.
-     * @param context The context to be set. - Careful when calling this.
-     *                Make sure other data relevant to context is preserved.
+     * 
+     * @param context
+     *            The context to be set. - Careful when calling this. Make sure other data relevant to context is
+     *            preserved.
      */
     public static void set(RequestContext context) {
         userThreadLocal.set(context);
@@ -28,6 +50,7 @@ public class WorkflowContext {
 
     /**
      * Gets the context associated with current context.
+     * 
      * @return The context associated with current thread.
      */
     public static RequestContext get() {
@@ -36,6 +59,7 @@ public class WorkflowContext {
 
     /**
      * Gets the user associated with current user.
+     * 
      * @return User id associated with current request.
      */
     public static synchronized String getRequestUser() {

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java (original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/Constants.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.common.utils;
 
 /**

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java (original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DBUtil.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.common.utils;
 
 import org.apache.commons.dbcp.BasicDataSource;
@@ -33,9 +54,13 @@ public class DBUtil {
 
     /**
      * Initializes and load driver. Must be called this before calling anyother method.
-     * @throws ClassNotFoundException If DB driver is not found.
-     * @throws InstantiationException If unable to create driver class.
-     * @throws IllegalAccessException If security does not allow users to instantiate driver object.
+     * 
+     * @throws ClassNotFoundException
+     *             If DB driver is not found.
+     * @throws InstantiationException
+     *             If unable to create driver class.
+     * @throws IllegalAccessException
+     *             If security does not allow users to instantiate driver object.
      */
     public void init() throws ClassNotFoundException, InstantiationException, IllegalAccessException {
         properties = new Properties();
@@ -50,33 +75,43 @@ public class DBUtil {
 
     /**
      * Generic method to query values in the database.
-     * @param tableName Table name to query
-     * @param selectColumn The column selecting
-     * @param whereValue The condition query
+     * 
+     * @param tableName
+     *            Table name to query
+     * @param selectColumn
+     *            The column selecting
+     * @param whereValue
+     *            The condition query
      * @return The value appropriate to the query.
-     * @throws SQLException If an error occurred while querying
+     * @throws SQLException
+     *             If an error occurred while querying
      */
-    public String getMatchingColumnValue(String tableName, String selectColumn, String whereValue)
-            throws SQLException {
+    public String getMatchingColumnValue(String tableName, String selectColumn, String whereValue) throws SQLException {
         return getMatchingColumnValue(tableName, selectColumn, selectColumn, whereValue);
     }
 
     /**
      * Generic method to query values in the database.
-     * @param tableName Table name to query
-     * @param selectColumn The column selecting
-     * @param whereColumn The column which condition should apply
-     * @param whereValue The condition query
+     * 
+     * @param tableName
+     *            Table name to query
+     * @param selectColumn
+     *            The column selecting
+     * @param whereColumn
+     *            The column which condition should apply
+     * @param whereValue
+     *            The condition query
      * @return The value appropriate to the query.
-     * @throws SQLException If an error occurred while querying
+     * @throws SQLException
+     *             If an error occurred while querying
      */
     public String getMatchingColumnValue(String tableName, String selectColumn, String whereColumn, String whereValue)
             throws SQLException {
 
         StringBuilder stringBuilder = new StringBuilder();
 
-        stringBuilder.append("SELECT ").append(selectColumn).append(" FROM ").append(tableName)
-                .append(" WHERE ").append(whereColumn).append(" = ?");
+        stringBuilder.append("SELECT ").append(selectColumn).append(" FROM ").append(tableName).append(" WHERE ")
+                .append(whereColumn).append(" = ?");
 
         String sql = stringBuilder.toString();
 
@@ -112,8 +147,11 @@ public class DBUtil {
 
     /**
      * Create table utility method.
-     * @param sql SQL to be executed.
-     * @throws SQLException If an error occurred while creating the table.
+     * 
+     * @param sql
+     *            SQL to be executed.
+     * @throws SQLException
+     *             If an error occurred while creating the table.
      */
     public void executeSQL(String sql) throws SQLException {
 
@@ -145,6 +183,7 @@ public class DBUtil {
 
     /**
      * Gets a new DBCP data source.
+     * 
      * @return A new data source.
      */
     public DataSource getDataSource() {
@@ -159,8 +198,10 @@ public class DBUtil {
 
     /**
      * Creates a new JDBC connections based on provided DBCP properties.
+     * 
      * @return A new DB connection.
-     * @throws SQLException If an error occurred while creating the connection.
+     * @throws SQLException
+     *             If an error occurred while creating the connection.
      */
     public Connection getConnection() throws SQLException {
         return DriverManager.getConnection(jdbcUrl, properties);
@@ -168,8 +209,11 @@ public class DBUtil {
 
     /**
      * Utility method to close statements and connections.
-     * @param preparedStatement The prepared statement to close.
-     * @param connection The connection to close.
+     * 
+     * @param preparedStatement
+     *            The prepared statement to close.
+     * @param connection
+     *            The connection to close.
      */
     public void cleanup(PreparedStatement preparedStatement, Connection connection) {
         if (preparedStatement != null) {
@@ -190,8 +234,11 @@ public class DBUtil {
 
     /**
      * Mainly useful for tests.
-     * @param tableName The table name.
-     * @param connection The connection to be used.
+     * 
+     * @param tableName
+     *            The table name.
+     * @param connection
+     *            The connection to be used.
      */
     public static void truncate(String tableName, Connection connection) throws SQLException {
 
@@ -206,12 +253,14 @@ public class DBUtil {
 
     /**
      * Creates a DBUtil object based on servlet context configurations.
-     * @param servletContext The servlet context.
+     * 
+     * @param servletContext
+     *            The servlet context.
      * @return DBUtil object.
-     * @throws Exception If an error occurred while reading configurations or while creating
-     * database object.
+     * @throws Exception
+     *             If an error occurred while reading configurations or while creating database object.
      */
-    public static DBUtil getDBUtil(ServletContext servletContext) throws Exception{
+    public static DBUtil getDBUtil(ServletContext servletContext) throws Exception {
 
         String jdbcUrl = servletContext.getInitParameter("credential-store-jdbc-url");
         String userName = servletContext.getInitParameter("credential-store-db-user");
@@ -219,8 +268,8 @@ public class DBUtil {
         String driverName = servletContext.getInitParameter("credential-store-db-driver");
 
         StringBuilder stringBuilder = new StringBuilder("Starting credential store, connecting to database - ");
-        stringBuilder.append(jdbcUrl).append(" DB user - ").append(userName).
-                append(" driver name - ").append(driverName);
+        stringBuilder.append(jdbcUrl).append(" DB user - ").append(userName).append(" driver name - ")
+                .append(driverName);
 
         log.debug(stringBuilder.toString());
 
@@ -235,6 +284,4 @@ public class DBUtil {
         return dbUtil;
     }
 
-
-
 }

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java (original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DatabaseTestCases.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.common.utils;
 
 import org.slf4j.Logger;
@@ -7,21 +28,18 @@ import java.sql.Connection;
 import java.sql.SQLException;
 
 /**
- * An abstraction for database specific test classes. This will create a database and provides
- * methods to execute SQLs.
+ * An abstraction for database specific test classes. This will create a database and provides methods to execute SQLs.
  */
 public class DatabaseTestCases {
 
     private static final Logger logger = LoggerFactory.getLogger(DatabaseTestCases.class);
 
-
     protected static String hostAddress = "localhost";
     protected static int port = 20000;
     protected static String userName = "admin";
     protected static String password = "admin";
     protected static String driver = "org.apache.derby.jdbc.ClientDriver";
 
-
     public static String getHostAddress() {
         return hostAddress;
     }
@@ -43,9 +61,9 @@ public class DatabaseTestCases {
     }
 
     public static String getJDBCUrl() {
-        return new StringBuilder().append("jdbc:derby://").append(getHostAddress()).append(":").append(getPort()).
-                append("/persistent_data;create=true;user=").append(getUserName()).
-                append(";password=").append(getPassword()).toString();
+        return new StringBuilder().append("jdbc:derby://").append(getHostAddress()).append(":").append(getPort())
+                .append("/persistent_data;create=true;user=").append(getUserName()).append(";password=")
+                .append(getPassword()).toString();
     }
 
     public static void waitTillServerStarts() {
@@ -53,7 +71,7 @@ public class DatabaseTestCases {
 
         Connection connection = null;
         try {
-           connection = dbUtil.getConnection();
+            connection = dbUtil.getConnection();
         } catch (SQLException e) {
             // ignore
         }
@@ -67,15 +85,12 @@ public class DatabaseTestCases {
                     // ignore
                 }
             } catch (InterruptedException e) {
-                //ignore
+                // ignore
             }
         }
 
-
     }
 
-
-
     public static void executeSQL(String sql) throws Exception {
         DBUtil dbUtil = new DBUtil(getJDBCUrl(), getUserName(), getPassword(), getDriver());
         dbUtil.executeSQL(sql);

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DerbyUtil.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DerbyUtil.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DerbyUtil.java (original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/DerbyUtil.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.common.utils;
 
 import java.io.IOException;
@@ -23,11 +44,17 @@ public class DerbyUtil {
 
     /**
      * Starts new derby server instance with given configurations.
-     * @param hostAddress The host address start the server.
-     * @param port The port number which server is starting.
-     * @param user JDBC user name.
-     * @param password JDBC password.
-     * @throws Exception If an error occurred while starting the server.
+     * 
+     * @param hostAddress
+     *            The host address start the server.
+     * @param port
+     *            The port number which server is starting.
+     * @param user
+     *            JDBC user name.
+     * @param password
+     *            JDBC password.
+     * @throws Exception
+     *             If an error occurred while starting the server.
      */
     public static void startDerbyInServerMode(String hostAddress, int port, String user, String password)
             throws Exception {
@@ -35,19 +62,17 @@ public class DerbyUtil {
 
         try {
             System.setProperty(DERBY_SERVER_MODE_SYS_PROPERTY, "true");
-            server = new NetworkServerControl(InetAddress.getByName(hostAddress),
-                    port,
-                    user, password);
+            server = new NetworkServerControl(InetAddress.getByName(hostAddress), port, user, password);
             consoleWriter = new PrintWriter(System.out, true);
             server.start(consoleWriter);
 
         } catch (IOException e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available", e);
+            logger.error("Unable to start Apache derby in the server mode! Check whether "
+                    + "specified port is available", e);
             throw e;
         } catch (Exception e) {
-            logger.error("Unable to start Apache derby in the server mode! Check whether " +
-                    "specified port is available", e);
+            logger.error("Unable to start Apache derby in the server mode! Check whether "
+                    + "specified port is available", e);
             throw e;
         } finally {
 
@@ -61,8 +86,11 @@ public class DerbyUtil {
 
     /**
      * Starts derby server in embedded mode.
-     * @throws ClassNotFoundException If specified driver not found in the class path.
-     * @throws SQLException  If an error occurred while creat
+     * 
+     * @throws ClassNotFoundException
+     *             If specified driver not found in the class path.
+     * @throws SQLException
+     *             If an error occurred while creat
      */
     public static void startDerbyInEmbeddedMode() throws ClassNotFoundException, SQLException {
         Class.forName("org.apache.derby.jdbc.EmbeddedDriver");
@@ -71,7 +99,9 @@ public class DerbyUtil {
 
     /**
      * Shuts down the server.
-     * @throws Exception If an error occurred while shutting down.
+     * 
+     * @throws Exception
+     *             If an error occurred while shutting down.
      */
     public static void stopDerbyServer() throws Exception {
         try {

Modified: airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/SecurityUtil.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/SecurityUtil.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/SecurityUtil.java (original)
+++ airavata/trunk/modules/commons/utils/src/main/java/org/apache/airavata/common/utils/SecurityUtil.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.common.utils;
 
 import org.slf4j.Logger;
@@ -17,13 +38,16 @@ public class SecurityUtil {
 
     /**
      * Creates a hash of given string with the given hash algorithm.
-     * @param stringToDigest The string to digest.
-     * @param digestingAlgorithm Hash algorithm.
+     * 
+     * @param stringToDigest
+     *            The string to digest.
+     * @param digestingAlgorithm
+     *            Hash algorithm.
      * @return The digested string.
-     * @throws NoSuchAlgorithmException If given hash algorithm doesnt exists.
+     * @throws NoSuchAlgorithmException
+     *             If given hash algorithm doesnt exists.
      */
-    public static String digestString(String stringToDigest, String digestingAlgorithm)
-            throws NoSuchAlgorithmException {
+    public static String digestString(String stringToDigest, String digestingAlgorithm) throws NoSuchAlgorithmException {
 
         if (digestingAlgorithm == null || digestingAlgorithm.equals(PASSWORD_HASH_METHOD_PLAINTEXT)) {
             return stringToDigest;
@@ -35,8 +59,11 @@ public class SecurityUtil {
 
     /**
      * Sets the truststore for application. Useful when communicating over HTTPS.
-     * @param trustStoreFilePath Where trust store is located.
-     * @param trustStorePassword The trust store password.
+     * 
+     * @param trustStoreFilePath
+     *            Where trust store is located.
+     * @param trustStorePassword
+     *            The trust store password.
      */
     public static void setTrustStoreParameters(String trustStoreFilePath, String trustStorePassword) {
 

Modified: airavata/trunk/modules/distribution/xbaya-gui/src/main/java/org/apache/airavata/distribution/xbaya/jnlp/Main.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/distribution/xbaya-gui/src/main/java/org/apache/airavata/distribution/xbaya/jnlp/Main.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/distribution/xbaya-gui/src/main/java/org/apache/airavata/distribution/xbaya/jnlp/Main.java (original)
+++ airavata/trunk/modules/distribution/xbaya-gui/src/main/java/org/apache/airavata/distribution/xbaya/jnlp/Main.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.distribution.xbaya.jnlp;
 
 import java.io.*;
@@ -14,7 +35,8 @@ public class Main {
     public static void main(String[] args) {
 
         if (args.length != 2) {
-            System.err.println("[ERROR] JNLP creator must be given with lib directory of Xbaya and JNLP template location.");
+            System.err
+                    .println("[ERROR] JNLP creator must be given with lib directory of Xbaya and JNLP template location.");
             System.exit(-1);
         }
 
@@ -47,10 +69,9 @@ public class Main {
             stringBuilder.append("\n");
         }
 
-        //System.out.println(stringBuilder.toString());
+        // System.out.println(stringBuilder.toString());
         modifyConfigurations(jnlpFile, stringBuilder);
 
-
     }
 
     private static void modifyConfigurations(File jnlpFile, StringBuilder dependencies) {
@@ -65,7 +86,6 @@ public class Main {
             System.err.println("[ERROR] Error occurred while reading the file. " + e.getMessage());
         }
 
-
         String line = null;
         if (in != null) {
             try {
@@ -102,7 +122,6 @@ public class Main {
             }
         }
 
-
         // now, write the file again with the changes
         PrintWriter out = null;
         try {

Modified: airavata/trunk/modules/integration-tests/src/main/java/org/apache/airavata/integration/Man.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/integration-tests/src/main/java/org/apache/airavata/integration/Man.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/integration-tests/src/main/java/org/apache/airavata/integration/Man.java (original)
+++ airavata/trunk/modules/integration-tests/src/main/java/org/apache/airavata/integration/Man.java Fri Jan 25 03:43:20 2013
@@ -1,12 +1,26 @@
+/*
+ *
+ * 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.airavata.integration;
 
-/**
- * Created with IntelliJ IDEA.
- * User: thejaka
- * Date: 11/30/12
- * Time: 9:40 PM
- * To change this template use File | Settings | File Templates.
- */
 public class Man {
 
 }

Modified: airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java (original)
+++ airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/BaseCaseIT.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.integration;
 
 import java.io.BufferedReader;
@@ -43,7 +64,6 @@ import org.slf4j.LoggerFactory;
 import org.testng.annotations.BeforeTest;
 import org.testng.annotations.Test;
 
-
 /**
  * Integration test class.
  */
@@ -111,10 +131,10 @@ public class BaseCaseIT {
         setUpEnvironment();
     }
 
-    public void setUpEnvironment() throws Exception{
+    public void setUpEnvironment() throws Exception {
 
         log("..................Validating server logs .............................");
-        //TODO validate logs
+        // TODO validate logs
 
         log("Reading test server configurations ...");
 
@@ -148,20 +168,17 @@ public class BaseCaseIT {
 
         log("Configurations - Registry URL : " + registryURL);
 
-
         PasswordCallback passwordCallback = new PasswordCallbackImpl();
-        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()),
-                getGatewayName(), getUserName(), passwordCallback);
+        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
+                passwordCallback);
 
         checkServerStartup(airavataAPI);
 
-
         log("Server successfully started .............................");
         log("Running tests .............................");
     }
 
-
-    protected void checkServerStartup (AiravataAPI airavataAPI) throws Exception {
+    protected void checkServerStartup(AiravataAPI airavataAPI) throws Exception {
 
         int tries = 0;
 
@@ -182,10 +199,8 @@ public class BaseCaseIT {
 
             URI workflowInterpreterServiceURL = airavataAPI.getAiravataManager().getWorkflowInterpreterServiceURL();
 
-            if (eventingServiceURL == null ||
-                    gFaCURL == null ||
-                    messageBoxServiceURL == null ||
-                    workflowInterpreterServiceURL == null) {
+            if (eventingServiceURL == null || gFaCURL == null || messageBoxServiceURL == null
+                    || workflowInterpreterServiceURL == null) {
 
                 log.info("Waiting till server initializes ........");
                 Thread.sleep(TIME_OUT);
@@ -202,8 +217,8 @@ public class BaseCaseIT {
     public void setUp() throws Exception {
 
         PasswordCallback passwordCallback = new PasswordCallbackImpl();
-        this.airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()),
-                getGatewayName(), getUserName(), passwordCallback);
+        this.airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
+                passwordCallback);
     }
 
     @Test(groups = { "setupTests" })
@@ -234,15 +249,14 @@ public class BaseCaseIT {
 
         DescriptorBuilder descriptorBuilder = airavataAPI.getDescriptorBuilder();
 
-        HostDescription hostDescription
-                = descriptorBuilder.buildHostDescription(HostDescriptionType.type, "localhost", "127.0.0.1");
+        HostDescription hostDescription = descriptorBuilder.buildHostDescription(HostDescriptionType.type, "localhost",
+                "127.0.0.1");
 
         log("Adding host description ....");
         airavataAPI.getApplicationManager().addHostDescription(hostDescription);
 
-        Assert.assertTrue(airavataAPI.getApplicationManager().isHostDescriptorExists(hostDescription.getType()
-                .getHostName()));
-
+        Assert.assertTrue(airavataAPI.getApplicationManager().isHostDescriptorExists(
+                hostDescription.getType().getHostName()));
 
         List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
         inputParameters.add(descriptorBuilder.buildInputParameterType("echo_input", "echo input", DataType.STRING));
@@ -255,19 +269,19 @@ public class BaseCaseIT {
 
         log("Adding service description ...");
         airavataAPI.getApplicationManager().addServiceDescription(serviceDescription);
-        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(serviceDescription.
-                getType().getName()));
+        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
+                serviceDescription.getType().getName()));
 
         // Deployment descriptor
-        ApplicationDescription applicationDeploymentDescription
-                = descriptorBuilder.buildApplicationDeploymentDescription("EchoApplication", "/bin/echo", "/tmp");
+        ApplicationDescription applicationDeploymentDescription = descriptorBuilder
+                .buildApplicationDeploymentDescription("EchoApplication", "/bin/echo", "/tmp");
 
         log("Adding deployment description ...");
-        airavataAPI.getApplicationManager().addApplicationDescription(serviceDescription,
-                hostDescription, applicationDeploymentDescription);
+        airavataAPI.getApplicationManager().addApplicationDescription(serviceDescription, hostDescription,
+                applicationDeploymentDescription);
 
-        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(serviceDescription.getType().
-                getName(), hostDescription.getType().getHostName(),
+        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
+                serviceDescription.getType().getName(), hostDescription.getType().getHostName(),
                 applicationDeploymentDescription.getType().getApplicationName().getStringValue()));
 
         log("Saving workflow ...");
@@ -281,19 +295,19 @@ public class BaseCaseIT {
         runWorkFlow(workflow, Arrays.asList("echo_output=Airavata_Test"));
     }
 
-    @Test(groups = { "performanceTesting" } )
+    @Test(groups = { "performanceTesting" })
     public void testExistsHostDescriptor() throws AiravataAPIInvocationException {
 
         airavataAPI.getApplicationManager().isHostDescriptorExists("localhost");
     }
 
-    @Test(groups = { "echoGroup" }/*, dependsOnMethods = { "testEchoService" }*/)
+    @Test(groups = { "echoGroup" }/* , dependsOnMethods = { "testEchoService" } */)
     public void testUpdateEchoService() throws Exception {
 
         DescriptorBuilder descriptorBuilder = airavataAPI.getDescriptorBuilder();
 
-        HostDescription hostDescription
-                = descriptorBuilder.buildHostDescription(HostDescriptionType.type, "localhost", "127.0.0.1");
+        HostDescription hostDescription = descriptorBuilder.buildHostDescription(HostDescriptionType.type, "localhost",
+                "127.0.0.1");
 
         log("Trying to add host description ....");
         try {
@@ -305,9 +319,8 @@ public class BaseCaseIT {
             airavataAPI.getApplicationManager().updateHostDescription(hostDescription);
         }
 
-        Assert.assertTrue(airavataAPI.getApplicationManager().isHostDescriptorExists(hostDescription.getType()
-                .getHostName()));
-
+        Assert.assertTrue(airavataAPI.getApplicationManager().isHostDescriptorExists(
+                hostDescription.getType().getHostName()));
 
         List<InputParameterType> inputParameters = new ArrayList<InputParameterType>();
         inputParameters.add(descriptorBuilder.buildInputParameterType("echo_input", "echo input", DataType.STRING));
@@ -328,27 +341,27 @@ public class BaseCaseIT {
             airavataAPI.getApplicationManager().updateServiceDescription(serviceDescription);
         }
 
-        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(serviceDescription.
-                getType().getName()));
+        Assert.assertTrue(airavataAPI.getApplicationManager().isServiceDescriptorExists(
+                serviceDescription.getType().getName()));
 
         // Deployment descriptor
-        ApplicationDescription applicationDeploymentDescription
-                = descriptorBuilder.buildApplicationDeploymentDescription("EchoApplication", "/bin/echo", "/tmp");
+        ApplicationDescription applicationDeploymentDescription = descriptorBuilder
+                .buildApplicationDeploymentDescription("EchoApplication", "/bin/echo", "/tmp");
 
         log("Adding deployment description ...");
         try {
-            airavataAPI.getApplicationManager().addApplicationDescription(serviceDescription,
-                    hostDescription, applicationDeploymentDescription);
+            airavataAPI.getApplicationManager().addApplicationDescription(serviceDescription, hostDescription,
+                    applicationDeploymentDescription);
             Assert.fail("Application Descriptor should already exists and should go to update.");
         } catch (DescriptorRecordAlreadyExistsException e) {
 
             log("Updating application description ....");
-            airavataAPI.getApplicationManager().updateApplicationDescription(serviceDescription,
-                    hostDescription, applicationDeploymentDescription);
+            airavataAPI.getApplicationManager().updateApplicationDescription(serviceDescription, hostDescription,
+                    applicationDeploymentDescription);
         }
 
-        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(serviceDescription.getType().
-                getName(), hostDescription.getType().getHostName(),
+        Assert.assertTrue(airavataAPI.getApplicationManager().isApplicationDescriptorExists(
+                serviceDescription.getType().getName(), hostDescription.getType().getHostName(),
                 applicationDeploymentDescription.getType().getApplicationName().getStringValue()));
 
         log("Saving workflow ...");
@@ -368,7 +381,7 @@ public class BaseCaseIT {
         log("Workflow setting up completed ...");
 
         try {
-        	runWorkFlowWithoutMonitor(workflow, Arrays.asList("echo_output=Airavata_Test"));
+            runWorkFlowWithoutMonitor(workflow, Arrays.asList("echo_output=Airavata_Test"));
         } catch (Exception e) {
             log.error("An error occurred while invoking workflow", e);
             throw e;
@@ -377,13 +390,14 @@ public class BaseCaseIT {
 
     protected void runWorkFlow(Workflow workflow, List<String> inputValues) throws Exception {
 
-        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(),
-                getUserName(), new PasswordCallbackImpl());
+        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
+                new PasswordCallbackImpl());
         List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
         String workflowName = workflow.getName();
-        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(workflowName,getUserName(),null);
+        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(
+                workflowName, getUserName(), null);
         String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options);
-        
+
         Assert.assertNotNull(experimentId);
 
         log.info("Run workflow completed ....");
@@ -391,24 +405,26 @@ public class BaseCaseIT {
 
         monitor(experimentId);
     }
-    
+
     protected void runWorkFlowWithoutMonitor(Workflow workflow, List<String> inputValues) throws Exception {
 
-        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(),
-                getUserName(), new PasswordCallbackImpl());
+        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
+                new PasswordCallbackImpl());
         List<WorkflowInput> workflowInputs = setupInputs(workflow, inputValues);
         String workflowName = workflow.getName();
-        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(workflowName,getUserName(),null);
-        String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options, new EventDataListenerAdapter() {
-			@Override
-			public void notify(EventDataRepository eventDataRepo, EventData eventData) {
-				//do nothing
-			}
-		});
-        
+        ExperimentAdvanceOptions options = airavataAPI.getExecutionManager().createExperimentAdvanceOptions(
+                workflowName, getUserName(), null);
+        String experimentId = airavataAPI.getExecutionManager().runExperiment(workflowName, workflowInputs, options,
+                new EventDataListenerAdapter() {
+                    @Override
+                    public void notify(EventDataRepository eventDataRepo, EventData eventData) {
+                        // do nothing
+                    }
+                });
+
         Assert.assertNotNull(experimentId);
         airavataAPI.getExecutionManager().waitForExperimentTermination(experimentId);
-        
+
         log.info("Run workflow completed ....");
         log.info("Starting monitoring ....");
 
@@ -416,8 +432,8 @@ public class BaseCaseIT {
     }
 
     protected void verifyOutput(String experimentId, String outputVerifyingString) throws Exception {
-    	AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(),
-                getUserName(), new PasswordCallbackImpl());
+        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
+                new PasswordCallbackImpl());
         log.info("Experiment ID Returned : " + experimentId);
 
         ExperimentData experimentData = airavataAPI.getProvenanceManager().getExperimentData(experimentId);
@@ -428,26 +444,26 @@ public class BaseCaseIT {
 
         Assert.assertFalse("Workflow instance data cannot be empty !", workflowInstanceData.isEmpty());
 
-        for(WorkflowExecutionDataImpl data:workflowInstanceData){
+        for (WorkflowExecutionDataImpl data : workflowInstanceData) {
             List<NodeExecutionData> nodeDataList = data.getNodeDataList();
-            for(NodeExecutionData nodeData:nodeDataList){
+            for (NodeExecutionData nodeData : nodeDataList) {
 
                 Assert.assertFalse("Node execution data list cannot be empty !", nodeDataList.isEmpty());
 
-            	for (OutputData outputData : nodeData.getOutputData()) {
+                for (OutputData outputData : nodeData.getOutputData()) {
                     Assert.assertEquals("Airavata_Test", outputData.getValue());
-				}
-            	for (InputData inputData : nodeData.getInputData()) {
+                }
+                for (InputData inputData : nodeData.getInputData()) {
                     Assert.assertEquals(outputVerifyingString, inputData.getValue());
-				}
+                }
             }
         }
     }
-    
-	private List<WorkflowInput> setupInputs(Workflow workflow,List<String> inputValues)	throws Exception {
-		AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(),
-                getUserName(), new PasswordCallbackImpl());
-		List<WorkflowInput> workflowInputs = airavataAPI.getWorkflowManager().getWorkflowInputs(workflow.getName());
+
+    private List<WorkflowInput> setupInputs(Workflow workflow, List<String> inputValues) throws Exception {
+        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
+                new PasswordCallbackImpl());
+        List<WorkflowInput> workflowInputs = airavataAPI.getWorkflowManager().getWorkflowInputs(workflow.getName());
 
         Assert.assertEquals(workflowInputs.size(), inputValues.size());
 
@@ -456,8 +472,8 @@ public class BaseCaseIT {
             workflowInputs.get(i).setValue(valueString);
             ++i;
         }
-		return workflowInputs;
-	}
+        return workflowInputs;
+    }
 
     protected String getWorkflowComposeContent(String fileName) throws IOException {
         File f = new File(".");
@@ -480,31 +496,30 @@ public class BaseCaseIT {
     }
 
     public void monitor(final String experimentId) throws Exception {
-        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(),
-                getUserName(), new PasswordCallbackImpl() );
-		final Monitor experimentMonitor = airavataAPI.getExecutionManager().getExperimentMonitor(experimentId,new EventDataListenerAdapter() {
-			
-			@Override
-			public void notify(EventDataRepository eventDataRepo, EventData eventData) {
-				Assert.assertNotNull(eventDataRepo);
-		        Assert.assertNotNull(eventData);
-		        if (MonitorUtil.EventType.WORKFLOW_TERMINATED.equals(eventData.getType())) {
-		            try {
-		                BaseCaseIT.this.verifyOutput(experimentId,"echo_output=Airavata_Test");
-		            } catch (Exception e) {
-		                log.error("Error verifying output", e);
-		                Assert.fail("Error occurred while verifying output.");
-		            }finally{
-		            	getMonitor().stopMonitoring();
-		            }
-		        }
-		        log.info("No of events: "+eventDataRepo.getEvents().size());				
-			}
-		});
+        AiravataAPI airavataAPI = AiravataAPIFactory.getAPI(new URI(getRegistryURL()), getGatewayName(), getUserName(),
+                new PasswordCallbackImpl());
+        final Monitor experimentMonitor = airavataAPI.getExecutionManager().getExperimentMonitor(experimentId,
+                new EventDataListenerAdapter() {
+
+                    @Override
+                    public void notify(EventDataRepository eventDataRepo, EventData eventData) {
+                        Assert.assertNotNull(eventDataRepo);
+                        Assert.assertNotNull(eventData);
+                        if (MonitorUtil.EventType.WORKFLOW_TERMINATED.equals(eventData.getType())) {
+                            try {
+                                BaseCaseIT.this.verifyOutput(experimentId, "echo_output=Airavata_Test");
+                            } catch (Exception e) {
+                                log.error("Error verifying output", e);
+                                Assert.fail("Error occurred while verifying output.");
+                            } finally {
+                                getMonitor().stopMonitoring();
+                            }
+                        }
+                        log.info("No of events: " + eventDataRepo.getEvents().size());
+                    }
+                });
         experimentMonitor.startMonitoring();
         experimentMonitor.waitForCompletion();
     }
 
-
-
 }

Modified: airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java (original)
+++ airavata/trunk/modules/integration-tests/src/test/java/org/apache/airavata/integration/PasswordCallbackImpl.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.integration;
 
 import org.apache.airavata.registry.api.PasswordCallback;

Modified: airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/ServletRequestHelper.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/ServletRequestHelper.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/ServletRequestHelper.java (original)
+++ airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/ServletRequestHelper.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.services.registry.rest.security;
 
 import org.apache.airavata.common.context.RequestContext;
@@ -94,5 +115,4 @@ public class ServletRequestHelper {
         WorkflowContext.set(requestContext);
     }
 
-
 }

Modified: airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/local/LocalUserStore.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/local/LocalUserStore.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/local/LocalUserStore.java (original)
+++ airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/security/local/LocalUserStore.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.services.registry.rest.security.local;
 
 import java.security.NoSuchAlgorithmException;
@@ -29,14 +50,14 @@ public class LocalUserStore {
     private String hashMethod;
 
     public LocalUserStore(ServletContext servletContext) throws Exception {
-//        Properties properties = WebAppUtil.getAiravataProperties(servletContext);
+        // Properties properties = WebAppUtil.getAiravataProperties(servletContext);
 
         hashMethod = RegistrySettings.getSetting("default.registry.password.hash.method");
 
         dbUtil = new DBUtil(RegistrySettings.getSetting("registry.jdbc.url"),
-        		RegistrySettings.getSetting("registry.jdbc.user"),
-        		RegistrySettings.getSetting("registry.jdbc.password"),
-        		RegistrySettings.getSetting("registry.jdbc.driver"));
+                RegistrySettings.getSetting("registry.jdbc.user"),
+                RegistrySettings.getSetting("registry.jdbc.password"),
+                RegistrySettings.getSetting("registry.jdbc.driver"));
 
         dbUtil.init();
     }
@@ -57,8 +78,7 @@ public class LocalUserStore {
             preparedStatement = connection.prepareStatement(sql);
 
             preparedStatement.setString(1, userName);
-            preparedStatement.setString(2, SecurityUtil.digestString(password,
-                    hashMethod));
+            preparedStatement.setString(2, SecurityUtil.digestString(password, hashMethod));
 
             preparedStatement.executeUpdate();
 
@@ -146,8 +166,8 @@ public class LocalUserStore {
 
             if (storedPassword != null) {
                 if (!storedPassword.equals(oldDigestedPassword)) {
-                    throw new RuntimeException("Previous password did not match correctly. Please specify old password" +
-                            " correctly.");
+                    throw new RuntimeException("Previous password did not match correctly. Please specify old password"
+                            + " correctly.");
                 }
             }
 
@@ -223,7 +243,6 @@ public class LocalUserStore {
 
     }
 
-
     public void deleteUser(String userName) {
 
         String sql = "delete from users where user_name=?";

Modified: airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/utils/WebAppUtil.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/utils/WebAppUtil.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/utils/WebAppUtil.java (original)
+++ airavata/trunk/modules/rest/service/src/main/java/org/apache/airavata/services/registry/rest/utils/WebAppUtil.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.services.registry.rest.utils;
 
 import java.io.IOException;
@@ -26,18 +47,18 @@ public class WebAppUtil {
         return builder.build();
     }
 
-//    public static Properties getAiravataProperties(ServletContext servletContext) throws IOException {
-//
-//        URL url = WebAppUtil.class.getClassLoader().
-//                getResource(RestServicesConstants.AIRAVATA_SERVER_PROPERTIES);
-//        Properties properties = new Properties();
-//        try {
-//            properties.load(url.openStream());
-//        } catch (IOException e) {
-//            log.error("Error reading Airavata properties");
-//            throw e;
-//        }
-//
-//        return properties;
-//    }
+    // public static Properties getAiravataProperties(ServletContext servletContext) throws IOException {
+    //
+    // URL url = WebAppUtil.class.getClassLoader().
+    // getResource(RestServicesConstants.AIRAVATA_SERVER_PROPERTIES);
+    // Properties properties = new Properties();
+    // try {
+    // properties.load(url.openStream());
+    // } catch (IOException e) {
+    // log.error("Error reading Airavata properties");
+    // throw e;
+    // }
+    //
+    // return properties;
+    // }
 }

Modified: airavata/trunk/modules/rest/service/src/test/java/org/apache/airavata/services/registry/rest/security/AbstractAuthenticatorTest.java
URL: http://svn.apache.org/viewvc/airavata/trunk/modules/rest/service/src/test/java/org/apache/airavata/services/registry/rest/security/AbstractAuthenticatorTest.java?rev=1438310&r1=1438309&r2=1438310&view=diff
==============================================================================
--- airavata/trunk/modules/rest/service/src/test/java/org/apache/airavata/services/registry/rest/security/AbstractAuthenticatorTest.java (original)
+++ airavata/trunk/modules/rest/service/src/test/java/org/apache/airavata/services/registry/rest/security/AbstractAuthenticatorTest.java Fri Jan 25 03:43:20 2013
@@ -1,3 +1,24 @@
+/*
+ *
+ * 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.airavata.services.registry.rest.security;
 
 import junit.framework.TestCase;
@@ -27,12 +48,12 @@ public abstract class AbstractAuthentica
 
     protected AuthenticatorConfigurationReader authenticatorConfigurationReader;
 
-
     @Before
     public void setUp() throws Exception {
 
         authenticatorConfigurationReader = new AuthenticatorConfigurationReader();
-        authenticatorConfigurationReader.init(this.getClass().getClassLoader().getResourceAsStream("authenticators.xml"));
+        authenticatorConfigurationReader.init(this.getClass().getClassLoader()
+                .getResourceAsStream("authenticators.xml"));
 
         List<Authenticator> listAuthenticators = authenticatorConfigurationReader.getAuthenticatorList();
 



Mime
View raw message