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

Shane Bryzak sbryzak at redhat.com
Mon Nov 19 06:43:31 EST 2007


  User: sbryzak2
  Date: 07/11/19 06:43:31

  Modified:    src/main/org/jboss/seam/security  Identity.java
  Log:
  JBSEAM-2271
  
  Revision  Changes    Path
  1.109     +17 -4     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.108
  retrieving revision 1.109
  diff -u -b -r1.108 -r1.109
  --- Identity.java	16 Nov 2007 01:08:04 -0000	1.108
  +++ Identity.java	19 Nov 2007 11:43:31 -0000	1.109
  @@ -197,14 +197,17 @@
         {
            if ( !isLoggedIn() )
            {
  -            Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
  +//          TODO - Deprecated, remove for next major release
  +            if (Events.exists()) Events.instance().raiseEvent("org.jboss.seam.notLoggedIn");            
  +            
  +            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
               log.debug(String.format(
                  "Error evaluating expression [%s] - User not logged in", expr));
               throw new NotLoggedInException();
            }
            else
            {
  -            Events.instance().raiseEvent(EVENT_NOT_AUTHORIZED);
  +            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_AUTHORIZED);
               throw new AuthorizationException(String.format(
                  "Authorization check failed for expression [%s]", expr));
            }
  @@ -220,6 +223,10 @@
            {
               log.debug("Login successful for: " + getUsername());
            }
  +
  +//       TODO - Deprecated, remove for next major release
  +         if (Events.exists()) Events.instance().raiseEvent("org.jboss.seam.loginSuccessful");
  +         
            if (Events.exists()) Events.instance().raiseEvent(EVENT_LOGIN_SUCCESSFUL);
            return "loggedIn";
         }
  @@ -443,7 +450,10 @@
         {
            if ( !isLoggedIn() )
            {
  -            Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
  +            // TODO - Deprecated, remove for next major release
  +            if (Events.exists()) Events.instance().raiseEvent("org.jboss.seam.notLoggedIn");
  +            
  +            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
               throw new NotLoggedInException();
            }
            else
  @@ -471,7 +481,10 @@
         {
            if ( !isLoggedIn() )
            {
  -            Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
  +//          TODO - Deprecated, remove for next major release
  +            if (Events.exists()) Events.instance().raiseEvent("org.jboss.seam.notLoggedIn");            
  +            
  +            if (Events.exists()) Events.instance().raiseEvent(EVENT_NOT_LOGGED_IN);
               throw new NotLoggedInException();
            }
            else
  
  
  



More information about the jboss-cvs-commits mailing list