org.glite.wmsui.apij
Class UserJobs

java.lang.Object
  extended byorg.glite.wmsui.apij.UserJobs

public class UserJobs
extends java.lang.Object

Allow controlling all the jobs owned by the user The UserJobs class provides methods that allow controlling all the user's jobs during its lifetime. such as getting their status, logging information, or cancelling them

Version:
0.1
Author:
Alessandro Maraschini

Constructor Summary
UserJobs()
          Instantiates an UserJobs object using default user credential
UserJobs(java.io.File cp)
          Instantiates an UserJobs object using specified user credential
 
Method Summary
 java.util.Vector getJobs(Url lbAddress)
          Retreive the jobs owned by the user in a specific LB
 java.util.Vector getJobs(Url lbAddress, java.util.Calendar from, java.util.Calendar to, org.glite.jdl.Ad userTags, boolean[] includes, boolean[] excludes, boolean owned)
          Deprecated. use instead getJobs ( Url lbAddress , Query query)
 java.util.Vector getJobs(Url lbAddress, Query query)
          Retreive a vector of JobStatus that match the query for the specified LB
 java.util.Vector getStates(Url lbAddress)
          Retrieve the status of all the user's jobs
 void setCredPath(java.io.File cp)
          Set a different Proxy certificate from the default one and check it
 void unsetCredPath()
          Set the Proxy certificate as default
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserJobs

public UserJobs()
         throws org.globus.gsi.GlobusCredentialException,
                java.io.FileNotFoundException
Instantiates an UserJobs object using default user credential

Throws:
FileNotFoundException - Unable to find certificates files
org.globus.gsi.GlobusCredentialException - - Unable to get the specified proxy certificate

UserJobs

public UserJobs(java.io.File cp)
         throws org.globus.gsi.GlobusCredentialException,
                java.io.FileNotFoundException
Instantiates an UserJobs object using specified user credential

Parameters:
cp - The full path of the proxy certificate file to be set
Throws:
FileNotFoundException - Unable to find certificates files
org.globus.gsi.GlobusCredentialException - - Unable to get the specified proxy certificate
Method Detail

setCredPath

public void setCredPath(java.io.File cp)
                 throws org.globus.gsi.GlobusCredentialException
Set a different Proxy certificate from the default one and check it

Parameters:
cp - The full path of the proxy certificate file to be set
Throws:
FileNotFoundException - Unable to find certificates files
org.globus.gsi.GlobusCredentialException - - Unable to get the specified proxy certificate

unsetCredPath

public void unsetCredPath()
                   throws org.globus.gsi.GlobusCredentialException,
                          java.io.FileNotFoundException
Set the Proxy certificate as default

Throws:
FileNotFoundException - Unable to find certificates files
org.globus.gsi.GlobusCredentialException - - Unable to get the specified proxy certificate

getJobs

public java.util.Vector getJobs(Url lbAddress)
                         throws org.globus.gsi.GlobusCredentialException,
                                java.io.FileNotFoundException
Retreive the jobs owned by the user in a specific LB

Parameters:
lbAddress - the full Logging and Bookkeeping address
Returns:
A vector containing all the jobs owned by the user for the specified LB address
Throws:
FileNotFoundException - Unable to find certificates files
org.globus.gsi.GlobusCredentialException - - Unable to get the specified proxy certificate

getJobs

public java.util.Vector getJobs(Url lbAddress,
                                Query query)
                         throws org.globus.gsi.GlobusCredentialException,
                                java.io.FileNotFoundException
Retreive a vector of JobStatus that match the query for the specified LB

Parameters:
lbAddress - the full Logging and Bookkeeping address
query - filter specifying all the requirements of the search
Throws:
FileNotFoundException - Unable to find certificates files
org.globus.gsi.GlobusCredentialException - - Unable to get the specified proxy certificate

getJobs

public java.util.Vector getJobs(Url lbAddress,
                                java.util.Calendar from,
                                java.util.Calendar to,
                                org.glite.jdl.Ad userTags,
                                boolean[] includes,
                                boolean[] excludes,
                                boolean owned)
                         throws org.globus.gsi.GlobusCredentialException,
                                java.io.FileNotFoundException
Deprecated. use instead getJobs ( Url lbAddress , Query query)

Retreive a vector of JobStatus that match the query for the specified LB

Parameters:
lbAddress - the full Logging and Bookkeeping address
from - filter selecting only jobs submitted after the specified time
to - filter selecting only jobs submitted before the specified time
userTags - Ad instance specifying a list of =
includes - filter selecting only jobs with specified states (cannot be specified with excludes parameter) is a boolean array of JobStatus.MAX_STATUS dimension
excludes - filter excluding only jobs with specified states (cannot be specified with includes parameter) is a boolean array of JobStatus.MAX_STATUS dimension
owned - filter selecting only jobs owned by user
Throws:
FileNotFoundException - Unable to find certificates files
org.globus.gsi.GlobusCredentialException - - Unable to get the specified proxy certificate

getStates

public java.util.Vector getStates(Url lbAddress)
                           throws org.globus.gsi.GlobusCredentialException,
                                  java.io.FileNotFoundException
Retrieve the status of all the user's jobs

Parameters:
lbAddress - the full Logging and Bookkeeping address
Returns:
the vector to be filled of all the jobs status information
Throws:
FileNotFoundException - Unable to find certificates files
org.globus.gsi.GlobusCredentialException - - Unable to get the specified proxy certificate