Search in sources :

Example 1 with WFDirectoryList

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;
}
Also used : WFDirectory(com.emc.storageos.db.client.model.uimodels.WFDirectory) WFDirectoryList(com.emc.vipr.model.catalog.WFDirectoryList) NamedRelatedResourceRep(com.emc.storageos.model.NamedRelatedResourceRep) Produces(javax.ws.rs.Produces) GET(javax.ws.rs.GET) CheckPermission(com.emc.storageos.security.authorization.CheckPermission)

Aggregations

WFDirectory (com.emc.storageos.db.client.model.uimodels.WFDirectory)1 NamedRelatedResourceRep (com.emc.storageos.model.NamedRelatedResourceRep)1 CheckPermission (com.emc.storageos.security.authorization.CheckPermission)1 WFDirectoryList (com.emc.vipr.model.catalog.WFDirectoryList)1 GET (javax.ws.rs.GET)1 Produces (javax.ws.rs.Produces)1