org.apache.james.user.impl.file
Class FileUserMetaDataRepository
java.lang.Object
org.apache.james.user.impl.file.FileUserMetaDataRepository
- All Implemented Interfaces:
- UserMetaDataRespository
public class FileUserMetaDataRepository
- extends java.lang.Object
- implements UserMetaDataRespository
Stores user meta-data in the file system.
Method Summary |
void |
clear(java.lang.String username)
Clears all attributes for the given user. |
java.io.Serializable |
getAttribute(java.lang.String username,
java.lang.String key)
Gets the attribute for the given key. |
void |
setAttribute(java.lang.String username,
java.io.Serializable value,
java.lang.String key)
Sets the attribute keyed to the given value. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FileUserMetaDataRepository
public FileUserMetaDataRepository(java.lang.String baseDirectory)
clear
public void clear(java.lang.String username)
throws UserRepositoryException
- Description copied from interface:
UserMetaDataRespository
- Clears all attributes for the given user.
- Specified by:
clear
in interface UserMetaDataRespository
- Parameters:
username
- the name of the user who meta data is to be cleared, not null
- Throws:
UserRepositoryException
getAttribute
public java.io.Serializable getAttribute(java.lang.String username,
java.lang.String key)
throws UserRepositoryException
- Description copied from interface:
UserMetaDataRespository
- Gets the attribute for the given key.
- Specified by:
getAttribute
in interface UserMetaDataRespository
- Parameters:
username
- the name of the user, not nullkey
- conventionally an URI, not null
- Returns:
- value, or null if the keyed attribute has
no associated value.
- Throws:
UserRepositoryException
setAttribute
public void setAttribute(java.lang.String username,
java.io.Serializable value,
java.lang.String key)
throws UserRepositoryException
- Description copied from interface:
UserMetaDataRespository
- Sets the attribute keyed to the given value.
- Specified by:
setAttribute
in interface UserMetaDataRespository
- Parameters:
username
- the name of the user which meta-data is to be set, not nullvalue
- Serializable
value, possibly nullkey
- conventionally an URI, not null
- Throws:
UserRepositoryException
Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.