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

Gavin King gavin.king at jboss.com
Wed Jul 18 10:37:29 EDT 2007


  User: gavin   
  Date: 07/07/18 10:37:29

  Modified:    src/main/org/jboss/seam/core    Contexts.java Init.java
                        package-info.java
  Log:
  global imports JBSEAM-1693
  
  Revision  Changes    Path
  1.2       +8 -0      jboss-seam/src/main/org/jboss/seam/core/Contexts.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Contexts.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Contexts.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- Contexts.java	20 Jun 2007 20:24:08 -0000	1.1
  +++ Contexts.java	18 Jul 2007 14:37:29 -0000	1.2
  @@ -9,6 +9,7 @@
   import static org.jboss.seam.annotations.Install.BUILT_IN;
   
   import org.jboss.seam.ScopeType;
  +import org.jboss.seam.annotations.Factory;
   import org.jboss.seam.annotations.Install;
   import org.jboss.seam.annotations.Name;
   import org.jboss.seam.annotations.Scope;
  @@ -27,36 +28,43 @@
   public class Contexts 
   {
   
  +   @Factory("org.jboss.seam.core.eventContext")
      public Context getEventContext() 
      {
         return org.jboss.seam.contexts.Contexts.getEventContext();
      }
   
  +   @Factory("org.jboss.seam.core.methodContext")
      public Context getMethodContext() 
      {
         return org.jboss.seam.contexts.Contexts.getMethodContext();
      }
   
  +   @Factory("org.jboss.seam.core.pageContext")
      public Context getPageContext() 
      {
         return org.jboss.seam.contexts.Contexts.getPageContext();
      }
   
  +   @Factory("org.jboss.seam.core.sessionContext")
      public Context getSessionContext() 
      {
         return org.jboss.seam.contexts.Contexts.getSessionContext();
      }
   
  +   @Factory("org.jboss.seam.core.applicationContext")
      public Context getApplicationContext() 
      {
         return org.jboss.seam.contexts.Contexts.getApplicationContext();
      }
   
  +   @Factory("org.jboss.seam.core.conversationContext")
      public Context getConversationContext() 
      {
         return org.jboss.seam.contexts.Contexts.getConversationContext();
      }
   
  +   @Factory("org.jboss.seam.core.businessProcessContext")
      public Context getBusinessProcessContext() 
      {
         return org.jboss.seam.contexts.Contexts.getBusinessProcessContext();
  
  
  
  1.51      +22 -1     jboss-seam/src/main/org/jboss/seam/core/Init.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Init.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/Init.java,v
  retrieving revision 1.50
  retrieving revision 1.51
  diff -u -b -r1.50 -r1.51
  --- Init.java	20 Jun 2007 17:45:55 -0000	1.50
  +++ Init.java	18 Jul 2007 14:37:29 -0000	1.51
  @@ -1,4 +1,4 @@
  -//$Id: Init.java,v 1.50 2007/06/20 17:45:55 gavin Exp $
  +//$Id: Init.java,v 1.51 2007/07/18 14:37:29 gavin Exp $
   package org.jboss.seam.core;
   
   
  @@ -7,11 +7,13 @@
   import java.io.File;
   import java.lang.reflect.Method;
   import java.util.ArrayList;
  +import java.util.Collection;
   import java.util.HashMap;
   import java.util.HashSet;
   import java.util.List;
   import java.util.Map;
   import java.util.Set;
  +import java.util.StringTokenizer;
   
   import org.jboss.seam.Component;
   import org.jboss.seam.Namespace;
  @@ -40,6 +42,8 @@
      
      private Namespace rootNamespace = new Namespace(null);
      
  +   private Collection<Namespace> globalImports = new ArrayList<Namespace>();
  +   
      //private boolean isClientSideConversations = false;
      private boolean jbpmInstalled;
      private String jndiPattern;
  @@ -364,6 +368,18 @@
         return rootNamespace;
      }
   
  +   public void importNamespace(String namespaceName)
  +   {
  +      Namespace namespace = getRootNamespace();
  +      StringTokenizer tokens = new StringTokenizer(namespaceName, ".");
  +      while ( tokens.hasMoreTokens() )
  +      {
  +         String key = tokens.nextToken();
  +         namespace = namespace.getOrCreateChild(key);
  +      }
  +      globalImports.add(namespace);
  +   }
  +
      public void addInstalledFilter(String name)
      {
         installedFilters.add(name);
  @@ -443,4 +459,9 @@
      {
         this.transactionManagementEnabled = transactionManagementEnabled;
      }
  +
  +   public Collection<Namespace> getGlobalImports()
  +   {
  +      return globalImports;
  +   }
   }
  
  
  
  1.4       +2 -0      jboss-seam/src/main/org/jboss/seam/core/package-info.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: package-info.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/core/package-info.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -b -r1.3 -r1.4
  --- package-info.java	22 Jun 2007 09:18:40 -0000	1.3
  +++ package-info.java	18 Jul 2007 14:37:29 -0000	1.4
  @@ -3,6 +3,8 @@
    * This is where the magic happens.
    */
   @Namespace(value="http://jboss.com/products/seam/core", prefix="org.jboss.seam.core")
  + at AutoCreate
   package org.jboss.seam.core;
   
  +import org.jboss.seam.annotations.AutoCreate;
   import org.jboss.seam.annotations.Namespace;
  
  
  



More information about the jboss-cvs-commits mailing list