org.apache.james.api.user
Interface UserMetaDataRespository

All Known Implementing Classes:
FileUserMetaDataRepository, FileUserMetaDataService

public interface UserMetaDataRespository

Contains flexible meta-data related to users. Values should be serializable to allow easy remote transport and persistence. Keys are strings.

Note conventionally keys should be URIs and so naturally namespaced. In particular, all keys starting with http://james.apache.org/ are reserved for use by JAMES.


Field Summary
static java.lang.String ROLE
           
 
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.
 

Field Detail

ROLE

static final java.lang.String ROLE
See Also:
Constant Field Values
Method Detail

getAttribute

java.io.Serializable getAttribute(java.lang.String username,
                                  java.lang.String key)
                                  throws UserRepositoryException
Gets the attribute for the given key.

Parameters:
username - the name of the user, not null
key - conventionally an URI, not null
Returns:
value, or null if the keyed attribute has no associated value.
Throws:
UserRepositoryException

setAttribute

void setAttribute(java.lang.String username,
                  java.io.Serializable value,
                  java.lang.String key)
                  throws UserRepositoryException
Sets the attribute keyed to the given value.

Parameters:
username - the name of the user which meta-data is to be set, not null
value - Serializable value, possibly null
key - conventionally an URI, not null
Throws:
UserRepositoryException

clear

void clear(java.lang.String username)
           throws UserRepositoryException
Clears all attributes for the given user.

Parameters:
username - the name of the user who meta data is to be cleared, not null
Throws:
UserRepositoryException


Copyright ? 2002-2009 The Apache Software Foundation. All Rights Reserved.