Package org.apache.airavata.rest.mappings.resourcemappings

Examples of org.apache.airavata.rest.mappings.resourcemappings.WorkspaceProjectList


            logger.error(response.getEntity(String.class));
            throw new RuntimeException("Failed : HTTP error code : "
                    + status);
        }

        WorkspaceProjectList workspaceProjectList = response.getEntity(WorkspaceProjectList.class);
        WorkspaceProject[] workspaceProjects = workspaceProjectList.getWorkspaceProjects();

        for (WorkspaceProject workspaceProject : workspaceProjects) {
            workspaceProjectsList.add(workspaceProject);
        }
        return workspaceProjectsList;
View Full Code Here


    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Response getWorkspaceProjects() {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            List<WorkspaceProject> workspaceProjects = airavataRegistry.getWorkspaceProjects();
            WorkspaceProjectList workspaceProjectList = new WorkspaceProjectList();
            WorkspaceProject[] workspaceProjectSet = new WorkspaceProject[workspaceProjects.size()];
            for (int i = 0; i < workspaceProjects.size(); i++) {
                workspaceProjectSet[i] = workspaceProjects.get(i);
            }
            workspaceProjectList.setWorkspaceProjects(workspaceProjectSet);
            if (workspaceProjects.size() != 0) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(workspaceProjectList);
                return builder.build();
            } else {
View Full Code Here

TOP

Related Classes of org.apache.airavata.rest.mappings.resourcemappings.WorkspaceProjectList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.