use of com.emc.vipr.model.catalog.WFDirectoryList in project coprhd-controller by CoprHD.
the class WFDirectoryService method getWorkflowDirectories.
/**
* Get workflow directories
*
* @prereq none
* @brief Get workflow directories
* @return List of workflow directories
*/
@GET
@CheckPermission(roles = { Role.SYSTEM_ADMIN })
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public WFDirectoryList getWorkflowDirectories() {
List<WFDirectory> wfDirectories = wfDirectoryManager.getWFDirectories();
WFDirectoryList wfDirectoryList = new WFDirectoryList();
for (WFDirectory dir : wfDirectories) {
NamedRelatedResourceRep wfDirectoryRestRep = toNamedRelatedResource(ResourceTypeEnum.WF_DIRECTORY, dir.getId(), dir.getLabel());
wfDirectoryList.getWFDirectories().add(wfDirectoryRestRep);
}
return wfDirectoryList;
}
Aggregations