Package org.apache.airavata.registry.api

Examples of org.apache.airavata.registry.api.AiravataRegistry2


    @POST
    @Path(ResourcePathConstants.BasicRegistryConstants.SET_GATEWAY)
    @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    @Produces(MediaType.TEXT_PLAIN)
    public Response setGateway(Gateway gateway) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            airavataRegistry.setGateway(gateway);
            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
            builder.entity("Gateway added successfully");
            return builder.build();
        } catch (Throwable e) {
            return WebAppUtil.reportInternalServerError(ResourcePathConstants.BasicRegistryConstants.SET_GATEWAY, e);
View Full Code Here


    @POST
    @Path(ResourcePathConstants.BasicRegistryConstants.SET_USER)
    @Consumes({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    @Produces(MediaType.TEXT_PLAIN)
    public Response setAiravataUser(AiravataUser user) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            airavataRegistry.setAiravataUser(user);
            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
            builder.entity("Airavata user added successfully");
            return builder.build();
        } catch (Throwable e) {
            return WebAppUtil.reportInternalServerError(ResourcePathConstants.BasicRegistryConstants.SET_USER, e);
View Full Code Here

    @GET
    @Path(ResourcePathConstants.BasicRegistryConstants.VERSION)
    @Produces({MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML})
    public Response getVersion() {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            Version version = airavataRegistry.getVersion();
            if (version != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(version);
                return builder.build();
            } else {
View Full Code Here

    @GET
    @Path(ResourcePathConstants.BasicRegistryConstants.GET_SERVICE_URL)
    @Produces(MediaType.TEXT_PLAIN)
    public Response getConnectionURL (){
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try{
            String connectionURL = airavataRegistry.getConnectionURI().toString();
            if (connectionURL != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(connectionURL);
                return builder.build();
            } else {
View Full Code Here

    @POST
    @Path(ResourcePathConstants.BasicRegistryConstants.SET_SERVICE_URL)
    @Produces(MediaType.TEXT_PLAIN)
    public Response setConnectionURL (@FormParam("connectionurl") String connectionURL){
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try{
            URI uri = new URI(connectionURL);
            airavataRegistry.setConnectionURI(uri);
            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
            builder.entity("Connection URL updated successfully...");
            return builder.build();
        } catch (Throwable e) {
            return WebAppUtil.reportInternalServerError(ResourcePathConstants.BasicRegistryConstants.SET_SERVICE_URL, e);
View Full Code Here

    @GET
    @Path(ResourcePathConstants.UserWFConstants.WORKFLOW_EXIST)
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    @Produces(MediaType.TEXT_PLAIN)
    public Response isWorkflowExists(@QueryParam("workflowName") String workflowName) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            boolean workflowExists = airavataRegistry.isWorkflowExists(workflowName);
            if (workflowExists) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity("True");
                return builder.build();
            } else {
View Full Code Here

    @Path(ResourcePathConstants.UserWFConstants.ADD_WORKFLOW)
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    @Produces(MediaType.TEXT_PLAIN)
    public Response addWorkflow(@FormParam("workflowName") String workflowName,
                                @FormParam("workflowGraphXml") String workflowGraphXml) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            airavataRegistry.addWorkflow(workflowName, workflowGraphXml);
            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
            builder.entity("Workflow added successfully...");
            return builder.build();
        } catch (UserWorkflowAlreadyExistsException e) {
            Response.ResponseBuilder builder = Response.status(Response.Status.BAD_REQUEST);
View Full Code Here

    @Path(ResourcePathConstants.UserWFConstants.UPDATE_WORKFLOW)
    @Consumes(MediaType.APPLICATION_FORM_URLENCODED)
    @Produces(MediaType.TEXT_PLAIN)
    public Response updateWorkflow(@FormParam("workflowName") String workflowName,
                                   @FormParam("workflowGraphXml") String workflowGraphXml) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            airavataRegistry.updateWorkflow(workflowName, workflowGraphXml);
            Response.ResponseBuilder builder = Response.status(Response.Status.OK);
            builder.entity("Workflow updated successfully...");
            return builder.build();
        } catch (UserWorkflowAlreadyExistsException e) {
            Response.ResponseBuilder builder = Response.status(Response.Status.BAD_REQUEST);
View Full Code Here

     */
    @GET
    @Path(ResourcePathConstants.UserWFConstants.GET_WORKFLOWGRAPH)
    @Produces(MediaType.APPLICATION_FORM_URLENCODED)
    public Response getWorkflowGraphXML(@QueryParam("workflowName") String workflowName) {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            String workflowGraphXML = airavataRegistry.getWorkflowGraphXML(workflowName);
            if (workflowGraphXML != null) {
                Response.ResponseBuilder builder = Response.status(Response.Status.OK);
                builder.entity(workflowGraphXML);
                return builder.build();
            } else {
View Full Code Here

     */
    @GET
    @Path(ResourcePathConstants.UserWFConstants.GET_WORKFLOWS)
    @Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})
    public Response getWorkflows() {
        AiravataRegistry2 airavataRegistry = RegPoolUtils.acquireRegistry(context);
        try {
            Map<String, String> workflows = airavataRegistry.getWorkflows();
            WorkflowList workflowList = new WorkflowList();
            List<Workflow> workflowsModels = new ArrayList<Workflow>();
            for (String workflowName : workflows.keySet()) {
                Workflow workflow = new Workflow();
                workflow.setWorkflowName(workflowName);
View Full Code Here

TOP

Related Classes of org.apache.airavata.registry.api.AiravataRegistry2

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.