[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...

Gavin King gavin.king at jboss.com
Fri May 18 21:36:52 EDT 2007


  User: gavin   
  Date: 07/05/18 21:36:52

  Modified:    src/main/org/jboss/seam/contexts 
                        BusinessProcessContext.java
  Log:
  ws
  
  Revision  Changes    Path
  1.35      +13 -7     jboss-seam/src/main/org/jboss/seam/contexts/BusinessProcessContext.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: BusinessProcessContext.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/BusinessProcessContext.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -b -r1.34 -r1.35
  --- BusinessProcessContext.java	21 Feb 2007 16:58:41 -0000	1.34
  +++ BusinessProcessContext.java	19 May 2007 01:36:52 -0000	1.35
  @@ -27,7 +27,7 @@
    * @author <a href="mailto:theute at jboss.org">Thomas Heute</a>
    * @author <a href="mailto:steve at hibernate.org">Steve Ebersole</a>
    * @author Gavin King
  - * @version $Revision: 1.34 $
  + * @version $Revision: 1.35 $
    */
   public class BusinessProcessContext implements Context {
   
  @@ -43,7 +43,8 @@
   
      public BusinessProcessContext() {}
      
  -   public Object get(String name) {
  +   public Object get(String name) 
  +   {
         
         Object result = additions.get(name);
         if (result!=null) return result;
  @@ -62,7 +63,8 @@
         
      }
   
  -   public void set(String name, Object value) {
  +   public void set(String name, Object value) 
  +   {
         if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preSetVariable." + name);
         if (value==null)
         {
  @@ -77,25 +79,29 @@
         if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postSetVariable." + name);
      }
   
  -   public boolean isSet(String name) {
  +   public boolean isSet(String name) 
  +   {
         return get(name)!=null;
      }
      
  -   public void remove(String name) {
  +   public void remove(String name) 
  +   {
         if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.preRemoveVariable." + name);
         additions.remove(name);
         removals.add(name);
         if ( Events.exists() ) Events.instance().raiseEvent("org.jboss.seam.postRemoveVariable." + name);
      }
   
  -   public String[] getNames() {
  +   public String[] getNames() 
  +   {
         Set<String> results = getNamesFromContext();
         results.removeAll(removals);
         results.addAll( additions.keySet() ); //after, to override
         return results.toArray(new String[]{});
      }
   
  -   private Set<String> getNamesFromContext() {
  +   private Set<String> getNamesFromContext() 
  +   {
         //TODO: note that this is called from Contexts.destroy(), 
         //      after the Seam-managed txn was committed, but 
         //      this implementation requires a hit to the database!
  
  
  



More information about the jboss-cvs-commits mailing list