diff --git a/build.gradle b/build.gradle new file mode 100644 index 0000000..2656d3f --- /dev/null +++ b/build.gradle @@ -0,0 +1,289 @@ +description = 'Spring Integration AWS Support' + +buildscript { + repositories { + maven { url 'https://repo.springsource.org/plugins-snapshot' } + } +} + +apply plugin: 'java' +apply from: "${rootProject.projectDir}/publish-maven.gradle" +apply plugin: 'eclipse' +apply plugin: 'idea' + +group = 'org.springframework.integration' + +repositories { + maven { url 'http://repo.springsource.org/libs-milestone' } + maven { url 'http://repo.springsource.org/plugins-release' } +} + +sourceCompatibility=1.6 +targetCompatibility=1.6 + +// See http://www.gradle.org/docs/current/userguide/dependency_management.html#sub:configurations +// and http://www.gradle.org/docs/current/dsl/org.gradle.api.artifacts.ConfigurationContainer.html +configurations { + jacoco //Configuration Group used by Sonar to provide Code Coverage using JaCoCo +} + +ext { + apacheHttpclientVersion='4.1.1' + awsSdkVersion='1.3.32' + commonsCodecVersion='1.5' + commonsIoVersion='2.0.1' + javaMailVersion='1.4.4' + jacksonVersion='1.9.11' + junitVersion='4.11' + log4jVersion = '1.2.12' + mockitoVersion='1.9.0' + springIntegrationVersion = '2.2.2.RELEASE' + springVersion = '3.1.4.RELEASE' + + idPrefix = 'aws' + +} + +ext.javadocLinks = [ + "http://docs.aws.amazon.com/AWSJavaSDK/latest/javadoc/" +] as String[] + + +dependencies { + + compile "org.springframework.integration:spring-integration-core:$springIntegrationVersion" + compile "com.amazonaws:aws-java-sdk:$awsSdkVersion" + compile "commons-codec:commons-codec:$commonsCodecVersion" + compile "commons-io:commons-io:$commonsIoVersion" + compile "org.codehaus.jackson:jackson-core-asl:$jacksonVersion" + compile "org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion" + compile "org.apache.httpcomponents:httpclient:$apacheHttpclientVersion" + compile "org.apache.httpcomponents:httpcore:$apacheHttpclientVersion" + + //Amazon SES Support + compile ("org.springframework.integration:spring-integration-mail:$springIntegrationVersion", optional) + compile ("javax.mail:mail:$javaMailVersion", optional) + + testCompile "org.springframework.integration:spring-integration-test:$springIntegrationVersion" + testCompile "org.hamcrest:hamcrest-all:1.1" + testCompile "junit:junit-dep:$junitVersion" + testCompile "org.mockito:mockito-all:$mockitoVersion" + testCompile "org.springframework:spring-test:$springVersion" + testCompile "log4j:log4j:$log4jVersion" + + jacoco group: "org.jacoco", name: "org.jacoco.agent", version: "0.6.2.201302030002", classifier: "runtime" + +} + +eclipse { + project { + natures += 'org.springframework.ide.eclipse.core.springnature' + } +} + +javadoc { + group = 'Documentation' + description = 'Generates the Javadoc API documentation.' + title = "${rootProject.description} ${version} API" + + options.memberLevel = org.gradle.external.javadoc.JavadocMemberLevel.PROTECTED + options.author = true + options.header = project.description + options.overview = 'src/api/overview.html' + options.stylesheetFile = file("src/api/stylesheet.css") + options.splitIndex = true + options.links(project.ext.javadocLinks) + + source = sourceSets.main.allJava + classpath = project.sourceSets.main.compileClasspath + destinationDir = new File(buildDir, "api") + + // suppress warnings due to cross-module @see and @link references; + // note that global 'api' task does display all warnings. + logging.captureStandardError LogLevel.INFO + logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message +} + +sourceSets { + test { + resources { + srcDirs = ['src/test/resources', 'src/test/java'] + } + } +} + +// enable all compiler warnings; individual projects may customize further +ext.xLintArg = '-Xlint:all' +[compileJava, compileTestJava]*.options*.compilerArgs = [xLintArg] + +test { + // suppress all console output during testing unless running `gradle -i` + logging.captureStandardOutput(LogLevel.INFO) + jvmArgs "-javaagent:${configurations.jacoco.asPath}=destfile=${buildDir}/jacoco.exec,includes=*" +} + +task sourcesJar(type: Jar) { + classifier = 'sources' + from sourceSets.main.allJava +} + +task javadocJar(type: Jar) { + classifier = 'javadoc' + from javadoc +} + +artifacts { + archives sourcesJar + archives javadocJar +} + +apply plugin: 'sonar' +apply plugin: 'sonar-runner' //New for Gradle 1.5 + +sonar { + + if (rootProject.hasProperty('sonarHostUrl')) { + server.url = rootProject.sonarHostUrl + } + + database { + if (rootProject.hasProperty('sonarJdbcUrl')) { + url = rootProject.sonarJdbcUrl + } + if (rootProject.hasProperty('sonarJdbcDriver')) { + driverClassName = rootProject.sonarJdbcDriver + } + if (rootProject.hasProperty('sonarJdbcUsername')) { + username = rootProject.sonarJdbcUsername + } + if (rootProject.hasProperty('sonarJdbcPassword')) { + password = rootProject.sonarJdbcPassword + } + } + + project { + dynamicAnalysis = "reuseReports" + withProjectProperties { props -> + props["sonar.core.codeCoveragePlugin"] = "jacoco" + props["sonar.jacoco.reportPath"] = "${buildDir.name}/jacoco.exec" + } + } + + logger.info("Sonar parameters used: server.url='${server.url}'; database.url='${database.url}'; database.driverClassName='${database.driverClassName}'; database.username='${database.username}'") +} + +task schemaZip(type: Zip) { + group = 'Distribution' + classifier = 'schema' + description = "Builds -${classifier} archive containing all " + + "XSDs for deployment at static.springframework.org/schema." + + def Properties schemas = new Properties(); + def shortName = idPrefix.replaceFirst("${idPrefix}-", '') + + project.sourceSets.main.resources.find { + it.path.endsWith('META-INF/spring.schemas') + }?.withInputStream { schemas.load(it) } + + for (def key : schemas.keySet()) { + File xsdFile = project.sourceSets.main.resources.find { + it.path.endsWith(schemas.get(key)) + } + assert xsdFile != null + into ("integration/${shortName}") { + from xsdFile.path + } + } + +} + +task docsZip(type: Zip) { + group = 'Distribution' + classifier = 'docs' + description = "Builds -${classifier} archive containing the JavaDoc api " + + "for deployment at static.springframework.org/spring-integration/docs." + + from('.') { + include 'README.md' + } + + from (javadoc) { + into 'api' + } + +} + +task distZip(type: Zip, dependsOn: [docsZip, schemaZip]) { + group = 'Distribution' + classifier = 'dist' + description = "Builds -${classifier} archive, containing all jars and docs, " + + "suitable for community download page." + + ext.baseDir = "${project.name}-${project.version}"; + + from('src/dist') { + include 'license.txt' + include 'notice.txt' + into "${baseDir}" + } + + from('.') { + include 'README.md' + into "${baseDir}" + } + + from(zipTree(schemaZip.archivePath)) { + into "${baseDir}/schema" + } + + into ("${baseDir}/libs") { + from project.jar + from project.sourcesJar + from project.javadocJar + } +} + +// Create an optional "with dependencies" distribution. +// Not published by default; only for use when building from source. +task depsZip(type: Zip, dependsOn: distZip) { zipTask -> + group = 'Distribution' + classifier = 'dist-with-deps' + description = "Builds -${classifier} archive, containing everything " + + "in the -${distZip.classifier} archive plus all dependencies." + + from zipTree(distZip.archivePath) + + gradle.taskGraph.whenReady { taskGraph -> + if (taskGraph.hasTask(":${zipTask.name}")) { + def projectName = rootProject.name + def artifacts = new HashSet() + + rootProject.configurations.runtime.resolvedConfiguration.resolvedArtifacts.each { artifact -> + def dependency = artifact.moduleVersion.id + if (!projectName.equals(dependency.name)) { + artifacts << artifact.file + } + } + + zipTask.from(artifacts) { + into "${distZip.baseDir}/deps" + } + } + } +} + +artifacts { + archives distZip + archives docsZip + archives schemaZip +} + +task dist(dependsOn: assemble) { + group = 'Distribution' + description = 'Builds -dist, -docs and -schema distribution archives.' +} + +task wrapper(type: Wrapper) { + description = 'Generates gradlew[.bat] scripts' + gradleVersion = '1.5-rc-1' +} diff --git a/gradle.properties b/gradle.properties new file mode 100644 index 0000000..5364470 --- /dev/null +++ b/gradle.properties @@ -0,0 +1 @@ +version=0.5.0.BUILD-SNAPSHOT diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 0000000..42d9b0e Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 0000000..46ef152 --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Mon Mar 11 17:28:12 EDT 2013 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=http\://services.gradle.org/distributions/gradle-1.5-rc-1-bin.zip diff --git a/gradlew b/gradlew new file mode 100755 index 0000000..91a7e26 --- /dev/null +++ b/gradlew @@ -0,0 +1,164 @@ +#!/usr/bin/env bash + +############################################################################## +## +## Gradle start up script for UN*X +## +############################################################################## + +# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +DEFAULT_JVM_OPTS="" + +APP_NAME="Gradle" +APP_BASE_NAME=`basename "$0"` + +# Use the maximum available, or set MAX_FD != -1 to use that value. +MAX_FD="maximum" + +warn ( ) { + echo "$*" +} + +die ( ) { + echo + echo "$*" + echo + exit 1 +} + +# OS specific support (must be 'true' or 'false'). +cygwin=false +msys=false +darwin=false +case "`uname`" in + CYGWIN* ) + cygwin=true + ;; + Darwin* ) + darwin=true + ;; + MINGW* ) + msys=true + ;; +esac + +# For Cygwin, ensure paths are in UNIX format before anything is touched. +if $cygwin ; then + [ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"` +fi + +# Attempt to set APP_HOME +# Resolve links: $0 may be a link +PRG="$0" +# Need this for relative symlinks. +while [ -h "$PRG" ] ; do + ls=`ls -ld "$PRG"` + link=`expr "$ls" : '.*-> \(.*\)$'` + if expr "$link" : '/.*' > /dev/null; then + PRG="$link" + else + PRG=`dirname "$PRG"`"/$link" + fi +done +SAVED="`pwd`" +cd "`dirname \"$PRG\"`/" >&- +APP_HOME="`pwd -P`" +cd "$SAVED" >&- + +CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar + +# Determine the Java command to use to start the JVM. +if [ -n "$JAVA_HOME" ] ; then + if [ -x "$JAVA_HOME/jre/sh/java" ] ; then + # IBM's JDK on AIX uses strange locations for the executables + JAVACMD="$JAVA_HOME/jre/sh/java" + else + JAVACMD="$JAVA_HOME/bin/java" + fi + if [ ! -x "$JAVACMD" ] ; then + die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." + fi +else + JAVACMD="java" + which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. + +Please set the JAVA_HOME variable in your environment to match the +location of your Java installation." +fi + +# Increase the maximum file descriptors if we can. +if [ "$cygwin" = "false" -a "$darwin" = "false" ] ; then + MAX_FD_LIMIT=`ulimit -H -n` + if [ $? -eq 0 ] ; then + if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then + MAX_FD="$MAX_FD_LIMIT" + fi + ulimit -n $MAX_FD + if [ $? -ne 0 ] ; then + warn "Could not set maximum file descriptor limit: $MAX_FD" + fi + else + warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" + fi +fi + +# For Darwin, add options to specify how the application appears in the dock +if $darwin; then + GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\"" +fi + +# For Cygwin, switch paths to Windows format before running java +if $cygwin ; then + APP_HOME=`cygpath --path --mixed "$APP_HOME"` + CLASSPATH=`cygpath --path --mixed "$CLASSPATH"` + + # We build the pattern for arguments to be converted via cygpath + ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null` + SEP="" + for dir in $ROOTDIRSRAW ; do + ROOTDIRS="$ROOTDIRS$SEP$dir" + SEP="|" + done + OURCYGPATTERN="(^($ROOTDIRS))" + # Add a user-defined pattern to the cygpath arguments + if [ "$GRADLE_CYGPATTERN" != "" ] ; then + OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)" + fi + # Now convert the arguments - kludge to limit ourselves to /bin/sh + i=0 + for arg in "$@" ; do + CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -` + CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option + + if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition + eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"` + else + eval `echo args$i`="\"$arg\"" + fi + i=$((i+1)) + done + case $i in + (0) set -- ;; + (1) set -- "$args0" ;; + (2) set -- "$args0" "$args1" ;; + (3) set -- "$args0" "$args1" "$args2" ;; + (4) set -- "$args0" "$args1" "$args2" "$args3" ;; + (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;; + (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;; + (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;; + (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;; + (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;; + esac +fi + +# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules +function splitJvmOpts() { + JVM_OPTS=("$@") +} +eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS +JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME" + +exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@" diff --git a/gradlew.bat b/gradlew.bat new file mode 100644 index 0000000..aec9973 --- /dev/null +++ b/gradlew.bat @@ -0,0 +1,90 @@ +@if "%DEBUG%" == "" @echo off +@rem ########################################################################## +@rem +@rem Gradle startup script for Windows +@rem +@rem ########################################################################## + +@rem Set local scope for the variables with windows NT shell +if "%OS%"=="Windows_NT" setlocal + +@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. +set DEFAULT_JVM_OPTS= + +set DIRNAME=%~dp0 +if "%DIRNAME%" == "" set DIRNAME=. +set APP_BASE_NAME=%~n0 +set APP_HOME=%DIRNAME% + +@rem Find java.exe +if defined JAVA_HOME goto findJavaFromJavaHome + +set JAVA_EXE=java.exe +%JAVA_EXE% -version >NUL 2>&1 +if "%ERRORLEVEL%" == "0" goto init + +echo. +echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:findJavaFromJavaHome +set JAVA_HOME=%JAVA_HOME:"=% +set JAVA_EXE=%JAVA_HOME%/bin/java.exe + +if exist "%JAVA_EXE%" goto init + +echo. +echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% +echo. +echo Please set the JAVA_HOME variable in your environment to match the +echo location of your Java installation. + +goto fail + +:init +@rem Get command-line arguments, handling Windowz variants + +if not "%OS%" == "Windows_NT" goto win9xME_args +if "%@eval[2+2]" == "4" goto 4NT_args + +:win9xME_args +@rem Slurp the command line arguments. +set CMD_LINE_ARGS= +set _SKIP=2 + +:win9xME_args_slurp +if "x%~1" == "x" goto execute + +set CMD_LINE_ARGS=%* +goto execute + +:4NT_args +@rem Get arguments from the 4NT Shell from JP Software +set CMD_LINE_ARGS=%$ + +:execute +@rem Setup the command line + +set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar + +@rem Execute Gradle +"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% + +:end +@rem End local scope for the variables with windows NT shell +if "%ERRORLEVEL%"=="0" goto mainEnd + +:fail +rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of +rem the _cmd.exe /c_ return code! +if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 +exit /b 1 + +:mainEnd +if "%OS%"=="Windows_NT" endlocal + +:omega diff --git a/pom.xml b/pom.xml deleted file mode 100644 index 68399de..0000000 --- a/pom.xml +++ /dev/null @@ -1,227 +0,0 @@ - - - 4.0.0 - org.springframework.integration - spring-integration-aws - 0.5.0.BUILD-SNAPSHOT - Spring Integration Amazon Web Services Support - - - The Apache Software License, Version 2.0 - http://www.apache.org/licenses/LICENSE-2.0.txt - repo - - - - - 2.2.1 - - - - 2.2.0.RELEASE - 3.1.3.RELEASE - 1.3.32 - 1.5 - 1.1.1 - 2.0.1 - 1.4.4 - 1.9.11 - 4.1.1 - 1.1 - 4.11 - 1.9.0 - UTF8 - - - - - - src/main/java - - **/* - - - **/*.java - - - - src/main/resources - - **/* - - - - - - src/test/java - - **/* - - - **/*.java - - - - src/test/resources - - **/* - - - - - - org.apache.maven.plugins - maven-compiler-plugin - 3.0 - - 1.6 - 1.6 - - - - org.apache.maven.plugins - maven-surefire-plugin - 2.13 - - - **/*Tests.java - - - **/*Abstract*.java - **/*AWSTests.java - - - - - - - - springsource-libs-milestone - Spring Framework Maven Milestone Repository - https://repo.springsource.org/libs-milestone - - - - - com.amazonaws - aws-java-sdk - ${aws.sdk.version} - compile - - - - commons-codec - commons-codec - ${commons.codec.version} - compile - - - - commons-logging - commons-logging - ${commons.logging.version} - compile - - - - commons-io - commons-io - ${commons.io.version} - compile - - - - javax.mail - mail - ${java.mail.version} - compile - - - - org.springframework.integration - spring-integration-core - ${spring.integration.version} - compile - - - - org.springframework.integration - spring-integration-mail - ${spring.integration.version} - provided - - - - org.codehaus.jackson - jackson-core-asl - ${jackson.version} - compile - - - - org.codehaus.jackson - jackson-mapper-asl - ${jackson.version} - compile - - - - org.apache.httpcomponents - httpclient - ${apache.httpclient.version} - compile - - - - org.apache.httpcomponents - httpcore - ${apache.httpclient.version} - compile - - - - org.springframework.integration - spring-integration-test - ${spring.integration.version} - test - - - - org.hamcrest - hamcrest-core - ${hamcrest.version} - test - - - - junit - junit - ${junit.version} - test - - - - org.mockito - mockito-all - ${mockito.version} - test - - - - org.mockito - mockito-core - ${mockito.version} - test - - - - org.springframework - spring-test - ${spring.test.version} - test - - - - diff --git a/publish-maven.gradle b/publish-maven.gradle new file mode 100644 index 0000000..b6dab25 --- /dev/null +++ b/publish-maven.gradle @@ -0,0 +1,66 @@ +apply plugin: 'maven' + +ext.optionalDeps = [] +ext.providedDeps = [] + +ext.optional = { optionalDeps << it } +ext.provided = { providedDeps << it } + +install { + repositories.mavenInstaller { + customizePom(pom, project) + } +} + +def customizePom(pom, gradleProject) { + pom.whenConfigured { generatedPom -> + // respect 'optional' and 'provided' dependencies + gradleProject.optionalDeps.each { dep -> + generatedPom.dependencies.find { it.artifactId == dep.name }?.optional = true + } + gradleProject.providedDeps.each { dep -> + generatedPom.dependencies.find { it.artifactId == dep.name }?.scope = 'provided' + } + + // eliminate test-scoped dependencies (no need in maven central poms) + generatedPom.dependencies.removeAll { dep -> + dep.scope == 'test' + } + + // add all items necessary for maven central publication + generatedPom.project { + name = gradleProject.description + description = gradleProject.description + url = 'https://github.com/SpringSource/spring-integration-extensions' + organization { + name = 'SpringSource' + url = 'http://springsource.org' + } + licenses { + license { + name 'The Apache Software License, Version 2.0' + url 'http://www.apache.org/licenses/LICENSE-2.0.txt' + distribution 'repo' + } + } + scm { + url = 'https://github.com/SpringSource/spring-integration-extensions' + connection = 'scm:git:git://github.com/SpringSource/spring-integration-extensions' + developerConnection = 'scm:git:git://github.com/SpringSource/spring-integration-extensions' + } + + developers { + developer { + id = 'amolnayak311' + name = 'Amol Nayak' + email = 'amolnayak311@gmail.com' + } + developer { + id = 'ghillert' + name = 'Gunnar Hillert' + email = 'ghillert@vmware.com' + } + } + } + } +} diff --git a/src/api/overview.html b/src/api/overview.html new file mode 100644 index 0000000..31badc8 --- /dev/null +++ b/src/api/overview.html @@ -0,0 +1,22 @@ + + +This document is the API specification for the Spring Integration AWS Extension +
+
+

+ For further API reference and developer documentation, see the + Spring + Integration reference documentation. + That documentation contains more detailed, developer-targeted + descriptions, with conceptual overviews, definitions of terms, + workarounds, and working code examples. +

+ +

+ If you are interested in commercial training, consultancy, and + support for Spring Integration, please visit + http://www.springsource.com +

+
+ + diff --git a/src/api/stylesheet.css b/src/api/stylesheet.css new file mode 100644 index 0000000..23a3421 --- /dev/null +++ b/src/api/stylesheet.css @@ -0,0 +1,541 @@ +/* Javadoc style sheet */ + +/* +Overall document style +*/ +body { + background-color:#ffffff; + color:#353833; + font-family:Arial, Helvetica, sans-serif; + font-size:76%; + margin:0; +} +a:link, a:visited { + text-decoration:none; + color:#4c6b87; +} +a:hover, a:focus { + text-decoration:none; + color:#bb7a2a; +} +a:active { + text-decoration:none; + color:#4c6b87; +} +a[name] { + color:#353833; +} +a[name]:hover { + text-decoration:none; + color:#353833; +} +pre { + font-size:1.3em; +} +h1 { + font-size:1.8em; +} +h2 { + font-size:1.5em; +} +h3 { + font-size:1.4em; +} +h4 { + font-size:1.3em; +} +h5 { + font-size:1.2em; +} +h6 { + font-size:1.1em; +} +ul { + list-style-type:disc; +} +code, tt { + font-size:1.2em; +} +dt code { + font-size:1.2em; +} +table tr td dt code { + font-size:1.2em; + vertical-align:top; +} +sup { + font-size:.6em; +} +/* +Document title and Copyright styles +*/ +.clear { + clear:both; + height:0px; + overflow:hidden; +} +.aboutLanguage { + float:right; + padding:0px 21px; + font-size:.8em; + z-index:200; + margin-top:-7px; +} +.legalCopy { + margin-left:.5em; +} +.bar a, .bar a:link, .bar a:visited, .bar a:active { + color:#FFFFFF; + text-decoration:none; +} +.bar a:hover, .bar a:focus { + color:#bb7a2a; +} +.tab { + background-color:#0066FF; + background-image:url(resources/titlebar.gif); + background-position:left top; + background-repeat:no-repeat; + color:#ffffff; + padding:8px; + width:5em; + font-weight:bold; +} +/* +Navigation bar styles +*/ +.bar { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + padding:.8em .5em .4em .8em; + height:auto;/*height:1.8em;*/ + font-size:1em; + margin:0; +} +.topNav { + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.bottomNav { + margin-top:10px; + background-image:url(resources/background.gif); + background-repeat:repeat-x; + color:#FFFFFF; + float:left; + padding:0; + width:100%; + clear:right; + height:2.8em; + padding-top:10px; + overflow:hidden; +} +.subNav { + background-color:#dee3e9; + border-bottom:1px solid #9eadc0; + float:left; + width:100%; + overflow:hidden; +} +.subNav div { + clear:left; + float:left; + padding:0 0 5px 6px; +} +ul.navList, ul.subNavList { + float:left; + margin:0 25px 0 0; + padding:0; +} +ul.navList li{ + list-style:none; + float:left; + padding:3px 6px; +} +ul.subNavList li{ + list-style:none; + float:left; + font-size:90%; +} +.topNav a:link, .topNav a:active, .topNav a:visited, .bottomNav a:link, .bottomNav a:active, .bottomNav a:visited { + color:#FFFFFF; + text-decoration:none; +} +.topNav a:hover, .bottomNav a:hover { + text-decoration:none; + color:#bb7a2a; +} +.navBarCell1Rev { + background-image:url(resources/tab.gif); + background-color:#a88834; + color:#FFFFFF; + margin: auto 5px; + border:1px solid #c9aa44; +} +/* +Page header and footer styles +*/ +.header, .footer { + clear:both; + margin:0 20px; + padding:5px 0 0 0; +} +.indexHeader { + margin:10px; + position:relative; +} +.indexHeader h1 { + font-size:1.3em; +} +.title { + color:#2c4557; + margin:10px 0; +} +.subTitle { + margin:5px 0 0 0; +} +.header ul { + margin:0 0 25px 0; + padding:0; +} +.footer ul { + margin:20px 0 5px 0; +} +.header ul li, .footer ul li { + list-style:none; + font-size:1.2em; +} +/* +Heading styles +*/ +div.details ul.blockList ul.blockList ul.blockList li.blockList h4, div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList ul.blockList li.blockList h3 { + background-color:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + margin:0 0 6px -8px; + padding:2px 5px; +} +ul.blockList ul.blockList li.blockList h3 { + padding:0; + margin:15px 0; +} +ul.blockList li.blockList h2 { + padding:0px 0 20px 0; +} +/* +Page layout container styles +*/ +.contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer, .constantValuesContainer { + clear:both; + padding:10px 20px; + position:relative; +} +.indexContainer { + margin:10px; + position:relative; + font-size:1.0em; +} +.indexContainer h2 { + font-size:1.1em; + padding:0 0 3px 0; +} +.indexContainer ul { + margin:0; + padding:0; +} +.indexContainer ul li { + list-style:none; +} +.contentContainer .description dl dt, .contentContainer .details dl dt, .serializedFormContainer dl dt { + font-size:1.1em; + font-weight:bold; + margin:10px 0 0 0; + color:#4E4E4E; +} +.contentContainer .description dl dd, .contentContainer .details dl dd, .serializedFormContainer dl dd { + margin:10px 0 10px 20px; +} +.serializedFormContainer dl.nameValue dt { + margin-left:1px; + font-size:1.1em; + display:inline; + font-weight:bold; +} +.serializedFormContainer dl.nameValue dd { + margin:0 0 0 1px; + font-size:1.1em; + display:inline; +} +/* +List styles +*/ +ul.horizontal li { + display:inline; + font-size:0.9em; +} +ul.inheritance { + margin:0; + padding:0; +} +ul.inheritance li { + display:inline; + list-style:none; +} +ul.inheritance li ul.inheritance { + margin-left:15px; + padding-left:15px; + padding-top:1px; +} +ul.blockList, ul.blockListLast { + margin:10px 0 10px 0; + padding:0; +} +ul.blockList li.blockList, ul.blockListLast li.blockList { + list-style:none; + margin-bottom:25px; +} +ul.blockList ul.blockList li.blockList, ul.blockList ul.blockListLast li.blockList { + padding:0px 20px 5px 10px; + border:1px solid #9eadc0; + background-color:#f9f9f9; +} +ul.blockList ul.blockList ul.blockList li.blockList, ul.blockList ul.blockList ul.blockListLast li.blockList { + padding:0 0 5px 8px; + background-color:#ffffff; + border:1px solid #9eadc0; + border-top:none; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockList { + margin-left:0; + padding-left:0; + padding-bottom:15px; + border:none; + border-bottom:1px solid #9eadc0; +} +ul.blockList ul.blockList ul.blockList ul.blockList li.blockListLast { + list-style:none; + border-bottom:none; + padding-bottom:0; +} +table tr td dl, table tr td dl dt, table tr td dl dd { + margin-top:0; + margin-bottom:1px; +} +/* +Table styles +*/ +.contentContainer table, .classUseContainer table, .constantValuesContainer table { + border-bottom:1px solid #9eadc0; + width:100%; +} +.contentContainer ul li table, .classUseContainer ul li table, .constantValuesContainer ul li table { + width:100%; +} +.contentContainer .description table, .contentContainer .details table { + border-bottom:none; +} +.contentContainer ul li table th.colOne, .contentContainer ul li table th.colFirst, .contentContainer ul li table th.colLast, .classUseContainer ul li table th, .constantValuesContainer ul li table th, .contentContainer ul li table td.colOne, .contentContainer ul li table td.colFirst, .contentContainer ul li table td.colLast, .classUseContainer ul li table td, .constantValuesContainer ul li table td{ + vertical-align:top; + padding-right:20px; +} +.contentContainer ul li table th.colLast, .classUseContainer ul li table th.colLast,.constantValuesContainer ul li table th.colLast, +.contentContainer ul li table td.colLast, .classUseContainer ul li table td.colLast,.constantValuesContainer ul li table td.colLast, +.contentContainer ul li table th.colOne, .classUseContainer ul li table th.colOne, +.contentContainer ul li table td.colOne, .classUseContainer ul li table td.colOne { + padding-right:3px; +} +.overviewSummary caption, .packageSummary caption, .contentContainer ul.blockList li.blockList caption, .summary caption, .classUseContainer caption, .constantValuesContainer caption { + position:relative; + text-align:left; + background-repeat:no-repeat; + color:#FFFFFF; + font-weight:bold; + clear:none; + overflow:hidden; + padding:0px; + margin:0px; +} +caption a:link, caption a:hover, caption a:active, caption a:visited { + color:#FFFFFF; +} +.overviewSummary caption span, .packageSummary caption span, .contentContainer ul.blockList li.blockList caption span, .summary caption span, .classUseContainer caption span, .constantValuesContainer caption span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.contentContainer ul.blockList li.blockList caption span.activeTableTab span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/activetitlebar.gif); + height:18px; +} +.contentContainer ul.blockList li.blockList caption span.tableTab span { + white-space:nowrap; + padding-top:8px; + padding-left:8px; + display:block; + float:left; + background-image:url(resources/titlebar.gif); + height:18px; +} +.contentContainer ul.blockList li.blockList caption span.tableTab, .contentContainer ul.blockList li.blockList caption span.activeTableTab { + padding-top:0px; + padding-left:0px; + background-image:none; + float:none; + display:inline; +} +.overviewSummary .tabEnd, .packageSummary .tabEnd, .contentContainer ul.blockList li.blockList .tabEnd, .summary .tabEnd, .classUseContainer .tabEnd, .constantValuesContainer .tabEnd { + width:10px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +.contentContainer ul.blockList li.blockList .activeTableTab .tabEnd { + width:10px; + margin-right:5px; + background-image:url(resources/activetitlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +.contentContainer ul.blockList li.blockList .tableTab .tabEnd { + width:10px; + margin-right:5px; + background-image:url(resources/titlebar_end.gif); + background-repeat:no-repeat; + background-position:top right; + position:relative; + float:left; +} +ul.blockList ul.blockList li.blockList table { + margin:0 0 12px 0px; + width:100%; +} +.tableSubHeadingColor { + background-color: #EEEEFF; +} +.altColor { + background-color:#eeeeef; +} +.rowColor { + background-color:#ffffff; +} +.overviewSummary td, .packageSummary td, .contentContainer ul.blockList li.blockList td, .summary td, .classUseContainer td, .constantValuesContainer td { + text-align:left; + padding:3px 3px 3px 7px; +} +th.colFirst, th.colLast, th.colOne, .constantValuesContainer th { + background:#dee3e9; + border-top:1px solid #9eadc0; + border-bottom:1px solid #9eadc0; + text-align:left; + padding:3px 3px 3px 7px; +} +td.colOne a:link, td.colOne a:active, td.colOne a:visited, td.colOne a:hover, td.colFirst a:link, td.colFirst a:active, td.colFirst a:visited, td.colFirst a:hover, td.colLast a:link, td.colLast a:active, td.colLast a:visited, td.colLast a:hover, .constantValuesContainer td a:link, .constantValuesContainer td a:active, .constantValuesContainer td a:visited, .constantValuesContainer td a:hover { + font-weight:bold; +} +td.colFirst, th.colFirst { + border-left:1px solid #9eadc0; + white-space:nowrap; +} +td.colLast, th.colLast { + border-right:1px solid #9eadc0; +} +td.colOne, th.colOne { + border-right:1px solid #9eadc0; + border-left:1px solid #9eadc0; +} +table.overviewSummary { + padding:0px; + margin-left:0px; +} +table.overviewSummary td.colFirst, table.overviewSummary th.colFirst, +table.overviewSummary td.colOne, table.overviewSummary th.colOne { + width:25%; + vertical-align:middle; +} +table.packageSummary td.colFirst, table.overviewSummary th.colFirst { + width:25%; + vertical-align:middle; +} +/* +Content styles +*/ +.description pre { + margin-top:0; +} +.deprecatedContent { + margin:0; + padding:10px 0; +} +.docSummary { + padding:0; +} +/* +Formatting effect styles +*/ +.sourceLineNo { + color:green; + padding:0 30px 0 0; +} +h1.hidden { + visibility:hidden; + overflow:hidden; + font-size:.9em; +} +.block { + display:block; + margin:3px 0 0 0; +} +.strong { + font-weight:bold; +} + + +/* +Spring +*/ + +pre.code { + background-color: #F8F8F8; + border: 1px solid #CCCCCC; + border-radius: 3px 3px 3px 3px; + overflow: auto; + padding: 10px; + margin: 4px 20px 2px 0px; +} + +pre.code code, pre.code code * { + font-size: 1em; +} + +pre.code code, pre.code code * { + padding: 0 !important; + margin: 0 !important; +} \ No newline at end of file diff --git a/src/dist/license.txt b/src/dist/license.txt new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/src/dist/license.txt @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed 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. diff --git a/src/dist/notice.txt b/src/dist/notice.txt new file mode 100644 index 0000000..f62045a --- /dev/null +++ b/src/dist/notice.txt @@ -0,0 +1,21 @@ + ======================================================================== + == NOTICE file corresponding to section 4 d of the Apache License, == + == Version 2.0, in this case for the Spring Integration distribution. == + ======================================================================== + + This product includes software developed by + the Apache Software Foundation (http://www.apache.org). + + The end-user documentation included with a redistribution, if any, + must include the following acknowledgement: + + "This product includes software developed by the Spring Framework + Project (http://www.springframework.org)." + + Alternatively, this acknowledgement may appear in the software itself, + if and wherever such third-party acknowledgements normally appear. + + The names "Spring", "Spring Framework", and "Spring Integration" must + not be used to endorse or promote products derived from this software + without prior written permission. For written permission, please contact + enquiries@springsource.com. diff --git a/src/main/java/org/springframework/integration/aws/config/xml/AmazonWSParserUtils.java b/src/main/java/org/springframework/integration/aws/config/xml/AmazonWSParserUtils.java index 2a149d4..9cfcfee 100644 --- a/src/main/java/org/springframework/integration/aws/config/xml/AmazonWSParserUtils.java +++ b/src/main/java/org/springframework/integration/aws/config/xml/AmazonWSParserUtils.java @@ -18,6 +18,7 @@ package org.springframework.integration.aws.config.xml; import org.springframework.beans.factory.support.BeanDefinitionBuilder; import org.springframework.beans.factory.support.BeanDefinitionReaderUtils; import org.springframework.beans.factory.xml.ParserContext; +import org.springframework.integration.aws.core.AWSCredentials; import org.springframework.integration.aws.core.BasicAWSCredentials; import org.springframework.integration.aws.core.PropertiesAWSCredentials; import org.springframework.util.StringUtils; @@ -44,13 +45,12 @@ public final class AmazonWSParserUtils { /** - * Registers the {@link AmazonWSCredentials} bean with the current ApplicationContext if + * Registers the {@link AWSCredentials} bean with the current ApplicationContext if * accessKey and secretKey is given, if the credentials-ref is given, the given value * is returned. * * @param element * @param parserContext - * @return */ public static String getAmazonWSCredentials(Element element,ParserContext parserContext) { //TODO: Some mechanism to use the same instance with same ACCESS_KEY to be implemented diff --git a/src/main/java/org/springframework/integration/aws/core/AWSCommonUtils.java b/src/main/java/org/springframework/integration/aws/core/AWSCommonUtils.java index 2e6e7e4..845a8f0 100644 --- a/src/main/java/org/springframework/integration/aws/core/AWSCommonUtils.java +++ b/src/main/java/org/springframework/integration/aws/core/AWSCommonUtils.java @@ -46,7 +46,6 @@ public class AWSCommonUtils { /** * Generates the MD5 hash of the file provided * @param file - * @return */ public static byte[] getContentsMD5AsBytes(File file) { @@ -78,23 +77,20 @@ public class AWSCommonUtils { /** * Compute the MD5 hash of the provided String - * @param the String whose MD5 sun is to be computed - * @return + * @param contents The String whose MD5 sun is to be computed */ public static byte[] getContentsMD5AsBytes(String contents) { try { MessageDigest digest = MessageDigest.getInstance("MD5"); return digest.digest(contents.getBytes()); } catch (NoSuchAlgorithmException e) { - logger.error("Unable to digest the input String", e); + throw new IllegalStateException(String.format("Unable to digest the input String '%s' using MD5.", contents), e); } - return null; } /** * Encodes the given raw bytes into hex * @param rawBytes - * @return */ public static String encodeHex(byte[] rawBytes) throws UnsupportedEncodingException { return new String(Hex.encodeHex(rawBytes)); @@ -104,7 +100,6 @@ public class AWSCommonUtils { * Decodes the given base 64 raw bytes * * @param rawBytes - * @return */ public static byte[] decodeBase64(byte[] rawBytes) throws UnsupportedEncodingException { return Base64.decodeBase64(rawBytes); diff --git a/src/main/java/org/springframework/integration/aws/core/AWSCredentials.java b/src/main/java/org/springframework/integration/aws/core/AWSCredentials.java index 3ae05ef..0d63bb6 100644 --- a/src/main/java/org/springframework/integration/aws/core/AWSCredentials.java +++ b/src/main/java/org/springframework/integration/aws/core/AWSCredentials.java @@ -27,14 +27,12 @@ public interface AWSCredentials { /** * Get the Access key to the Amazon WS account - * @return */ - public String getAccessKey(); + String getAccessKey(); /** * Get the Secret key to the Amazon WS account - * @return */ - public String getSecretKey(); + String getSecretKey(); } diff --git a/src/main/java/org/springframework/integration/aws/core/AWSOperationException.java b/src/main/java/org/springframework/integration/aws/core/AWSOperationException.java index 70c2df8..2cd192f 100644 --- a/src/main/java/org/springframework/integration/aws/core/AWSOperationException.java +++ b/src/main/java/org/springframework/integration/aws/core/AWSOperationException.java @@ -54,7 +54,6 @@ public class AWSOperationException extends RuntimeException { /** * Get the access key for the user who encountered the exception - * @return */ public String getAccessKey() { return accessKey; diff --git a/src/main/java/org/springframework/integration/aws/core/AbstractAWSClientFactory.java b/src/main/java/org/springframework/integration/aws/core/AbstractAWSClientFactory.java index 2ae3c05..c2161b9 100644 --- a/src/main/java/org/springframework/integration/aws/core/AbstractAWSClientFactory.java +++ b/src/main/java/org/springframework/integration/aws/core/AbstractAWSClientFactory.java @@ -120,8 +120,7 @@ public abstract class AbstractAWSClientFactory /** * Extracts the endpoint from the URL provided * - * @param url - * @return + * @return Will return null if the provided url is empty */ private String getEndpointFromURL(String stringUrl) { if(!StringUtils.hasText(stringUrl)) { @@ -151,7 +150,6 @@ public abstract class AbstractAWSClientFactory /** * The subclass needs to implement this method and return an appropriate implementation - * @return */ protected abstract T getClientImplementation(); diff --git a/src/main/java/org/springframework/integration/aws/core/BasicAWSCredentials.java b/src/main/java/org/springframework/integration/aws/core/BasicAWSCredentials.java index 30fe0cb..818c506 100644 --- a/src/main/java/org/springframework/integration/aws/core/BasicAWSCredentials.java +++ b/src/main/java/org/springframework/integration/aws/core/BasicAWSCredentials.java @@ -62,7 +62,6 @@ public class BasicAWSCredentials implements AWSCredentials { /** * Get the Access key to the Amazon WS account - * @return */ public String getAccessKey() { return accessKey; @@ -70,7 +69,6 @@ public class BasicAWSCredentials implements AWSCredentials { /** * Set the Access key to the Amazon WS account - * @param accessKey */ public void setAccessKey(String accessKey) { Assert.hasText(accessKey, "The accessKey parameter must not be null or empty."); @@ -79,7 +77,6 @@ public class BasicAWSCredentials implements AWSCredentials { /** * Get the Secret key to the Amazon WS account - * @return */ public String getSecretKey() { return secretKey; diff --git a/src/main/java/org/springframework/integration/aws/core/PropertiesAWSCredentials.java b/src/main/java/org/springframework/integration/aws/core/PropertiesAWSCredentials.java index 567efa2..ca14485 100644 --- a/src/main/java/org/springframework/integration/aws/core/PropertiesAWSCredentials.java +++ b/src/main/java/org/springframework/integration/aws/core/PropertiesAWSCredentials.java @@ -56,8 +56,8 @@ public class PropertiesAWSCredentials extends BasicAWSCredentials implements Ini } /**. - * Gets the property name which holds the - * @return + * Gets the property name which holds the AWS access key + * @return the Access Key Property */ public String getAccessKeyProperty() { return accessKeyProperty; @@ -74,7 +74,6 @@ public class PropertiesAWSCredentials extends BasicAWSCredentials implements Ini /**. * Gets the property name which holds the - * @return */ public String getSecretKeyProperty() { return secretKeyProperty; @@ -83,7 +82,6 @@ public class PropertiesAWSCredentials extends BasicAWSCredentials implements Ini /**. * Sets the name of the property that will be used as the key in the properties * file to hold the AWS secret key - * @param accessKeyProperty */ public void setSecretKeyProperty(String secretKeyProperty) { this.secretKeyProperty = secretKeyProperty; @@ -91,7 +89,6 @@ public class PropertiesAWSCredentials extends BasicAWSCredentials implements Ini /**. * Get the name of the property file that will hold the AWS credentials - * @return */ public String getPropertyFileName() { return propertyFileName; diff --git a/src/main/java/org/springframework/integration/aws/s3/AbstractFileNameFilter.java b/src/main/java/org/springframework/integration/aws/s3/AbstractFileNameFilter.java index 0873d61..6cb3174 100644 --- a/src/main/java/org/springframework/integration/aws/s3/AbstractFileNameFilter.java +++ b/src/main/java/org/springframework/integration/aws/s3/AbstractFileNameFilter.java @@ -75,7 +75,6 @@ public abstract class AbstractFileNameFilter implements FileNameFilter { /** * Gets the folder whose file are to be accepted, this path is relative to the * bucket. - * @return */ public String getFolderName() { return folderName; @@ -87,21 +86,22 @@ public abstract class AbstractFileNameFilter implements FileNameFilter { * @param folderName */ public void setFolderName(String folderName) { + if(StringUtils.hasText(folderName)) { - folderName = folderName.trim(); - if(folderName.equals("/")) { - folderName = null; + String trimmedFolderName = folderName.trim(); + if("/".equals(trimmedFolderName)) { + trimmedFolderName = null; } else { - if(!folderName.endsWith("/")) { - folderName = folderName + "/"; + if(!trimmedFolderName.endsWith("/")) { + trimmedFolderName = trimmedFolderName + "/"; } - if(folderName.startsWith("/")) { - folderName = folderName.substring(1); + if(trimmedFolderName.startsWith("/")) { + trimmedFolderName = trimmedFolderName.substring(1); } } - this.folderName = folderName; + this.folderName = trimmedFolderName; } else { this.folderName = null; @@ -109,11 +109,9 @@ public abstract class AbstractFileNameFilter implements FileNameFilter { } - /** * Checks the flag if the sub folders are to be accepted or not. * - * @return */ public boolean isAcceptSubFolders() { return acceptSubFolders; diff --git a/src/main/java/org/springframework/integration/aws/s3/AmazonS3InboundSynchronizationMessageSource.java b/src/main/java/org/springframework/integration/aws/s3/AmazonS3InboundSynchronizationMessageSource.java index 6ca7840..4000127 100644 --- a/src/main/java/org/springframework/integration/aws/s3/AmazonS3InboundSynchronizationMessageSource.java +++ b/src/main/java/org/springframework/integration/aws/s3/AmazonS3InboundSynchronizationMessageSource.java @@ -173,7 +173,7 @@ public class AmazonS3InboundSynchronizationMessageSource extends * Sets the file's wildcard pattern that would be used to match the objects in S3 bucket * This attribute is mutually exclusive to fileName regex. * - * @param fileWildcard + * @param fileNameWildcard Must not be empty. */ public void setFileNameWildcard(String fileNameWildcard) { Assert.hasText(fileNameWildcard, "Provided file wildcard is null or empty string"); @@ -217,7 +217,7 @@ public class AmazonS3InboundSynchronizationMessageSource extends /** * Sets the expression to find the local directory where the remote files are synchronized with. * - * @param directory + * @param directoryExpression Must not be null */ public void setDirectory(Expression directoryExpression) { Assert.notNull(directoryExpression, "provided 'directoryExpression' is null"); diff --git a/src/main/java/org/springframework/integration/aws/s3/AmazonS3MessageHandler.java b/src/main/java/org/springframework/integration/aws/s3/AmazonS3MessageHandler.java index 838df41..72595b2 100644 --- a/src/main/java/org/springframework/integration/aws/s3/AmazonS3MessageHandler.java +++ b/src/main/java/org/springframework/integration/aws/s3/AmazonS3MessageHandler.java @@ -72,7 +72,7 @@ public class AmazonS3MessageHandler extends AbstractMessageHandler { /** * The constructor that initializes {@link AmazonS3MessageHandler} with the provided - * implementation of {@link AmazonS3Operations} and using the provided {@link AmazonWSCredentials} + * implementation of {@link AmazonS3Operations} and using the provided {@link AWSCredentials} * * @param credentials * @param operations @@ -162,7 +162,6 @@ public class AmazonS3MessageHandler extends AbstractMessageHandler { * @param message * @param headerName * @param expectedType - * @return */ @SuppressWarnings("unchecked") private T getHeaderValue(Message message, String headerName, Class expectedType) { diff --git a/src/main/java/org/springframework/integration/aws/s3/AmazonS3ObjectBuilder.java b/src/main/java/org/springframework/integration/aws/s3/AmazonS3ObjectBuilder.java index bf3febf..b6208ad 100644 --- a/src/main/java/org/springframework/integration/aws/s3/AmazonS3ObjectBuilder.java +++ b/src/main/java/org/springframework/integration/aws/s3/AmazonS3ObjectBuilder.java @@ -51,7 +51,6 @@ public class AmazonS3ObjectBuilder { /** * Gets a new instance of the builder - * @return */ public static AmazonS3ObjectBuilder getInstance() { return new AmazonS3ObjectBuilder(); @@ -60,7 +59,6 @@ public class AmazonS3ObjectBuilder { /** * Sets the file which is to be read for uploading into S3 * @param file - * @return */ public AmazonS3ObjectBuilder fromFile(File file) { Assert.notNull(file,"null 'file' object provided"); @@ -76,7 +74,6 @@ public class AmazonS3ObjectBuilder { /** * Convenience method for setting the File object from the String path * @param fileLocation - * @return */ public AmazonS3ObjectBuilder fromLocation(String fileLocation) { Assert.hasText(fileLocation, "'fileLocation should be non null, non empty string"); @@ -85,8 +82,7 @@ public class AmazonS3ObjectBuilder { /** * Sets an InputStream from which the data to be uploaded to S3 will be read - * @param in - * @return + * @param in The provided {@link InputStream} must not be null */ public AmazonS3ObjectBuilder fromInputStream(InputStream in) { Assert.notNull(in, "The Stream object provided is null"); @@ -98,7 +94,6 @@ public class AmazonS3ObjectBuilder { /** * Use the given user meta data for the file to be uploaded * @param userMetaData - * @return */ public AmazonS3ObjectBuilder withUserMetaData(Map userMetaData) { this.userMetaData = userMetaData; @@ -108,7 +103,6 @@ public class AmazonS3ObjectBuilder { /** * uses the given metadata for the S3 object to be uploaded * @param metaData - * @return */ public AmazonS3ObjectBuilder withMetaData(Map metaData) { this.metaData = metaData; @@ -118,7 +112,6 @@ public class AmazonS3ObjectBuilder { /** * Sets the S3 Object ACL * @param objectACL - * @return */ public AmazonS3ObjectBuilder withObjectACL(Map> objectACL) { //The key can be of three types, the email id, the canonical id of the user or the Group identifier @@ -159,7 +152,6 @@ public class AmazonS3ObjectBuilder { /** * Gets the Appropriate {@link ObjectPermissions} based on the String passed * @param permission - * @return */ private ObjectPermissions getObjectPermission(String permission) { //Types of permission are READ, READ_ACP, WRITE_ACP @@ -180,7 +172,6 @@ public class AmazonS3ObjectBuilder { /** * Method checks if the provided String is a canonical id of the AWS account * @param identifier - * @return */ private boolean isCanonicalId(String identifier) { //Note: we do not check if the given id is a valid canonical id with AWS, we just check if it is in the right format @@ -196,7 +187,6 @@ public class AmazonS3ObjectBuilder { /** * Checks if the given identifier corresponds to a group id * @param identifier - * @return */ private boolean isGroupIdentifier(String identifier){ if(StringUtils.hasText(identifier)) { @@ -209,7 +199,6 @@ public class AmazonS3ObjectBuilder { /** * Builds the {@link AmazonS3Object} from the provided meta data, file/input stream and object ACLs - * @return */ public AmazonS3Object build() { Assert.isTrue(!(in == null && file == null),"One of File object or InputStream is required"); diff --git a/src/main/java/org/springframework/integration/aws/s3/FileEvent.java b/src/main/java/org/springframework/integration/aws/s3/FileEvent.java index 3366ce8..e97d611 100644 --- a/src/main/java/org/springframework/integration/aws/s3/FileEvent.java +++ b/src/main/java/org/springframework/integration/aws/s3/FileEvent.java @@ -36,7 +36,6 @@ public interface FileEvent { /** * The File on which the given occurred - * @return */ File getFile(); } diff --git a/src/main/java/org/springframework/integration/aws/s3/FileNameGenerationStrategy.java b/src/main/java/org/springframework/integration/aws/s3/FileNameGenerationStrategy.java index d39537f..ed7e258 100644 --- a/src/main/java/org/springframework/integration/aws/s3/FileNameGenerationStrategy.java +++ b/src/main/java/org/springframework/integration/aws/s3/FileNameGenerationStrategy.java @@ -29,7 +29,6 @@ public interface FileNameGenerationStrategy { /** * Generates the file name from the given message - * @return */ String generateFileName(Message message); } diff --git a/src/main/java/org/springframework/integration/aws/s3/InboundFileSynchronizationImpl.java b/src/main/java/org/springframework/integration/aws/s3/InboundFileSynchronizationImpl.java index ab86022..50e6aa3 100644 --- a/src/main/java/org/springframework/integration/aws/s3/InboundFileSynchronizationImpl.java +++ b/src/main/java/org/springframework/integration/aws/s3/InboundFileSynchronizationImpl.java @@ -279,13 +279,12 @@ public class InboundFileSynchronizationImpl implements InboundFileSynchronizer,I * and hence this method will return false. * * @param eTag - * @return */ private boolean isEtagMD5Hash(String eTag) { if (eTag == null || eTag.length() != 32) { - return false; - } - return eTag.replaceAll("[a-f0-9A-F]", "").length() == 0; + return false; + } + return eTag.replaceAll("[a-f0-9A-F]", "").length() == 0; } diff --git a/src/main/java/org/springframework/integration/aws/s3/InboundFileSynchronizer.java b/src/main/java/org/springframework/integration/aws/s3/InboundFileSynchronizer.java index 4f60fba..d38a975 100644 --- a/src/main/java/org/springframework/integration/aws/s3/InboundFileSynchronizer.java +++ b/src/main/java/org/springframework/integration/aws/s3/InboundFileSynchronizer.java @@ -32,14 +32,13 @@ public interface InboundFileSynchronizer { * It retrieved new files and updates existing ones with the latest content from S3 * Please note that this method will NOT delete any additional files present on the * local filesystem - * @param localDirectory: The local directory that needs to be synchronized with the - * Remote S3 bucket - * @param bucketName: The name of the bucket whose contents are to be synchronized - * @param remoteFolder: The folder name in S3 whose contents are to be synchronized - * use / if the contents of the bucket starting from the root - * are to be synchronized. This operation will only synchronize - * the files resent in the given remote folder and will ignore - * all the folders and sub folder in it. + * @param localDirectory The local directory that needs to be synchronized with the Remote S3 bucket + * @param bucketName The name of the bucket whose contents are to be synchronized + * @param remoteFolder The folder name in S3 whose contents are to be synchronized + * use / if the contents of the bucket starting from the root + * are to be synchronized. This operation will only synchronize + * the files resent in the given remote folder and will ignore + * all the folders and sub folder in it. */ void synchronizeToLocalDirectory(File localDirectory,String bucketName,String remoteFolder); @@ -63,8 +62,6 @@ public interface InboundFileSynchronizer { /** * Sets the simple file name wildcard to match to match the file e.g., it can be * set to *.txt to accept all .txt files - * - * @param suffix of the file name to match */ void setFileWildcard(String wildcardString); diff --git a/src/main/java/org/springframework/integration/aws/s3/InboundLocalFileOperationsImpl.java b/src/main/java/org/springframework/integration/aws/s3/InboundLocalFileOperationsImpl.java index 26c0554..391e359 100644 --- a/src/main/java/org/springframework/integration/aws/s3/InboundLocalFileOperationsImpl.java +++ b/src/main/java/org/springframework/integration/aws/s3/InboundLocalFileOperationsImpl.java @@ -89,7 +89,6 @@ public class InboundLocalFileOperationsImpl implements /** * Returns true if create directories if required flag is set to true - * @return */ public boolean isCreateDirectoriesIfRequired() { return createDirectoriesIfRequired; @@ -215,7 +214,6 @@ public class InboundLocalFileOperationsImpl implements * * @param fileToWrite * @param dest - * @return */ private boolean renameFile(final File from, final File to) { final boolean isSuccessful; diff --git a/src/main/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3Operations.java b/src/main/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3Operations.java index 3b3c5fe..f1aab3b 100644 --- a/src/main/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3Operations.java +++ b/src/main/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3Operations.java @@ -65,7 +65,7 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I /** - * The constructor that accepts the {@link AmazonWSCredentials} + * The constructor that accepts the {@link AWSCredentials} * @param credentials */ protected AbstractAmazonS3Operations(AWSCredentials credentials) { @@ -76,7 +76,6 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I /** * Get the threshold value in bytes above which multi part upload will be used - * @return */ public long getMultipartUploadThreshold() { return multipartUploadThreshold; @@ -103,7 +102,6 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I /** * Gets the temporary directory - * @return */ public File getTemporaryDirectory() { return temporaryDirectory; @@ -134,7 +132,6 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I /** * Gets the temporary file suffix that is appended to the file while writing to * the temporary directory - * @return */ public String getTemporaryFileSuffix() { return temporaryFileSuffix; @@ -158,7 +155,6 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I * Gets the AWS endpoint to use for all the operations, by default if none is set then us-east-1 is * assumed. * - * @return */ public String getAwsEndpoint() { return awsEndpoint; @@ -346,7 +342,6 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I * * @param folder * @param objectName - * @return */ private String getKeyFromFolder(String folder, String objectName) { if(objectName.startsWith(PATH_SEPARATOR)) { @@ -387,10 +382,7 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I * @param nextMarker The number of objects can be very large and this serves as the marker * for remembering the last record fetch in the last retrieve operation. * @param pageSize The max number of records to be retrieved in one list object operation. - * @param prefix The prefix for the list operation, this can serve as the folder whose contents - * are to be listed. * - * @return */ public final PaginatedObjectsView listObjects(String bucketName, String folder, String nextMarker,int pageSize) { Assert.hasText(bucketName, "Bucket name should be non null and non empty"); @@ -445,7 +437,6 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I * * @param bucketName * @param key - * @return */ protected abstract AmazonS3Object doGetObject(String bucketName, String key); @@ -459,7 +450,6 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I * @param pageSize The max number of records to be retrieved in one list object operation. * @param prefix The prefix for the list operation, this can serve as the folder whose contents * are to be listed. - * @return */ protected abstract PaginatedObjectsView doListObjects(String bucketName, String nextMarker, int pageSize, String prefix); @@ -469,12 +459,12 @@ public abstract class AbstractAmazonS3Operations implements AmazonS3Operations,I * The abstract method to be implemented by the subclass that would be doing the job * of uploading the given file against the given key in the given bucket * - * @param bucketName The bucket on S3 where this object is to be put + * @param bucket The bucket on S3 where this object is to be put * @param key The key against which this Object is to be stored in S3 * @param file resource to be uploaded to S3 * @param objectACL the Object's Access controls for the object to be uploaded * @param userMetadata The user's metadata to be associated with the object uploaded - * @param The MD5 sum of the contents of the file to be uploaded + * @param stringContentMD5 The MD5 sum of the contents of the file to be uploaded * */ protected abstract void doPut(String bucket,String key,File file, diff --git a/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3Object.java b/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3Object.java index c2083b3..4cdf557 100644 --- a/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3Object.java +++ b/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3Object.java @@ -90,7 +90,6 @@ public class AmazonS3Object implements Serializable { /** * Gets the User Metadata associated with given Amazon S3 object - * @return */ public Map getUserMetaData() { return userMetaData; @@ -98,7 +97,6 @@ public class AmazonS3Object implements Serializable { /** * Gets the Metadata associated with the given Amazon S3 object - * @return */ public Map getMetaData() { return metaData; @@ -106,7 +104,6 @@ public class AmazonS3Object implements Serializable { /** * Gets the {@link InputStream} to the resource - * @return */ public InputStream getInputStream() { return inputStream; @@ -114,7 +111,6 @@ public class AmazonS3Object implements Serializable { /** * Gets the file source - * @return */ public File getFileSource() { return fileSource; @@ -122,7 +118,6 @@ public class AmazonS3Object implements Serializable { /** * Gets the Access controls associated with the S3 Object - * @return */ public AmazonS3ObjectACL getObjectACL() { return objectACL; diff --git a/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3ObjectACL.java b/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3ObjectACL.java index d0f6c5a..6b3aabb 100644 --- a/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3ObjectACL.java +++ b/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3ObjectACL.java @@ -35,7 +35,6 @@ public class AmazonS3ObjectACL { /** * Gets all the grants on the object in the bucket - * @return */ public Set getGrants() { return grants; diff --git a/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3OperationException.java b/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3OperationException.java index 9dfe4b4..d1867e2 100644 --- a/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3OperationException.java +++ b/src/main/java/org/springframework/integration/aws/s3/core/AmazonS3OperationException.java @@ -18,7 +18,7 @@ package org.springframework.integration.aws.s3.core; import org.springframework.integration.aws.core.AWSOperationException; /** - * A subclass of {@link AmazonWSOperationException} which indicates a failure in performing + * A subclass of {@link AWSOperationException} which indicates a failure in performing * an operation on the object in S3. * * @author Amol Nayak @@ -105,7 +105,6 @@ public class AmazonS3OperationException extends AWSOperationException { /** * Gets the bucket name for which an S3 operation failed - * @return */ public String getBucket() { return bucket; @@ -113,7 +112,6 @@ public class AmazonS3OperationException extends AWSOperationException { /** * Gets the object name where an S3 operation failed - * @return */ public String getObjectName() { return objectName; diff --git a/src/main/java/org/springframework/integration/aws/s3/core/DefaultAmazonS3Operations.java b/src/main/java/org/springframework/integration/aws/s3/core/DefaultAmazonS3Operations.java index 7628441..fa366c0 100644 --- a/src/main/java/org/springframework/integration/aws/s3/core/DefaultAmazonS3Operations.java +++ b/src/main/java/org/springframework/integration/aws/s3/core/DefaultAmazonS3Operations.java @@ -123,7 +123,6 @@ public class DefaultAmazonS3Operations extends AbstractAmazonS3Operations { * @param pageSize The max number of records to be retrieved in one list object operation. * @param prefix The prefix for the list operation, this can serve as the folder whose contents * are to be listed. - * @return */ @Override protected PaginatedObjectsView doListObjects(String bucketName, @@ -179,7 +178,7 @@ public class DefaultAmazonS3Operations extends AbstractAmazonS3Operations { * * @param bucketName * @param key - * @return + * @return The Amazon S3 Object representing the Object in S3, may be null. */ @Override protected AmazonS3Object doGetObject(String bucketName, String key) { @@ -212,7 +211,7 @@ public class DefaultAmazonS3Operations extends AbstractAmazonS3Operations { * @param file resource to be uploaded to S3 * @param objectACL the Object's Access controls for the object to be uploaded * @param userMetadata The user's metadata to be associated with the object uploaded - * @param The MD5 sum of the contents of the file to be uploaded + * @param stringContentMD5 The MD5 sum of the contents of the file to be uploaded */ @Override public void doPut(String bucketName, String key, File file, AmazonS3ObjectACL objectACL, @@ -288,8 +287,6 @@ public class DefaultAmazonS3Operations extends AbstractAmazonS3Operations { /** * Gets the {@link AccessControlList} from the given {@link AmazonS3ObjectACL} - * @param acl - * @return */ private AccessControlList getAccessControlList(String bucketName,String key,AmazonS3ObjectACL acl) { AccessControlList accessControlList = null; @@ -334,7 +331,6 @@ public class DefaultAmazonS3Operations extends AbstractAmazonS3Operations { /** * Gets the thread pool executor that will be used to upload the object in multiparts * concurrently - * @return */ public ThreadPoolExecutor getThreadPoolExecutor() { return threadPoolExecutor; @@ -345,7 +341,7 @@ public class DefaultAmazonS3Operations extends AbstractAmazonS3Operations { * Used only when we upload the data using multi part upload. The thread pool will be used * to upload the data concurrently * - * @param threadPool + * @param threadPoolExecutor May not be null */ public void setThreadPoolExecutor(ThreadPoolExecutor threadPoolExecutor) { Assert.notNull(threadPoolExecutor, "'threadPoolExecutor' is null"); diff --git a/src/main/java/org/springframework/integration/aws/s3/core/Grantee.java b/src/main/java/org/springframework/integration/aws/s3/core/Grantee.java index eb3960e..947e509 100644 --- a/src/main/java/org/springframework/integration/aws/s3/core/Grantee.java +++ b/src/main/java/org/springframework/integration/aws/s3/core/Grantee.java @@ -47,7 +47,6 @@ public class Grantee { /** * Gets the particular identifier representing the grantee - * @return */ public String getIdentifier() { return identifier; @@ -55,7 +54,6 @@ public class Grantee { /** * Gets the Particular grantee Type - * @return */ public GranteeType getGranteeType() { return granteeType; diff --git a/src/main/java/org/springframework/integration/aws/s3/core/ObjectGrant.java b/src/main/java/org/springframework/integration/aws/s3/core/ObjectGrant.java index f7b349e..7f4d8f2 100644 --- a/src/main/java/org/springframework/integration/aws/s3/core/ObjectGrant.java +++ b/src/main/java/org/springframework/integration/aws/s3/core/ObjectGrant.java @@ -42,7 +42,6 @@ public class ObjectGrant { /** * Gets the grantee for this particular object permission - * @return */ public Grantee getGrantee() { return grantee; @@ -50,7 +49,6 @@ public class ObjectGrant { /** * Gets the Corresponding object permission - * @return */ public ObjectPermissions getPermission() { return permission; diff --git a/src/main/java/org/springframework/integration/aws/s3/core/PaginatedObjectsView.java b/src/main/java/org/springframework/integration/aws/s3/core/PaginatedObjectsView.java index bbfdf82..f2aa2d7 100644 --- a/src/main/java/org/springframework/integration/aws/s3/core/PaginatedObjectsView.java +++ b/src/main/java/org/springframework/integration/aws/s3/core/PaginatedObjectsView.java @@ -30,7 +30,7 @@ public interface PaginatedObjectsView { /** * Gets the Paginated List of Object names - * @return: A {@link List} of paginated object names + * @return A {@link List} of paginated object names */ List getObjectSummary(); @@ -41,10 +41,9 @@ public interface PaginatedObjectsView { boolean hasMoreResults(); /** - * Contains the merker that can be used to get the next listing of objects from the + * Contains the marker that can be used to get the next listing of objects from the * S3. Contains a null value if the listing is complete, the hasMoreResults * method will return true if this marker contains a non null value. - * @return */ String getNextMarker(); diff --git a/src/main/java/org/springframework/integration/aws/s3/core/S3ObjectSummary.java b/src/main/java/org/springframework/integration/aws/s3/core/S3ObjectSummary.java index f417df4..b287119 100644 --- a/src/main/java/org/springframework/integration/aws/s3/core/S3ObjectSummary.java +++ b/src/main/java/org/springframework/integration/aws/s3/core/S3ObjectSummary.java @@ -29,31 +29,26 @@ public interface S3ObjectSummary { /** * Gets the Bucket nane in which the object is kept on S3 - * @return */ String getBucketName(); /** * Gets the keys under which the Object is stored on S3 - * @return */ String getKey(); /** * Gets the Hex encoded 128 bit MD5 digest of the contents of the object uploaded on S3 - * @return */ String getETag(); /** * Gets the size of the object in bytes - * @return */ long getSize(); /** * Gets the Date the object was last modified - * @return */ Date getLastModified(); } diff --git a/src/main/java/org/springframework/integration/aws/ses/core/AmazonSESMailSendException.java b/src/main/java/org/springframework/integration/aws/ses/core/AmazonSESMailSendException.java index 03bb6da..92942b0 100644 --- a/src/main/java/org/springframework/integration/aws/ses/core/AmazonSESMailSendException.java +++ b/src/main/java/org/springframework/integration/aws/ses/core/AmazonSESMailSendException.java @@ -87,7 +87,6 @@ public class AmazonSESMailSendException extends AWSOperationException { /** * Gets the map of failed messages where the failed message is the key and the exception * while sending it is the value - * @return */ public Map getFailedMessages() { return failedMessages; diff --git a/src/test/java/org/springframework/integration/aws/common/AWSClientFactoryTest.java b/src/test/java/org/springframework/integration/aws/common/AWSClientFactoryTest.java index 8bbc2a5..a52dee0 100644 --- a/src/test/java/org/springframework/integration/aws/common/AWSClientFactoryTest.java +++ b/src/test/java/org/springframework/integration/aws/common/AWSClientFactoryTest.java @@ -15,7 +15,7 @@ */ package org.springframework.integration.aws.common; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Test; import org.springframework.integration.aws.core.AbstractAWSClientFactory; diff --git a/src/test/java/org/springframework/integration/aws/common/AWSTestUtils.java b/src/test/java/org/springframework/integration/aws/common/AWSTestUtils.java index 08e13ea..c2e145c 100644 --- a/src/test/java/org/springframework/integration/aws/common/AWSTestUtils.java +++ b/src/test/java/org/springframework/integration/aws/common/AWSTestUtils.java @@ -27,7 +27,7 @@ import java.security.NoSuchAlgorithmException; import java.util.ArrayList; import java.util.List; -import junit.framework.Assert; +import org.junit.Assert; import org.apache.commons.codec.binary.Base64; import org.springframework.integration.aws.core.AWSCredentials; @@ -92,8 +92,7 @@ public final class AWSTestUtils { /** * The static helper method that would be used by other AWS tests to - * get the implementation of the {@link AmazonWSCredentials} instance - * @return + * get the implementation of the {@link AWSCredentials} instance * @throws Exception */ public static AWSCredentials getCredentials() { @@ -114,7 +113,6 @@ public final class AWSTestUtils { * checked and the listing of the directories is retrieved. * * @param rootDirectory - * @return */ public static List getContentsRecursively(File rootDirectory) { if(!rootDirectory.isDirectory()) { @@ -150,7 +148,6 @@ public final class AWSTestUtils { * Helper method that will be used to generate the base64 encoded MD5 hash of the string * * @param input - * @return */ public static String md5Hash(String input) { try { diff --git a/src/test/java/org/springframework/integration/aws/config/xml/AbstractAWSOutboundChannelAdapterParserTests.java b/src/test/java/org/springframework/integration/aws/config/xml/AbstractAWSOutboundChannelAdapterParserTests.java index 45fb3d7..0bfe333 100644 --- a/src/test/java/org/springframework/integration/aws/config/xml/AbstractAWSOutboundChannelAdapterParserTests.java +++ b/src/test/java/org/springframework/integration/aws/config/xml/AbstractAWSOutboundChannelAdapterParserTests.java @@ -15,7 +15,7 @@ */ package org.springframework.integration.aws.config.xml; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.AfterClass; import org.junit.Before; @@ -78,7 +78,6 @@ public abstract class AbstractAWSOutboundChannelAdapterParserTests getFactory(); /** * Gets the endpoint for the service in US-EAST-1 region - * @return */ protected abstract String getUSEast1Endpoint(); /** * Gets the endpoint for the service in US-EAST-1 region - * @return */ protected abstract String getEUWest1Endpoint(); /** * Gets the Suffix for the endpoint URL which is service specific - * @return */ protected abstract String getSuffix(); diff --git a/src/test/java/org/springframework/integration/aws/s3/AmazonS3InboundSynchronizationMessageSourceTests.java b/src/test/java/org/springframework/integration/aws/s3/AmazonS3InboundSynchronizationMessageSourceTests.java index 6cda68c..0bac9ae 100644 --- a/src/test/java/org/springframework/integration/aws/s3/AmazonS3InboundSynchronizationMessageSourceTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/AmazonS3InboundSynchronizationMessageSourceTests.java @@ -15,8 +15,8 @@ */ package org.springframework.integration.aws.s3; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNull; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; import static org.springframework.integration.aws.common.AWSTestUtils.md5Hash; import static org.springframework.integration.aws.s3.AmazonS3OperationsMockingUtil.BUCKET; import static org.springframework.integration.aws.s3.AmazonS3OperationsMockingUtil.mockAmazonS3Operations; diff --git a/src/test/java/org/springframework/integration/aws/s3/AmazonS3MessageHandlerTests.java b/src/test/java/org/springframework/integration/aws/s3/AmazonS3MessageHandlerTests.java index 7026659..47b1106 100644 --- a/src/test/java/org/springframework/integration/aws/s3/AmazonS3MessageHandlerTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/AmazonS3MessageHandlerTests.java @@ -32,7 +32,7 @@ import java.util.Collections; import java.util.HashMap; import java.util.Map; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; diff --git a/src/test/java/org/springframework/integration/aws/s3/AmazonS3ObjectBuilderTests.java b/src/test/java/org/springframework/integration/aws/s3/AmazonS3ObjectBuilderTests.java index dcfcec3..ea79d91 100644 --- a/src/test/java/org/springframework/integration/aws/s3/AmazonS3ObjectBuilderTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/AmazonS3ObjectBuilderTests.java @@ -21,6 +21,7 @@ import static org.springframework.integration.aws.s3.core.ObjectPermissions.WRIT import java.io.File; import java.io.FileInputStream; +import java.io.IOException; import java.io.InputStream; import java.util.Arrays; import java.util.Collection; @@ -29,7 +30,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Rule; import org.junit.Test; @@ -53,7 +54,7 @@ import org.springframework.integration.test.util.TestUtils; public class AmazonS3ObjectBuilderTests { @Rule - public static TemporaryFolder temp = new TemporaryFolder(); + public TemporaryFolder temp = new TemporaryFolder(); private static final String GROUP_GRANTEE = "http://acs.amazonaws.com/groups/global/AllUsers"; private static final String EMAIL_GRANTEE = "test@test.com"; @@ -79,7 +80,7 @@ public class AmazonS3ObjectBuilderTests { * Tries to construct the file which is a directory */ @Test(expected=IllegalArgumentException.class) - public void withADirectory() { + public void withADirectory() throws IOException { File dir = temp.newFolder("tempdir"); AmazonS3ObjectBuilder.getInstance().fromFile(dir); dir.delete(); @@ -220,7 +221,6 @@ public class AmazonS3ObjectBuilderTests { /** * Generate the object test ACLS - * @return */ private Map> generateObjectACLS() { Map> acls = new HashMap>(); diff --git a/src/test/java/org/springframework/integration/aws/s3/DefaultFileNameGenerationStrategyTests.java b/src/test/java/org/springframework/integration/aws/s3/DefaultFileNameGenerationStrategyTests.java index 33513d3..4979dd4 100644 --- a/src/test/java/org/springframework/integration/aws/s3/DefaultFileNameGenerationStrategyTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/DefaultFileNameGenerationStrategyTests.java @@ -19,7 +19,7 @@ package org.springframework.integration.aws.s3; import java.io.File; import java.util.UUID; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Test; import org.springframework.integration.Message; diff --git a/src/test/java/org/springframework/integration/aws/s3/FileNameFilterTests.java b/src/test/java/org/springframework/integration/aws/s3/FileNameFilterTests.java index 9fb4619..d112b34 100644 --- a/src/test/java/org/springframework/integration/aws/s3/FileNameFilterTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/FileNameFilterTests.java @@ -15,7 +15,7 @@ */ package org.springframework.integration.aws.s3; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Test; diff --git a/src/test/java/org/springframework/integration/aws/s3/InboundFileSynchronizationImplTests.java b/src/test/java/org/springframework/integration/aws/s3/InboundFileSynchronizationImplTests.java index 26d68d1..6cd9550 100644 --- a/src/test/java/org/springframework/integration/aws/s3/InboundFileSynchronizationImplTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/InboundFileSynchronizationImplTests.java @@ -15,10 +15,10 @@ */ package org.springframework.integration.aws.s3; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; -import static junit.framework.Assert.assertNotNull; -import static junit.framework.Assert.assertTrue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import static org.springframework.integration.aws.common.AWSTestUtils.assertFileContent; import static org.springframework.integration.aws.common.AWSTestUtils.getContentsRecursively; import static org.springframework.integration.aws.common.AWSTestUtils.md5Hash; diff --git a/src/test/java/org/springframework/integration/aws/s3/InboundLocalFileOperationsImplTests.java b/src/test/java/org/springframework/integration/aws/s3/InboundLocalFileOperationsImplTests.java index 04d6041..9ead4d8 100644 --- a/src/test/java/org/springframework/integration/aws/s3/InboundLocalFileOperationsImplTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/InboundLocalFileOperationsImplTests.java @@ -22,7 +22,7 @@ import java.io.File; import java.io.FileOutputStream; import java.util.Collections; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Rule; import org.junit.Test; diff --git a/src/test/java/org/springframework/integration/aws/s3/config/xml/AmazonS3InboundChannelAdapterParserTests.java b/src/test/java/org/springframework/integration/aws/s3/config/xml/AmazonS3InboundChannelAdapterParserTests.java index 0942ee8..5345367 100644 --- a/src/test/java/org/springframework/integration/aws/s3/config/xml/AmazonS3InboundChannelAdapterParserTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/config/xml/AmazonS3InboundChannelAdapterParserTests.java @@ -16,7 +16,7 @@ package org.springframework.integration.aws.s3.config.xml; -import static junit.framework.Assert.assertEquals; +import static org.junit.Assert.assertEquals; import static org.springframework.integration.test.util.TestUtils.getPropertyValue; import java.io.File; diff --git a/src/test/java/org/springframework/integration/aws/s3/config/xml/AmazonS3OutboundChannelAdapterParserTests.java b/src/test/java/org/springframework/integration/aws/s3/config/xml/AmazonS3OutboundChannelAdapterParserTests.java index f61c546..bf4a679 100644 --- a/src/test/java/org/springframework/integration/aws/s3/config/xml/AmazonS3OutboundChannelAdapterParserTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/config/xml/AmazonS3OutboundChannelAdapterParserTests.java @@ -15,8 +15,8 @@ */ package org.springframework.integration.aws.s3.config.xml; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertNotNull; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; import static org.springframework.integration.test.util.TestUtils.getPropertyValue; import java.net.URI; diff --git a/src/test/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3OperationsImplAWSTests.java b/src/test/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3OperationsImplAWSTests.java index 730cefd..4f294c4 100644 --- a/src/test/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3OperationsImplAWSTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/core/AbstractAmazonS3OperationsImplAWSTests.java @@ -27,9 +27,10 @@ import java.util.List; import java.util.Map; import java.util.Set; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Rule; import org.junit.Test; import org.junit.rules.TemporaryFolder; @@ -56,12 +57,13 @@ import com.amazonaws.services.s3.model.S3Object; * @since 0.5 * */ +@Ignore() public abstract class AbstractAmazonS3OperationsImplAWSTests { private static final String VALID_CANONICAL_ID = "f854da004ee08cf4f8664334d288561c8512c508db9785388de7319ded85f8f3"; @Rule - public static final TemporaryFolder temp = new TemporaryFolder(); + public final TemporaryFolder temp = new TemporaryFolder(); //private static final String UPLOAD_SOURCE_DIRECTORY = System.getProperty("java.io.tmpdir") + "upload"; @@ -572,7 +574,6 @@ public abstract class AbstractAmazonS3OperationsImplAWSTests { /** * The private helper method that generates the test file to be uploaded - * @return * @throws IOException * @throws FileNotFoundException */ @@ -607,7 +608,6 @@ public abstract class AbstractAmazonS3OperationsImplAWSTests { * * @param bucket * @param key - * @return */ protected AccessControlList getObjectACL(String bucket,String key) { return client.getObjectAcl(bucket, key); diff --git a/src/test/java/org/springframework/integration/aws/s3/core/DefaultAmazonS3OperationsAWSTests.java b/src/test/java/org/springframework/integration/aws/s3/core/DefaultAmazonS3OperationsAWSTests.java index 694ca6a..dccf043 100644 --- a/src/test/java/org/springframework/integration/aws/s3/core/DefaultAmazonS3OperationsAWSTests.java +++ b/src/test/java/org/springframework/integration/aws/s3/core/DefaultAmazonS3OperationsAWSTests.java @@ -18,9 +18,10 @@ import java.util.concurrent.Executors; import java.util.concurrent.ThreadPoolExecutor; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.springframework.integration.aws.core.PropertiesAWSCredentials; @@ -43,6 +44,7 @@ import org.springframework.integration.aws.core.PropertiesAWSCredentials; * @since 0.5 * */ +@Ignore public class DefaultAmazonS3OperationsAWSTests extends AbstractAmazonS3OperationsImplAWSTests { @@ -60,6 +62,7 @@ public class DefaultAmazonS3OperationsAWSTests extends AbstractAmazonS3Operation * complete successfully * */ + @Ignore @Test public void withNonNullThreadPoolExecutor() { ThreadPoolExecutor executor = (ThreadPoolExecutor)Executors.newFixedThreadPool(10); @@ -71,6 +74,7 @@ public class DefaultAmazonS3OperationsAWSTests extends AbstractAmazonS3Operation * Sets the thread pool executor to a null value, should throw an * {@link IllegalArgumentException} */ + @Ignore @Test(expected=IllegalArgumentException.class) public void withNullThreadPoolExecutor() { impl.setThreadPoolExecutor(null); diff --git a/src/test/java/org/springframework/integration/aws/ses/AmazonSESMessageHandlerTests.java b/src/test/java/org/springframework/integration/aws/ses/AmazonSESMessageHandlerTests.java index f86a175..b1b08c8 100644 --- a/src/test/java/org/springframework/integration/aws/ses/AmazonSESMessageHandlerTests.java +++ b/src/test/java/org/springframework/integration/aws/ses/AmazonSESMessageHandlerTests.java @@ -30,7 +30,7 @@ import java.util.List; import javax.mail.internet.MimeMessage; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.BeforeClass; import org.junit.Test; diff --git a/src/test/java/org/springframework/integration/aws/ses/config/xml/AmazonSESOutboundAdapterParserTests.java b/src/test/java/org/springframework/integration/aws/ses/config/xml/AmazonSESOutboundAdapterParserTests.java index 9ea5e16..38fccf6 100644 --- a/src/test/java/org/springframework/integration/aws/ses/config/xml/AmazonSESOutboundAdapterParserTests.java +++ b/src/test/java/org/springframework/integration/aws/ses/config/xml/AmazonSESOutboundAdapterParserTests.java @@ -17,7 +17,7 @@ package org.springframework.integration.aws.ses.config.xml; import java.util.Properties; -import junit.framework.Assert; +import org.junit.Assert; import org.junit.Test; import org.springframework.beans.factory.parsing.BeanDefinitionParsingException; diff --git a/src/test/java/org/springframework/integration/aws/ses/core/DefaultAmazonSESMailSenderAWSTests.java b/src/test/java/org/springframework/integration/aws/ses/core/DefaultAmazonSESMailSenderAWSTests.java index 386e219..baae3e9 100644 --- a/src/test/java/org/springframework/integration/aws/ses/core/DefaultAmazonSESMailSenderAWSTests.java +++ b/src/test/java/org/springframework/integration/aws/ses/core/DefaultAmazonSESMailSenderAWSTests.java @@ -18,6 +18,7 @@ package org.springframework.integration.aws.ses.core; import javax.mail.internet.MimeMessage; import org.junit.BeforeClass; +import org.junit.Ignore; import org.junit.Test; import org.springframework.integration.aws.core.PropertiesAWSCredentials; import org.springframework.mail.SimpleMailMessage; @@ -40,6 +41,7 @@ import org.springframework.mail.javamail.MimeMessageHelper; * @since 0.5 * */ +@Ignore public class DefaultAmazonSESMailSenderAWSTests { private static final String TO_EMAIL_ID = "amolnayak311@gmail.com";