com.randomcoder.user
Interface UserBusiness

All Known Implementing Classes:
UserBusinessImpl

public interface UserBusiness

Business interface 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.
 


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 updateUser(Producer<User> producer, Long userId)
          Update an existing user.
 

Method Detail

changePassword

void changePassword(String userName,
                    String password)
Change a user's password.

Parameters:
userName - user name
password - new password

createUser

void createUser(Producer<User> producer)
Create a new user.

Parameters:
producer - user producer

createAccount

void createAccount(Producer<User> producer)
Creates a new account using a password.

Parameters:
producer - user producer

createAccount

void createAccount(Producer<User> userProducer,
                   Producer<CardSpaceToken> tokenProducer)
Creates a new account using CardSpace credentials.

Parameters:
userProducer - user producer
tokenProducer - CardSpace token producer

loadUserForEditing

void loadUserForEditing(Consumer<User> consumer,
                        Long userId)
Loads a user for editing.

Parameters:
consumer - consumer
userId - id of user to load

updateUser

void updateUser(Producer<User> producer,
                Long userId)
Update an existing user.

Parameters:
producer - user producer
userId - user id

deleteUser

void deleteUser(Long userId)
Deletes a user.

Parameters:
userId - user id to delete

associateCardSpaceCredentials

void associateCardSpaceCredentials(Long userId,
                                   CardSpaceCredentials credentials)
Associates the given CardSpaceCredentials with the given user.

Parameters:
userId - user id of user to associate credentials with
credentials - CardSpace credentials

auditUsernamePasswordLogin

void auditUsernamePasswordLogin(String userName)
Marks a user as having logged in as of a particular date and time.

Parameters:
userName - user name to update

auditCardSpaceLogin

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.

Parameters:
credentials - credentials to update

deleteCardSpaceToken

void deleteCardSpaceToken(String userName,
                          Long tokenId)
Deletes a CardSpace token.

Parameters:
userName - current user
tokenId - id of token to delete


Copyright © 2006-2010 Craig Condit. All Rights Reserved.