gov.bnl.gums.admin
Class GUMSAPIImpl

java.lang.Object
  extended by gov.bnl.gums.admin.GUMSAPIImpl
All Implemented Interfaces:
GUMSAPI, Remote

public class GUMSAPIImpl
extends Object
implements GUMSAPI

GUMSAPI implementation

Author:
Gabriele Carcassi, Jay Packard

Constructor Summary
GUMSAPIImpl()
           
 
Method Summary
 void addAccountRange2(String accountPoolMapperName, String range)
          Add a range of pool accounts
 void backupConfiguration(String name)
          Backup current configuration with a name
 void deleteBackupConfiguration(String name)
          Delete a backup configuration by date
 String generateEmailMapfile(String hostname)
          Generate email gridmap file to be able to contact user if needed
 String generateFqanMapfile(String hostname)
          Generate fqanmap file used to validate mappings
 String generateGrid3UserVoMap(String hostname)
          Generate the inverse entry->VO map used by OSG.
 String generateGridMapfile(String hostname)
          Generate gridmap file used by gateway in case GUMS is down and by certain applications like dCache
 String generateOsgUserVoMap(String hostname)
          Generate the inverse entry->VO map used by OSG.
 String generateVoGridMapfile(String hostname)
          Genereate Vo grid map file used for accounting purposes
 Collection getBackupNames()
          Get a list of dates for which there is a backup
 Configuration getConfiguration()
          Get current configuration
 String getCurrentDn()
          Get currently logged in user DN
 String getPoolAccountAssignments(String accountPoolMapperName)
          Get current pool account assignments
 String getVersion()
          Get current version of GUMS
 void manualGroupAdd(String persistanceFactory, String group, String userDN)
           
 void manualGroupAdd2(String manualUserGroupName, String userDN)
          Add a userDN to a manual user group
 void manualGroupAdd3(String manualUserGroupName, String userDN, String fqan, String email)
          Add a userDN to a manual user group
 void manualGroupRemove(String persistanceFactory, String group, String userDN)
           
 void manualGroupRemove2(String manualUserGroupName, String userDN)
          Remove a userDN from a manual user group
 void manualGroupRemove3(String manualUserGroupName, String userDN, String fqan)
          Remove a userDN from a manual user group
 void manualMappingAdd(String persistanceFactory, String group, String userDN, String account)
           
 void manualMappingAdd2(String manualAccountMapperName, String userDN, String account)
          Add a userDN to account mapping
 void manualMappingRemove(String persistanceFactory, String group, String userDN)
           
 void manualMappingRemove2(String manualAccountMapperName, String userDN)
          Removes a userDN from an account mapping
 String mapAccount(String accountName)
          Map an account to a list of grid DNs
 String mapUser(String hostname, String userDN, String fqan)
          Map a grid DN to an account
 void mergeConfiguration(Configuration conf, String newConfUri, String persistenceFactory, String hostToGroupMapping)
          Merge configuration into current configuration
 void poolAddAccount(String persistanceFactory, String group, String accountName)
           
 void removeAccountRange(String accountPoolMapperName, String range)
          Remove a range of pool accounts
 void restoreConfiguration(String name)
          Restore a configuration by date
 void setConfiguration(Configuration configuration)
          Set the configuration
 void unassignAccountRange(String accountPoolMapperName, String range)
          Unassign all accounts in a pool
 void updateGroups()
          Update members in user groups by querying VO servers - may be time consuming
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GUMSAPIImpl

public GUMSAPIImpl()
Method Detail

addAccountRange2

public void addAccountRange2(String accountPoolMapperName,
                             String range)
Description copied from interface: GUMSAPI
Add a range of pool accounts

Specified by:
addAccountRange2 in interface GUMSAPI

backupConfiguration

public void backupConfiguration(String name)
Description copied from interface: GUMSAPI
Backup current configuration with a name

Specified by:
backupConfiguration in interface GUMSAPI
Parameters:
name - as String

deleteBackupConfiguration

public void deleteBackupConfiguration(String name)
Description copied from interface: GUMSAPI
Delete a backup configuration by date

Specified by:
deleteBackupConfiguration in interface GUMSAPI

generateEmailMapfile

public String generateEmailMapfile(String hostname)
Description copied from interface: GUMSAPI
Generate email gridmap file to be able to contact user if needed

Specified by:
generateEmailMapfile in interface GUMSAPI
Returns:

generateFqanMapfile

public String generateFqanMapfile(String hostname)
Description copied from interface: GUMSAPI
Generate fqanmap file used to validate mappings

Specified by:
generateFqanMapfile in interface GUMSAPI
Returns:

generateGrid3UserVoMap

public String generateGrid3UserVoMap(String hostname)
Description copied from interface: GUMSAPI
Generate the inverse entry->VO map used by OSG.

Specified by:
generateGrid3UserVoMap in interface GUMSAPI
Parameters:
hostname - Host name to generate the map for.
Returns:
The map, or null if no map is found

generateGridMapfile

public String generateGridMapfile(String hostname)
Description copied from interface: GUMSAPI
Generate gridmap file used by gateway in case GUMS is down and by certain applications like dCache

Specified by:
generateGridMapfile in interface GUMSAPI
Returns:

generateOsgUserVoMap

public String generateOsgUserVoMap(String hostname)
Description copied from interface: GUMSAPI
Generate the inverse entry->VO map used by OSG.

Specified by:
generateOsgUserVoMap in interface GUMSAPI
Parameters:
hostname - Host name to generate the map for.
Returns:
The map, or null if no map is found

generateVoGridMapfile

public String generateVoGridMapfile(String hostname)
Description copied from interface: GUMSAPI
Genereate Vo grid map file used for accounting purposes

Specified by:
generateVoGridMapfile in interface GUMSAPI
Returns:

getBackupNames

public Collection getBackupNames()
Description copied from interface: GUMSAPI
Get a list of dates for which there is a backup

Specified by:
getBackupNames in interface GUMSAPI
Returns:

getConfiguration

public Configuration getConfiguration()
Description copied from interface: GUMSAPI
Get current configuration

Specified by:
getConfiguration in interface GUMSAPI
Returns:

getPoolAccountAssignments

public String getPoolAccountAssignments(String accountPoolMapperName)
Description copied from interface: GUMSAPI
Get current pool account assignments

Specified by:
getPoolAccountAssignments in interface GUMSAPI
Returns:
printout of assignments

getVersion

public String getVersion()
Description copied from interface: GUMSAPI
Get current version of GUMS

Specified by:
getVersion in interface GUMSAPI
Returns:

manualGroupAdd2

public void manualGroupAdd2(String manualUserGroupName,
                            String userDN)
Description copied from interface: GUMSAPI
Add a userDN to a manual user group

Specified by:
manualGroupAdd2 in interface GUMSAPI

manualGroupAdd3

public void manualGroupAdd3(String manualUserGroupName,
                            String userDN,
                            String fqan,
                            String email)
Description copied from interface: GUMSAPI
Add a userDN to a manual user group

Specified by:
manualGroupAdd3 in interface GUMSAPI

manualGroupRemove2

public void manualGroupRemove2(String manualUserGroupName,
                               String userDN)
Description copied from interface: GUMSAPI
Remove a userDN from a manual user group

Specified by:
manualGroupRemove2 in interface GUMSAPI

manualGroupRemove3

public void manualGroupRemove3(String manualUserGroupName,
                               String userDN,
                               String fqan)
Description copied from interface: GUMSAPI
Remove a userDN from a manual user group

Specified by:
manualGroupRemove3 in interface GUMSAPI

manualMappingAdd2

public void manualMappingAdd2(String manualAccountMapperName,
                              String userDN,
                              String account)
Description copied from interface: GUMSAPI
Add a userDN to account mapping

Specified by:
manualMappingAdd2 in interface GUMSAPI

mergeConfiguration

public void mergeConfiguration(Configuration conf,
                               String newConfUri,
                               String persistenceFactory,
                               String hostToGroupMapping)
Description copied from interface: GUMSAPI
Merge configuration into current configuration

Specified by:
mergeConfiguration in interface GUMSAPI

manualMappingRemove2

public void manualMappingRemove2(String manualAccountMapperName,
                                 String userDN)
Description copied from interface: GUMSAPI
Removes a userDN from an account mapping

Specified by:
manualMappingRemove2 in interface GUMSAPI

mapAccount

public String mapAccount(String accountName)
Description copied from interface: GUMSAPI
Map an account to a list of grid DNs

Specified by:
mapAccount in interface GUMSAPI
Returns:

mapUser

public String mapUser(String hostname,
                      String userDN,
                      String fqan)
Description copied from interface: GUMSAPI
Map a grid DN to an account

Specified by:
mapUser in interface GUMSAPI
Returns:

removeAccountRange

public void removeAccountRange(String accountPoolMapperName,
                               String range)
Description copied from interface: GUMSAPI
Remove a range of pool accounts

Specified by:
removeAccountRange in interface GUMSAPI

restoreConfiguration

public void restoreConfiguration(String name)
                          throws Exception
Description copied from interface: GUMSAPI
Restore a configuration by date

Specified by:
restoreConfiguration in interface GUMSAPI
Throws:
Exception

setConfiguration

public void setConfiguration(Configuration configuration)
                      throws Exception
Description copied from interface: GUMSAPI
Set the configuration

Specified by:
setConfiguration in interface GUMSAPI
Throws:
Exception

unassignAccountRange

public void unassignAccountRange(String accountPoolMapperName,
                                 String range)
Description copied from interface: GUMSAPI
Unassign all accounts in a pool

Specified by:
unassignAccountRange in interface GUMSAPI

updateGroups

public void updateGroups()
Description copied from interface: GUMSAPI
Update members in user groups by querying VO servers - may be time consuming

Specified by:
updateGroups in interface GUMSAPI

getCurrentDn

public String getCurrentDn()
Description copied from interface: GUMSAPI
Get currently logged in user DN

Specified by:
getCurrentDn in interface GUMSAPI

manualGroupAdd

public void manualGroupAdd(String persistanceFactory,
                           String group,
                           String userDN)
Specified by:
manualGroupAdd in interface GUMSAPI

manualGroupRemove

public void manualGroupRemove(String persistanceFactory,
                              String group,
                              String userDN)
Specified by:
manualGroupRemove in interface GUMSAPI

manualMappingAdd

public void manualMappingAdd(String persistanceFactory,
                             String group,
                             String userDN,
                             String account)
Specified by:
manualMappingAdd in interface GUMSAPI

manualMappingRemove

public void manualMappingRemove(String persistanceFactory,
                                String group,
                                String userDN)
Specified by:
manualMappingRemove in interface GUMSAPI

poolAddAccount

public void poolAddAccount(String persistanceFactory,
                           String group,
                           String accountName)
Specified by:
poolAddAccount in interface GUMSAPI


Copyright © 2004-2009. All Rights Reserved.