|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.randomcoder.user.UserBusinessImpl
public class UserBusinessImpl
Business implementation for user management.
Copyright (c) 2006-2007, Craig Condit. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
| Constructor Summary | |
|---|---|
UserBusinessImpl()
|
|
| Method Summary | |
|---|---|
void |
associateCardSpaceCredentials(Long userId,
CardSpaceCredentials credentials)
Associates the given CardSpaceCredentials with the given user. |
void |
auditCardSpaceLogin(CardSpaceCredentials credentials)
Marks a user as having logged in as of a particular date and time and marks the associated CardSpaceToken as used. |
void |
auditUsernamePasswordLogin(String userName)
Marks a user as having logged in as of a particular date and time. |
void |
changePassword(String userName,
String password)
Change a user's password. |
void |
createAccount(Producer<User> producer)
Creates a new account using a password. |
void |
createAccount(Producer<User> userProducer,
Producer<CardSpaceToken> tokenProducer)
Creates a new account using CardSpace credentials. |
void |
createUser(Producer<User> producer)
Create a new user. |
void |
deleteCardSpaceToken(String userName,
Long tokenId)
Deletes a CardSpace token. |
void |
deleteUser(Long userId)
Deletes a user. |
void |
loadUserForEditing(Consumer<User> consumer,
Long userId)
Loads a user for editing. |
void |
setCardSpaceTokenDao(CardSpaceTokenDao cardSpaceTokenDao)
Sets the CardSpaceTokenDao implementation to use. |
void |
setUserDao(UserDao userDao)
Sets the UserDao implementation to use. |
void |
updateUser(Producer<User> producer,
Long userId)
Update an existing user. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public UserBusinessImpl()
| Method Detail |
|---|
public void setUserDao(UserDao userDao)
userDao - UserDao implementationpublic void setCardSpaceTokenDao(CardSpaceTokenDao cardSpaceTokenDao)
cardSpaceTokenDao - CardSpaceTokenDao implementation
@Transactional
public void changePassword(String userName,
String password)
UserBusiness
changePassword in interface UserBusinessuserName - user namepassword - new password@Transactional public void createUser(Producer<User> producer)
UserBusiness
createUser in interface UserBusinessproducer - user producer@Transactional public void createAccount(Producer<User> producer)
UserBusiness
createAccount in interface UserBusinessproducer - user producer
@Transactional
public void createAccount(Producer<User> userProducer,
Producer<CardSpaceToken> tokenProducer)
UserBusiness
createAccount in interface UserBusinessuserProducer - user producertokenProducer - CardSpace token producer
@Transactional
public void updateUser(Producer<User> producer,
Long userId)
UserBusiness
updateUser in interface UserBusinessproducer - user produceruserId - user id@Transactional public void deleteUser(Long userId)
UserBusiness
deleteUser in interface UserBusinessuserId - user id to delete
@Transactional(readOnly=true)
public void loadUserForEditing(Consumer<User> consumer,
Long userId)
UserBusiness
loadUserForEditing in interface UserBusinessconsumer - consumeruserId - id of user to load
@Transactional
public void associateCardSpaceCredentials(Long userId,
CardSpaceCredentials credentials)
UserBusiness
associateCardSpaceCredentials in interface UserBusinessuserId - user id of user to associate credentials withcredentials - CardSpace credentials@Transactional public void auditUsernamePasswordLogin(String userName)
UserBusiness
auditUsernamePasswordLogin in interface UserBusinessuserName - user name to update@Transactional public void auditCardSpaceLogin(CardSpaceCredentials credentials)
UserBusiness
auditCardSpaceLogin in interface UserBusinesscredentials - credentials to update
@Transactional
public void deleteCardSpaceToken(String userName,
Long tokenId)
UserBusiness
deleteCardSpaceToken in interface UserBusinessuserName - current usertokenId - id of token to delete
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||