Loading pom.xml +44 −4 Original line number Diff line number Diff line Loading @@ -6,10 +6,10 @@ <groupId>com.inteligr8.alfresco</groupId> <artifactId>acs-public-rest-client</artifactId> <version>2.0-SNAPSHOT</version> <version>2.0-SNAPSHOT-jersey</version> <name>Alfresco Content Services ReST API Client for Java</name> <description>An ACS Client library for building REST API clients that support both the CXF and Jersey frameworks</description> <description>An ACS Client library for building Jersey-based REST API clients</description> <url>https://bitbucket.org/inteligr8/acs-public-rest-client</url> <licenses> Loading Loading @@ -43,17 +43,18 @@ <maven.compiler.target>8</maven.compiler.target> <maven.compiler.debuglevel>lines,vars,source</maven.compiler.debuglevel> <acs.platform.tag>acs62</acs.platform.tag> <acs.platform.tag>acs7</acs.platform.tag> <junit.version>5.7.2</junit.version> <spring.version>5.2.14.RELEASE</spring.version> <jersey.version>2.35</jersey.version> </properties> <dependencies> <dependency> <groupId>com.inteligr8</groupId> <artifactId>common-rest-client</artifactId> <version>2.0.1-cxf</version> <version>2.0.1-jersey</version> </dependency> <dependency> <groupId>com.inteligr8.alfresco</groupId> Loading Loading @@ -85,10 +86,49 @@ <version>2.17.2</version> <scope>test</scope> </dependency> <!-- Jersey libraries --> <dependency> <groupId>org.glassfish.jersey.inject</groupId> <artifactId>jersey-hk2</artifactId> <version>${jersey.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-json-jackson</artifactId> <version>${jersey.version}</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <id>add-jaxrs-src</id> <goals><goal>add-source</goal></goals> <configuration> <sources> <source>src/main/jersey</source> </sources> </configuration> </execution> <execution> <id>add-test-src</id> <goals><goal>add-test-source</goal></goals> <configuration> <sources> <source>src/test/jersey</source> </sources> </configuration> </execution> </executions> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M5</version> Loading src/main/jersey/com/inteligr8/alfresco/acs/AcsClientJerseyConfiguration.java 0 → 100644 +46 −0 Original line number Diff line number Diff line /* * 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 <https://www.gnu.org/licenses/>. */ package com.inteligr8.alfresco.acs; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import com.inteligr8.rs.ClientJerseyConfiguration; /** * This class provides a POJO & Spring-based implementation of the * ClientJerseyConfiguration interface. You can use it outside of the Spring * context, but you will need the spring-context and spring-beans libraries in * your non-Spring application. * * @author brian@inteligr8.com */ @Configuration @ComponentScan public class AcsClientJerseyConfiguration extends AcsClientConfiguration implements ClientJerseyConfiguration { @Value("${content.service.jersey.putBodyRequired:true}") private boolean putBodyRequired; public boolean isPutBodyRequired() { return this.putBodyRequired; } public void setPutBodyRequired(boolean putBodyRequired) { this.putBodyRequired = putBodyRequired; } } src/main/jersey/com/inteligr8/alfresco/acs/AcsClientJerseyImpl.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * 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 <https://www.gnu.org/licenses/>. */ package com.inteligr8.alfresco.acs; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import com.inteligr8.rs.ClientJerseyImpl; /** * This class provides a POJO & Spring-based implementation of the Jersey * client configured for APS. You can use it outside of the Spring context, * but you will need the spring-context and spring-beans libraries in your * non-Spring application. * * @author brian@inteligr8.com */ @Component("acs.client.jersey") @Lazy public class AcsClientJerseyImpl extends ClientJerseyImpl { /** * This constructor is for Spring and POJO use */ @Autowired public AcsClientJerseyImpl(AcsClientJerseyConfiguration config) { super(config); } } src/main/jersey/com/inteligr8/alfresco/acs/AcsPublicRestApiJerseyImpl.java 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * 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 <https://www.gnu.org/licenses/>. */ package com.inteligr8.alfresco.acs; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; /** * This class provides the Jersey client to the JAX-RS API for the ACS Public * ReST API. * * @author brian@inteligr8.com */ @Component("acs.api.jersey") @Lazy public class AcsPublicRestApiJerseyImpl extends AcsPublicRestApiImpl implements AcsPublicRestJerseyApi { /** * This constructor is for Spring or POJO use */ @Autowired public AcsPublicRestApiJerseyImpl(AcsClientJerseyImpl client) { super(client); } } src/test/jersey/META-INF/services/javax.ws.rs.client.ClientBuilder 0 → 100644 +1 −0 Original line number Diff line number Diff line org.glassfish.jersey.client.JerseyClientBuilder No newline at end of file Loading
pom.xml +44 −4 Original line number Diff line number Diff line Loading @@ -6,10 +6,10 @@ <groupId>com.inteligr8.alfresco</groupId> <artifactId>acs-public-rest-client</artifactId> <version>2.0-SNAPSHOT</version> <version>2.0-SNAPSHOT-jersey</version> <name>Alfresco Content Services ReST API Client for Java</name> <description>An ACS Client library for building REST API clients that support both the CXF and Jersey frameworks</description> <description>An ACS Client library for building Jersey-based REST API clients</description> <url>https://bitbucket.org/inteligr8/acs-public-rest-client</url> <licenses> Loading Loading @@ -43,17 +43,18 @@ <maven.compiler.target>8</maven.compiler.target> <maven.compiler.debuglevel>lines,vars,source</maven.compiler.debuglevel> <acs.platform.tag>acs62</acs.platform.tag> <acs.platform.tag>acs7</acs.platform.tag> <junit.version>5.7.2</junit.version> <spring.version>5.2.14.RELEASE</spring.version> <jersey.version>2.35</jersey.version> </properties> <dependencies> <dependency> <groupId>com.inteligr8</groupId> <artifactId>common-rest-client</artifactId> <version>2.0.1-cxf</version> <version>2.0.1-jersey</version> </dependency> <dependency> <groupId>com.inteligr8.alfresco</groupId> Loading Loading @@ -85,10 +86,49 @@ <version>2.17.2</version> <scope>test</scope> </dependency> <!-- Jersey libraries --> <dependency> <groupId>org.glassfish.jersey.inject</groupId> <artifactId>jersey-hk2</artifactId> <version>${jersey.version}</version> <scope>test</scope> </dependency> <dependency> <groupId>org.glassfish.jersey.media</groupId> <artifactId>jersey-media-json-jackson</artifactId> <version>${jersey.version}</version> <scope>test</scope> </dependency> </dependencies> <build> <plugins> <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <version>3.2.0</version> <executions> <execution> <id>add-jaxrs-src</id> <goals><goal>add-source</goal></goals> <configuration> <sources> <source>src/main/jersey</source> </sources> </configuration> </execution> <execution> <id>add-test-src</id> <goals><goal>add-test-source</goal></goals> <configuration> <sources> <source>src/test/jersey</source> </sources> </configuration> </execution> </executions> </plugin> <plugin> <artifactId>maven-surefire-plugin</artifactId> <version>3.0.0-M5</version> Loading
src/main/jersey/com/inteligr8/alfresco/acs/AcsClientJerseyConfiguration.java 0 → 100644 +46 −0 Original line number Diff line number Diff line /* * 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 <https://www.gnu.org/licenses/>. */ package com.inteligr8.alfresco.acs; import org.springframework.beans.factory.annotation.Value; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; import com.inteligr8.rs.ClientJerseyConfiguration; /** * This class provides a POJO & Spring-based implementation of the * ClientJerseyConfiguration interface. You can use it outside of the Spring * context, but you will need the spring-context and spring-beans libraries in * your non-Spring application. * * @author brian@inteligr8.com */ @Configuration @ComponentScan public class AcsClientJerseyConfiguration extends AcsClientConfiguration implements ClientJerseyConfiguration { @Value("${content.service.jersey.putBodyRequired:true}") private boolean putBodyRequired; public boolean isPutBodyRequired() { return this.putBodyRequired; } public void setPutBodyRequired(boolean putBodyRequired) { this.putBodyRequired = putBodyRequired; } }
src/main/jersey/com/inteligr8/alfresco/acs/AcsClientJerseyImpl.java 0 → 100644 +43 −0 Original line number Diff line number Diff line /* * 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 <https://www.gnu.org/licenses/>. */ package com.inteligr8.alfresco.acs; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; import com.inteligr8.rs.ClientJerseyImpl; /** * This class provides a POJO & Spring-based implementation of the Jersey * client configured for APS. You can use it outside of the Spring context, * but you will need the spring-context and spring-beans libraries in your * non-Spring application. * * @author brian@inteligr8.com */ @Component("acs.client.jersey") @Lazy public class AcsClientJerseyImpl extends ClientJerseyImpl { /** * This constructor is for Spring and POJO use */ @Autowired public AcsClientJerseyImpl(AcsClientJerseyConfiguration config) { super(config); } }
src/main/jersey/com/inteligr8/alfresco/acs/AcsPublicRestApiJerseyImpl.java 0 → 100644 +39 −0 Original line number Diff line number Diff line /* * 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 <https://www.gnu.org/licenses/>. */ package com.inteligr8.alfresco.acs; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Component; /** * This class provides the Jersey client to the JAX-RS API for the ACS Public * ReST API. * * @author brian@inteligr8.com */ @Component("acs.api.jersey") @Lazy public class AcsPublicRestApiJerseyImpl extends AcsPublicRestApiImpl implements AcsPublicRestJerseyApi { /** * This constructor is for Spring or POJO use */ @Autowired public AcsPublicRestApiJerseyImpl(AcsClientJerseyImpl client) { super(client); } }
src/test/jersey/META-INF/services/javax.ws.rs.client.ClientBuilder 0 → 100644 +1 −0 Original line number Diff line number Diff line org.glassfish.jersey.client.JerseyClientBuilder No newline at end of file