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 CallscheckRetrieveStatus()NamepackageNamessinglePackagespecificFilesunpackagedTypestring[]booleanstring[]PackageDescription<strong>com</strong>ponents for version 13.0 or earlier, the <strong>com</strong>ponentswill not include the icon field.A list of package names to be retrieved. If you are retrievingonly unpackaged <strong>com</strong>ponents, do not specify a name here.You can retrieve packaged and unpackaged <strong>com</strong>ponentsin the same retrieve.Specifies whether only a single package is being retrieved(true) or not (false). If false, then more than onepackage is being retrieved.A list of file names to be retrieved. If a value is specifiedfor this property, packageNames must be set to nulland singlePackage must be set to true.A list of <strong>com</strong>ponents to retrieve that are not in a package.checkRetrieveStatus()Checks the status of declarative metadata call retrieve() and returns the zip file contents.SyntaxRetrieveResult = metadatabinding.checkRetrieveStatus(ID id);UsagecheckRetrieveStatus is part of the procedure for retrieving metadata <strong>com</strong>ponents from an organization. It is used togetherwith the checkStatus call which indicates when the asynchronous retrieve call has <strong>com</strong>pleted. Once checkStatusindicates that the call is <strong>com</strong>pleted, call checkRetrieveStatus to get the zip file contents:1. Issue a retrieve() call to start the asynchronous retrieval. An AsyncResult object is returned. If the call is <strong>com</strong>pleted,the done field contains true. Most often, the call is not <strong>com</strong>pleted quickly enough to be noted in the result. If it is<strong>com</strong>pleted, note the value in the id field returned and skip the next step.2. If the call is not <strong>com</strong>plete, issue a checkStatus() call in a loop using the value in the id field of the AsyncResult object,returned by the retrieve() call in the previous step. Check the AsyncResult object returned until the done field containstrue. The time taken to <strong>com</strong>plete a retrieve() call depends on the size of the zip file being deployed, so use a longerwait time between iterations as the size of the zip file increases.3. Issue a checkRetrieveStatus() call to obtain the results of the retrieve() call, using the id value returned in thefirst step.Sample Code—JavaSee the retrieve() sample code for sample usage of this call.ArgumentsNameidTypeIDDescriptionID obtained from a RetrieveResult object returned by a retrieve() call or a subsequentAsyncResult object returned by a checkStatus() call.40

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

Saved successfully!

Ooh no, something went wrong!