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

Gavin King gavin.king at jboss.com
Tue May 1 12:43:53 EDT 2007


  User: gavin   
  Date: 07/05/01 12:43:53

  Modified:    src/main/org/jboss/seam/security  Identity.java
  Log:
  migrate to unified EL everywhere
  
  Revision  Changes    Path
  1.77      +7 -10     jboss-seam/src/main/org/jboss/seam/security/Identity.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Identity.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/security/Identity.java,v
  retrieving revision 1.76
  retrieving revision 1.77
  diff -u -b -r1.76 -r1.77
  --- Identity.java	10 Apr 2007 01:43:49 -0000	1.76
  +++ Identity.java	1 May 2007 16:43:53 -0000	1.77
  @@ -14,7 +14,6 @@
   
   import javax.faces.application.FacesMessage;
   import javax.faces.application.FacesMessage.Severity;
  -import javax.faces.context.FacesContext;
   import javax.security.auth.Subject;
   import javax.security.auth.callback.Callback;
   import javax.security.auth.callback.CallbackHandler;
  @@ -37,13 +36,13 @@
   import org.jboss.seam.annotations.security.Restrict;
   import org.jboss.seam.contexts.Contexts;
   import org.jboss.seam.core.Events;
  +import org.jboss.seam.core.Expressions;
   import org.jboss.seam.core.FacesMessages;
   import org.jboss.seam.core.Selector;
  -import org.jboss.seam.core.Expressions.MethodBinding;
  +import org.jboss.seam.core.Expressions.MethodExpression;
   import org.jboss.seam.log.LogProvider;
   import org.jboss.seam.log.Logging;
   import org.jboss.seam.util.Strings;
  -import org.jboss.seam.util.UnifiedELValueBinding;
   
   @Name("org.jboss.seam.security.identity")
   @Scope(SESSION)
  @@ -61,7 +60,7 @@
      private String username;
      private String password;
      
  -   private MethodBinding authenticateMethod;
  +   private MethodExpression authenticateMethod;
   
      private Principal principal;   
      private Subject subject;
  @@ -503,10 +502,8 @@
       */
      protected boolean evaluateExpression(String expr) 
      {    
  -      // The following line doesn't work because of a bug in MyFaces      
  -      //return (Boolean) Expressions.instance().createValueBinding(expr).getValue();
  -
  -      return (Boolean) new UnifiedELValueBinding(expr).getValue( FacesContext.getCurrentInstance() );
  +      // The following line doesn't work in MyFaces      
  +      return Expressions.instance().createValueExpression(expr, Boolean.class).getValue();
      }   
      
      public String getUsername()
  @@ -531,12 +528,12 @@
         this.password = password;
      }
      
  -   public MethodBinding getAuthenticateMethod()
  +   public MethodExpression getAuthenticateMethod()
      {
         return authenticateMethod;
      }
      
  -   public void setAuthenticateMethod(MethodBinding authMethod)
  +   public void setAuthenticateMethod(MethodExpression authMethod)
      {
         this.authenticateMethod = authMethod;
      }
  
  
  



More information about the jboss-cvs-commits mailing list