[utilities COMMIT] in /spring-extensions/trunk: pom.xml src/main/java/net/shibboleth/ext/spring/resource/ResourceHelp...
noreply at shibboleth.net
noreply at shibboleth.net
Thu Jan 16 07:11:31 EST 2014
Author: rdw
Date: Thu Jan 16 07:11:31 2014
New Revision: 512
URL: http://svn.shibboleth.net/view/utilities?rev=512&view=rev
Log:
IDP-308 Resource refactoring
ShibbolethResource is renamed Resource and has one method name change to allow calsses to implement both it and Spring.io.Resource.
ShibbolethResourceHelper is renamed ResourceHelper
All vestiges of Resource implementation have been removed from Java-support.
Added:
spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ResourceHelper.java
- copied, changed from r507, spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ShibbolethResourceHelper.java
Modified:
spring-extensions/trunk/pom.xml
spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/SVNResource.java
spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ShibbolethResourceHelper.java
Modified: spring-extensions/trunk/pom.xml
URL: http://svn.shibboleth.net/view/utilities/spring-extensions/trunk/pom.xml?rev=512&r1=511&r2=512&view=diff
==============================================================================
--- spring-extensions/trunk/pom.xml (original)
+++ spring-extensions/trunk/pom.xml Thu Jan 16 07:11:31 2014
@@ -46,6 +46,18 @@
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>jsr305</artifactId>
+ </dependency>
+ <dependency>
+ <!-- Required if you're using anything in the httpclient package -->
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient</artifactId>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <!-- Required if you're using anything in the httpclient package -->
+ <groupId>org.apache.httpcomponents</groupId>
+ <artifactId>httpclient-cache</artifactId>
+ <optional>true</optional>
</dependency>
<dependency>
<groupId>edu.vt.middleware</groupId>
Copied: spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ResourceHelper.java (from r507, spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ShibbolethResourceHelper.java)
URL: http://svn.shibboleth.net/view/utilities/spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ResourceHelper.java?p2=spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ResourceHelper.java&p1=spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ShibbolethResourceHelper.java&r1=507&r2=512&rev=512&view=diff
==============================================================================
--- spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ShibbolethResourceHelper.java (original)
+++ spring-extensions/trunk/src/main/java/net/shibboleth/ext/spring/resource/ResourceHelper.java Thu Jan 16 07:11:31 2014
@@ -26,14 +26,13 @@
import javax.annotation.Nonnull;
import net.shibboleth.utilities.java.support.logic.Constraint;
-import net.shibboleth.utilities.java.support.resource.ShibbolethResource;
import org.springframework.core.io.Resource;
/**
- * Bridging class between {@link Resource} and {@link net.shibboleth.utilities.java.support.resource}.
+ * Bridging class between {@link Resource} and {@link net.shibboleth.utilities.java.support.resource.Resource}.
*/
-public final class ShibbolethResourceHelper implements ShibbolethResource {
+public final class ResourceHelper implements net.shibboleth.utilities.java.support.resource.Resource {
/** The cached Spring {@link Resource}. */
private Resource springResource;
@@ -43,84 +42,84 @@
*
* @param theResource the spring resource;
*/
- private ShibbolethResourceHelper(@Nonnull Resource theResource) {
+ private ResourceHelper(@Nonnull Resource theResource) {
springResource = Constraint.isNotNull(theResource, "provided Spring Resource should not be null");
}
/**
- * Return a {@link ShibbolethResource} that does all the work of the provided {@link Resource}<br/>
- * If the input implements {@link ShibbolethResource} then it is cast to the output, other a shim class is
- * generated.
+ * Return a {@link Resource} that does all the work of the provided {@link Resource}<br/>
+ * If the input implements {@link Resource} then it is cast to the output, other a shim class is generated.
*
* @param springResource the input
- * @return a {@link ShibbolethResource} which reflects what the Spring one does
+ * @return a {@link Resource} which reflects what the Spring one does
*/
- public static ShibbolethResource of(Resource springResource) {
- if (springResource instanceof ShibbolethResource) {
- return (ShibbolethResource) springResource;
+ public static net.shibboleth.utilities.java.support.resource.Resource of(Resource springResource) {
[... 111 lines stripped ...]
More information about the commits
mailing list