@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 {