Permalink
Browse files

Sharon & Behzad, #1421: Added functionality to retrieve a Trademark C…

…laims Notice

from TMDB for a look up key.
  • Loading branch information...
Sharon Jonnalagadda
Sharon Jonnalagadda committed Jul 18, 2013
1 parent 46b8f12 commit 1c1280732ed9cae3a8bcb32f19dbabe7bfb270a2
Showing with 2,919 additions and 38 deletions.
  1. +45 −2 build.gradle
  2. +3 −3 dependency-licenses/LICENSE.apache-2.0.txt
  3. +1 −1 gradle.properties
  4. BIN lib/ari-mock-http-server-1.0.1.jar
  5. +58 −4 readme.md
  6. +4 −0 src/main/config/tmdb.properties
  7. +1 −1 src/main/java/com/ausregistry/jtoolkit2/se/variant/package-info.java
  8. +73 −27 src/main/java/com/ausregistry/jtoolkit2/session/TLSContext.java
  9. +67 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/TmdbClient.java
  10. +43 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/TmdbClientProperties.java
  11. +56 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/model/TmAddress.java
  12. +92 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/model/TmClaim.java
  13. +24 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/model/TmClaimClassificationDesc.java
  14. +90 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/model/TmContact.java
  15. +47 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/model/TmCourt.java
  16. +90 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/model/TmHolder.java
  17. +58 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/model/TmNotice.java
  18. +26 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/model/TmUdrp.java
  19. +5 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/package-info.java
  20. +30 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/xml/TmAddressXmlParser.java
  21. +69 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/xml/TmClaimXmlParser.java
  22. +37 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/xml/TmContactXmlParser.java
  23. +33 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/xml/TmCourtXmlParser.java
  24. +37 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/xml/TmHolderXmlParser.java
  25. +9 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/xml/TmNoticeXmlParseException.java
  26. +60 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/xml/TmNoticeXmlParser.java
  27. +21 −0 src/main/java/com/ausregistry/jtoolkit2/tmdb/xml/TmUdrpXmlParser.java
  28. +133 −0 src/test/component/java/com/ausregistry/jtoolkit2/tmdb/TmdbClientComponentTest.java
  29. BIN src/test/component/resources/keystore.jks
  30. +143 −0 src/test/component/resources/sample-tmNotice.xml
  31. +4 −0 src/test/component/resources/tmdb.properties
  32. BIN src/test/component/resources/truststore.jks
  33. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/EPPDateFormatterTest.java
  34. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/ErrorPkgTest.java
  35. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/PerfTest.java
  36. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/TestEnvironment.java
  37. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/TimerTest.java
  38. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AeDomainCreateCommandTest.java
  39. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AeDomainInfoResponseTest.java
  40. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AeDomainModifyRegistrantCommandTest.java
  41. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AeDomainTransferRegistrantCommandTest.java
  42. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AeDomainTransferRegistrantResponseTest.java
  43. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ArDomainPolicyDeleteCommandTest.java
  44. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ArDomainPolicyUndeleteCommandTest.java
  45. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ArDomainUndeleteCommandTest.java
  46. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ArDomainUnrenewCommandTest.java
  47. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ArDomainUnrenewResponseTest.java
  48. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AuDomainCreateCommandTest.java
  49. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AuDomainInfoResponseTest.java
  50. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AuDomainInfoResponseV1Test.java
  51. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AuDomainModifyRegistrantCommandTest.java
  52. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AuDomainTransferRegistrantCommandTest.java
  53. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/AuDomainTransferRegistrantResponseTest.java
  54. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactCheckCommandTest.java
  55. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactCheckResponseTest.java
  56. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactCreateCommandTest.java
  57. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactCreateResponseTest.java
  58. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactDeleteCommandTest.java
  59. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactInfoCommandTest.java
  60. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactInfoResponseTest.java
  61. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactTransferApproveCommandTest.java
  62. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactTransferCancelCommandTest.java
  63. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactTransferQueryCommandTest.java
  64. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactTransferRejectCommandTest.java
  65. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactTransferRequestCommandTest.java
  66. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactTransferResponseTest.java
  67. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ContactUpdateCommandTest.java
  68. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainCheckCommandTest.java
  69. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainCheckResponseTest.java
  70. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainCreateCommandTest.java
  71. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainCreateResponseTest.java
  72. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainDeleteCommandTest.java
  73. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainInfoCommandTest.java
  74. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainInfoResponseTest.java
  75. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainNotificationResponseTest.java
  76. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainRenewCommandTest.java
  77. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainRenewResponseTest.java
  78. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainTransferApproveCommandTest.java
  79. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainTransferCancelCommandTest.java
  80. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainTransferQueryCommandTest.java
  81. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainTransferRejectCommandTest.java
  82. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainTransferRequestCommandTest.java
  83. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainTransferResponseTest.java
  84. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainUpdateCommandTest.java
  85. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainVariantInfoCommandTest.java
  86. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/DomainVariantInfoResponseTest.java
  87. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/EnumDomainInfoResponseTest.java
  88. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/GreetingTest.java
  89. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/HelloTest.java
  90. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/HostCheckCommandTest.java
  91. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/HostCheckResponseTest.java
  92. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/HostCreateCommandTest.java
  93. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/HostCreateResponseTest.java
  94. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/HostDeleteCommandTest.java
  95. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/HostInfoCommandTest.java
  96. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/HostInfoResponseTest.java
  97. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/HostUpdateCommandTest.java
  98. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/IPVersionTest.java
  99. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/LoginCommandTest.java
  100. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/LogoutCommandTest.java
  101. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/PollAckCommandTest.java
  102. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/PollRequestCommandTest.java
  103. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/PollResponseTest.java
  104. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/ResponseTest.java
  105. 0 .../{ → unit}/java/com/ausregistry/jtoolkit2/se/app/DomainCreateApplicationCommandExtensionTest.java
  106. 0 ...{ → unit}/java/com/ausregistry/jtoolkit2/se/app/DomainCreateApplicationResponseExtensionTest.java
  107. 0 .../{ → unit}/java/com/ausregistry/jtoolkit2/se/app/DomainDeleteApplicationCommandExtensionTest.java
  108. 0 ...st/{ → unit}/java/com/ausregistry/jtoolkit2/se/app/DomainInfoApplicationCommandExtensionTest.java
  109. 0 .../{ → unit}/java/com/ausregistry/jtoolkit2/se/app/DomainUpdateApplicationCommandExtensionTest.java
  110. 0 ...gistry/jtoolkit2/se/extendedAvailability/DomainCheckExtendedAvailabilityCommandExtensionTest.java
  111. 0 ...istry/jtoolkit2/se/extendedAvailability/DomainCheckExtendedAvailabilityResponseExtensionTest.java
  112. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/generic/DomainInfoKVResponseExtensionTest.java
  113. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/generic/DomainKVCommandExtensionTest.java
  114. 0 ...test/{ → unit}/java/com/ausregistry/jtoolkit2/se/generic/DomainRegistrantTransferCommandTest.java
  115. 0 ...est/{ → unit}/java/com/ausregistry/jtoolkit2/se/generic/DomainRegistrantTransferResponseTest.java
  116. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/idn/DomainCreateCommandTest.java
  117. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/idn/DomainInfoIdnResponseTest.java
  118. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/price/DomainCheckPriceCommandExtensionTest.java
  119. 0 ...test/{ → unit}/java/com/ausregistry/jtoolkit2/se/price/DomainCheckPriceResponseExtensionTest.java
  120. 0 ...test/{ → unit}/java/com/ausregistry/jtoolkit2/se/price/DomainCreatePriceCommandExtensionTest.java
  121. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/price/DomainRenewPriceCommandExtensionTest.java
  122. 0 ...unit}/java/com/ausregistry/jtoolkit2/se/price/DomainTransferRequestPriceCommandExtensionTest.java
  123. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/rgp/DomainInfoRgpResponseTest.java
  124. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/rgp/DomainRestoreReportCommandTest.java
  125. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/rgp/DomainRestoreRequestCommandTest.java
  126. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/rgp/DomainRestoreResponseTest.java
  127. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/rgp/RgpStatusTest.java
  128. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/secdns/DSDataTest.java
  129. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/secdns/KeyDataTest.java
  130. 0 ...{ → unit}/java/com/ausregistry/jtoolkit2/se/secdns/SecDnsDomainCreateCommandExtensionAddTest.java
  131. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/secdns/SecDnsDomainInfoResponseTest.java
  132. 0 ...{ → unit}/java/com/ausregistry/jtoolkit2/se/secdns/SecDnsDomainUpdateCommandExtensionAddTest.java
  133. 0 ... unit}/java/com/ausregistry/jtoolkit2/se/secdns/SecDnsDomainUpdateCommandExtensionChangeTest.java
  134. 0 ... unit}/java/com/ausregistry/jtoolkit2/se/secdns/SecDnsDomainUpdateCommandExtensionRemoveTest.java
  135. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/MarkAbstractTest.java
  136. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/MarkAddressTest.java
  137. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/MarkContactTest.java
  138. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/MarkCourtTest.java
  139. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/MarkHolderTest.java
  140. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/MarksListTest.java
  141. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/SignedMarkDataTest.java
  142. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/SmdIssuerInfoTest.java
  143. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/TmchDomainCheckCommandExtensionTest.java
  144. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/TmchDomainCheckResponseExtensionTest.java
  145. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/TmchDomainCreateCommandExtensionTest.java
  146. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/TmchDomainInfoCommandExtensionTest.java
  147. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/TmchXMLUtilTest.java
  148. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/TrademarkTest.java
  149. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/TreatyOrStatuteProtectionTest.java
  150. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/se/tmch/TreatyOrStatuteTest.java
  151. 0 ...test/{ → unit}/java/com/ausregistry/jtoolkit2/se/variant/DomainCreateVariantV1_1ResponseTest.java
  152. 0 ... unit}/java/com/ausregistry/jtoolkit2/se/variant/DomainUpdateVariantCommandExtensionV1_1Test.java
  153. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/session/CommandCounterTest.java
  154. +17 −0 src/test/unit/java/com/ausregistry/jtoolkit2/session/SessionManagerPropertiesImplTest.java
  155. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/session/SessionManagerTest.java
  156. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/session/SessionTest.java
  157. +45 −0 src/test/unit/java/com/ausregistry/jtoolkit2/test/infrastructure/NodeForXml.java
  158. +10 −0 src/test/unit/java/com/ausregistry/jtoolkit2/test/infrastructure/ToolkitMatchers.java
  159. +94 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/TmdbClientPropertiesTest.java
  160. +77 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/TmdbClientTest.java
  161. +51 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/model/TmAddressTest.java
  162. +21 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/model/TmClaimClassificationDescTest.java
  163. +98 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/model/TmClaimTest.java
  164. +78 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/model/TmContactTest.java
  165. +43 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/model/TmCourtTest.java
  166. +77 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/model/TmHolderTest.java
  167. +56 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/model/TmNoticeTest.java
  168. +26 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/model/TmUdrpTest.java
  169. +98 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/xml/TmAddressXmlParserTest.java
  170. +225 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/xml/TmClaimXmlParserTest.java
  171. +135 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/xml/TmContactXmlParserTest.java
  172. +84 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/xml/TmCourtXmlParserTest.java
  173. +137 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/xml/TmHolderXmlParserTest.java
  174. +129 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/xml/TmNoticeXmlParserTest.java
  175. +59 −0 src/test/unit/java/com/ausregistry/jtoolkit2/tmdb/xml/TmUdrpXmlParserTest.java
  176. 0 src/test/{ → unit}/java/com/ausregistry/jtoolkit2/xml/EPPResolverTest.java
  177. 0 { → src/test/unit/resources}/site.properties
@@ -9,19 +9,54 @@ ext {
artifactGroupId = 'au.com.ausregistry'
gradleWrapperVersion = '1.6'
pagesProjectDir = "$projectDir/../ari-toolkit-gitpages"
simpleFrameworkVersion = '4.1.21'
httpClientVersion = '4.2.3'
powerMockVersion = '1.5.1'
hamcrestVersion = '1.3'
ariMockHttpServerVersion = '1.0.1'
}
version = toolkitVersion
repositories {
mavenCentral()
flatDir name:'ExternalJars',dirs:'lib'
}
sourceSets {
test {
java.srcDir('src/test/unit/java')
resources.srcDir('src/test/unit/resources')
}
componentTest {
java.srcDir('src/test/component/java')
resources.srcDir('src/test/component/resources')
}
}
dependencies {
compile("commons-codec:commons-codec:1.7") {
exclude group: 'junit', module: 'junit'
}
testCompile group: "junit", name: "junit", version: junitVersion
compile "org.apache.httpcomponents:httpclient:$httpClientVersion"
testCompile "org.hamcrest:hamcrest-all:$hamcrestVersion"
testCompile "org.simpleframework:simple:$simpleFrameworkVersion"
testCompile("org.powermock:powermock-api-mockito:$powerMockVersion") {
exclude module: 'junit'
}
testCompile("org.powermock:powermock-module-junit4:$powerMockVersion") {
exclude module: 'junit'
}
testCompile ("junit:junit-dep:$junitVersion") {
exclude group: 'org.hamcrest', module: 'hamcrest-core' // exclude hamcrest-core 1.3
}
componentTestCompile "ari-mock-http-server:ari-mock-http-server:$ariMockHttpServerVersion"
componentTestCompile sourceSets.main.output
componentTestCompile configurations.testCompile
}
tasks.withType(Compile) {
@@ -52,6 +87,14 @@ clean.dependsOn cleanArtifacts
test.dependsOn jar
task componentTest(type: Test) {
testClassesDir = sourceSets.componentTest.output.classesDir
testResultsDir = file('build/test-results/component')
classpath += sourceSets.componentTest.runtimeClasspath
}
build.dependsOn componentTest
//Run this task to download the gradle wrapper corresponding to the gradleWrapperVersion number
task wrapper(type: Wrapper) {
@@ -119,4 +162,4 @@ uploadArchives << {
into "$pagesProjectDir/javadoc/ari-toolkit"
}
}
}
}
@@ -35,7 +35,7 @@
"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
copyright tmNotice 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
@@ -179,12 +179,12 @@
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 "[]"
boilerplate tmNotice, 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
same "printed page" as the copyright tmNotice for easier
identification within third-party archives.
Copyright [yyyy] [name of copyright owner]
@@ -1 +1 @@
toolkitVersion=3.0.3
toolkitVersion=3.1.0
Binary file not shown.
@@ -1,7 +1,7 @@
[![Build Status](https://travis-ci.org/AusRegistry/ari-toolkit.png)](https://travis-ci.org/AusRegistry/ari-toolkit)
## Downloads
The latest ari-toolkit is available for download. [ari-toolkit v3.0.3](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.0.3/arjtk-3.0.3.jar) ([sources](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.0.3/arjtk-3.0.3-sources.jar) | [javadoc](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.0.3/arjtk-3.0.3-javadoc.jar))
The latest ari-toolkit is available for download. [ari-toolkit v3.1.0](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.1.0/arjtk-3.1.0.jar) ([sources](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.1.0/arjtk-3.1.0-sources.jar) | [javadoc](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.1.0/arjtk-3.1.0-javadoc.jar))
For more information, please read [Installation and Setup](#installation-and-setup).
@@ -32,14 +32,15 @@ The EPP toolkit developed and supplied by ARI provides client-side libraries tha
The service element mapping module provides a simple means of translating between EPP service elements and their programmatic representation. The network transport module, which depends on session management service elements in the service element module, provides the following services; service information discovery, opening and closing EPP sessions, and sending and receiving EPP service elements.
This toolkit also provides a mechanism to retrieve a Trademark Claims Notice from TMDB for a look up key. For detailed information on retrieving TM notice please refer to [Trademark Claims Notice](#trademark-claims-notice)
## Installation and Setup
### How to get the toolkit
#### Direct download
Obtain the latest toolkit here: [Toolkit v3.0.3](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.0.3/arjtk-3.0.3.jar) ([sources](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.0.3/arjtk-3.0.3-sources.jar) | [javadoc](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.0.3/arjtk-3.0.3-javadoc.jar))
Obtain the latest toolkit here: [Toolkit v3.1.0](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.1.0/arjtk-3.1.0.jar) ([sources](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.1.0/arjtk-3.1.0-sources.jar) | [javadoc](http://ausregistry.github.com/repo/au/com/ausregistry/arjtk/3.1.0/arjtk-3.1.0-javadoc.jar))
#### Dependency Management
@@ -48,7 +49,7 @@ Use your build's dependency management tool to automatically download the toolki
* Repository: `http://ausregistry.github.com/repo/`
* groupId: `au.com.ausregistry`
* artifactId: `arjtk`
* version: `3.0.3`
* version: `3.1.0`
For example (using Maven):
@@ -63,7 +64,7 @@ For example (using Maven):
<dependency>
<groupId>au.com.ausregistry</groupId>
<artifactId>arjtk</artifactId>
<version>3.0.3</version>
<version>3.1.0</version>
</dependency>
</dependencies>
@@ -289,3 +290,56 @@ The properties relevant to the standard logging implementation are:
* `package-name.audience.handlers` should be left at the default values to use the provided handler implementations. The default values are provided in the `logging.properties` file distributed with the Toolkit.
Alternatively, the user may implement custom handler classes and register those classes using the package-name.audience.handlers parameters. Implementers should familiarise themselves with the Java Logging API [JLOGAPI] and Java Logging Overview [JLOGGUIDE] before deciding on this approach.
## Trademark Claims Notice
The Toolkit facilitates connections to the TMDB using classes in the com.ausregistry.jtoolkit2.tmdb package.
### Configuration
All properties related to the tmdb connections must be specified in the properties file named 'tmdb.properties'.
All the properties mentioned in tmdb.properties are mandatory.
`tmdb.server.url` - TMDB server URL including the https protocol and optional server port number if default https port is not used.
`tmdb.server.url=https://<tmdb-domain-name>/cnis`
`tmdb.truststore.location` - Path to the TMDB truststore file, relative to classpath.
`tmdb.truststore.location=tmdb-truststore.jks`
`tmdb.truststore.pass` - Password to the TMDB truststore.
`tmdb.truststore.pass=password`
`tmdb.socket.timeout` - Https socket connection time out.
`tmdb.socket.timeout=60000`
### TMDB Communication
Trade Mark notice for a lookup key from the configured TMDB server can be requested using the TmdbClient class.
TmdbClient uses the properties specified in 'tmdb.properties' file to establish a connection to the TMDB server.
The information contained in a TradeMark notice response from TMDB is encapsulated in a TmNotice object.
The following code sends a request for a TradeMark notice using TmdbClient.
TmdbClient tmdbClient = new TmdbClient();
TmNotice tmNotice = tmdbClient.requestNotice(lookupKey);
A TmdbClient can be used to request multiple TradeMark notices.
@@ -0,0 +1,4 @@
tmdb.server.url=https://localhost:11678
tmdb.truststore.location=truststore.jks
tmdb.truststore.pass=password
tmdb.socket.timeout=60000
@@ -1,7 +1,7 @@
/**
* <p>Contains command extension classes for the ARI Domain Name Add/Remove IDNA Variants extension.</p>
*
* <p>Response extension classes for this extension can be found in {@link com.ausregistry.jtoolkit2.se}.</p>
* <p>Response extension classes for this extension can be found in com.ausregistry.jtoolkit2.se.</p>
*
* @see <a href="http://ausregistry.github.com/doc/variant-1.1/variant-1.1.html">draft-ar-variant-epp-mapping-01:
* Domain Name Variant Extension Mapping for the Extensible Provisioning Protocol (EPP) </a>
@@ -1,33 +1,20 @@
package com.ausregistry.jtoolkit2.session;
import javax.net.ssl.*;
import javax.security.auth.x500.X500Principal;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.net.InetSocketAddress;
import java.net.Socket;
import java.net.SocketException;
import java.security.KeyManagementException;
import java.security.KeyStore;
import java.security.KeyStoreException;
import java.security.NoSuchAlgorithmException;
import java.security.UnrecoverableKeyException;
import java.net.URL;
import java.security.*;
import java.security.cert.Certificate;
import java.security.cert.CertificateException;
import java.security.cert.CertificateExpiredException;
import java.security.cert.CertificateNotYetValidException;
import java.security.cert.X509Certificate;
import java.security.cert.*;
import java.util.Enumeration;
import java.util.logging.Logger;
import javax.net.ssl.KeyManager;
import javax.net.ssl.KeyManagerFactory;
import javax.net.ssl.SSLContext;
import javax.net.ssl.SSLHandshakeException;
import javax.net.ssl.SSLSocket;
import javax.net.ssl.TrustManager;
import javax.net.ssl.TrustManagerFactory;
import javax.security.auth.x500.X500Principal;
import com.ausregistry.jtoolkit2.ErrorPkg;
/**
@@ -67,8 +54,6 @@
* the key store type
* @param algorithm
* the algorithm
* @throws KeyStoreTypeException
* the key store type exception
* @throws KeyStoreNotFoundException
* the key store not found exception
* @throws KeyStoreReadException
@@ -77,10 +62,6 @@
* the key store exception
* @throws CertificateException
* the certificate exception
* @throws CertificateExpiredException
* the certificate expired exception
* @throws CertificateNotYetValidException
* the certificate not yet valid exception
* @throws UnrecoverableKeyException
* the unrecoverable key exception
* @throws NoSuchAlgorithmException
@@ -89,8 +70,8 @@
* the key management exception
*/
public TLSContext(String keystore, String keypass, String truststore, String trustpass, String type,
String algorithm) throws KeyStoreTypeException, KeyStoreNotFoundException, KeyStoreReadException,
KeyStoreException, CertificateException, CertificateExpiredException, CertificateNotYetValidException,
String algorithm) throws KeyStoreNotFoundException, KeyStoreReadException,
KeyStoreException, CertificateException,
UnrecoverableKeyException, NoSuchAlgorithmException, KeyManagementException {
String pname = getClass().getPackage().getName();
@@ -101,7 +82,10 @@ public TLSContext(String keystore, String keypass, String truststore, String tru
try {
TrustManager[] trustManagers = loadTrustManagers(truststore, trustpass);
KeyManager[] keyManagers = loadKeyManagers(keystore, keypass, type, algorithm);
KeyManager[] keyManagers = null;
if (keystore != null) {
keyManagers = loadKeyManagers(keystore, keypass, type, algorithm);
}
ctx = SSLContext.getInstance(TLS);
ctx.init(keyManagers, trustManagers, null);
@@ -128,6 +112,40 @@ public TLSContext(String keystore, String keypass, String truststore, String tru
}
}
/**
* Instantiates a new TLS context.
*
* @param truststore
* the filename of the trust store that is to be used for the key store
* @param trustpass
* the password used in the trust store
*
* @throws KeyStoreNotFoundException
* the key store not found exception
* @throws KeyStoreReadException
* the key store read exception
* @throws KeyStoreException
* the key store exception
* @throws CertificateException
* the certificate exception
* @throws UnrecoverableKeyException
* the unrecoverable key exception
* @throws NoSuchAlgorithmException
* the no such algorithm exception
* @throws KeyManagementException
* the key management exception
*/
public TLSContext(String truststore, String trustpass) throws CertificateException,
UnrecoverableKeyException,
NoSuchAlgorithmException,
KeyStoreException,
KeyManagementException,
KeyStoreReadException,
KeyStoreNotFoundException {
this(null, null, truststore, trustpass, null, null);
}
public String getCertificateCommonName() {
return commonName;
}
@@ -185,6 +203,32 @@ public SSLSocket createSocket(String host, int port, int soTimeout) throws IOExc
return socket;
}
/**
* Creates a Https connection to the specified URL connection.
*
* @param url the URL to establish a HTTPS connection to
* @param connectionTimeout connection timeout value to be used in milliseconds
* @return HTTPS URL connection
* @throws IOException in case of a malformed URL or an IO exception occurring while trying to open a connection
*/
public HttpsURLConnection createHttpsUrlConnection(String url, Integer connectionTimeout) throws IOException {
HttpsURLConnection.setDefaultHostnameVerifier(
new javax.net.ssl.HostnameVerifier(){
public boolean verify(String hostname,
javax.net.ssl.SSLSession sslSession) {
if (hostname.equals("localhost")) {
return true;
}
return false;
}
});
HttpsURLConnection urlConnection = (HttpsURLConnection) (new URL(url)).openConnection();
urlConnection.setSSLSocketFactory(ctx.getSocketFactory());
urlConnection.setConnectTimeout(connectionTimeout);
return urlConnection;
}
private KeyManager[] loadKeyManagers(String filename, String password, String type, String algorithm)
throws CertificateException, CertificateExpiredException, CertificateNotYetValidException,
KeyManagementException, KeyStoreException, KeyStoreNotFoundException, KeyStoreReadException,
@@ -314,4 +358,6 @@ private KeyStore loadKeystore(String filename, char[] passphrase, String type) t
return store;
}
}
Oops, something went wrong.

0 comments on commit 1c12807

Please sign in to comment.