[jboss-cvs] JBossAS SVN: r87992 - projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Apr 29 07:37:25 EDT 2009


Author: emuckenhuber
Date: 2009-04-29 07:37:24 -0400 (Wed, 29 Apr 2009)
New Revision: 87992

Modified:
   projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileDeployment.java
Log:
add transient attachments 

Modified: projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileDeployment.java
===================================================================
--- projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileDeployment.java	2009-04-29 11:32:02 UTC (rev 87991)
+++ projects/integration/trunk/jboss-profileservice-spi/src/main/java/org/jboss/profileservice/spi/ProfileDeployment.java	2009-04-29 11:37:24 UTC (rev 87992)
@@ -67,6 +67,18 @@
    Object getAttachment(String name);
    
    /**
+    * Get attachment.
+    * 
+    * @param <T> the expected type
+    * @param name the name of the attachment
+    * @param expectedType the expected type
+    * @return the attachment or null if not present
+    * 
+    * @throws IllegalArgumentException for a null name
+    */
+   <T> T getAttachment(String name, Class<T> expectedType);
+   
+   /**
     * Add attachment
     *
     * @param name the name of the attachment
@@ -77,5 +89,58 @@
     */
    Object addAttachment(String name, Object attachment);
    
+   /**
+    * Remove attachment.
+    * 
+    * @param name the attachment name
+    * @return the attachment or null if not present
+    * 
+    * @throws IllegalArgumentException for a null name
+    */
+   Object removeAttachment(String name);
+   
+   /**
+    * Get transient attachment.
+    * 
+    * @param name the name of the attachment
+    * @return the attachment or null if not present
+    * 
+    * @throws IllegalArgumentException for a null name
+    */
+   Object getTransientAttachment(String name);
+   
+   /**
+    * Get transient attachment.
+    * 
+    * @param <T> the expected type
+    * @param name the name of the attachment
+    * @param expectedType the expected type
+    * @return the attachment or null if not present
+    * 
+    * @throws IllegalArgumentException for a null name
+    */
+   <T> T getTransientAttachment(String name, Class<T> expectedType);
+   
+   /**
+    * Add transient attachment
+    *
+    * @param name the name of the attachment
+    * @param attachment the attachment
+    * @return any previous attachment
+    * 
+    * @throws IllegalArgumentException for a null name or attachment
+    */
+   Object addTransientAttachment(String name, Object attachment);
+   
+   /**
+    * Remove transient attachment.
+    * 
+    * @param name the attachment name
+    * @return the attachment or null if not present
+    * 
+    * @throws IllegalArgumentException for a null name
+    */
+   Object removeTransientAttachment(String name);
+   
 }
 




More information about the jboss-cvs-commits mailing list