org.apache.lenya.ac.file
Class FileRole

java.lang.Object
  extended by org.apache.lenya.ac.impl.AbstractItem
      extended by org.apache.lenya.ac.impl.AbstractRole
          extended by org.apache.lenya.ac.file.FileRole
All Implemented Interfaces:
Item, Role

public class FileRole
extends AbstractRole

File-based role implementation.

Version:
$Id: FileRole.java 473841 2006-11-12 00:46:38Z gregor $

Field Summary
static java.lang.String ROLE
           
 
Constructor Summary
FileRole()
          Creates a new FileRole object.
FileRole(java.io.File configurationDirectory, java.lang.String id)
          Creates a new file role.
 
Method Summary
 void configure(org.apache.avalon.framework.configuration.Configuration config)
          Configure this instance of FileRole
 java.io.File getConfigurationDirectory()
          Returns the configuration directory.
 void save()
          Save the role
 void setConfigurationDirectory(java.io.File file)
          Sets the configuration directory of this item.
 
Methods inherited from class org.apache.lenya.ac.impl.AbstractItem
equals, getDescription, getId, getName, hashCode, isValidId, setDescription, setId, setName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.lenya.ac.Item
getDescription, getId, getName, setDescription, setName
 

Field Detail

ROLE

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

FileRole

public FileRole(java.io.File configurationDirectory,
                java.lang.String id)
Creates a new file role.

Parameters:
configurationDirectory - The configuration directory.
id - The role ID.

FileRole

public FileRole()
Creates a new FileRole object.

Method Detail

configure

public void configure(org.apache.avalon.framework.configuration.Configuration config)
               throws org.apache.avalon.framework.configuration.ConfigurationException
Configure this instance of FileRole

Parameters:
config - containing the role details
Throws:
org.apache.avalon.framework.configuration.ConfigurationException - if the FileRole could not be configured

save

public void save()
          throws AccessControlException
Save the role

Throws:
AccessControlException - if the save fails

getConfigurationDirectory

public java.io.File getConfigurationDirectory()
Returns the configuration directory.

Returns:
A file object.

setConfigurationDirectory

public void setConfigurationDirectory(java.io.File file)
Description copied from interface: Item
Sets the configuration directory of this item.

Parameters:
file - The configuration directory.
See Also:
Item.setConfigurationDirectory(java.io.File)


Copyright © 1999-2005 Apache Software Foundation. All Rights Reserved.