org.apache.james.user.impl.file
Class FileUserMetaDataService

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.james.user.impl.file.FileUserMetaDataService
All Implemented Interfaces:
org.apache.avalon.framework.activity.Initializable, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.logger.LogEnabled, UserMetaDataRespository

public class FileUserMetaDataService
extends org.apache.avalon.framework.logger.AbstractLogEnabled
implements UserMetaDataRespository, org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Initializable


Field Summary
 
Fields inherited from interface org.apache.james.api.user.UserMetaDataRespository
ROLE
 
Constructor Summary
FileUserMetaDataService()
           
 
Method Summary
 void clear(java.lang.String username)
          Clears all attributes for the given user.
 void configure(org.apache.avalon.framework.configuration.Configuration configuration)
           
 java.io.Serializable getAttribute(java.lang.String username, java.lang.String key)
          Gets the attribute for the given key.
 void initialize()
           
 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 org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUserMetaDataService

public FileUserMetaDataService()
Method Detail

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 null
key - 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 null
value - Serializable value, possibly null
key - conventionally an URI, not null
Throws:
UserRepositoryException

configure

public void configure(org.apache.avalon.framework.configuration.Configuration configuration)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Specified by:
configure in interface org.apache.avalon.framework.configuration.Configurable
Throws:
org.apache.avalon.framework.configuration.ConfigurationException

initialize

public void initialize()
                throws java.lang.Exception
Specified by:
initialize in interface org.apache.avalon.framework.activity.Initializable
Throws:
java.lang.Exception


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