You are here

getDocuments

getDocuments returns a list of documents associated with a process or task.
Attention: These methods were introduced in SDK version 1.3.

public List<Document> getDocuments(Process process)

public List<Document> getDocuments(Process process) returns a list of documents associated with the process.

Parameters

Process process
The process to return documents for.

Returns

A List<Document> a list of documents associated with the process.

Exception

Throws an SkyVaultServiceException if the operation cannot be completed.

Example

          
    // get documents associated with process
  List<Document> documents = workflowService.getDocuments(process);
  Log.d(TAG, "Printing documents for process...");
  for (Document doc : documents){
    Log.d(TAG, "name: "+doc.getName());
    Log.d(TAG, "description: "+doc.getDescription());
    Log.d(TAG, "title: "+doc.getTitle());			
  }
        

Would produce output such as the following:

          
Printing documents for process...
name: craft_of_text_editing.pdf
description: This book is about building a text editor using the Emacs philosophy.
title: The Craft of Text Editing          
          
        

public PagingResult<Document> getDocuments(Process process)

public PagingResult<Document> getDocuments(Process process, ListingContext listingContext) returns a paged list of documents associated with the process.

Parameters

Process process
The process to return documents for.
ListingContext listingContext
The listing context to use to control paging of results. See ListingContext for further information.

Returns

Returns a PagingResult<Document> a paged list of documents associated with the process.

Exception

Throws an SkyVaultServiceException if the operation cannot be completed.

Example

public List<Document> getDocuments(Task task)

public List<Document> getDocuments(Task task) returns a list of documents associated with the task.

Parameters

Task task
The task to return a list of documents for.

Returns

A List<Document> a list of documents associated with the process.

Exception

Throws an SkyVaultServiceException if the operation cannot be completed.

Example

          
  // get all tasks
  Log.d(TAG, "Tasks...");
  List<Task> tasks = workflowService.getTasks();
  for (Task task : tasks){
    Log.d(TAG, "identifier: "+task.getIdentifier());
    Log.d(TAG, "name: "+task.getName());
    Log.d(TAG, "description: "+task.getDescription());
    
    // get documents associated with a task
    List<Document> documents = workflowService.getDocuments(task);
    Log.d(TAG, "Printing documents...");
    for (Document doc : documents){
      Log.d(TAG, "name: "+doc.getName());
      Log.d(TAG, "description: "+doc.getDescription());
      Log.d(TAG, "title: "+doc.getTitle());			
    }
  }
        

Would produce output such as the following:

          
Printing documents...
name: craft_of_text_editing.pdf
description: This book is about building a text editor using the Emacs philosophy.
title: The Craft of Text Editing          
          
        

public PagingResult<Document> getDocuments(Task task)

public PagingResult<Document> getDocuments(Task task, ListingContext listingContext) returns a paged list of documents associated with the task.

Parameters

Task task
The task to return a list of documents for.
ListingContext listingContext
The listing context to use to control paging of results. See ListingContext for further information.

Returns

Returns a PagingResult<Document> - a paged list of documents associated with the process.

Exception

Throws an SkyVaultServiceException if the operation cannot be completed.

Example