Search in sources :

Example 31 with Project

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;
}
Also used : Project(org.apache.airavata.model.workspace.Project)

Example 32 with 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;
}
Also used : TException(org.apache.thrift.TException) Project(org.apache.airavata.model.workspace.Project) AiravataSystemException(org.apache.airavata.model.error.AiravataSystemException) InvalidRequestException(org.apache.airavata.model.error.InvalidRequestException) AiravataClientException(org.apache.airavata.model.error.AiravataClientException) InvalidRequestException(org.apache.airavata.model.error.InvalidRequestException) TException(org.apache.thrift.TException) AiravataClientException(org.apache.airavata.model.error.AiravataClientException) AiravataSystemException(org.apache.airavata.model.error.AiravataSystemException)

Aggregations

Project (org.apache.airavata.model.workspace.Project)32 TException (org.apache.thrift.TException)20 InputDataObjectType (org.apache.airavata.model.application.io.InputDataObjectType)17 ExperimentModel (org.apache.airavata.model.experiment.ExperimentModel)17 UserConfigurationDataModel (org.apache.airavata.model.experiment.UserConfigurationDataModel)17 ComputationalResourceSchedulingModel (org.apache.airavata.model.scheduling.ComputationalResourceSchedulingModel)17 OutputDataObjectType (org.apache.airavata.model.application.io.OutputDataObjectType)16 AuthzToken (org.apache.airavata.model.security.AuthzToken)13 ArrayList (java.util.ArrayList)9 RegistryServiceException (org.apache.airavata.registry.api.exception.RegistryServiceException)8 ApplicationSettingsException (org.apache.airavata.common.exception.ApplicationSettingsException)6 AiravataClientException (org.apache.airavata.model.error.AiravataClientException)6 AiravataSystemException (org.apache.airavata.model.error.AiravataSystemException)6 InvalidRequestException (org.apache.airavata.model.error.InvalidRequestException)6 AiravataException (org.apache.airavata.common.exception.AiravataException)5 CredentialStoreException (org.apache.airavata.credential.store.exception.CredentialStoreException)5 RegistryService (org.apache.airavata.registry.api.RegistryService)4 SecurityCheck (org.apache.airavata.service.security.interceptor.SecurityCheck)4 SharingRegistryService (org.apache.airavata.sharing.registry.service.cpi.SharingRegistryService)4 DocumentCreatorNew (org.apache.airavata.integration.tools.DocumentCreatorNew)3