[seam-commits] Seam SVN: r10689 - in modules/trunk/security: src/main/java/org/jboss/seam/security and 1 other directory.
seam-commits at lists.jboss.org
seam-commits at lists.jboss.org
Tue Apr 28 20:25:59 EDT 2009
Author: shane.bryzak at jboss.com
Date: 2009-04-28 20:25:59 -0400 (Tue, 28 Apr 2009)
New Revision: 10689
Added:
modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java
Removed:
modules/trunk/security/src/main/java/org/jboss/seam/security/FacesSecurityEvents.java
Modified:
modules/trunk/security/pom.xml
Log:
renamed FacesSecurityEvents to SecurityEventMessages
Modified: modules/trunk/security/pom.xml
===================================================================
--- modules/trunk/security/pom.xml 2009-04-28 22:45:14 UTC (rev 10688)
+++ modules/trunk/security/pom.xml 2009-04-29 00:25:59 UTC (rev 10689)
@@ -16,11 +16,11 @@
<dependencies>
<dependency>
- <groupId>org.jboss.webbeans</groupId>
+ <groupId>${webbeans.groupId}</groupId>
<artifactId>jsr299-api</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.webbeans</groupId>
+ <groupId>${webbeans.groupId}</groupId>
<artifactId>webbeans-logging</artifactId>
</dependency>
<dependency>
@@ -40,15 +40,19 @@
<artifactId>drools-core</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.seam</groupId>
+ <groupId>${seam.groupId}</groupId>
<artifactId>seam-drools</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.seam</groupId>
+ <groupId>${seam.groupId}</groupId>
<artifactId>seam-el</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.seam</groupId>
+ <groupId>${seam.groupId}</groupId>
+ <artifactId>seam-international</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>${seam.groupId}</groupId>
<artifactId>seam-persistence</artifactId>
</dependency>
<dependency>
Deleted: modules/trunk/security/src/main/java/org/jboss/seam/security/FacesSecurityEvents.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/FacesSecurityEvents.java 2009-04-28 22:45:14 UTC (rev 10688)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/FacesSecurityEvents.java 2009-04-29 00:25:59 UTC (rev 10689)
@@ -1,95 +0,0 @@
-package org.jboss.seam.security;
-
-import javax.context.ApplicationScoped;
-import javax.event.Observes;
-import javax.security.auth.login.LoginException;
-
-import org.jboss.seam.international.StatusMessages;
-import org.jboss.seam.international.StatusMessage.Severity;
-import org.jboss.seam.security.events.AlreadyLoggedInEvent;
-import org.jboss.seam.security.events.LoggedInEvent;
-import org.jboss.seam.security.events.LoginFailedEvent;
-import org.jboss.seam.security.events.NotLoggedInEvent;
-import org.jboss.seam.security.events.PostAuthenticateEvent;
-
-/**
- * Produces FacesMessages in response of certain security events, and helps to decouple the
- * Identity component from JSF.
- *
- * @author Shane Bryzak
- */
- at ApplicationScoped
-public class FacesSecurityEvents
-{
- public void postAuthenticate(@Observes PostAuthenticateEvent event)
- {
- //org.jboss.security.saml.SSOManager.processManualLoginNotification(
- //ServletContexts.instance().getRequest(), identity.getPrincipal().getName());
- }
-
- public void addLoginFailedMessage(@Observes LoginFailedEvent event)
- {
- StatusMessages.instance().addFromResourceBundleOrDefault(
- getLoginFailedMessageSeverity(),
- getLoginFailedMessageKey(),
- getLoginFailedMessage(),
- event.getLoginException());
- }
-
- public String getLoginFailedMessage()
- {
- return "Login failed";
- }
-
- public Severity getLoginFailedMessageSeverity()
- {
- return Severity.INFO;
- }
-
- public String getLoginFailedMessageKey()
- {
- return "org.jboss.seam.loginFailed";
- }
-
- public void addLoginSuccessfulMessage(@Observes LoggedInEvent event)
- {
- StatusMessages.instance().addFromResourceBundleOrDefault(
- getLoginSuccessfulMessageSeverity(),
- getLoginSuccessfulMessageKey(),
- getLoginSuccessfulMessage(),
- Identity.instance().getCredentials().getUsername());
- }
-
- public void addNotLoggedInMessage(@Observes NotLoggedInEvent event)
- {
- StatusMessages.instance().addFromResourceBundleOrDefault(
- Severity.WARN,
- "org.jboss.seam.NotLoggedIn",
- "Please log in first"
- );
- }
-
- public Severity getLoginSuccessfulMessageSeverity()
- {
- return Severity.INFO;
- }
-
- public String getLoginSuccessfulMessage()
- {
- return "Welcome, #0";
- }
-
- public String getLoginSuccessfulMessageKey()
- {
- return "org.jboss.seam.loginSuccessful";
- }
-
- public void addAlreadyLoggedInMessage(@Observes AlreadyLoggedInEvent event)
- {
- StatusMessages.instance().addFromResourceBundleOrDefault (
- Severity.WARN,
- "org.jboss.seam.AlreadyLoggedIn",
- "You are already logged in, please log out first if you wish to log in again"
- );
- }
-}
Added: modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java
===================================================================
--- modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java (rev 0)
+++ modules/trunk/security/src/main/java/org/jboss/seam/security/SecurityEventMessages.java 2009-04-29 00:25:59 UTC (rev 10689)
@@ -0,0 +1,95 @@
+package org.jboss.seam.security;
+
+import javax.context.ApplicationScoped;
+import javax.event.Observes;
+import javax.security.auth.login.LoginException;
+
+import org.jboss.seam.international.StatusMessages;
+import org.jboss.seam.international.StatusMessage.Severity;
+import org.jboss.seam.security.events.AlreadyLoggedInEvent;
+import org.jboss.seam.security.events.LoggedInEvent;
+import org.jboss.seam.security.events.LoginFailedEvent;
+import org.jboss.seam.security.events.NotLoggedInEvent;
+import org.jboss.seam.security.events.PostAuthenticateEvent;
+
+/**
+ * Produces FacesMessages in response of certain security events, and helps to decouple the
+ * Identity component from JSF.
+ *
+ * @author Shane Bryzak
+ */
+ at ApplicationScoped
+public class SecurityEventMessages
+{
+ public void postAuthenticate(@Observes PostAuthenticateEvent event)
+ {
+ //org.jboss.security.saml.SSOManager.processManualLoginNotification(
+ //ServletContexts.instance().getRequest(), identity.getPrincipal().getName());
+ }
+
+ public void addLoginFailedMessage(@Observes LoginFailedEvent event)
+ {
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ getLoginFailedMessageSeverity(),
+ getLoginFailedMessageKey(),
+ getLoginFailedMessage(),
+ event.getLoginException());
+ }
+
+ public String getLoginFailedMessage()
+ {
+ return "Login failed";
+ }
+
+ public Severity getLoginFailedMessageSeverity()
+ {
+ return Severity.INFO;
+ }
+
+ public String getLoginFailedMessageKey()
+ {
+ return "org.jboss.seam.loginFailed";
+ }
+
+ public void addLoginSuccessfulMessage(@Observes LoggedInEvent event)
+ {
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ getLoginSuccessfulMessageSeverity(),
+ getLoginSuccessfulMessageKey(),
+ getLoginSuccessfulMessage(),
+ Identity.instance().getCredentials().getUsername());
+ }
+
+ public void addNotLoggedInMessage(@Observes NotLoggedInEvent event)
+ {
+ StatusMessages.instance().addFromResourceBundleOrDefault(
+ Severity.WARN,
+ "org.jboss.seam.NotLoggedIn",
+ "Please log in first"
+ );
+ }
+
+ public Severity getLoginSuccessfulMessageSeverity()
+ {
+ return Severity.INFO;
+ }
+
+ public String getLoginSuccessfulMessage()
+ {
+ return "Welcome, #0";
+ }
+
+ public String getLoginSuccessfulMessageKey()
+ {
+ return "org.jboss.seam.loginSuccessful";
+ }
+
+ public void addAlreadyLoggedInMessage(@Observes AlreadyLoggedInEvent event)
+ {
+ StatusMessages.instance().addFromResourceBundleOrDefault (
+ Severity.WARN,
+ "org.jboss.seam.AlreadyLoggedIn",
+ "You are already logged in, please log out first if you wish to log in again"
+ );
+ }
+}
More information about the seam-commits
mailing list