Class Abstract
- java.lang.Object
-
- edu.isi.pegasus.planner.code.generator.condor.style.Abstract
-
- All Implemented Interfaces:
CondorStyle
- Direct Known Subclasses:
Condor
,CondorG
,CondorGlideIN
,CreamCE
,GLite
public abstract class Abstract extends java.lang.Object implements CondorStyle
An abstract implementation of the CondorStyle interface. Implements the initialization method.- Version:
- $Revision$
- Author:
- Karan Vahi
-
-
Field Summary
Fields Modifier and Type Field Description protected CredentialHandlerFactory
mCredentialFactory
Handle to the Credential Handler Factoryprotected LogManager
mLogger
A handle to the logging object.protected PegasusProperties
mProps
The object holding all the properties pertaining to Pegasus.protected SiteStore
mSiteStore
The handle to the Site Catalog Store.-
Fields inherited from interface edu.isi.pegasus.planner.code.generator.condor.CondorStyle
VERSION
-
-
Constructor Summary
Constructors Constructor Description Abstract()
The default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
apply(AggregatedJob job)
Apply a style to an AggregatedJobprotected void
applyCredentialsForJobSubmission(Job job)
Associates credentials required for job submission.protected void
applyCredentialsForLocalExec(Job job)
Examines the credential requirements for a job and adds appropiate transfer and environment directives for the credentials to be picked up for the local jobprotected void
applyCredentialsForRemoteExec(Job job)
Examines the credential requirements for a job and adds appropiate transfer and environment directives for the credentials to be staged and picked up by the job.protected void
complainForCredential(Job job, java.lang.String key, java.lang.String site)
Complain if a particular credential key is not found for a siteprotected java.lang.String
errorMessage(Job job, java.lang.String style, java.lang.String universe)
Constructs an error message in case of style mismatch.void
initialize(PegasusBag bag, CredentialHandlerFactory credentialFactory)
Initializes the Code Style implementation.-
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.planner.code.generator.condor.CondorStyle
apply
-
-
-
-
Field Detail
-
mProps
protected PegasusProperties mProps
The object holding all the properties pertaining to Pegasus.
-
mSiteStore
protected SiteStore mSiteStore
The handle to the Site Catalog Store.
-
mLogger
protected LogManager mLogger
A handle to the logging object.
-
mCredentialFactory
protected CredentialHandlerFactory mCredentialFactory
Handle to the Credential Handler Factory
-
-
Method Detail
-
initialize
public void initialize(PegasusBag bag, CredentialHandlerFactory credentialFactory) throws CondorStyleException
Initializes the Code Style implementation.- Specified by:
initialize
in interfaceCondorStyle
- Parameters:
bag
- the bag of initialization objectscredentialFactory
- the credential handler factory- Throws:
CondorStyleFactoryException
- that nests any error that might occur during the instantiation of the implementation.CondorStyleException
-
apply
public void apply(AggregatedJob job) throws CondorStyleException
Apply a style to an AggregatedJob- Specified by:
apply
in interfaceCondorStyle
- Parameters:
job
- theAggregatedJob
object containing the job.- Throws:
CondorStyleException
- in case of any error occuring code generation.
-
applyCredentialsForRemoteExec
protected void applyCredentialsForRemoteExec(Job job) throws CondorStyleException
Examines the credential requirements for a job and adds appropiate transfer and environment directives for the credentials to be staged and picked up by the job.- Parameters:
job
-- Throws:
CondorStyleException
-
applyCredentialsForLocalExec
protected void applyCredentialsForLocalExec(Job job) throws CondorStyleException
Examines the credential requirements for a job and adds appropiate transfer and environment directives for the credentials to be picked up for the local job- Parameters:
job
-- Throws:
CondorStyleException
-
applyCredentialsForJobSubmission
protected void applyCredentialsForJobSubmission(Job job) throws CondorStyleException
Associates credentials required for job submission.- Parameters:
job
-- Throws:
CondorStyleException
-
complainForCredential
protected void complainForCredential(Job job, java.lang.String key, java.lang.String site) throws CondorStyleException
Complain if a particular credential key is not found for a site- Parameters:
job
-key
-site
-- Throws:
CondorStyleException
-
errorMessage
protected java.lang.String errorMessage(Job job, java.lang.String style, java.lang.String universe)
Constructs an error message in case of style mismatch.- Parameters:
job
- the job object.style
- the name of the style.universe
- the universe associated with the job.
-
-