gov.bnl.gums.configuration
Class Configuration

java.lang.Object
  extended by gov.bnl.gums.configuration.Configuration

public class Configuration
extends Object

Holds the configuration of GUMS, including which policies will be used for which hosts, which database layer is going to be used and so on.

The configuration object will be constructed programmatically by reading an xml file.

Author:
Gabriele Carcassi, Jay Packard

Constructor Summary
Configuration()
           
Configuration(boolean transformingFromOld11Version)
           
 
Method Summary
 void addAccountMapper(AccountMapper accountMapper)
           
 void addGroupToAccountMapping(GroupToAccountMapping g2AMapping)
           
 void addHostToGroupMapping(HostToGroupMapping h2GMapping)
           
 void addHostToGroupMapping(int index, HostToGroupMapping h2GMapping)
           
 void addPersistenceFactory(PersistenceFactory peristenceFactory)
           
 void addUserGroup(UserGroup userGroup)
           
 void addVomsServer(VomsServer vomsServer)
           
 Object clone()
           
 void finalize()
           
 AccountMapper getAccountMapper(String accountMapper)
           
 Map getAccountMappers()
           
 boolean getAllowGridmapFiles()
           
 List getBannedUserGroupList()
           
 String getBannedUserGroups()
           
 Date getCreated()
           
 GroupToAccountMapping getGroupToAccountMapping(String groupToAccountMapping)
           
 Map getGroupToAccountMappings()
           
 HostToGroupMapping getHostToGroupMapping(String name)
           
 List getHostToGroupMappings()
           
 Map getPersistenceFactories()
           
 PersistenceFactory getPersistenceFactory(String persistenceFactory)
           
 ArrayList getReadAllUserGroups()
          Returns a list of all the readers with all read access defined in the configuration file.
 ArrayList getReadSelfUserGroups()
          Returns a list of all the self readers defined in the configuration file.
 UserGroup getUserGroup(String userGroup)
           
 Map getUserGroups()
           
 VomsServer getVomsServer(String vomsServer)
           
 Map getVomsServers()
           
 ArrayList getWriteUserGroups()
          Returns a list of all the writer groups defined in the configuration file.
 void mergeConfiguration(Configuration configuraton, String persistenceFactory, String hostToGroupMapping)
           
 AccountMapper removeAccountMapper(String name)
           
 GroupToAccountMapping removeGroupToAccountMapping(String name)
           
 HostToGroupMapping removeHostToGroupMapping(String name)
           
 PersistenceFactory removePersistenceFactory(String name)
           
 UserGroup removeUserGroup(String name)
           
 VomsServer removeVomsServer(String name)
           
 void setAllowGridmapFiles(boolean allowGridmapFiles)
           
 void setBannedUserGroups(String bannedUserGroups)
           
 String toXml()
           
 void write(Writer out)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configuration

public Configuration()

Configuration

public Configuration(boolean transformingFromOld11Version)
Method Detail

finalize

public void finalize()
Overrides:
finalize in class Object

addAccountMapper

public void addAccountMapper(AccountMapper accountMapper)
Parameters:
accountMapper -

addGroupToAccountMapping

public void addGroupToAccountMapping(GroupToAccountMapping g2AMapping)
Parameters:
g2AMapping -

addHostToGroupMapping

public void addHostToGroupMapping(HostToGroupMapping h2GMapping)
Parameters:
h2GMapping -

addHostToGroupMapping

public void addHostToGroupMapping(int index,
                                  HostToGroupMapping h2GMapping)
Parameters:
index -
h2GMapping -

addPersistenceFactory

public void addPersistenceFactory(PersistenceFactory peristenceFactory)
Parameters:
peristenceFactory -

addUserGroup

public void addUserGroup(UserGroup userGroup)
Parameters:
userGroup -

addVomsServer

public void addVomsServer(VomsServer vomsServer)
Parameters:
vomsServer -

clone

public Object clone()
Overrides:
clone in class Object

getAccountMapper

public AccountMapper getAccountMapper(String accountMapper)
Parameters:
accountMapper -
Returns:

getAccountMappers

public Map getAccountMappers()
Returns:

getAllowGridmapFiles

public boolean getAllowGridmapFiles()

getBannedUserGroupList

public List getBannedUserGroupList()

getBannedUserGroups

public String getBannedUserGroups()

getCreated

public Date getCreated()

getGroupToAccountMapping

public GroupToAccountMapping getGroupToAccountMapping(String groupToAccountMapping)
Parameters:
groupToAccountMapping -
Returns:

getGroupToAccountMappings

public Map getGroupToAccountMappings()
Returns:

getHostToGroupMapping

public HostToGroupMapping getHostToGroupMapping(String name)
Parameters:
name -
Returns:

getHostToGroupMappings

public List getHostToGroupMappings()
Returns:

getPersistenceFactories

public Map getPersistenceFactories()
Returns:

getPersistenceFactory

public PersistenceFactory getPersistenceFactory(String persistenceFactory)
Parameters:
persistenceFactory -
Returns:

getReadAllUserGroups

public ArrayList getReadAllUserGroups()
Returns a list of all the readers with all read access defined in the configuration file.

Returns:
a list of ReaderGroupManager objects.

getReadSelfUserGroups

public ArrayList getReadSelfUserGroups()
Returns a list of all the self readers defined in the configuration file.

Returns:
a list of ReaderGroupManager objects.

getUserGroup

public UserGroup getUserGroup(String userGroup)
Parameters:
userGroup -
Returns:

getUserGroups

public Map getUserGroups()
Returns:

getVomsServer

public VomsServer getVomsServer(String vomsServer)
Parameters:
vomsServer -
Returns:

getVomsServers

public Map getVomsServers()
Returns:

getWriteUserGroups

public ArrayList getWriteUserGroups()
Returns a list of all the writer groups defined in the configuration file.

Returns:
a list of WriterGroupManager objects.

removeAccountMapper

public AccountMapper removeAccountMapper(String name)
Parameters:
name -
Returns:

removeGroupToAccountMapping

public GroupToAccountMapping removeGroupToAccountMapping(String name)
Parameters:
name -
Returns:

removeHostToGroupMapping

public HostToGroupMapping removeHostToGroupMapping(String name)
Parameters:
name -
Returns:

removePersistenceFactory

public PersistenceFactory removePersistenceFactory(String name)
Parameters:
name -
Returns:

removeUserGroup

public UserGroup removeUserGroup(String name)
Parameters:
name -
Returns:

removeVomsServer

public VomsServer removeVomsServer(String name)
Parameters:
name -
Returns:

setAllowGridmapFiles

public void setAllowGridmapFiles(boolean allowGridmapFiles)

setBannedUserGroups

public void setBannedUserGroups(String bannedUserGroups)

toXml

public String toXml()
             throws IOException
Returns:
Throws:
IOException

write

public void write(Writer out)
           throws IOException
Throws:
IOException

mergeConfiguration

public void mergeConfiguration(Configuration configuraton,
                               String persistenceFactory,
                               String hostToGroupMapping)


Copyright © 2004-2009. All Rights Reserved.