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