Java Globus API: Class GridMap

org.globus.security.gridmap
Class GridMap

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

public class GridMap
extends java.lang.Object


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

Field Detail

map

protected java.util.Map map
Constructor Detail

GridMap

public GridMap()
Method Detail

GridMap

public void GridMap()

load

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

load

public void load(java.io.InputStream input)
          throws java.io.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:
java.io.IOException - in case of I/O error or parsing error.

getUserID

public java.lang.String getUserID(java.lang.String globusID)
Returns 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.

checkUser

public boolean checkUser(java.lang.String globusID,
                         java.lang.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 java.lang.String getGlobusID(java.lang.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.

map

public void map(java.lang.String globusID,
                java.lang.String userID)