Use standard Java™ code
or the filtering command provided by the ListService object to retrieve
a subset of activities or entries on which you would like to perform
an operation.
Procedure
- When you use a command to retrieve a set of resources,
use a variable to store the returned data. For example, the following
code stores the objects returned from the fetchTrash() command,
which are formatted as a java.util.Vector of hash tables that represent
activities and entries in the Trash view, in the alltrash variable:
alltrash=TrashCollectionService.fetchTrash()
- Do one of the following:
- Pass the variable containing the subset of resources that
you want to operate on into the command. For example, to restore the
collected subset of activities that are currently in the Trash view,
you could use the following command:
TrashCollectionService.undeleteTrash(myactivities)