public class GridMap
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Field and Description |
---|---|
protected java.util.Map |
map |
Constructor and Description |
---|
GridMap() |
Modifier and Type | Method and Description |
---|---|
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[] |
getAllGlobusID(java.lang.String userID)
Returns all globus IDs associated with the
specified local user name.
|
static java.lang.String |
getDefaultGridMapLocation() |
java.lang.String |
getFileName()
|
java.lang.String |
getGlobusID(java.lang.String userID)
Returns globus ID associated with the
specified local user name.
|
boolean |
getIgnoreErrors()
Returns whether errors in the gridmap file are
ignored.
|
java.lang.String |
getUserID(java.lang.String globusID)
Returns first local user name mapped to the specified
globusID.
|
java.lang.String[] |
getUserIDs(java.lang.String globusID)
Returns local user names mapped to the specified
globusID.
|
boolean |
load(java.io.File file)
Loads grid map definition from a given file.
|
boolean |
load(java.io.InputStream input)
Loads grid map file definition from a given input stream.
|
boolean |
load(java.lang.String file)
Loads grid map definition from a given file.
|
void |
map(java.lang.String globusID,
java.lang.String userID) |
static java.lang.String |
normalizeDN(java.lang.String globusID) |
boolean |
refresh()
|
void |
setIgnoreErrors(boolean ignoreErrors)
Sets whether errors in the gridmap file
should be ignored.
|
public void setIgnoreErrors(boolean ignoreErrors)
ignoreErrors
- if true, errors in the gridmap file
will be ignored (warnings will be logged). If false,
an exception will be raised on errors.public boolean getIgnoreErrors()
public java.lang.String getFileName()
load
or load
functions. If no file was used, returns
null.public boolean load(java.lang.String file) throws java.io.IOException
file
- the grid map filejava.io.IOException
- in case of I/O error or
when there are parsing errors in the file (only when errors
are not ignored).public boolean load(java.io.File file) throws java.io.IOException
file
- the grid map filejava.io.IOException
- in case of I/O error or
when there are parsing errors in the file (only when errors
are not ignored).public boolean refresh() throws java.io.IOException
load
or load
functions.
The file will only be reloaded if it has changed
since the last time.java.io.IOException
- in case of I/O error or
when there are parsing errors in the file (only when errors
are not ignored).public boolean load(java.io.InputStream input) throws java.io.IOException
input
- the input stream that contains the gridmap
definitions.java.io.IOException
- in case of I/O error or
when there are parsing errors in the input (only when errors
are not ignored).public java.lang.String getUserID(java.lang.String globusID)
globusID
- globusIDpublic java.lang.String[] getUserIDs(java.lang.String globusID)
globusID
- globusIDpublic boolean checkUser(java.lang.String globusID, java.lang.String userID)
globusID
- globus IDuserID
- userIDpublic java.lang.String getGlobusID(java.lang.String userID)
userID
- local user namepublic java.lang.String[] getAllGlobusID(java.lang.String userID)
userID
- local user namepublic void map(java.lang.String globusID, java.lang.String userID)
public static java.lang.String normalizeDN(java.lang.String globusID)
public static java.lang.String getDefaultGridMapLocation()