[spring-extensions] branch master updated: Add additional shortcut methods.

Scott Cantor cantor.2 at osu.edu
Mon Mar 20 13:01:12 EDT 2017


This is an automated email from the git hooks/post-receive script.

scantor pushed a commit to branch master
in repository spring-extensions.

View the commit online:
http://git.shibboleth.net/view/?p=spring-extensions.git;a=commit;h=1bcecae91dccf6e8ed5ddcdfc6b5419e328fdb78

The following commit(s) were added to refs/heads/master by this push:
       new  1bcecae   Add additional shortcut methods.
1bcecae is described below

commit 1bcecae91dccf6e8ed5ddcdfc6b5419e328fdb78
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Mar 20 13:01:10 2017 -0400

    Add additional shortcut methods.
---
 .../ext/spring/util/ApplicationContextBuilder.java | 45 ++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/src/main/java/net/shibboleth/ext/spring/util/ApplicationContextBuilder.java b/src/main/java/net/shibboleth/ext/spring/util/ApplicationContextBuilder.java
index fb964e0..3df801e 100644
--- a/src/main/java/net/shibboleth/ext/spring/util/ApplicationContextBuilder.java
+++ b/src/main/java/net/shibboleth/ext/spring/util/ApplicationContextBuilder.java
@@ -116,6 +116,19 @@ public class ApplicationContextBuilder {
     }
     
     /**
+     * Set a single configuration resource for this context.
+     * 
+     * @param config configuration for this context
+     * 
+     * @return this builder
+     */
+    @Nonnull public ApplicationContextBuilder setServiceConfiguration(@Nonnull final Resource config) {
+        configurationResources = Collections.singletonList(Constraint.isNotNull(config, "Resource cannot be null"));
+        
+        return this;
+    }
+    
+    /**
      * Set the list of configurations for this context.
      * 
      * @param configs list of configurations for this context
@@ -161,6 +174,23 @@ public class ApplicationContextBuilder {
         
         return this;
     }
+    
+    /**
+     * Set a single bean factory post processor for this context.
+     * 
+     * @param processor bean factory post processor to apply
+     * 
+     * @return this builder
+     */
+    @Nonnull public ApplicationContextBuilder setBeanFactoryPostProcessor(
+            @Nonnull final BeanFactoryPostProcessor processor) {
+        Constraint.isNotNull(processor, "BeanFactoryPostProcessor cannot be null");
+        
+        factoryPostProcessors = Collections.singletonList(processor);
+        
+        return this;
+    }
+
 
     /**
      * Set the list of bean factory post processors for this context.
@@ -175,6 +205,21 @@ public class ApplicationContextBuilder {
         
         return this;
     }
+    
+    /**
+     * Set a single bean post processor for this context.
+     * 
+     * @param processor bean post processor to apply
+     * 
+     * @return this builder
+     */
+    @Nonnull public ApplicationContextBuilder setBeanPostProcessor(@Nonnull final BeanPostProcessor processor) {
+        Constraint.isNotNull(processor, "BeanPostProcessor cannot be null");
+        
+        postProcessors = Collections.singletonList(processor);
+        
+        return this;
+    }
 
     /**
      * Set the list of bean post processors for this context.

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the commits mailing list