12.07.2015 Views

Database.com Metadata API Developer's Guide - Salesforce.com

Database.com Metadata API Developer's Guide - Salesforce.com

Database.com Metadata API Developer's Guide - Salesforce.com

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

File-Based Callsdeploy()NamerunAllTestsrunTestsTypebooleanstring[]Descriptioncan be performed without errors are performed, and errorsare returned for the remaining actions. This parametermust be set to true if you are deploying to a productionorganization. The default is false.If true, all Apex tests defined in the organization are run.For deployment to a production organization, all tests,except for those that originate from installed managedpackages, are automatically run regardless of this argument.If any of the tests fail when the rollbackOnErrorparameter is set to true, the entire deployment will rollback.A list of Apex tests to be run during deployment. Specifythe class name, one name per instance. The class namemay also specify a namespace with a dot. For example, torun three tests:positive_testnegative_testnamespace.third_testsinglePackagebooleanIf any of these tests fail when the rollbackOnErrorparameter is set to true, the deployment is rolled backand no changes will be made to your organization.Indicates whether the specified .zip file points to adirectory structure with a single package (true) or a setof packages (false).ResponseAsyncResultSample Code—JavaThis sample shows how to deploy <strong>com</strong>ponents in a zip file. See the retrieve() sample code for details on how to retrievea zip file.package <strong>com</strong>.doc.samples;import java.io.*;import java.rmi.RemoteException;import <strong>com</strong>.sforce.soap.metadata.AsyncResult;import <strong>com</strong>.sforce.soap.metadata.DeployDetails;import <strong>com</strong>.sforce.soap.metadata.<strong>Metadata</strong>Connection;import <strong>com</strong>.sforce.soap.metadata.DeployOptions;import <strong>com</strong>.sforce.soap.metadata.DeployResult;import <strong>com</strong>.sforce.soap.metadata.DeployMessage;import <strong>com</strong>.sforce.soap.metadata.RunTestsResult;import <strong>com</strong>.sforce.soap.metadata.RunTestFailure;import <strong>com</strong>.sforce.soap.metadata.CodeCoverageWarning;import <strong>com</strong>.sforce.soap.partner.LoginResult;import <strong>com</strong>.sforce.soap.partner.PartnerConnection;import <strong>com</strong>.sforce.ws.ConnectionException;import <strong>com</strong>.sforce.ws.ConnectorConfig;28

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!