edu.isi.pegasus.common.credential.impl
Class S3CFG

java.lang.Object
  extended by edu.isi.pegasus.common.credential.impl.Abstract
      extended by edu.isi.pegasus.common.credential.impl.S3CFG
All Implemented Interfaces:
CredentialHandler

public class S3CFG
extends Abstract
implements CredentialHandler

A convenience class that allows us to determine the path to the user s3cfg file.

Version:
$Revision: 4929 $
Author:
Mats Rynge, Karan Vahi

Nested Class Summary
 
Nested classes/interfaces inherited from interface edu.isi.pegasus.common.credential.CredentialHandler
CredentialHandler.TYPE
 
Field Summary
private static String DESCRIPTION
          The description
static String S3CFG_FILE_VARIABLE
          The name of the environment variable that specifies the path to the s3cfg file.
 
Fields inherited from class edu.isi.pegasus.common.credential.impl.Abstract
mLogger, mProps, mSiteStore
 
Fields inherited from interface edu.isi.pegasus.common.credential.CredentialHandler
VERSION
 
Constructor Summary
S3CFG()
          The default constructor.
 
Method Summary
 String getBaseName()
          returns the basename of the path to the local credential
 String getDescription()
          Returns the description for the implementing handler
 String getEnvironmentVariable()
          Returns the name of the environment variable that needs to be set for the job associated with the credential.
 String getPath(String site)
          Returns the path to s3cfg.
 
Methods inherited from class edu.isi.pegasus.common.credential.impl.Abstract
getPath, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface edu.isi.pegasus.common.credential.CredentialHandler
getPath, initialize
 

Field Detail

S3CFG_FILE_VARIABLE

public static final String S3CFG_FILE_VARIABLE
The name of the environment variable that specifies the path to the s3cfg file.

See Also:
Constant Field Values

DESCRIPTION

private static final String DESCRIPTION
The description

See Also:
Constant Field Values
Constructor Detail

S3CFG

public S3CFG()
The default constructor.

Method Detail

getPath

public String getPath(String site)
Returns the path to s3cfg. The order of preference is as follows - If a s3cfg is specified in the site catalog entry that is used - Else the one pointed to by the environment variable S3Cfg - Else the default path to the ~/.s3cfg

Specified by:
getPath in interface CredentialHandler
Parameters:
site - the site handle
Returns:
the path to s3cfg.

getBaseName

public String getBaseName()
returns the basename of the path to the local credential

Specified by:
getBaseName in interface CredentialHandler
Returns:

getEnvironmentVariable

public String getEnvironmentVariable()
Returns the name of the environment variable that needs to be set for the job associated with the credential.

Specified by:
getEnvironmentVariable in interface CredentialHandler
Returns:
the name of the environment variable.

getDescription

public String getDescription()
Returns the description for the implementing handler

Specified by:
getDescription in interface CredentialHandler
Returns:
description


Copyright © 2011 The University of Southern California. All Rights Reserved.