| java.lang.Object org.geoserver.security.EditableUserDAO
EditableUserDAO | public class EditableUserDAO implements UserDetailsService(Code) | | The EditableUserDAO class provides a UserDetailsService implementation that
allows modifying user information programmatically.
author: David Winslow - |
Constructor Summary | |
public | EditableUserDAO() Create an EditableUserDAO object. |
EditableUserDAO | public EditableUserDAO()(Code) | | Create an EditableUserDAO object. This currently entails:
- Finding the user configuration file
- Creating a PropertyFileWatcher to track changes to it
- Loading the user details into a map in memory
If no user information is found, a default user will be created.
|
deleteUser | public void deleteUser(String username) throws IOException, ConfigurationException(Code) | | Remove a user specified by name. If the username is not used by any
known user, nothing happens.
Parameters: username - the name of the user to delete throws: ConfigurationException - if the user configuration file does not exist and cannot be created throws: IOException - if an error occurs while opening the user configuration file |
getGeoServer | public GeoServer getGeoServer()(Code) | | Spring-friendly getter to go along with the setter.
this object's associated GeoServer instance |
getNameSet | public Set getNameSet()(Code) | | TODO: Actually document this!
author: David Winslow |
loadUserByUsername | public UserDetails loadUserByUsername(String username)(Code) | | Find a user's details based on the username.
Parameters: username - the username for the desired user a UserDetails object with the user's details, or null if no such user exists |
setGeoServer | public void setGeoServer(GeoServer geoServer)(Code) | | Spring-friendly setter so we can easily get a reference to the GeoServer instance
Parameters: geoServer - the GeoServer instance this DAO will be working with |
setUserDetails | public void setUserDetails(String username, UserAttribute details) throws IOException, ConfigurationException(Code) | | Create a user with the specified credentials and authority. The user will
be automatically added to persistant storage. If the user already exists,
the previously existing user will be overwritten.
Parameters: username - the username for the user being added Parameters: details - a UserAttribute containing the credentials and authorities for the user throws: ConfigurationException - if the user configuration file does not exist and cannot be created throws: IOException - if an error occurs while opening the user configuration file |
|
|