org.glite.wms.wmproxy
Class WMProxyAPI

java.lang.Object
  extended by org.glite.wms.wmproxy.WMProxyAPI

public class WMProxyAPI
extends java.lang.Object

Allows sending requests to the Workload Manager Proxy (WMProxy) server

The class WMProxyAPI represents a client API to access to the WMProxy services provided as Web Services.
It provides a set of methods that allow :

Job requirements are expressed by Job Description Language (JDL). The types of jobs supported by the WM service are:

Version:
$Id: WMProxyAPI.java,v 1.11.2.3 2007/02/02 15:04:59 lpetronz Exp $
Author:
Marco Sottilaro

Constructor Summary
WMProxyAPI(java.lang.String url, java.io.InputStream proxyFile)
          Constructor
WMProxyAPI(java.lang.String url, java.io.InputStream proxyFile, java.lang.String certsPath)
          Constructor that allows setting of the Log4j tool by configuration file
WMProxyAPI(java.lang.String url, java.lang.String proxyFile)
          Constructor
WMProxyAPI(java.lang.String url, java.lang.String proxyFile, java.lang.String certsPath)
          Constructor that allows setting of the Log4j tool by configuration file
 
Method Summary
 void enableFilePerusal(java.lang.String jobId, org.glite.wms.wmproxy.StringList fileList)
          Enables file perusal functionalities if not disabled with the specific jdl attribute during job register operation.
 java.lang.String getCollectionTemplate(int jobNumber, java.lang.String requirements, java.lang.String rank)
          Returns a JDL template for a collection of jobs, that is a set of independent jobs that can be submitted, controlled and monitored as a single entity.
 java.lang.String getDAGTemplate(org.glite.wms.wmproxy.GraphStructType dependencies, java.lang.String requirements, java.lang.String rank)
          Returns a JDL template for a DAG.
 org.glite.wms.wmproxy.ProxyInfoStructType getDelegatedProxyInfo(java.lang.String delegationId)
          Returns the Delegated Proxy information identified by the delegationId string
 void getFreeQuota(javax.xml.rpc.holders.LongHolder softLimit, javax.xml.rpc.holders.LongHolder hardLimit)
          Returns the remaining free part of available user disk quota (in bytes).
 java.lang.String getIntParametricJobTemplate(org.glite.wms.wmproxy.StringList attributes, int param, int parameterStart, int parameterStep, java.lang.String requirements, java.lang.String rank)
          Returns a JDL template for a parametric of job, which is a job having one or more parametric attributes in the JDL.
 java.lang.String getJDL(java.lang.String jobId, org.glite.wms.wmproxy.JdlType type)
          Returns the JDL string which identifier is the input JobId
 org.glite.wms.wmproxy.ProxyInfoStructType getJobProxyInfo(java.lang.String jobId)
          Returns the information related to the proxy used to submit a job that identified by its JobId.
 java.lang.String getJobTemplate(org.glite.wms.wmproxy.JobTypeList jobType, java.lang.String executable, java.lang.String arguments, java.lang.String requirements, java.lang.String rank)
          Returns a JDL template for the requested job type.
 double getMaxInputSandboxSize()
          Returns the maximum Input sandbox size (in bytes) a user can count on for a job submission if using the space managed by the WM.
 org.glite.wms.wmproxy.StringAndLongList getOutputFileList(java.lang.String jobId, java.lang.String protocol)
          Returns the list of URIs where the output files created during job execution have been stored in the WM managed space and the corresponding sizes in bytes.
 org.glite.wms.wmproxy.StringList getPerusalFiles(java.lang.String jobId, java.lang.String file, boolean allchunks, java.lang.String protocol)
          Gets the URIs of perusal files generated during job execution for the specified file file.
 java.lang.String getProxyReq(java.lang.String delegationId)
          Gets a proxy identified by the delegationId string.
 org.glite.wms.wmproxy.DestURIsStructType getSandboxBulkDestURI(java.lang.String jobId, java.lang.String protocol)
          Returns the list of destination URIs associated to a compound job (i.e.
 org.glite.wms.wmproxy.StringList getSandboxDestURI(java.lang.String jobId, java.lang.String protocol)
          Returns a list of destination URI's associated to the job, identified by the jobId provided as input, where the job input sandbox files can be uploaded by the client.
 java.lang.String getStringParametricJobTemplate(org.glite.wms.wmproxy.StringList attributes, org.glite.wms.wmproxy.StringList param, java.lang.String requirements, java.lang.String rank)
          Returns a JDL template for a parametric of job, which is a job having one or more parametric attributes in the JDL.
 void getTotalQuota(javax.xml.rpc.holders.LongHolder softLimit, javax.xml.rpc.holders.LongHolder hardLimit)
          Returns the total space quota assigned to the user on the storage managed by the WM The fault GetQuotaManagementFault is returned if the quota management is not active on the WM.
 org.glite.wms.wmproxy.StringList getTransferProtocols()
          Returns the server available transfer protocols to be used for file transferring operations
 java.lang.String getVersion()
          Gets the version numbers of the WMProxy services
 java.lang.String grstGetProxyReq(java.lang.String delegationId)
          Gets a proxy identified by the delegationId string.
 void grstPutProxy(java.lang.String delegationId, java.lang.String cert)
          This method allows delegating user credential to the WMProxy server using the GridSite package: it creates a proxy from the input certificate (got by a previous call to the createProxyfromCertReq server).
 void jobCancel(java.lang.String jobId)
          This operation cancels a previously submitted job identified by its JobId.
 org.glite.wms.wmproxy.StringAndLongList jobListMatch(java.lang.String jdl, java.lang.String delegationId)
          Returns the list of CE Ids satisfying the job Requirements specified in the JDL, ordered according to the decreasing Rank.
 void jobPurge(java.lang.String jobId)
          Removes from the WM managed space all files related to the job identified by the jobId provided as input.
 org.glite.wms.wmproxy.JobIdStructType jobRegister(java.lang.String jdl, java.lang.String delegationId)
          Registers a job for submission.The unique identifier assigned to the job is returned to the client.
 void jobStart(java.lang.String jobId)
          Triggers the submission a previously registered job.
 org.glite.wms.wmproxy.JobIdStructType jobSubmit(java.lang.String jdl, java.lang.String delegationId)
          Submits a job: performs registration and triggers the submission The JDL description of the job provided by the client is validated by the service, registered to the LB and finally passed to the Workload Manager.
 void putProxy(java.lang.String delegationId, java.lang.String cert)
          This method allows delegating user credential to the WMProxy server: it creates a proxy from the input certificate (got by a previous call to the createProxyfromCertReq server).
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WMProxyAPI

public WMProxyAPI(java.lang.String url,
                  java.lang.String proxyFile)
           throws ServiceException,
                  ServiceURLException,
                  CredentialException
Constructor

Parameters:
url - WMProxy service URL
proxyFile - the path location of the user proxy file
Throws:
ServiceException - If any error in calling the service
ServiceURLException - malformed service URL specified as input
CredentialException - in case of any error with the user proxy file

WMProxyAPI

public WMProxyAPI(java.lang.String url,
                  java.lang.String proxyFile,
                  java.lang.String certsPath)
           throws ServiceException,
                  ServiceURLException,
                  CredentialException
Constructor that allows setting of the Log4j tool by configuration file

Parameters:
url - WMProxy service URL
proxyFile - the path location of the user proxy file
logPropFille - the path location of the log4j properties file
Throws:
ServiceException - If any error in calling the service
CredentialException - in case of any error with the user proxy file
ServiceURLException - malformed service URL specified as input

WMProxyAPI

public WMProxyAPI(java.lang.String url,
                  java.io.InputStream proxyFile)
           throws ServiceException,
                  ServiceURLException,
                  CredentialException
Constructor

Parameters:
url - WMProxy service URL
proxyFile - the proxy in input as a stream
Throws:
ServiceException - If any error in calling the service
CredentialException - in case of any error with the user proxy file
ServiceURLException - malformed service URL specified as input

WMProxyAPI

public WMProxyAPI(java.lang.String url,
                  java.io.InputStream proxyFile,
                  java.lang.String certsPath)
           throws ServiceException,
                  ServiceURLException,
                  CredentialException
Constructor that allows setting of the Log4j tool by configuration file

Parameters:
url - WMProxy service URL
proxyFile - the proxy in input as a stream
logPropFille - the path location of the log4j properties file
Throws:
ServiceException - If any error in calling the service
CredentialException - in case of any error with the user proxy file
ServiceURLException - malformed service URL specified as input
Method Detail

getProxyReq

public java.lang.String getProxyReq(java.lang.String delegationId)
                             throws AuthenticationFaultException,
                                    AuthorizationFaultException,
                                    ServiceException,
                                    ServerOverloadedFaultException
Gets a proxy identified by the delegationId string. This method remains to keep compatibility with the version 1.0.0 of WMProxy servers, but it will be soon deprecated.

Parameters:
delegationID - the id to identify the delegation
Returns:
the string representing the proxy
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
ServiceException - a problem occurred during the remote call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

grstGetProxyReq

public java.lang.String grstGetProxyReq(java.lang.String delegationId)
                                 throws CredentialException,
                                        ServiceException,
                                        ServerOverloadedFaultException
Gets a proxy identified by the delegationId string. This method can be only used invoking WMProxy servers with versions greater than or equal to 2.0.0; the version of the server can be retrieved by calling the getVersion service.

Parameters:
delegationID - the id to identify the delegation
Returns:
a string representing the proxy
Throws:
CredentialException - a problem occurred during the operations of retrieving the proxy
ServiceException - a problem occurred during the remote call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
Since:
1.2.0

putProxy

public void putProxy(java.lang.String delegationId,
                     java.lang.String cert)
              throws AuthenticationFaultException,
                     AuthorizationFaultException,
                     CredentialException,
                     ServiceException,
                     ServerOverloadedFaultException
This method allows delegating user credential to the WMProxy server: it creates a proxy from the input certificate (got by a previous call to the createProxyfromCertReq server). The created proxy is sent to the server and identified by a delegationId string. This string can be used to call some services accepting a delegationId string as input parameter (like jobRegister, jobSubmit, etc) until its expiration time. This method remains to keep compatibility with the version 1.0.0 of WMProxy servers, but it will be soon deprecated; the version of the server can be retrieved by calling the getVersion service.

Parameters:
delegationId - the id used to identify the delegation
cert - the input certificate
Throws:
CredentialException - if any error occurs during the creation of the proxy from the input certificate
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
See Also:
getVersion()

grstPutProxy

public void grstPutProxy(java.lang.String delegationId,
                         java.lang.String cert)
                  throws CredentialException,
                         ServiceException,
                         ServerOverloadedFaultException
This method allows delegating user credential to the WMProxy server using the GridSite package: it creates a proxy from the input certificate (got by a previous call to the createProxyfromCertReq server). The created proxy is sent to the server and identified by a delegationId string. This string can be used to call some services accepting a delegationId string as input parameter (like jobRegister, jobSubmit, etc) until its expiration time. This method can be only used invoking WMProxy servers with versions greater than or equal to 2.0.0

Parameters:
delegationId - the id used to identify the delegation
cert - the input certificate
Throws:
CredentialException - a problem occurred during the operations of delegation
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
Since:
1.2.0
See Also:
getVersion()

getDelegatedProxyInfo

public org.glite.wms.wmproxy.ProxyInfoStructType getDelegatedProxyInfo(java.lang.String delegationId)
                                                                throws AuthorizationFaultException,
                                                                       AuthenticationFaultException,
                                                                       InvalidArgumentFaultException,
                                                                       ServiceException,
                                                                       ServerOverloadedFaultException
Returns the Delegated Proxy information identified by the delegationId string

Parameters:
delegationId - The id of the delegation created previously (by a getProxyReq call)
cfs - Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters
Returns:
a struct with the information on the input proxy
Throws:
AuthenticationFaultException - a generic authentication problem occurred.
AuthorizationFaultException - if the client is not authorized to perform this operation.
InvalidArgumentFaultException - one or more of the given input parameters is not valid.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
Since:
1.5.3
See Also:
getProxyReq(java.lang.String), grstGetProxyReq(java.lang.String), putProxy(java.lang.String, java.lang.String), grstPutProxy(java.lang.String, java.lang.String)

getJobProxyInfo

public org.glite.wms.wmproxy.ProxyInfoStructType getJobProxyInfo(java.lang.String jobId)
                                                          throws AuthorizationFaultException,
                                                                 AuthenticationFaultException,
                                                                 InvalidArgumentFaultException,
                                                                 ServiceException,
                                                                 ServerOverloadedFaultException
Returns the information related to the proxy used to submit a job that identified by its JobId. This operation needs that a valid proxy (identified by an id string -delegationId string-) has been previously delegated to the endpoint.

Parameters:
jobId - the identifier of the job
cfs - Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters
Returns:
a struct with the information on the input proxy
Throws:
AuthenticationFaultException - a generic authentication problem occurred.
AuthorizationFaultException - if the client is not authorized to perform this operation.
InvalidArgumentFaultException - one or more of the given input parameters is not valid.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
See Also:
getProxyReq(java.lang.String), putProxy(java.lang.String, java.lang.String), BaseException

getVersion

public java.lang.String getVersion()
                            throws AuthenticationFaultException,
                                   ServiceException,
                                   ServerOverloadedFaultException
Gets the version numbers of the WMProxy services

Returns:
the string with the version numbers
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

jobRegister

public org.glite.wms.wmproxy.JobIdStructType jobRegister(java.lang.String jdl,
                                                         java.lang.String delegationId)
                                                  throws AuthenticationFaultException,
                                                         InvalidArgumentFaultException,
                                                         ServiceException,
                                                         ServerOverloadedFaultException
Registers a job for submission.The unique identifier assigned to the job is returned to the client. This operation only registers the job and assigns it with an identifier. The processing of the job (matchmaking, scheduling etc.) within the WM is not started. The job is "held" by the system in the "Registered" status until the jobStart operation is called. Between the two calls the client can perform all preparatory actions needed by the job to run (e.g. the registration of input data, the upload of the job input sandbox files etc); especially those actions requiring the specification of the job identifier. The service supports registration (and consequently submission) of simple jobs, parametric jobs, partitionable jobs, DAGs and collections of jobs. The description is always provided through a single JDL description. When a clients requests for registration of a complex object, i.e. parametric and partitionable jobs, DAGs and collections of jobs (all those requests represent in fact a set of jobs), the operations returns a structure containing the main identifier of the complex object and the identifiers of all related sub jobs.

Parameters:
jdl - the job jdl representation.
delegationId - the id used to identify the delegation
Returns:
the structure containing the id of the registered job
Throws:
AuthenticationFaultException - a generic authentication problem occurred
InvalidArgumentFaultException - the given JDL expression is not valid
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

jobStart

public void jobStart(java.lang.String jobId)
              throws AuthorizationFaultException,
                     AuthenticationFaultException,
                     OperationNotAllowedFaultException,
                     InvalidArgumentFaultException,
                     JobUnknownFaultException,
                     ServiceException,
                     ServerOverloadedFaultException
Triggers the submission a previously registered job. It starts the actual processing of the registered job within the Workload Manager. It is assumed that when this operation is called, all the work preparatory to the job (e.g. input sandbox upload, registration of input data to the Data Management service etc.) has been completed by the client.
Here follows an example of the sequence of operations to be performed for submitting a job:

Parameters:
jobId - the id of the job
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
JobUnknownFaultException - the given job has not been registered to the system
InvalidArgumentFaultException - the given job Id is not valid
OperationNotAllowedFaultException - the current job status does not allow requested operation.
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

jobSubmit

public org.glite.wms.wmproxy.JobIdStructType jobSubmit(java.lang.String jdl,
                                                       java.lang.String delegationId)
                                                throws AuthorizationFaultException,
                                                       AuthenticationFaultException,
                                                       InvalidArgumentFaultException,
                                                       ServiceException,
                                                       ServerOverloadedFaultException
Submits a job: performs registration and triggers the submission The JDL description of the job provided by the client is validated by the service, registered to the LB and finally passed to the Workload Manager. The unique identifier assigned to the job is returned to the client. Usage of this operation (instead of jobRegister + jobStart) is indeed recommended when the job identifier is not needed prior to its submission (e.g. jobs without input sandbox or with a sandbox entirely available on a GridFTP server managed by the client or her organisation). The service supports submission of simple jobs, parametric jobs, partitionable jobs, DAGs and collections of jobs; the description is always provided through a single JDL description. When a clients requests for submission of a complex object, i.e. parametric and partitionable jobs, DAGs and collections of jobs (all those requests represent in fact a set of jobs), the operations returns a structure containing the main identifier of the complex object and the identifiers of all related sub jobs.

Parameters:
jobId - the id of the job
delegationId - the id used to identify the delegation
Returns:
the id of the job
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
InvalidArgumentFaultException - the given job Id is not valid
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

jobCancel

public void jobCancel(java.lang.String jobId)
               throws AuthorizationFaultException,
                      AuthenticationFaultException,
                      OperationNotAllowedFaultException,
                      InvalidArgumentFaultException,
                      JobUnknownFaultException,
                      ServiceException,
                      ServerOverloadedFaultException
This operation cancels a previously submitted job identified by its JobId. If the job is still managed by the WM then it is removed from the WM tasks queue. If the job has been already sent to the CE, the WM simply forwards the request to the CE. For suspending/releasing and sending signals to a submitted job the user has to check that the job has been scheduled to a CE and access directly the corresponding operations made available by the CE service.

Parameters:
jobId - the id of the job
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
JobUnknownFaultException - the given job has not been registered to the system
InvalidArgumentFaultException - the given job Id is not valid
OperationNotAllowedFaultException - the current job status does not allow requested operation.
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getMaxInputSandboxSize

public double getMaxInputSandboxSize()
                              throws AuthenticationFaultException,
                                     ServiceException,
                                     ServerOverloadedFaultException
Returns the maximum Input sandbox size (in bytes) a user can count on for a job submission if using the space managed by the WM. This is a static value in the WM configuration (on a job-basis) set by the VO administrator

Returns:
the size of the InputSandbox (in bytes)
Throws:
AuthenticationFaultException - a generic authentication problem occurred
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getTransferProtocols

public org.glite.wms.wmproxy.StringList getTransferProtocols()
                                                      throws AuthorizationFaultException,
                                                             AuthenticationFaultException,
                                                             ServiceException,
                                                             ServerOverloadedFaultException
Returns the server available transfer protocols to be used for file transferring operations

Returns:
a list with the protocol strings
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getSandboxDestURI

public org.glite.wms.wmproxy.StringList getSandboxDestURI(java.lang.String jobId,
                                                          java.lang.String protocol)
                                                   throws AuthorizationFaultException,
                                                          AuthenticationFaultException,
                                                          OperationNotAllowedFaultException,
                                                          InvalidArgumentFaultException,
                                                          JobUnknownFaultException,
                                                          ServiceException,
                                                          ServerOverloadedFaultException
Returns a list of destination URI's associated to the job, identified by the jobId provided as input, where the job input sandbox files can be uploaded by the client. The location is created in the storage managed by the WM (if needed) and the corresponding URI is returned to the operation caller if no problems has been arised during creation. Files of the job input sandbox that have been referenced in the JDL as relative or absolute paths are expected to be found in the returned location when the job lands on the CE. File upload can be performed by the GridFTP/HTTPS server available on the WMS node(using file-transferring tools like curl and globus-url-copy). The user can also specify in the JDL the complete URI of files that are stored on a GridFTP/HTTPS server (e.g. managed by her organisation); those files will be directly downloaded (by the JobWrapper) on the WN where the job will run without transiting on the WMS machine. The same applies to the output sandbox files list, i.e. the user can specify in the JDL the complete URIs for the files of the output sandbox; those files will be directly uploaded (by the JobWrapper) from the WN to the specified GridFTP/HTTPS servers without transiting on the WMS machine.

Parameters:
jobId - string containing the JobId
protocol - string containing the protocol to use in the returned URI (Server available protocols are those returned by getTransferProtocols operation. Possible standard values are: "all" to get URIs with all available protocols; "default" to get URIs with the server default protocol not mandatory, default value is "all")
Returns:
the list of the Sandbox destionation URI's strings
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
JobUnknownFaultException - the given job has not been registered to the system
InvalidArgumentFaultException - the given job Id is not valid
OperationNotAllowedFaultException - the current job status does not allow requested operation.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getSandboxBulkDestURI

public org.glite.wms.wmproxy.DestURIsStructType getSandboxBulkDestURI(java.lang.String jobId,
                                                                      java.lang.String protocol)
                                                               throws AuthorizationFaultException,
                                                                      AuthenticationFaultException,
                                                                      OperationNotAllowedFaultException,
                                                                      InvalidArgumentFaultException,
                                                                      JobUnknownFaultException,
                                                                      ServiceException,
                                                                      ServerOverloadedFaultException
Returns the list of destination URIs associated to a compound job (i.e. a DAG a Collection or a parametric jobs) and all of its sub-jobs in a complex structure containing:

getTotalQuota

public void getTotalQuota(javax.xml.rpc.holders.LongHolder softLimit,
                          javax.xml.rpc.holders.LongHolder hardLimit)
                   throws AuthenticationFaultException,
                          GetQuotaManagementFaultException,
                          ServiceException,
                          ServerOverloadedFaultException
Returns the total space quota assigned to the user on the storage managed by the WM The fault GetQuotaManagementFault is returned if the quota management is not active on the WM.

Parameters:
softLimit - the returned value of the soft limit free quota i.e. the difference between quota soft limit and user's disk usage.
hardLimit - the returned value of the hard limit quota (in bytes) i.e. the real quota limit that cannot be exceeded.
Throws:
AuthenticationFaultException - a generic authentication problem occurred
GetQuotaManagementFaultException - quota management is not active on the WM.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getFreeQuota

public void getFreeQuota(javax.xml.rpc.holders.LongHolder softLimit,
                         javax.xml.rpc.holders.LongHolder hardLimit)
                  throws AuthenticationFaultException,
                         GetQuotaManagementFaultException,
                         ServiceException,
                         ServerOverloadedFaultException
Returns the remaining free part of available user disk quota (in bytes). The fault GetQuotaManagementFault is returned if the quota management is not active.

Parameters:
softLimit - the returned value of the soft limit free quota i.e. the difference between quota soft limit and user's disk usage.
hardLimit - the returned value of the hard limit quota (in bytes) i.e. the real quota limit that cannot be exceeded.
Throws:
AuthenticationFaultException - a generic authentication problem occurred
GetQuotaManagementFaultException - quota management is not active on the WM.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

jobPurge

public void jobPurge(java.lang.String jobId)
              throws AuthorizationFaultException,
                     AuthenticationFaultException,
                     OperationNotAllowedFaultException,
                     InvalidArgumentFaultException,
                     JobUnknownFaultException,
                     ServiceException,
                     ServerOverloadedFaultException
Removes from the WM managed space all files related to the job identified by the jobId provided as input. It can only be applied for job related files that are managed by the WM. E.g. Input/Output sandbox files that have been specified in the JDL through a URI will be not subjected to this management.

Parameters:
jobId - the identifier of the job
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
JobUnknownFaultException - the given job has not been registered to the system
InvalidArgumentFaultException - the given job Id is not valid
OperationNotAllowedFaultException - the current job status does not allow requested operation.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getOutputFileList

public org.glite.wms.wmproxy.StringAndLongList getOutputFileList(java.lang.String jobId,
                                                                 java.lang.String protocol)
                                                          throws AuthorizationFaultException,
                                                                 AuthenticationFaultException,
                                                                 OperationNotAllowedFaultException,
                                                                 InvalidArgumentFaultException,
                                                                 JobUnknownFaultException,
                                                                 ServiceException,
                                                                 ServerOverloadedFaultException
Returns the list of URIs where the output files created during job execution have been stored in the WM managed space and the corresponding sizes in bytes. It can only be applied for files of the Output Sandbox that are managed by the WM (i.e. not specified as URI in the JDL).

Parameters:
jobId - the identifier of the job
cfs - Non-default configuration context (proxy file, endpoint URL and trusted cert location) ; if NULL, the object is created with the default parameters
Returns:
the list of objects containing the file URI and the corresponding size in bytes
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
JobUnknownFaultException - the given job has not been registered to the system
InvalidArgumentFaultException - the given job Id is not valid
OperationNotAllowedFaultException - the current job status does not allow requested operation.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

jobListMatch

public org.glite.wms.wmproxy.StringAndLongList jobListMatch(java.lang.String jdl,
                                                            java.lang.String delegationId)
                                                     throws AuthorizationFaultException,
                                                            AuthenticationFaultException,
                                                            InvalidArgumentFaultException,
                                                            NoSuitableResourcesFaultException,
                                                            ServiceException,
                                                            ServerOverloadedFaultException
Returns the list of CE Ids satisfying the job Requirements specified in the JDL, ordered according to the decreasing Rank. The fault NoSuitableResourcesFault is returned if there are no resources matching job constraints.

Parameters:
jdl - the job description
delegationId - the string used previously to delegate credential
Returns:
the list of the found resources and their rank values
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
NoSuitableResourcesFaultException - no suitable resources matching job requirements have been found.
InvalidArgumentFaultException - the given job JDL expression is not valid
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

enableFilePerusal

public void enableFilePerusal(java.lang.String jobId,
                              org.glite.wms.wmproxy.StringList fileList)
                       throws AuthorizationFaultException,
                              AuthenticationFaultException,
                              InvalidArgumentFaultException,
                              JobUnknownFaultException,
                              ServiceException,
                              ServerOverloadedFaultException
Enables file perusal functionalities if not disabled with the specific jdl attribute during job register operation. Calling this operation, the user enables perusal for job identified by jobId, for files specified with fileList. After this operation, the URIs of perusal files generated during job execution can be retrieved by calling the getPerusalFiles service An empty fileList disables perusal. This method can be only used invoking WMProxy servers with version greater than or equal to 2.0.0; the version of the server can be retrieved by calling the getVersion service.

Parameters:
jobid - the string with the job identifier
fileList - the list of filenames to be enabled
Throws:
AuthorizationFaultException - if the client is not authorized to perform this operation
AuthenticationFaultException - a generic authentication problem occurred
InvalidArgumentFaultException - the given jobId is not valid
OperationNotAllowedFaultException - perusal was disabled with the specific jdl attribute.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
JobUnknownFaultException
See Also:
getPerusalFiles(java.lang.String, java.lang.String, boolean, java.lang.String), getVersion()

getPerusalFiles

public org.glite.wms.wmproxy.StringList getPerusalFiles(java.lang.String jobId,
                                                        java.lang.String file,
                                                        boolean allchunks,
                                                        java.lang.String protocol)
                                                 throws AuthorizationFaultException,
                                                        AuthenticationFaultException,
                                                        InvalidArgumentFaultException,
                                                        JobUnknownFaultException,
                                                        ServiceException,
                                                        ServerOverloadedFaultException
Gets the URIs of perusal files generated during job execution for the specified file file. If allChunks is set to true all perusal URIs will be returned; also the URIs already requested with a previous getPerusalFiles operation. Default value is false. Perusal files have to be presiuosly enabled by calling the enableFilePerusal service This method can be only used invoking WMProxy servers with version greater than or equal to 2.0.0; the version of the server can be retrieved by calling the getVersion service.

Parameters:
jobid - the string with the job identifier
allchuncks - boolean value to specify when to get all chuncks
jobid - the string with the job identifier
file - the name of the perusal file be enabled
jobid - the string with the job identifier
file - the name of the perusal file be enabled
protocol - string containing the protocol to use in the returned URI (Server available protocols are those returned by getTransferProtocols
Throws:
AuthenticationFaultException - An authentication problem occurred
AuthorizationFaultException - The user is not authorized to perform this operation
InvalidArgumentFaultException - If the given jobId is not valid
JobUnknownFaultException - The provided jobId has not been registered to the system
OperationNotAllowedFaultexception - perusal was disabled with the specific jdl attribute
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
See Also:
enableFilePerusal(java.lang.String, org.glite.wms.wmproxy.StringList), getVersion()

getJobTemplate

public java.lang.String getJobTemplate(org.glite.wms.wmproxy.JobTypeList jobType,
                                       java.lang.String executable,
                                       java.lang.String arguments,
                                       java.lang.String requirements,
                                       java.lang.String rank)
                                throws AuthorizationFaultException,
                                       AuthenticationFaultException,
                                       InvalidArgumentFaultException,
                                       ServiceException,
                                       ServerOverloadedFaultException
Returns a JDL template for the requested job type.

Parameters:
jobType - the job type description
executable - the exacutable filename
arguments - the arguments of the executable
requirements - a string representing the expression describing all the Job requirements (which is an attribute of boolean type)
rank - a string representing the expression for the rank (which is an attribute of double type) of the resources
Returns:
the jdl template of the job
Throws:
AuthenticationFaultException - a generic authentication problem occurred.
AuthorizationFaultException - if the client is not authorized to perform this operation.
InvalidArgumentFaultException - one or more of the given input parameters is not valid
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getDAGTemplate

public java.lang.String getDAGTemplate(org.glite.wms.wmproxy.GraphStructType dependencies,
                                       java.lang.String requirements,
                                       java.lang.String rank)
                                throws AuthorizationFaultException,
                                       AuthenticationFaultException,
                                       InvalidArgumentFaultException,
                                       ServiceException,
                                       ServerOverloadedFaultException
Returns a JDL template for a DAG.

Parameters:
dependencies - the description of the DAG
requirements - a string representing the expression describing all the Job requirements (which is an attribute of boolean type)
rank - a string representing the expression for the rank (which is an attribute of double type) for all the nodes of the dag
Returns:
the jdl template of the DAG
Throws:
AuthenticationFaultException - a generic authentication problem occurred.
AuthorizationFaultException - if the client is not authorized to perform this operation.
InvalidArgumentFaultException - one or more of the given input parameters is not valid
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getCollectionTemplate

public java.lang.String getCollectionTemplate(int jobNumber,
                                              java.lang.String requirements,
                                              java.lang.String rank)
                                       throws AuthorizationFaultException,
                                              AuthenticationFaultException,
                                              InvalidArgumentFaultException,
                                              ServiceException,
                                              ServerOverloadedFaultException
Returns a JDL template for a collection of jobs, that is a set of independent jobs that can be submitted, controlled and monitored as a single entity.

Parameters:
jobNumber - integer representing the number of jobs of the collection.
requirements - a string representing the expression describing all the Job requirements (which is an attribute of boolean type)
rank - a string representing the expression for the rank (which is an attribute of double type) of the resources
Returns:
the jdl template of the collection
Throws:
AuthenticationFaultException - a generic authentication problem occurred.
AuthorizationFaultException - if the client is not authorized to perform this operation.
InvalidArgumentFaultException - one or more of the given input parameters is not valid.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getIntParametricJobTemplate

public java.lang.String getIntParametricJobTemplate(org.glite.wms.wmproxy.StringList attributes,
                                                    int param,
                                                    int parameterStart,
                                                    int parameterStep,
                                                    java.lang.String requirements,
                                                    java.lang.String rank)
                                             throws AuthorizationFaultException,
                                                    AuthenticationFaultException,
                                                    InvalidArgumentFaultException,
                                                    ServiceException,
                                                    ServerOverloadedFaultException
Returns a JDL template for a parametric of job, which is a job having one or more parametric attributes in the JDL. The parametric attributes vary their values according to the "Parameter" attribute specified in the JDL itself (in this case the parametere has to be an integer). The submission of a Parametric job results in the submission of a set of jobs having the same descritpion apart from the parametrised attribute. They can be however controlled and monitored as a single entity.

Parameters:
attributes - list of strings representing the parametric JDL attributes
param - integer representing the value of the Parameter attribute
paramStart - integer representing the start value for varying the parametric attributes
paramStep - intege representing the step of each variation
requirements - a string representing the expression describing all the Job requirements (which is an attribute of boolean type)
rank - a string representing the expression for the rank (which is an attribute of double type) of the resources
Returns:
the jdl template
Throws:
AuthenticationFaultException - a generic authentication problem occurred.
AuthorizationFaultException - if the client is not authorized to perform this operation.
InvalidArgumentFaultException - one or more of the given input parameters is not valid.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getStringParametricJobTemplate

public java.lang.String getStringParametricJobTemplate(org.glite.wms.wmproxy.StringList attributes,
                                                       org.glite.wms.wmproxy.StringList param,
                                                       java.lang.String requirements,
                                                       java.lang.String rank)
                                                throws AuthorizationFaultException,
                                                       AuthenticationFaultException,
                                                       InvalidArgumentFaultException,
                                                       ServiceException,
                                                       ServerOverloadedFaultException
Returns a JDL template for a parametric of job, which is a job having one or more parametric attributes in the JDL. The parametric attributes vary their values according to the "Parameter" attribute specified in the JDL itself (in this case the parametere has to be a list of strings). The submission of a Parametric job results in the submission of a set of jobs having the same descritpion apart from the value of the parametric attributes. They can be however controlled and monitored as a single entity.

Parameters:
attributes - list of strings representing the parametric JDL attributes
param - list of strings representing the values of the Parameter attribute
requirements - a string representing the expression describing all the Job requirements (which is an attribute of boolean type)
rank - a string representing the expression for the rank (which is an attribute of double type) of the resources
Returns:
the jdl template
Throws:
AuthenticationFaultException - a generic authentication problem occurred.
AuthorizationFaultException - if the client is not authorized to perform this operation.
InvalidArgumentFaultException - one or more of the given input parameters is not valid
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation

getJDL

public java.lang.String getJDL(java.lang.String jobId,
                               org.glite.wms.wmproxy.JdlType type)
                        throws AuthorizationFaultException,
                               AuthenticationFaultException,
                               InvalidArgumentFaultException,
                               ServiceException,
                               ServerOverloadedFaultException
Returns the JDL string which identifier is the input JobId

Parameters:
jobid - the identifier of the job
type - the type of the JDL to be retrieved (either ORIGINAL or REGISTERED)
Returns:
the string with the JDL
Throws:
AuthenticationFaultException - a generic authentication problem occurred.
AuthorizationFaultException - if the client is not authorized to perform this operation.
InvalidArgumentFaultException - one or more of the given input parameters is not valid.
ServiceException - If any other error occurs during the execution of the remote method call to the WMProxy server
ServerOverloadedFaultException - the server is too much busy to attend the requested operation
Since:
1.5.3