use of org.apache.airavata.model.workspace.Project in project airavata by apache.
the class ProjectModelUtil method createProject.
public static Project createProject(String projectName, String owner, String description) {
Project project = new Project();
project.setName(projectName);
project.setProjectID(projectName);
project.setOwner(owner);
project.setDescription(description);
return project;
}
use of org.apache.airavata.model.workspace.Project in project airavata by apache.
the class ExperimentExecution method getProjects.
protected Map<String, List<Project>> getProjects(Map<String, String> tokenMap) throws Exception {
projectsMap = new HashMap<String, List<Project>>();
try {
if (tokenMap != null && !tokenMap.isEmpty()) {
for (String gatewayId : tokenMap.keySet()) {
List<Project> allUserProjects = airavata.getUserProjects(authzToken, gatewayId, testUser, 5, 0);
projectsMap.put(gatewayId, allUserProjects);
}
}
} catch (AiravataSystemException e) {
logger.error("Error while getting all user projects", e);
throw new Exception("Error while getting all user projects", e);
} catch (InvalidRequestException e) {
logger.error("Error while getting all user projects", e);
throw new Exception("Error while getting all user projects", e);
} catch (AiravataClientException e) {
logger.error("Error while getting all user projects", e);
throw new Exception("Error while getting all user projects", e);
} catch (TException e) {
logger.error("Error while getting all user projects", e);
throw new Exception("Error while getting all user projects", e);
}
return projectsMap;
}
Aggregations