[java-opensaml] branch master updated: Extend ActionSupport class with a non-String Event option.

Scott Cantor cantor.2 at osu.edu
Mon Jul 1 11:23:57 EDT 2019


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

scantor pushed a commit to branch master
in repository java-opensaml.

View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=03567af4a51ac2f016f69f2eda454383767755ad

The following commit(s) were added to refs/heads/master by this push:
       new  03567af   Extend ActionSupport class with a non-String Event option.
03567af is described below

commit 03567af4a51ac2f016f69f2eda454383767755ad
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Mon Jul 1 11:22:14 2019 -0400

    Extend ActionSupport class with a non-String Event option.
---
 .../java/org/opensaml/profile/action/ActionSupport.java | 17 ++++++++++++++++-
 1 file changed, 16 insertions(+), 1 deletion(-)

diff --git a/opensaml-profile-api/src/main/java/org/opensaml/profile/action/ActionSupport.java b/opensaml-profile-api/src/main/java/org/opensaml/profile/action/ActionSupport.java
index 40df4c3..bb59680 100644
--- a/opensaml-profile-api/src/main/java/org/opensaml/profile/action/ActionSupport.java
+++ b/opensaml-profile-api/src/main/java/org/opensaml/profile/action/ActionSupport.java
@@ -43,7 +43,7 @@ public final class ActionSupport {
     }
 
     /**
-     * Builds an event with a given ID but no related attributes.
+     * Builds an event with a given ID.
      * 
      * @param profileRequestContext the context to carry the event
      * @param eventId the ID of the event
@@ -59,4 +59,19 @@ public final class ActionSupport {
         profileRequestContext.getSubcontext(EventContext.class, true).setEvent(trimmedEventId);
     }
     
+    /**
+     * Builds an event from the given object.
+     * 
+     * @param profileRequestContext the context to carry the event
+     * @param event the event
+     */
+    public static void buildEvent(@Nonnull final ProfileRequestContext<?,?> profileRequestContext,
+            @Nonnull final Object event) {
+        
+        Constraint.isNotNull(profileRequestContext, "Profile request context cannot be null");
+        Constraint.isNotNull(event, "Event cannot be null");
+        
+        profileRequestContext.getSubcontext(EventContext.class, true).setEvent(event);
+    }
+
 }
\ No newline at end of file

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


More information about the commits mailing list