From 5f4a56cd0e649f228ab3cc0cc700da610c0b1ac8 Mon Sep 17 00:00:00 2001 From: Brian Long Date: Sat, 1 Oct 2022 00:51:28 -0400 Subject: [PATCH] documentation update; dual classifier build; maven central ready --- .gitignore | 3 + pom-release.xml | 156 ++++++++++++++++++ pom.xml | 60 ++++--- .../inteligr8/rs/ClientCxfConfiguration.java | 14 ++ .../cxf/com/inteligr8/rs/ClientCxfImpl.java | 23 ++- .../com/inteligr8/rs/CxfLoggingFilter.java | 22 +++ .../inteligr8/rs/CxfMultipartProvider.java | 24 ++- .../com/inteligr8/rs/AuthorizationFilter.java | 14 ++ .../rs/BasicAuthorizationFilter.java | 14 ++ .../rs/BearerTokenAuthorizationFilter.java | 14 ++ src/main/java/com/inteligr8/rs/Client.java | 26 ++- .../com/inteligr8/rs/ClientConfiguration.java | 14 ++ .../ClientEnforcementAuthorizationFilter.java | 14 ++ .../rs/ForwardingAuthorizationFilter.java | 14 ++ .../java/com/inteligr8/rs/LoggingFilter.java | 21 +++ ...hAuthorizationCodeAuthorizationFilter.java | 14 ++ .../rs/OAuthAuthorizationFilter.java | 14 ++ ...thClientCredentialAuthorizationFilter.java | 14 ++ ...OAuthPasswordGrantAuthorizationFilter.java | 14 ++ .../rs/ClientJerseyConfiguration.java | 14 ++ .../com/inteligr8/rs/ClientJerseyImpl.java | 23 ++- 21 files changed, 501 insertions(+), 25 deletions(-) create mode 100644 pom-release.xml diff --git a/.gitignore b/.gitignore index 47da827..2242b81 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,9 @@ target pom.xml.versionsBackup +# Maven Invoker +build.log + # Eclipse .project .classpath diff --git a/pom-release.xml b/pom-release.xml new file mode 100644 index 0000000..9877eec --- /dev/null +++ b/pom-release.xml @@ -0,0 +1,156 @@ + + + 4.0.0 + + com.inteligr8 + common-rest-client + 2.0-SNAPSHOT + pom + + ReST API Client for Java + A common library for building REST API clients that support both the CXF and Jersey frameworks + https://bitbucket.org/inteligr8/common-rest-client + + + + GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007 + https://www.gnu.org/licenses/lgpl-3.0.txt + + + + + scm:git:https://bitbucket.org/inteligr8/common-rest-client.git + scm:git:git@bitbucket.org:inteligr8/common-rest-client.git + https://bitbucket.org/inteligr8/common-rest-client + + + Inteligr8 + https://www.inteligr8.com + + + + brian.long + Brian Long + brian@inteligr8.com + https://twitter.com/brianmlong + + + + + UTF-8 + + + + + + maven-invoker-plugin + 3.3.0 + + package + pom.xml + true + + + + cxf + package + run + + + cxf + + + + + jersey + package + run + + + jersey + + + + + common + package + run + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.3.0 + + + attach-artifacts + package + attach-artifact + + + + ${project.build.directory}/${project.artifactId}-${project.version}.jar + jar + + + ${project.build.directory}/${project.artifactId}-${project.version}-javadoc.jar + javadoc + jar + + + ${project.build.directory}/${project.artifactId}-${project.version}-sources.jar + sources + jar + + + ${project.build.directory}/${project.artifactId}-${project.version}-cxf.jar + cxf + jar + + + ${project.build.directory}/${project.artifactId}-${project.version}-jersey.jar + jersey + jar + + + + + + + + + + + + ossrh-release + + + + maven-gpg-plugin + + + sign + verify + sign + + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.13 + true + + ossrh + https://s01.oss.sonatype.org/ + true + + + + + + + diff --git a/pom.xml b/pom.xml index 3d0ceec..40014f2 100644 --- a/pom.xml +++ b/pom.xml @@ -1,11 +1,42 @@ + 4.0.0 + com.inteligr8 common-rest-client 2.0-SNAPSHOT + jar + ReST API Client for Java + A common library for building REST API clients that support both the CXF and Jersey frameworks + https://bitbucket.org/inteligr8/common-rest-client + + + + GNU GENERAL PUBLIC LICENSE, Version 3, 29 June 2007 + https://www.gnu.org/licenses/lgpl-3.0.txt + + + + + scm:git:https://bitbucket.org/inteligr8/common-rest-client.git + scm:git:git@bitbucket.org:inteligr8/common-rest-client.git + https://bitbucket.org/inteligr8/common-rest-client + + + Inteligr8 + https://www.inteligr8.com + + + + brian.long + Brian Long + brian@inteligr8.com + https://twitter.com/brianmlong + + utf-8 @@ -124,6 +155,16 @@ + + maven-source-plugin + + + source + package + jar-no-fork + + + maven-javadoc-plugin @@ -144,7 +185,6 @@ jaxrs-jersey - true jaxrs.impl jersey @@ -203,22 +243,4 @@ - - - - inteligr8-public - https://repos.inteligr8.com/nexus/repository/inteligr8-public - - - - - - inteligr8-releases - https://repos.inteligr8.com/nexus/repository/inteligr8-public - - - inteligr8-snapshots - https://repos.inteligr8.com/nexus/repository/inteligr8-snapshots - - diff --git a/src/main/cxf/com/inteligr8/rs/ClientCxfConfiguration.java b/src/main/cxf/com/inteligr8/rs/ClientCxfConfiguration.java index 3ade952..b354593 100644 --- a/src/main/cxf/com/inteligr8/rs/ClientCxfConfiguration.java +++ b/src/main/cxf/com/inteligr8/rs/ClientCxfConfiguration.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; /** diff --git a/src/main/cxf/com/inteligr8/rs/ClientCxfImpl.java b/src/main/cxf/com/inteligr8/rs/ClientCxfImpl.java index 35829cd..ae8583b 100644 --- a/src/main/cxf/com/inteligr8/rs/ClientCxfImpl.java +++ b/src/main/cxf/com/inteligr8/rs/ClientCxfImpl.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import java.util.LinkedList; @@ -31,7 +45,8 @@ public class ClientCxfImpl extends Client { private ClientCxfConfiguration config; /** - * This constructor is for Spring or POJO use + * This constructor is for Spring or POJO use. + * @param config The client configuration. */ @Autowired public ClientCxfImpl(ClientCxfConfiguration config) { @@ -97,10 +112,16 @@ public class ClientCxfImpl extends Client { return client; } + /** + * @param providersAndFilters A list of JAX-RS and CXF providers. + */ public void addProvidersAndFilters(List providersAndFilters) { // for extension purposes } + /** + * @return The client configuration. + */ public ClientCxfConfiguration getConfig() { return this.config; } diff --git a/src/main/cxf/com/inteligr8/rs/CxfLoggingFilter.java b/src/main/cxf/com/inteligr8/rs/CxfLoggingFilter.java index 317932a..75c3c31 100644 --- a/src/main/cxf/com/inteligr8/rs/CxfLoggingFilter.java +++ b/src/main/cxf/com/inteligr8/rs/CxfLoggingFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import java.io.IOException; @@ -11,6 +25,14 @@ import org.apache.cxf.jaxrs.ext.multipart.Attachment; import org.apache.cxf.jaxrs.ext.multipart.MultipartBody; import org.slf4j.Logger; +/** + * This is a CXF specific handling of the logging of multipart requests, which + * would otherwise be ignored by the base LoggingFilter. It is meant to be + * used for debugging purposes. When used, it will write to 'jaxrs.request' and + * 'jaxrs.response' loggers at the 'trace' level. + * + * @author brian@inteligr8.com + */ public class CxfLoggingFilter extends LoggingFilter { @Override diff --git a/src/main/cxf/com/inteligr8/rs/CxfMultipartProvider.java b/src/main/cxf/com/inteligr8/rs/CxfMultipartProvider.java index dfedcfc..c79f53b 100644 --- a/src/main/cxf/com/inteligr8/rs/CxfMultipartProvider.java +++ b/src/main/cxf/com/inteligr8/rs/CxfMultipartProvider.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import java.lang.annotation.Annotation; @@ -11,6 +25,12 @@ import javax.ws.rs.ext.Provider; import org.apache.cxf.jaxrs.ext.multipart.MultipartBody; import org.apache.cxf.jaxrs.provider.MultipartProvider; +/** + * This implements a JAX-RS provider that adds support for the handling of CXF + * MultipartBody. + * + * @author brian@inteligr8.com + */ @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.MULTIPART_FORM_DATA) @Provider @@ -18,12 +38,12 @@ public class CxfMultipartProvider extends MultipartProvider { @Override public boolean isReadable(Class type, Type genericType, Annotation[] annotations, MediaType mediaType) { - return MultipartBody.class.isAssignableFrom(type) || this.isReadable(type, genericType, annotations, mediaType); + return MultipartBody.class.isAssignableFrom(type) || super.isReadable(type, genericType, annotations, mediaType); } @Override public boolean isWriteable(Class type, Type genericType, Annotation[] annotations, MediaType mediaType) { - return MultipartBody.class.isAssignableFrom(type) || this.isWriteable(type, genericType, annotations, mediaType); + return MultipartBody.class.isAssignableFrom(type) || super.isWriteable(type, genericType, annotations, mediaType); } } diff --git a/src/main/java/com/inteligr8/rs/AuthorizationFilter.java b/src/main/java/com/inteligr8/rs/AuthorizationFilter.java index 07f5c90..7ed3390 100755 --- a/src/main/java/com/inteligr8/rs/AuthorizationFilter.java +++ b/src/main/java/com/inteligr8/rs/AuthorizationFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import javax.ws.rs.client.ClientRequestFilter; diff --git a/src/main/java/com/inteligr8/rs/BasicAuthorizationFilter.java b/src/main/java/com/inteligr8/rs/BasicAuthorizationFilter.java index 8a6fcab..f951186 100755 --- a/src/main/java/com/inteligr8/rs/BasicAuthorizationFilter.java +++ b/src/main/java/com/inteligr8/rs/BasicAuthorizationFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import java.io.UnsupportedEncodingException; diff --git a/src/main/java/com/inteligr8/rs/BearerTokenAuthorizationFilter.java b/src/main/java/com/inteligr8/rs/BearerTokenAuthorizationFilter.java index 4b7b475..bfe16b4 100755 --- a/src/main/java/com/inteligr8/rs/BearerTokenAuthorizationFilter.java +++ b/src/main/java/com/inteligr8/rs/BearerTokenAuthorizationFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import javax.ws.rs.client.ClientRequestContext; diff --git a/src/main/java/com/inteligr8/rs/Client.java b/src/main/java/com/inteligr8/rs/Client.java index 74fe201..a15e664 100644 --- a/src/main/java/com/inteligr8/rs/Client.java +++ b/src/main/java/com/inteligr8/rs/Client.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import javax.ws.rs.client.ClientBuilder; @@ -18,6 +32,9 @@ public abstract class Client { private final Object sync = new Object(); private javax.ws.rs.client.Client client; + /** + * @return The client configuration. + */ public abstract ClientConfiguration getConfig(); /** @@ -69,6 +86,9 @@ public abstract class Client { return clientBuilder.build(); } + /** + * @param clientBuilder A client builder + */ public void buildClient(ClientBuilder clientBuilder) { // for extension purposes } @@ -97,7 +117,8 @@ public abstract class Client { /** * This method retrieves a JAX-RS implementation of the specified API. * - * @param apiClass A JAX-RS annotation API class. + * @param A JAX-RS annotated API class. + * @param apiClass A JAX-RS annotated API class. * @return An instance of the API class. */ public final T getApi(Class apiClass) { @@ -108,8 +129,9 @@ public abstract class Client { * This method retrieves a JAX-RS implementation of the specified API with * the specified authorization. * + * @param A JAX-RS annotated API class. * @param authFilter A dynamic authorization filter. - * @param apiClass A JAX-RS annotation API class. + * @param apiClass A JAX-RS annotated API class. * @return An instance of the API class. */ public abstract T getApi(AuthorizationFilter authFilter, Class apiClass); diff --git a/src/main/java/com/inteligr8/rs/ClientConfiguration.java b/src/main/java/com/inteligr8/rs/ClientConfiguration.java index 37f4e21..1bc48fe 100644 --- a/src/main/java/com/inteligr8/rs/ClientConfiguration.java +++ b/src/main/java/com/inteligr8/rs/ClientConfiguration.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import java.net.URI; diff --git a/src/main/java/com/inteligr8/rs/ClientEnforcementAuthorizationFilter.java b/src/main/java/com/inteligr8/rs/ClientEnforcementAuthorizationFilter.java index 3a71025..c7842a1 100644 --- a/src/main/java/com/inteligr8/rs/ClientEnforcementAuthorizationFilter.java +++ b/src/main/java/com/inteligr8/rs/ClientEnforcementAuthorizationFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import javax.ws.rs.client.ClientRequestContext; diff --git a/src/main/java/com/inteligr8/rs/ForwardingAuthorizationFilter.java b/src/main/java/com/inteligr8/rs/ForwardingAuthorizationFilter.java index b5d9143..731dcee 100755 --- a/src/main/java/com/inteligr8/rs/ForwardingAuthorizationFilter.java +++ b/src/main/java/com/inteligr8/rs/ForwardingAuthorizationFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import javax.ws.rs.client.ClientRequestContext; diff --git a/src/main/java/com/inteligr8/rs/LoggingFilter.java b/src/main/java/com/inteligr8/rs/LoggingFilter.java index 3338631..3fedd1c 100644 --- a/src/main/java/com/inteligr8/rs/LoggingFilter.java +++ b/src/main/java/com/inteligr8/rs/LoggingFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import java.io.IOException; @@ -15,6 +29,13 @@ import org.slf4j.LoggerFactory; import com.fasterxml.jackson.annotation.JsonInclude.Include; import com.fasterxml.jackson.databind.ObjectMapper; +/** + * This is an JAX-RS filter for the logging of any JAX-RS request/response for + * debugging purposes. When used, it will write to 'jaxrs.request' and + * 'jaxrs.response' loggers at the 'trace' level. + * + * @author brian@inteligr8.com + */ public class LoggingFilter implements ClientRequestFilter, ClientResponseFilter { private final Logger loggerRequest = LoggerFactory.getLogger("jaxrs.request"); diff --git a/src/main/java/com/inteligr8/rs/OAuthAuthorizationCodeAuthorizationFilter.java b/src/main/java/com/inteligr8/rs/OAuthAuthorizationCodeAuthorizationFilter.java index 869a5be..128cefe 100755 --- a/src/main/java/com/inteligr8/rs/OAuthAuthorizationCodeAuthorizationFilter.java +++ b/src/main/java/com/inteligr8/rs/OAuthAuthorizationCodeAuthorizationFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import java.net.URI; diff --git a/src/main/java/com/inteligr8/rs/OAuthAuthorizationFilter.java b/src/main/java/com/inteligr8/rs/OAuthAuthorizationFilter.java index 328b49e..be2d42b 100755 --- a/src/main/java/com/inteligr8/rs/OAuthAuthorizationFilter.java +++ b/src/main/java/com/inteligr8/rs/OAuthAuthorizationFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import java.util.Map; diff --git a/src/main/java/com/inteligr8/rs/OAuthClientCredentialAuthorizationFilter.java b/src/main/java/com/inteligr8/rs/OAuthClientCredentialAuthorizationFilter.java index c75d4a3..79e63da 100755 --- a/src/main/java/com/inteligr8/rs/OAuthClientCredentialAuthorizationFilter.java +++ b/src/main/java/com/inteligr8/rs/OAuthClientCredentialAuthorizationFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import javax.ws.rs.core.Form; diff --git a/src/main/java/com/inteligr8/rs/OAuthPasswordGrantAuthorizationFilter.java b/src/main/java/com/inteligr8/rs/OAuthPasswordGrantAuthorizationFilter.java index 1d95996..2037127 100755 --- a/src/main/java/com/inteligr8/rs/OAuthPasswordGrantAuthorizationFilter.java +++ b/src/main/java/com/inteligr8/rs/OAuthPasswordGrantAuthorizationFilter.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import javax.ws.rs.core.Form; diff --git a/src/main/jersey/com/inteligr8/rs/ClientJerseyConfiguration.java b/src/main/jersey/com/inteligr8/rs/ClientJerseyConfiguration.java index c4cfa51..ffdff70 100644 --- a/src/main/jersey/com/inteligr8/rs/ClientJerseyConfiguration.java +++ b/src/main/jersey/com/inteligr8/rs/ClientJerseyConfiguration.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; /** diff --git a/src/main/jersey/com/inteligr8/rs/ClientJerseyImpl.java b/src/main/jersey/com/inteligr8/rs/ClientJerseyImpl.java index d693f90..98514c2 100644 --- a/src/main/jersey/com/inteligr8/rs/ClientJerseyImpl.java +++ b/src/main/jersey/com/inteligr8/rs/ClientJerseyImpl.java @@ -1,3 +1,17 @@ +/* + * This program is free software: you can redistribute it and/or modify it + * under the terms of the GNU Lesser General Public License as published by + * the Free Software Foundation, either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ package com.inteligr8.rs; import javax.annotation.PostConstruct; @@ -27,7 +41,8 @@ public class ClientJerseyImpl extends Client { private ClientJerseyConfiguration config; /** - * This constructor is for Spring or POJO use + * This constructor is for Spring or POJO use. + * @param config The client configuration. */ @Autowired public ClientJerseyImpl(ClientJerseyConfiguration config) { @@ -54,6 +69,9 @@ public class ClientJerseyImpl extends Client { this.logger.info("API Base URL: " + this.getConfig().getBaseUrl()); } + /** + * @param clientBuilder A client builder. + */ @Override public void buildClient(ClientBuilder clientBuilder) { clientBuilder.register(MultiPartFeature.class); @@ -64,6 +82,9 @@ public class ClientJerseyImpl extends Client { } } + /** + * @return The client configuration. + */ public ClientJerseyConfiguration getConfig() { return this.config; }