edu.sdsc.grid.io.srb
Class SRBFileSystem

java.lang.Object
  extended by edu.sdsc.grid.io.GeneralFileSystem
      extended by edu.sdsc.grid.io.RemoteFileSystem
          extended by edu.sdsc.grid.io.srb.SRBFileSystem
All Implemented Interfaces:
java.lang.Cloneable

public class SRBFileSystem
extends RemoteFileSystem

The SRBFileSystem class is the class for connection implementations to SRB servers. It provides the framework to support a wide range of SRB semantics. Specifically, the functions needed to interact with a SRB server.

Many of the methods remain package private, though a few "srb..." methods have been made public. These methods are generally very low level and their use is not recommended. Clear, high level equivalents are being developed elsewhere in the JARGON API, and in the SRBAdmin tool. If you require the functionality of any of these methods and it is not yet available as a high level method, please notify the administrator of the JARGON package and we will try to include your request in the next release.

Since:
JARGON1.0
See Also:
SRBCommands

Field Summary
static java.lang.String PATH_SEPARATOR
          Deprecated. Use SRBFile separator and pathSeparator
static int PORTAL_OFF
          Used for proxy commands, no result.
static int PORTAL_ON
          Used for proxy commands, create a portal and put it in env PORTAL_ENV.
static int PORTAL_STD_IN_OUT
          Used for proxy commands, send result to the InputStream
static java.lang.String SRB_ROOT
          The SRB only has one root, "/".
 
Fields inherited from class edu.sdsc.grid.io.GeneralFileSystem
account, DEBUG, roots
 
Constructor Summary
SRBFileSystem()
          Opens a socket connection to read from and write to.
SRBFileSystem(SRBAccount srbAccount)
          Opens a socket connection to read from and write to.
 
Method Summary
 void close()
          Closes the connection to the SRB file system.
 boolean equals(java.lang.Object obj)
          Tests this filesystem object for equality with the given object.
 java.io.InputStream executeProxyCommand(java.lang.String command, java.lang.String commandArgs)
          Proxy Operation that executes a command.
 java.io.InputStream executeProxyCommand(java.lang.String command, java.lang.String commandArgs, java.lang.String hostAddress, int portalFlag)
          Proxy Operation that executes a command.
 java.io.InputStream executeProxyCommand(java.lang.String command, java.lang.String commandArgs, java.lang.String hostAddress, java.lang.String fileName, int portalFlag)
          Proxy Operation that executes a command.
protected  void finalize()
          Finalizes the object by explicitly letting go of each of its internally held values.
 GeneralAccount getAccount()
          Returns the account used by this SRBFileSystem.
 java.lang.String getDefaultStorageResource()
           
 java.lang.String getDomainName()
           
 java.lang.String getExecFile()
           
 java.lang.String getMcatZone()
           
 int getOptions()
           
 java.lang.String getPassword()
          Returns the password used by this RemoteAccount.
 java.lang.String getProxyDomainName()
           
 java.lang.String getProxyMcatZone()
           
 java.lang.String getProxyUserName()
           
 int getQueryRecordsWanted()
           
 java.lang.String[] getRootDirectories()
          Returns the root directories of the SRB file system.
 java.lang.String getVersion()
           
 float getVersionNumber()
           
static int getWriteBufferSize()
          Get the buffer size used by the SRB socket write.
 boolean isClosed()
          Returns if the connection to the SRB has been closed or not.
 boolean isConnected()
          Checks if the socket is connected.
 MetaDataRecordList[] query(MetaDataCondition[] conditions, MetaDataSelect[] selects)
          Queries the file server to find all files that match a set of conditions.
 MetaDataRecordList[] query(MetaDataCondition[] conditions, MetaDataSelect[] selects, int recordsWanted)
          Queries the file server to find all files that match a set of conditions.
 MetaDataRecordList[] query(MetaDataCondition[] conditions, MetaDataSelect[] selects, int recordsWanted, boolean orderBy)
          Queries the file server to find all files that match a set of conditions.
 MetaDataRecordList[] query(MetaDataCondition[] conditions, MetaDataSelect[] selects, int recordsWanted, boolean orderBy, boolean nonDistinct)
          Queries the file server to find all files that match a set of conditions.
 MetaDataRecordList[] query(MetaDataSelect select)
          Queries all files in the metadata catalog and uses one metadata value, select, to be returned.
 MetaDataRecordList[] query(MetaDataSelect[] selects)
          Queries all files in the metadata catalog and uses metadata values, selects, to be returned.
 MetaDataRecordList[] query(MetaDataSelect[] selects, int recordsWanted)
          Queries all files in the metadata catalog and uses metadata values, selects, to be returned.
 MetaDataRecordList[] query(java.lang.String fieldName)
          Queries all files in the metadata catalog and uses metadata values, fieldName, to be returned.
 MetaDataRecordList[] query(java.lang.String[] fieldNames)
          Queries all files in the metadata catalog and uses metadata values, selects, to be returned.
 void registerURL(SRBFile file, java.net.URL url)
          If this resource is a 'http file system' type resource, then the url will be registered with that resource as the abstract pathname file.
protected  void setAccount(GeneralAccount account)
          Loads the account information for this file system.
 void setFirewallPorts(int minPort, int maxPort)
          Used to specify a port range available through a firewall.
 void setQueryRecordsWanted(int num)
          Sets the default number of records that will be returned by a query.
static void setWriteBufferSize(int bufferSize)
          Set the buffer size used by the SRB socket write.
 void srbDeleteValue(int valueType, java.lang.String deleteValue)
          Delete a Value; a single MCAT entry.
 SRBAccount srbGetUserByDn(int catType, java.lang.String userDn)
          Get the zone and user@domain given the user's dn
 void srbIngestToken(java.lang.String typeName, java.lang.String newValue, java.lang.String parentValue)
          Ingest Token.
 void srbModifyRescInfo(int catType, java.lang.String resourceName, int actionType, java.lang.String dataValue1, java.lang.String dataValue2, java.lang.String dataValue3, java.lang.String dataValue4)
          Modify/create/delete a SRB resource.
 void srbModifyUser(int catType, java.lang.String dataValue1, java.lang.String dataValue2, int actionType)
          Modify a user info.
 void srbModifyZone(int catType, java.lang.String zoneName, java.lang.String dataValue1, java.lang.String dataValue2, java.lang.String dataValue3, java.lang.String dataValue4, java.lang.String dataValue5, int actionType)
          Modify and Insert SRB zone and zone information in the Metadata Catalog.
 void srbRegisterLocation(java.lang.String locName, java.lang.String fullAddr, java.lang.String parentLoc, java.lang.String serverUser, java.lang.String serverUserDomain)
          Register location information.
 void srbRegisterLogicalResource(java.lang.String rescName, java.lang.String rescType, java.lang.String phyResc, java.lang.String phyPath)
          Register Logical Resource.
 void srbRegisterReplicateResourceInfo(java.lang.String physicalRescName, java.lang.String rescType, java.lang.String oldLogicalRescName, java.lang.String inDefaultPath)
          srbRegisterReplicateResourceInfo Input - String physicalRescName - The physical resource name.
 void srbRegisterResource(java.lang.String rescName, java.lang.String rescType, java.lang.String location, java.lang.String phyPath, java.lang.String className, int size)
          Register Resource.
 void srbRegisterUser(int catType, java.lang.String userName, java.lang.String userDomain, java.lang.String userPasswd, java.lang.String userType, java.lang.String userAddress, java.lang.String userPhone, java.lang.String userEmail)
          Register a user.
 void srbRegisterUserGrp(int catType, java.lang.String userGrpName, java.lang.String userGrpPasswd, java.lang.String userGrpType, java.lang.String userGrpAddress, java.lang.String userGrpPhone, java.lang.String userGrpEmail)
          Register a user group
 java.lang.String toString()
          Returns a string representation of this file system object.
 
Methods inherited from class edu.sdsc.grid.io.RemoteFileSystem
getHost, getPort, getUserName
 
Methods inherited from class edu.sdsc.grid.io.GeneralFileSystem
clone, getHomeDirectory
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

SRB_ROOT

public static final java.lang.String SRB_ROOT
The SRB only has one root, "/".

See Also:
Constant Field Values

PORTAL_OFF

public static final int PORTAL_OFF
Used for proxy commands, no result.

See Also:
Constant Field Values

PORTAL_ON

public static final int PORTAL_ON
Used for proxy commands, create a portal and put it in env PORTAL_ENV.

See Also:
Constant Field Values

PORTAL_STD_IN_OUT

public static final int PORTAL_STD_IN_OUT
Used for proxy commands, send result to the InputStream

See Also:
Constant Field Values

PATH_SEPARATOR

public static final java.lang.String PATH_SEPARATOR
Deprecated. Use SRBFile separator and pathSeparator
Standard SRB path separator character represented as a string for convenience. This string contains a single character, namely GeneralFile.PATH_SEPARATOR_CHAR.

Constructor Detail

SRBFileSystem

public SRBFileSystem()
              throws java.io.FileNotFoundException,
                     java.io.IOException
Opens a socket connection to read from and write to. Loads the default SRB user account information from their home directory. The account information stored in this object cannot be changed once constructed.

This constructor is provided for convenience however, it is recommended that all necessary data be sent to the constructor and not left to the defaults.

Throws:
java.io.FileNotFoundException - if the user data file cannot be found.
java.io.IOException - if an IOException occurs.

SRBFileSystem

public SRBFileSystem(SRBAccount srbAccount)
              throws java.io.IOException,
                     java.lang.NullPointerException
Opens a socket connection to read from and write to. Opens the account held in the SRBAccount object. The account information stored in this object cannot be changed once constructed.

Parameters:
srbAccount - The SRB account information object.
Throws:
java.lang.NullPointerException - if srbAccount is null.
java.io.IOException - if an IOException occurs.
Method Detail

finalize

protected void finalize()
                 throws java.lang.Throwable
Finalizes the object by explicitly letting go of each of its internally held values.

Overrides:
finalize in class GeneralFileSystem
Throws:
java.lang.Throwable

setAccount

protected void setAccount(GeneralAccount account)
                   throws java.io.IOException
Loads the account information for this file system.

Specified by:
setAccount in class GeneralFileSystem
Throws:
java.io.IOException

setWriteBufferSize

public static void setWriteBufferSize(int bufferSize)
Set the buffer size used by the SRB socket write. Must be greater than 0.

Parameters:
bufferSize - The buffer size used by the SRB socket write.

getWriteBufferSize

public static int getWriteBufferSize()
Get the buffer size used by the SRB socket write.


getAccount

public GeneralAccount getAccount()
                          throws java.lang.NullPointerException
Returns the account used by this SRBFileSystem.

Overrides:
getAccount in class GeneralFileSystem
Throws:
java.lang.NullPointerException

getRootDirectories

public java.lang.String[] getRootDirectories()
Returns the root directories of the SRB file system.

Specified by:
getRootDirectories in class GeneralFileSystem

setFirewallPorts

public void setFirewallPorts(int minPort,
                             int maxPort)
Used to specify a port range available through a firewall. Needed because some SRB commands open new ports on the client machine.


setQueryRecordsWanted

public void setQueryRecordsWanted(int num)
Sets the default number of records that will be returned by a query. Must be a positive integer.


getQueryRecordsWanted

public int getQueryRecordsWanted()
Returns:
the default number of records that will be returned by a query.

getPassword

public java.lang.String getPassword()
Description copied from class: RemoteFileSystem
Returns the password used by this RemoteAccount.

Overrides:
getPassword in class RemoteFileSystem
Returns:
the SRB password

getProxyUserName

public java.lang.String getProxyUserName()
Returns:
the proxy user name

getProxyDomainName

public java.lang.String getProxyDomainName()
Returns:
the proxy domain name

getOptions

public int getOptions()
Returns:
the options

getDomainName

public java.lang.String getDomainName()
Returns:
the domain name used by the client. Only different from the proxyDomainName for ticketed users.

getVersion

public java.lang.String getVersion()
Returns:
the SRB version

getDefaultStorageResource

public java.lang.String getDefaultStorageResource()
Returns:
the default storage resource.

getProxyMcatZone

public java.lang.String getProxyMcatZone()
Returns:
the proxy mcat zone.

getMcatZone

public java.lang.String getMcatZone()
Returns:
the client mcat zone.

getExecFile

public java.lang.String getExecFile()
Returns:
the exec file.

getVersionNumber

public float getVersionNumber()
Returns:
the version number

query

public MetaDataRecordList[] query(java.lang.String fieldName)
                           throws java.io.IOException
Queries all files in the metadata catalog and uses metadata values, fieldName, to be returned.

This is a convenience method, the same as the code:
query( MetaDataSet.newSelection( fieldName ) );

Parameters:
fieldName - The string name used to form the select object.
Returns:
The metadata values for this file refered to by fieldName
Throws:
java.io.IOException

query

public MetaDataRecordList[] query(java.lang.String[] fieldNames)
                           throws java.io.IOException
Queries all files in the metadata catalog and uses metadata values, selects, to be returned.

This is a convenience method, the same as the code:
query( MetaDataSet.newSelection( fieldNames ) );

Parameters:
fieldNames - The string names used to form the select objects.
Returns:
The metadata values for this file refered to by fieldNames
Throws:
java.io.IOException

query

public MetaDataRecordList[] query(MetaDataSelect select)
                           throws java.io.IOException
Queries all files in the metadata catalog and uses one metadata value, select, to be returned.

Throws:
java.io.IOException

query

public MetaDataRecordList[] query(MetaDataSelect[] selects)
                           throws java.io.IOException
Queries all files in the metadata catalog and uses metadata values, selects, to be returned.

Throws:
java.io.IOException

query

public MetaDataRecordList[] query(MetaDataSelect[] selects,
                                  int recordsWanted)
                           throws java.io.IOException
Queries all files in the metadata catalog and uses metadata values, selects, to be returned.

Throws:
java.io.IOException

query

public MetaDataRecordList[] query(MetaDataCondition[] conditions,
                                  MetaDataSelect[] selects)
                           throws java.io.IOException
Queries the file server to find all files that match a set of conditions. For all those that match, the fields indicated in the select array are returned in the result object.

Specified by:
query in class GeneralFileSystem
Parameters:
conditions - The conditional statements that describe the values to query the server, like WHERE in SQL.
selects - The attributes to be returned from those values that met the conditions, like SELECT in SQL.
Throws:
java.io.IOException

query

public MetaDataRecordList[] query(MetaDataCondition[] conditions,
                                  MetaDataSelect[] selects,
                                  int recordsWanted)
                           throws java.io.IOException
Queries the file server to find all files that match a set of conditions. For all those that match, the fields indicated in the select array are returned in the result object.

Specified by:
query in class GeneralFileSystem
Parameters:
conditions - The conditional statements that describe the values to query the server, like WHERE in SQL.
selects - The attributes to be returned from those values that met the conditions, like SELECT in SQL.
recordsWanted - The number of values to return with the query, use the getMoreRecords() method in MetaDataRecordList to continue the search, if more records are available.
Throws:
java.io.IOException

query

public MetaDataRecordList[] query(MetaDataCondition[] conditions,
                                  MetaDataSelect[] selects,
                                  int recordsWanted,
                                  boolean orderBy)
                           throws java.io.IOException
Queries the file server to find all files that match a set of conditions. For all those that match, the fields indicated in the select array are returned in the result object.

Parameters:
conditions - The conditional statements that describe the values to query the server, like WHERE in SQL.
selects - The attributes to be returned from those values that met the conditions, like SELECT in SQL.
recordsWanted - The number of values to return with the query, use the getMoreRecords() method in MetaDataRecordList to continue the search, if more records are available.
orderBy - sorts the query's returned values. Ordered matching the order of the selects array.
Throws:
java.io.IOException

query

public MetaDataRecordList[] query(MetaDataCondition[] conditions,
                                  MetaDataSelect[] selects,
                                  int recordsWanted,
                                  boolean orderBy,
                                  boolean nonDistinct)
                           throws java.io.IOException
Queries the file server to find all files that match a set of conditions. For all those that match, the fields indicated in the select array are returned in the result object.

While condition and select array objects have all been checked for self-consistency during their construction, there are additional problems that must be detected at query time:

For instance, it is possible to build a condition object appropriate for the SRB, then pass that object in a local file system query. That will find that the condition is incompatible and generate a mismatch exception.

Query is implemented by the file-server-specific classes, like that for the SRB, FTP, etc. Those classes must re-map condition and select field names and operator codes to those required by a particular file server and protocol version. Once re-mapped, they issue the query and get results. The results are then mapped back to the standard public field names of the MetaDataGroups.

The orderBy variable sorts the query's returned values. The order will match the order of the selects array.
E.g., where selects[0] = SIZE
and selects[1] = OWNER
The files returned

Parameters:
conditions - The conditional statements that describe the values to query the server, like WHERE in SQL and all conditions in the array will be AND-ed together to form the query.
selects - The attributes to be returned from those values that met the conditions, like SELECT in SQL.
recordsWanted - The number of values to return with the query, use the getMoreRecords() method in MetaDataRecordList to continue the search, if more records are available.
orderBy - sorts the query's returned values. Ordered matching the order of the selects array.
nonDistinct - If true, allows redundencies in returned data.
Throws:
java.io.IOException

equals

public boolean equals(java.lang.Object obj)
Tests this filesystem object for equality with the given object. Returns true if and only if the argument is not null and both are filesystem objects connected to the same filesystem using the same account information.

Specified by:
equals in class GeneralFileSystem
Parameters:
obj - The object to be compared with this abstract pathname
Returns:
true if and only if the objects are the same; false otherwise

isConnected

public boolean isConnected()
Checks if the socket is connected.


toString

public java.lang.String toString()
Returns a string representation of this file system object. The string is formated according to the SRB URI model. Note: the user password will not be included in the URI.

Overrides:
toString in class GeneralFileSystem

close

public void close()
           throws java.io.IOException
Closes the connection to the SRB file system. The filesystem cannot be reconnected after this method is called. If this object, or another object which uses this filesystem, tries to send a command to the server a ClosedChannelException will be thrown.

Throws:
java.io.IOException

isClosed

public boolean isClosed()
                 throws java.io.IOException
Returns if the connection to the SRB has been closed or not.

Returns:
true if the connection has been closed
Throws:
java.io.IOException

executeProxyCommand

public java.io.InputStream executeProxyCommand(java.lang.String command,
                                               java.lang.String commandArgs)
                                        throws java.io.IOException
Proxy Operation that executes a command. The results of the command will be returned by the InputStream. The protocol of the return value on the InputStream depends on the command that was run. The InputStream is opened on a different port than the main SRB connection. It can be read independently of other SRB calls.

Parameters:
command - The command to run.
commandArgs - The command argument string.
Returns:
any byte stream output.
Throws:
java.io.IOException - If an IOException occurs.

executeProxyCommand

public java.io.InputStream executeProxyCommand(java.lang.String command,
                                               java.lang.String commandArgs,
                                               java.lang.String hostAddress,
                                               int portalFlag)
                                        throws java.io.IOException
Proxy Operation that executes a command.

Parameters:
command - The command to run.
commandArgs - The command argument string.
hostAddress - The host address where this proxy operation should be performed. null = the server for the current connect.
portalFlag - The portal flag. Valid flags are - PORTAL_OFF, PORTAL_ON, PORTAL_STD_IN_OUT.
Returns:
any byte stream output.
Throws:
java.io.IOException - If an IOException occurs.

executeProxyCommand

public java.io.InputStream executeProxyCommand(java.lang.String command,
                                               java.lang.String commandArgs,
                                               java.lang.String hostAddress,
                                               java.lang.String fileName,
                                               int portalFlag)
                                        throws java.io.IOException
Proxy Operation that executes a command. Only valid for version 3.x.x and above. Method will not work for version 2.x.x, or before.

Parameters:
command - The command to run.
commandArgs - The command argument string.
hostAddress - The host address where this proxy operation should be performed. null = the server for the current connect.
fileName - The SRB path to a file to perform proxy operation on.
portalFlag - The portal flag. Valid flags are - PORTAL_OFF, PORTAL_ON, PORTAL_STD_IN_OUT.
Returns:
any byte stream output.
Throws:
java.io.IOException - If an IOException occurs.

registerURL

public void registerURL(SRBFile file,
                        java.net.URL url)
                 throws java.io.IOException
If this resource is a 'http file system' type resource, then the url will be registered with that resource as the abstract pathname file. The URL can then be read using the SRBFile, SRBRandomAccessFile and others as if it were a standard SRB file.

Throws:
java.io.IOException

srbRegisterUserGrp

public void srbRegisterUserGrp(int catType,
                               java.lang.String userGrpName,
                               java.lang.String userGrpPasswd,
                               java.lang.String userGrpType,
                               java.lang.String userGrpAddress,
                               java.lang.String userGrpPhone,
                               java.lang.String userGrpEmail)
                        throws java.io.IOException
Register a user group

Parameters:
catType - catalog type. e.g., MDAS_CATALOG.
userGrpName - The name of the user group to register.
userGrpPasswd - The user group passwd.
userGrpType - The user group type. Currently, at SDSC valid userType are: "staff", "sdsc staff", "sdsc staff scientist", "sdsc senior staff scientist", "pto staff", "ucsd staff" "student", "sdsc student", "uva student", "project", "umd student", "public", "sysadmin", " deleted"
userGrpAddress - The mailing address of the user group.
userGrpPhone - The phone number of the user group.
userGrpEmail - The Email address of the user group.
Throws:
java.io.IOException - If an IOException occurs

srbRegisterUser

public void srbRegisterUser(int catType,
                            java.lang.String userName,
                            java.lang.String userDomain,
                            java.lang.String userPasswd,
                            java.lang.String userType,
                            java.lang.String userAddress,
                            java.lang.String userPhone,
                            java.lang.String userEmail)
                     throws java.io.IOException
Register a user.

Parameters:
catType - catalog type. e.g., MDAS_CATALOG.
userName - The name of the user to register.
userDomain - The domain of the user to register.
userPasswd - The user passwd.
userType - The user type. Currently, at SDSC valid userType are: "staff", "sdsc staff", "sdsc staff scientist", "sdsc senior staff scientist", "pto staff", "ucsd staff" "student", "sdsc student", "uva student", "project", "umd student", "public", "sysadmin", " deleted"
userAddress - The mailing address of the user.
userPhone - The phone number of the user.
userEmail - The Email address of the user.
Throws:
java.io.IOException - If an IOException occurs

srbModifyUser

public void srbModifyUser(int catType,
                          java.lang.String dataValue1,
                          java.lang.String dataValue2,
                          int actionType)
                   throws java.io.IOException
Modify a user info.

Parameters:
catType - catalog type. e.g., MDAS_CATALOG.
dataValue1, - String dataValue2 and int actionType - They are used to specify the user attributes to modify. A normal user may use it to modify his/her own password and a limited set of attributes. A user with MDAS sys admin privilege can also use these input values to modify other user's attributes.
Throws:
java.io.IOException - If an IOException occurs

srbModifyRescInfo

public void srbModifyRescInfo(int catType,
                              java.lang.String resourceName,
                              int actionType,
                              java.lang.String dataValue1,
                              java.lang.String dataValue2,
                              java.lang.String dataValue3,
                              java.lang.String dataValue4)
                       throws java.io.IOException
Modify/create/delete a SRB resource. Input - int catType - catalog type. e,g., MDAS_CATALOG. String resourceName - The storage resource name. e.g. "mda18-unix-sdsc" int actionType - The type of retraction. See srbC_mdas_externs.h for the actionType definition. For tapes, valid values are T_INSERT_TAPE_INFO, T_UPDATE_TAPE_INFO, T_UPDATE_TAPE_INFO_2, T_DELETE_TAPE_INFO. String dataValue1 - Input value 1. String dataValue2 - Input value 2. String dataValue3 - Input value 3. String dataValue4 - Input value 4.

Throws:
java.io.IOException

srbRegisterLocation

public void srbRegisterLocation(java.lang.String locName,
                                java.lang.String fullAddr,
                                java.lang.String parentLoc,
                                java.lang.String serverUser,
                                java.lang.String serverUserDomain)
                         throws java.io.IOException
Register location information. Input - String locName - The location name. String fullAddr - Full Address. String parentLoc - Parent location String serverUser - Server User String serverUserDomain - Server User Domain.

Throws:
java.io.IOException

srbIngestToken

public void srbIngestToken(java.lang.String typeName,
                           java.lang.String newValue,
                           java.lang.String parentValue)
                    throws java.io.IOException
Ingest Token. Input - String typeName - The type name. String newValue - The new value. String parentValue - Parent value.

Throws:
java.io.IOException

srbRegisterResource

public void srbRegisterResource(java.lang.String rescName,
                                java.lang.String rescType,
                                java.lang.String location,
                                java.lang.String phyPath,
                                java.lang.String className,
                                int size)
                         throws java.io.IOException
Register Resource. Input - String rescName - The resource name. String rescType - Resource type. String location - Location. String phyPath - Physical Path. String class - className. int size - size.

Throws:
java.io.IOException

srbRegisterLogicalResource

public void srbRegisterLogicalResource(java.lang.String rescName,
                                       java.lang.String rescType,
                                       java.lang.String phyResc,
                                       java.lang.String phyPath)
                                throws java.io.IOException
Register Logical Resource. Input - String rescName - The resource name. String rescType - Resource type. String phyResc - Physical resource. String phyPath - Physical path.

Throws:
java.io.IOException

srbRegisterReplicateResourceInfo

public void srbRegisterReplicateResourceInfo(java.lang.String physicalRescName,
                                             java.lang.String rescType,
                                             java.lang.String oldLogicalRescName,
                                             java.lang.String inDefaultPath)
                                      throws java.io.IOException
srbRegisterReplicateResourceInfo Input - String physicalRescName - The physical resource name. String rescType - Resource type. String oldLogicalRescName - old logical resource name. String indefaultPath - Indefault Path.

Throws:
java.io.IOException

srbDeleteValue

public void srbDeleteValue(int valueType,
                           java.lang.String deleteValue)
                    throws java.io.IOException
Delete a Value; a single MCAT entry.

Parameters:
valueType - - the value (token) type.
deleteValue - - The value (name) that is being deleted.
Throws:
java.io.IOException

srbModifyZone

public void srbModifyZone(int catType,
                          java.lang.String zoneName,
                          java.lang.String dataValue1,
                          java.lang.String dataValue2,
                          java.lang.String dataValue3,
                          java.lang.String dataValue4,
                          java.lang.String dataValue5,
                          int actionType)
                   throws java.io.IOException
Modify and Insert SRB zone and zone information in the Metadata Catalog. Information about the operation performed is also logged in the audit trail (if turned on). This is a privileged function and should be called only by a srbAdmin user.

Parameters:
catType - - catalog type. e,g., MDAS_CATALOG.
zone_name - - name of the zone
dataValue1 - - Input value 1.
dataValue2 - - Input value 2.
dataValue3 - - Input value 3.
dataValue4 - - Input value 4.
dataValue5 - - Input value 5.
actionType - - The type of action. performed values supported are:
INSERT_NEW_LOCAL_ZONE
dv1 = locn_desc
dv2 = port_number
dv3 = username@domain of remote MCAT admin
dv4 = zone_contact
dv5 = zone_comment
INSERT_NEW_ALIEN_ZONE
dv1-5 = same as for INSERT_NEW_LOCAL_ZONE
MODIFY_ZONE_INFO
dv1-5 = same as for INSERT_NEW_LOCAL_ZONE
empty string implies no change.
MODIFY_ZONE_FOR_USER
dv1 = user_name
dv2 = domain_name
CHANGE_ZONE_NAME
dv1 = new name
MODIFY_ZONE_LOCAL_FLAG
dv1 = new value (integer)
MODIFY_ZONE_STATUS
dv1 = new value (integer)
Throws:
java.io.IOException

srbGetUserByDn

public SRBAccount srbGetUserByDn(int catType,
                                 java.lang.String userDn)
                          throws java.io.IOException
Get the zone and user@domain given the user's dn

Parameters:
catType - catalog type. e,g., MDAS_CATALOG.
userDn - The Dn of the user
Returns:
output for zone:user@domain
Throws:
java.io.IOException