manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kwri...@apache.org
Subject svn commit: r1629085 - in /manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco: ConfigurationHandler.java Messages.java
Date Thu, 02 Oct 2014 22:15:33 GMT
Author: kwright
Date: Thu Oct  2 22:15:32 2014
New Revision: 1629085

URL: http://svn.apache.org/r1629085
Log:
Coding standards for Messages and ConfigurationHandler classes

Modified:
    manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/ConfigurationHandler.java
    manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/Messages.java

Modified: manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/ConfigurationHandler.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/ConfigurationHandler.java?rev=1629085&r1=1629084&r2=1629085&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/ConfigurationHandler.java
(original)
+++ manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/ConfigurationHandler.java
Thu Oct  2 22:15:32 2014
@@ -49,7 +49,7 @@ public class ConfigurationHandler {
     DEFAULT_CONFIGURATION_PARAMETERS.put(PARAM_PROTOCOL, "http");
     DEFAULT_CONFIGURATION_PARAMETERS.put(PARAM_HOSTNAME, "localhost");
     DEFAULT_CONFIGURATION_PARAMETERS.put(PARAM_ENDPOINT, "/alfresco/service");
-     DEFAULT_CONFIGURATION_PARAMETERS.put(PARAM_USERNAME, "");
+    DEFAULT_CONFIGURATION_PARAMETERS.put(PARAM_USERNAME, "");
     DEFAULT_CONFIGURATION_PARAMETERS.put(PARAM_PASSWORD, "");
   }
 
@@ -60,6 +60,7 @@ public class ConfigurationHandler {
       IHTTPOutput out, Locale locale, ConfigParams parameters,
       List<String> tabsArray) throws ManifoldCFException, IOException {
     tabsArray.add("Server");
+    // KDW - This should be using Velocity templates!  See functionality provided by Messages
class in almost every connector
     InputStream inputStream = ConfigurationHandler.class.getResourceAsStream("/org/apache/manifoldcf/authorities/alfresco/"
+ EDIT_CONFIG_HEADER);
     StringWriter writer = new StringWriter();
     IOUtils.copy(inputStream, writer, "UTF-8");

Modified: manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/Messages.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/Messages.java?rev=1629085&r1=1629084&r2=1629085&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/Messages.java
(original)
+++ manifoldcf/branches/CONNECTORS-1037/connectors/alfresco-webscript/connector/src/main/java/org/apache/manifoldcf/authorities/alfresco/Messages.java
Thu Oct  2 22:15:32 2014
@@ -34,79 +34,79 @@ public class Messages extends org.apache
 
     public static String getString(Locale locale, String messageKey)
     {
-        return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+      return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
     }
 
     public static String getAttributeString(Locale locale, String messageKey)
     {
-        return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+      return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
     }
 
     public static String getBodyString(Locale locale, String messageKey)
     {
-        return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+      return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
     }
 
     public static String getAttributeJavascriptString(Locale locale, String messageKey)
     {
-        return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+      return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
     }
 
     public static String getBodyJavascriptString(Locale locale, String messageKey)
     {
-        return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
+      return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, null);
     }
 
     public static String getString(Locale locale, String messageKey, Object[] args)
     {
-        return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+      return getString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
     }
 
     public static String getAttributeString(Locale locale, String messageKey, Object[] args)
     {
-        return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+      return getAttributeString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
     }
 
     public static String getBodyString(Locale locale, String messageKey, Object[] args)
     {
-        return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+      return getBodyString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
     }
 
     public static String getAttributeJavascriptString(Locale locale, String messageKey, Object[]
args)
     {
-        return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+      return getAttributeJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
     }
 
     public static String getBodyJavascriptString(Locale locale, String messageKey, Object[]
args)
     {
-        return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
+      return getBodyJavascriptString(DEFAULT_BUNDLE_NAME, locale, messageKey, args);
     }
 
     // More general methods which allow bundlenames and class loaders to be specified.
 
     public static String getString(String bundleName, Locale locale, String messageKey, Object[]
args)
     {
-        return getString(Messages.class, bundleName, locale, messageKey, args);
+      return getString(Messages.class, bundleName, locale, messageKey, args);
     }
 
     public static String getAttributeString(String bundleName, Locale locale, String messageKey,
Object[] args)
     {
-        return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
+      return getAttributeString(Messages.class, bundleName, locale, messageKey, args);
     }
 
     public static String getBodyString(String bundleName, Locale locale, String messageKey,
Object[] args)
     {
-        return getBodyString(Messages.class, bundleName, locale, messageKey, args);
+      return getBodyString(Messages.class, bundleName, locale, messageKey, args);
     }
 
     public static String getAttributeJavascriptString(String bundleName, Locale locale, String
messageKey, Object[] args)
     {
-        return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey,
args);
+      return getAttributeJavascriptString(Messages.class, bundleName, locale, messageKey,
args);
     }
 
     public static String getBodyJavascriptString(String bundleName, Locale locale, String
messageKey, Object[] args)
     {
-        return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
+      return getBodyJavascriptString(Messages.class, bundleName, locale, messageKey, args);
     }
 
     // Resource output
@@ -115,23 +115,23 @@ public class Messages extends org.apache
                                       Map<String,String> substitutionParameters, boolean
mapToUpperCase)
             throws ManifoldCFException
     {
-        outputResource(output,Messages.class,DEFAULT_PATH_NAME,locale,resourceKey,
+      outputResource(output,Messages.class,DEFAULT_PATH_NAME,locale,resourceKey,
                 substitutionParameters,mapToUpperCase);
     }
 
     public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String
resourceKey,
                                                   Map<String,String> substitutionParameters,
boolean mapToUpperCase)
-            throws ManifoldCFException
+      throws ManifoldCFException
     {
-        outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
                 substitutionParameters,mapToUpperCase);
     }
 
     public static void outputResourceWithVelocity(IHTTPOutput output, Locale locale, String
resourceKey,
                                                   Map<String,Object> contextObjects)
-            throws ManifoldCFException
+      throws ManifoldCFException
     {
-        outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
+      outputResourceWithVelocity(output,Messages.class,DEFAULT_BUNDLE_NAME,DEFAULT_PATH_NAME,locale,resourceKey,
                 contextObjects);
     }
 



Mime
View raw message