From 8a361fa7fb9f6ca7f6234ec535e293f1b89183ad Mon Sep 17 00:00:00 2001 From: pbastide Date: Wed, 4 Nov 2015 10:56:18 -0500 Subject: [PATCH] fixes javadoc and updates the sbt.properties sample --- samples/config/sbt.properties | 37 +++++------------ .../com/ibm/sbt/jslibrary/SBTEnvironment.java | 2 +- .../jslibrary/servlet/AbstractLibrary.java | 21 +++++----- .../sbt/jslibrary/servlet/LibraryRequest.java | 40 ++++++++++--------- .../servlet/LibraryRequestParams.java | 6 +-- 5 files changed, 46 insertions(+), 60 deletions(-) diff --git a/samples/config/sbt.properties b/samples/config/sbt.properties index a13e547db0..2509ba6efd 100644 --- a/samples/config/sbt.properties +++ b/samples/config/sbt.properties @@ -27,8 +27,8 @@ smartcloud.basic.apiVersion=3.0 # SmartCloud OAuth 1.0 Endpoint Parameters smartcloud.url=https://apps.na.collabserv.com -smartcloud.consumerKey=b43c48f51c498717c8547aee0590abc2 -smartcloud.consumerSecret=d46e0237d5de41feb4b446089a0575f3 +smartcloud.consumerKey= +smartcloud.consumerSecret= smartcloud.requestTokenURL=https://apps.na.collabserv.com/manage/oauth/getRequestToken smartcloud.authorizationURL=https://apps.na.collabserv.com/manage/oauth/authorizeToken smartcloud.accessTokenURL=https://apps.na.collabserv.com/manage/oauth/getAccessToken @@ -37,12 +37,12 @@ smartcloud.apiVersion=3.0 # SmartCloud OAuth 2.0 Endpoint Parameters smartcloudOA2.url=https://apps.na.collabserv.com -smartcloudOA2.serviceName=LotusLive +smartcloudOA2.serviceName=CollabServ smartcloudOA2.appId=Oauth2Impl -smartcloudOA2.consumerKey=app_20542369_1354381519099 -smartcloudOA2.consumerSecret=ed31477e78788cb35844686584c8ee994bd961ea0ce2d6fe86a7aebaed43497dc9e10eba6137055af0d4f0304ef40c64700a471b3cd858f99afeb572e2e06b3dcf0e88d17d5a6110f409714f9ebf481f2104dff84b07eab5820ee30b18e39e6b5a7b1ec9d6f1b7229fae7e6abef867037cc9ee6fdff2226666579e49bf949ee7 -smartcloudOA2.authorizationURL=https://apps.lotuslive.com/manage/oauth2/authorize -smartcloudOA2.accessTokenURL=https://apps.lotuslive.com/manage/oauth2/token +smartcloudOA2.consumerKey= +smartcloudOA2.consumerSecret= +smartcloudOA2.authorizationURL=https://apps.na.collabserv.com/manage/oauth2/authorize +smartcloudOA2.accessTokenURL=https://apps.na.collabserv.com/manage/oauth2/token smartcloudOA2.apiVersion=3.0 # Domino Endpoint Parameters @@ -51,25 +51,6 @@ domino.url= # Sametime Endpoint Parameters sametime.url= -# Twitter Endpoint Parameters -twitter.url=https://api.twitter.com -twitter.consumerKey= -twitter.consumerSecret= -twitter.applicationAccessToken= -twitter.requestTokenURL=https://api.twitter.com/oauth/request_token -twitter.authorizeURL=https://api.twitter.com/oauth/authorize -twitter.accessTokenURL=https://api.twitter.com/oauth/access_token -twitter.appId= - -# Dropbox Endpoint Parameters -dropbox.url=https://api.dropbox.com -dropbox.consumerKey= -dropbox.consumerSecret= -dropbox.requestTokenURL=https://api.dropbox.com/1/oauth/request_token -dropbox.authorizeURL=https://www.dropbox.com/1/oauth/authorize -dropbox.accessTokenURL=https://api.dropbox.com/1/oauth/access_token -dropbox.appId= - # PROPERTIES USED IN SAMPLES ############################# # Note : Some of the values will vary based on the content on Connections Server. @@ -165,7 +146,7 @@ acme.connections.oauth2.consumerSecret= #NOTE: THIS VALUE ASSUMES YOU ARE USING THE DEVELOPER QUICKSTART IMAGE connections.app.as.user=admin #NOTE: THIS VALUE ASSUMES YOU ARE USING THE DEVELOPER QUICKSTART IMAGE -connections.app.as.password=quickstart01 +connections.app.as.password= ########################################################### # END PROPERTIES FOR ACME AIRLINES WEB APPS # ########################################################### @@ -176,7 +157,7 @@ connections.app.as.password=quickstart01 mail.smtp.host=qs.renovations.com mail.smtp.auth=true mail.user=admin -mail.password=quickstart01 +mail.password= mail.from=admin@renovations.com mail.debug=true diff --git a/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/SBTEnvironment.java b/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/SBTEnvironment.java index 910180c6d1..2086290987 100644 --- a/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/SBTEnvironment.java +++ b/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/SBTEnvironment.java @@ -309,7 +309,7 @@ public static Endpoint[] readEndpoints(String sEndpoints) throws IOException { /** * Read a list of properties from a string and create an array if non empty. - * @param sEndpoints + * @param sProperty * @return Array of Property * @throws IOException */ diff --git a/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/AbstractLibrary.java b/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/AbstractLibrary.java index ec5acb1023..700deb9798 100644 --- a/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/AbstractLibrary.java +++ b/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/AbstractLibrary.java @@ -347,9 +347,12 @@ protected JsonObject populateProperties(LibraryRequest request) throws ServletEx } /** + * @param request * @param endpoint - * @param sameDomain - * TODO Need a unit test for this method + * @param endpointAlias + * @param endpointName + * + * TODO: Need a unit test for this method */ protected JsonObject createJsonForEndpoint(LibraryRequest request, Endpoint endpoint, String endpointAlias, String endpointName) throws LibraryException { @@ -749,8 +752,8 @@ protected String toJson(JsonObject properties) throws LibraryException { } /** - * @param dependModules - * @return + * @param modules + * @return module names String[] */ protected String[] getModuleNames(String[] modules) { List names = new ArrayList(); @@ -1201,8 +1204,8 @@ protected String[][] getRegisterExtModulesAmd(LibraryRequest request) { /** * Utility for changing a string so that its compatbile in javascript and does not prevent backslashes * - * @param StringBuilder - * @param string + * @param b + * @param s * converted to comply with javascript */ public static void appendJavaScriptString(StringBuilder b, String s) { @@ -1212,9 +1215,9 @@ public static void appendJavaScriptString(StringBuilder b, String s) { /** * Utility for changing a string so that its compatbile in javascript * - * @param buildingString + * @param b * String being constructed - * @param string + * @param s * converted to comply with javascript * @param preventBackslash */ @@ -1255,7 +1258,7 @@ public static void appendJavaScriptString(StringBuilder b, String s, boolean pre /** * Utility for changing a string so that its compatbile in javascript * - * @param String + * @param s * to convert * @return string converted to comply with javascript */ diff --git a/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/LibraryRequest.java b/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/LibraryRequest.java index 2b3833acf2..b2d2af3a15 100644 --- a/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/LibraryRequest.java +++ b/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/LibraryRequest.java @@ -236,7 +236,7 @@ public HttpServletResponse getHttpResponse() { /** * * @param name - * @return + * @return a parameter */ public String getParameter(String name) { if (httpRequest != null) { @@ -247,15 +247,16 @@ public String getParameter(String name) { /** * - * @return + * @return true, if there is a proxy domain */ public boolean isProxyDomain() { + //TODO: Always returns True. This code is not used. return true; } /** * - * @return + * @return the service url */ public String getServiceUrl() { return serviceUrl; @@ -263,7 +264,7 @@ public String getServiceUrl() { /** * - * @return + * @return the library url */ public String getLibraryUrl() { return libraryUrl; @@ -271,7 +272,7 @@ public String getLibraryUrl() { /** * - * @return + * @return the js library url */ public String getJsLibraryUrl() { return jsLibraryUrl; @@ -279,9 +280,10 @@ public String getJsLibraryUrl() { /** * - * @return + * @return use Iframe */ public boolean useIFrame() { + //TODO: Always returns false. This code is not used. return false; } @@ -301,7 +303,7 @@ public boolean isInitJs() { /** * - * @return + * @return if debug */ public boolean isDebug() { return debug; @@ -316,7 +318,7 @@ public void setDebug(boolean debug) { /** * - * @return + * @return the layer */ public boolean isLayer() { return layer; @@ -324,7 +326,7 @@ public boolean isLayer() { /** * - * @return + * @return registration path */ public boolean isRegPath() { return regPath; @@ -340,7 +342,7 @@ public void setRegPath(boolean regPath) { /** * - * @return + * @return debug transport */ public boolean isDebugTransport() { return debugTransport; @@ -348,7 +350,7 @@ public boolean isDebugTransport() { /** * - * @return + * @return mocktransport */ public boolean isMockTransport() { return mockTransport; @@ -356,7 +358,7 @@ public boolean isMockTransport() { /** * - * @return + * @return the iframe url */ public String getIFrameUrl() { return iframeUrl; @@ -414,14 +416,14 @@ public SBTEnvironment getEnvironment() { /** * Return the specified header * - * @return + * @return the header */ public String getHeader(String name) { return httpRequest.getHeader(name); } /** - * @return + * @return the server url */ protected String getServerUrl(LibraryRequestParams params) { if (httpRequest != null) { @@ -432,7 +434,7 @@ protected String getServerUrl(LibraryRequestParams params) { } /** - * @return + * @return the context url */ protected String getContextUrl(LibraryRequestParams params) { if (httpRequest != null) { @@ -443,7 +445,7 @@ protected String getContextUrl(LibraryRequestParams params) { } /** - * @return + * @return the context path */ protected String getContextPath(LibraryRequestParams params) { if (httpRequest != null) { @@ -454,7 +456,7 @@ protected String getContextPath(LibraryRequestParams params) { } /** - * @return + * @return the request url */ protected String getRequestUrl(LibraryRequestParams params) { if (httpRequest != null) { @@ -547,7 +549,7 @@ protected String getDefaultMockTransport() { * @param paramName * @param defValue * - * @return + * @return the value of the given parameter * * @throws ServletException * @throws IOException @@ -571,7 +573,7 @@ private String readString(LibraryRequestParams params, String paramName, String * @param source * @param values * @param replace - * @return + * @return string with updated value */ private String replace(String source, String[] values, String[] replaces) { if (StringUtil.isEmpty(source) || values == null || replaces == null) { diff --git a/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/LibraryRequestParams.java b/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/LibraryRequestParams.java index b63c280d41..3162c53fce 100644 --- a/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/LibraryRequestParams.java +++ b/sdk/com.ibm.sbt.core/src/main/java/com/ibm/sbt/jslibrary/servlet/LibraryRequestParams.java @@ -26,7 +26,7 @@ /** * @author Mark Wallace - * @date 16 Jan 2013 + * @since 16 Jan 2013 */ public class LibraryRequestParams { @@ -358,7 +358,7 @@ public void setPathInfo(String pathInfo) { /** * * @param name - * @return + * @return the parameter value */ public String getParameter(String name) { return parameters.get(name); @@ -378,7 +378,7 @@ public void setParameter(String name, String value) { * @param application * @param name * @param defaultValue - * @return + * @return the app parameter */ protected String getAppParameter(Application application, String name, String defaultValue) { String value = application.getProperty(name);