au.edu.archer.service.srb.api
Interface SRBService

All Superinterfaces:
Service
All Known Implementing Classes:
SRBServiceImpl

public interface SRBService
extends Service

Servicing for managing SRB.


Field Summary
static java.lang.String ADMN_GRP
          ADMN_GRP.
static java.lang.String DATAFILE
          DATAFILE.
static java.lang.String DATASET
          DATASET.
static java.lang.String EXPERIMENT
          EXPERIMENT.
static java.lang.String PROJECT
          PROJECT.
static java.lang.String SAMPLE
          SAMPLE.
static int SRB_ALL
          SRB_ALL.
static int SRB_ANNOTATE
          SRB_ANNOTATE.
static int SRB_NULL
          SRB_NULL.
static int SRB_READ
          SRB_READ.
static int SRB_WRITE
          SRB_WRITE.
static java.lang.String TEAM_GRP
          TEAM_GRP.
 
Method Summary
 void addGroupPermissions(SRBGroupPermissionRequest request)
          Modify group permissions.
 SRBLoginResponse authenticate(SRBLoginRequest request)
          Authenticate SRB login request.
 void copyDataset(SRBCopyRequest copyRequest)
          Copy Dataset.
 SRBContentInfo createDirectory(SRBContentRequest srbDirRequest)
          Create Directory.
 void deleteContent(SRBContentRequest srbDirRequest)
          Delete a SRB content[File, Directory, Collection ...].
 SRBDownloadResponse downloadContent(SRBDownloadRequest request)
          Get the content of the given file in the specified directory.
 java.util.Map<java.lang.String,java.lang.String> getAllSRBGroups(SRBRequest request)
          Retrieve all SRB groups.
 SRBContentInfo getContentInfo(SRBContentRequest request)
          Retrieve SRB content info.
 java.util.Map<java.lang.String,java.lang.String> getProjectGroups(SRBContentRequest request, java.lang.String contentType)
          Retrieve parent project groups.
 boolean isAuthorised(SRBContentRequest request, int operation)
          Check if user is authorised to perform a SRB operation.
 java.util.List<SRBContentInfo> listAll(SRBContentRequest request)
          Retrieve staging area content.
 java.util.List<SRBContentInfo> listDir(SRBContentRequest srbDirRequest)
          List all sub-directories in the given directory.
 java.util.List<SRBContentInfo> listFile(SRBContentRequest srbDirRequest)
          List all files in the given directory.
 java.util.List<SRBContentInfo> listScratchDirs(SRBContentRequest request)
          List all sub-directories in a scratch area directory that are 4 level down from the scratch area.
 SRBContentInfo renameContent(SRBRenameContentRequest request)
          Rename SRB content.
 java.lang.String uploadContent(SRBUploadRequest srbUploadRequest)
          Upload file to SRB.
 

Field Detail

SRB_READ

static final int SRB_READ
SRB_READ.

See Also:
Constant Field Values

SRB_WRITE

static final int SRB_WRITE
SRB_WRITE.

See Also:
Constant Field Values

SRB_ALL

static final int SRB_ALL
SRB_ALL.

See Also:
Constant Field Values

SRB_ANNOTATE

static final int SRB_ANNOTATE
SRB_ANNOTATE.

See Also:
Constant Field Values

SRB_NULL

static final int SRB_NULL
SRB_NULL.

See Also:
Constant Field Values

ADMN_GRP

static final java.lang.String ADMN_GRP
ADMN_GRP.

See Also:
Constant Field Values

TEAM_GRP

static final java.lang.String TEAM_GRP
TEAM_GRP.

See Also:
Constant Field Values

PROJECT

static final java.lang.String PROJECT
PROJECT.

See Also:
Constant Field Values

EXPERIMENT

static final java.lang.String EXPERIMENT
EXPERIMENT.

See Also:
Constant Field Values

SAMPLE

static final java.lang.String SAMPLE
SAMPLE.

See Also:
Constant Field Values

DATASET

static final java.lang.String DATASET
DATASET.

See Also:
Constant Field Values

DATAFILE

static final java.lang.String DATAFILE
DATAFILE.

See Also:
Constant Field Values
Method Detail

authenticate

SRBLoginResponse authenticate(SRBLoginRequest request)
                              throws InvalidSRBRequestException
Authenticate SRB login request.

Parameters:
request - SRBLoginRequest object.
Returns:
SRBLoginResponse a SRBLoginResponse object contains sessionId.
Throws:
InvalidSRBRequestException - if the request parameters are invalid.

isAuthorised

boolean isAuthorised(SRBContentRequest request,
                     int operation)
                     throws InvalidSRBRequestException
Check if user is authorised to perform a SRB operation.

Parameters:
request - SRBContentRequest.
operation - operation code.
Returns:
true if authorised, false otherwise.
Throws:
InvalidSRBRequestException - if any errors occur.

getAllSRBGroups

java.util.Map<java.lang.String,java.lang.String> getAllSRBGroups(SRBRequest request)
                                                                 throws InvalidSRBRequestException
Retrieve all SRB groups.

Parameters:
request - SRBRequest object.
Returns:
Map of all SRB groups.
Throws:
InvalidSRBRequestException - if the request parameters are invalid.

getProjectGroups

java.util.Map<java.lang.String,java.lang.String> getProjectGroups(SRBContentRequest request,
                                                                  java.lang.String contentType)
                                                                  throws InvalidSRBRequestException
Retrieve parent project groups.

Parameters:
request - SRBContentRequest.
contentType - content type.
Returns:
Map of parent project groups.
Throws:
InvalidSRBRequestException - if the request parameters are invalid.

addGroupPermissions

void addGroupPermissions(SRBGroupPermissionRequest request)
                         throws InvalidSRBRequestException
Modify group permissions.

Parameters:
request - SRBGroupPermissionRequest.
Throws:
InvalidSRBRequestException - if the request parameters are invalid.

listAll

java.util.List<SRBContentInfo> listAll(SRBContentRequest request)
                                       throws InvalidSRBRequestException
Retrieve staging area content.

Parameters:
request - SRBContentRequest object.
Returns:
List of staging area content.
Throws:
InvalidSRBRequestException - if the request parameters are invalid.

listDir

java.util.List<SRBContentInfo> listDir(SRBContentRequest srbDirRequest)
                                       throws InvalidSRBRequestException
List all sub-directories in the given directory. The supplied directory name is relative to the home directory.

Parameters:
srbDirRequest - request object.
Returns:
List of SDirectory object.
Throws:
InvalidSRBRequestException - if request is invalid.

listScratchDirs

java.util.List<SRBContentInfo> listScratchDirs(SRBContentRequest request)
                                               throws InvalidSRBRequestException
List all sub-directories in a scratch area directory that are 4 level down from the scratch area. The supplied directory name is relative to the home directory.

Parameters:
request - srbDirRequest request object.
Returns:
List of SDirectory object.
Throws:
InvalidSRBRequestException - if request is invalid.

listFile

java.util.List<SRBContentInfo> listFile(SRBContentRequest srbDirRequest)
                                        throws InvalidSRBRequestException
List all files in the given directory. The supplied directory name is relative to the home directory.

Parameters:
srbDirRequest - request object.
Returns:
List of SFile object.
Throws:
InvalidSRBRequestException - if request is invalid.

getContentInfo

SRBContentInfo getContentInfo(SRBContentRequest request)
                              throws InvalidSRBRequestException
Retrieve SRB content info.

Parameters:
request - SRBContentRequest
Returns:
SFile object.
Throws:
InvalidSRBRequestException - if the request parameters are invalid

createDirectory

SRBContentInfo createDirectory(SRBContentRequest srbDirRequest)
                               throws InvalidSRBRequestException,
                                      SRBServiceException
Create Directory.

Parameters:
srbDirRequest - request object.
Returns:
SRBContentInfo object.
Throws:
InvalidSRBRequestException - if request is invalid.
SRBServiceException - if error occurs in SRB service.

renameContent

SRBContentInfo renameContent(SRBRenameContentRequest request)
                             throws SRBServiceException
Rename SRB content.

Parameters:
request - SRBRenameContentRequest object.
Returns:
SRBContentInfo object.
Throws:
SRBServiceException - if failed to change name.

uploadContent

java.lang.String uploadContent(SRBUploadRequest srbUploadRequest)
                               throws InvalidSRBRequestException,
                                      SRBServiceException
Upload file to SRB.

Parameters:
srbUploadRequest - request object.
Returns:
String SRB File Location.
Throws:
InvalidSRBRequestException - if request is invalid.
SRBServiceException - if error occurs in SRB service.

downloadContent

SRBDownloadResponse downloadContent(SRBDownloadRequest request)
                                    throws InvalidSRBRequestException
Get the content of the given file in the specified directory.

Parameters:
request - SRBFileRequest down file request.
Returns:
SRBDownloadResponse object.
Throws:
InvalidSRBRequestException - if request is invalid.

deleteContent

void deleteContent(SRBContentRequest srbDirRequest)
                   throws InvalidSRBRequestException,
                          SRBServiceException
Delete a SRB content[File, Directory, Collection ...].

Parameters:
srbDirRequest - request object.
Throws:
InvalidSRBRequestException - if request is invalid.
SRBServiceException - if error occurs in SRB service.

copyDataset

void copyDataset(SRBCopyRequest copyRequest)
                 throws SRBServiceException
Copy Dataset.

Parameters:
copyRequest - SRBCopyRequest copy request object.
Throws:
SRBServiceException - throws SRBServiceException if error happens.


Copyright © 2008-09 Monash University. All Rights Reserved.