macaw.persistenceLayer.demo
Class InMemoryUserManager
java.lang.Object
macaw.persistenceLayer.demo.InMemoryUserManager
- All Implemented Interfaces:
- MacawSecurityAPI
public class InMemoryUserManager
- extends java.lang.Object
- implements MacawSecurityAPI
manages instances of User
in-memory. Note that in future
Macaw will rely on an external service for managing User identities. For now,
Macaw uses its own built-in system for editing user data.
Copyright 2010 Medical Research Council Unit for Lifelong Health and Ageing
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- Version:
- 1.0
- Author:
- Kevin Garwood (kgarwood@users.sourceforge.net)
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
InMemoryUserManager
public InMemoryUserManager(InMemoryChangeEventManager changeEventManager,
Log log,
User admin)
validateUser
public void validateUser(User candidateUser)
throws MacawException
- Specified by:
validateUser
in interface MacawSecurityAPI
- Throws:
MacawException
addUser
public void addUser(User admin,
User user)
throws MacawException
- Throws:
MacawException
updateUser
public void updateUser(User admin,
User revisedUser)
throws MacawException
- Throws:
MacawException
deleteUsers
public void deleteUsers(User admin,
java.util.ArrayList<User> usersToDelete)
throws MacawException
- Throws:
MacawException
getUsers
public java.util.ArrayList<User> getUsers(User admin)
- this is a utility
getUserIdentifier
public int getUserIdentifier(User user)
getUserFromEmail
public User getUserFromEmail(User user,
java.lang.String email)
throws MacawException
- Throws:
MacawException
getUserFromID
public User getUserFromID(User user,
java.lang.String userID)
throws MacawException
- Throws:
MacawException
getUnverifiedUsers
public java.util.ArrayList<User> getUnverifiedUsers(User admin)
throws MacawException
- Throws:
MacawException
clear
public void clear()
validateAdministrator
public void validateAdministrator(User candidateAdmin)
throws MacawException
- Specified by:
validateAdministrator
in interface MacawSecurityAPI
- Throws:
MacawException