|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.shale.usecases.logic.LogonLogic
public class LogonLogic
Business logic for manipulating user profile information and
validating logon credentials. The UsersDAO
object used to
access the underlying persistent data must be injected before
any of the logic methods in this class may be used.
Constructor Summary | |
---|---|
LogonLogic()
|
Method Summary | |
---|---|
User |
authenticate(String username,
String password)
Validate the specified logon credientials. |
User |
createUser()
Create and return a User object that may be populated
and then passed to insertUser() for persistence. |
User |
findUser(int id)
Pass-through method to retrieve a User by id. |
User |
findUser(String username)
Pass-through method to retrieve a User by username. |
UsersDAO |
getDao()
|
void |
insertUser(User user)
Insert a newly created User into persistent storage. |
void |
setDao(UsersDAO dao)
|
void |
updateUser(User user)
Update an existing User into persistent storage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LogonLogic()
Method Detail |
---|
public UsersDAO getDao()
public void setDao(UsersDAO dao)
public User authenticate(String username, String password)
Validate the specified logon credientials. If valid credentials
are specified, return the corresponding User
instance.
Otherwise, return null
.
username
- Username creditial that was enteredpassword
- Password credential that was enteredpublic User createUser()
Create and return a User
object that may be populated
and then passed to insertUser()
for persistence.
public User findUser(int id)
Pass-through method to retrieve a User
by id.
id
- Identifier of the User
to returnpublic User findUser(String username)
Pass-through method to retrieve a User
by username.
username
- Username of the User
to returnpublic void insertUser(User user)
Insert a newly created User
into persistent storage.
user
- Created User
to be persistedpublic void updateUser(User user)
Update an existing User
into persistent storage.
user
- Updated User
to be persisted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |