Java Globus API: Class GridMap

org.globus.security.gridmap
Class GridMap

java.lang.Object
  |
  +--org.globus.security.gridmap.GridMap

public class GridMap
extends Object


Field Summary
protected  Map map
           
 
Constructor Summary
GridMap()
           
 
Method Summary
 boolean checkUser(String globusID, String userID)
          Checks if a given globus ID is associated with given local user account.
 String[] getAllGlobusID(String userID)
          Returns all globus IDs associated with the specified local user name.
 String getGlobusID(String userID)
          Returns globus ID associated with the specified local user name.
 String getUserID(String globusID)
          Returns first local user name mapped to the specified globusID.
 String[] getUserIDs(String globusID)
          Returns local user names mapped to the specified globusID.
 void GridMap()
           
 void load(InputStream input)
          Loads grid map file definition from a given input stream.
 void load(String file)
          Loads grid map definition from a given file.
 void map(String globusID, String userID)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

map

protected Map map
Constructor Detail

GridMap

public GridMap()
Method Detail

GridMap

public void GridMap()

load

public void load(String file)
          throws IOException
Loads grid map definition from a given file.
Parameters:
file - grid map file
Throws:
IOException - in case of I/O or parsing error.

load

public void load(InputStream input)
          throws IOException
Loads grid map file definition from a given input stream. The input stream is not closed in case of an error.
Parameters:
input - input stream containing grid map definitions.
Throws:
IOException - in case of I/O error or parsing error.

getUserID

public String getUserID(String globusID)
Returns first local user name mapped to the specified globusID.
Parameters:
globusID - globusID
Returns:
local user name for the specified globusID. Null if the globusID is not mapped to a local user name.

getUserIDs

public String[] getUserIDs(String globusID)
Returns local user names mapped to the specified globusID.
Parameters:
globusID - globusID
Returns:
array of local user names for the specified globusID. Null if the globusID is not mapped to any local user name.

checkUser

public boolean checkUser(String globusID,
                         String userID)
Checks if a given globus ID is associated with given local user account.
Parameters:
globusID - globus ID
userID - userID
Returns:
true if globus ID is associated with given local user account, false, otherwise.

getGlobusID

public String getGlobusID(String userID)
Returns globus ID associated with the specified local user name.
Parameters:
userID - local user name
Returns:
associated globus ID, null if there is not any.

getAllGlobusID

public String[] getAllGlobusID(String userID)
Returns all globus IDs associated with the specified local user name.
Parameters:
userID - local user name
Returns:
associated globus ID, null if there is not any.

map

public void map(String globusID,
                String userID)