package org.ow2.chameleon.fuchsia.jsonrpc.exporter.model;

import org.ow2.chameleon.fuchsia.core.declaration.ExportDeclaration;

public class JSONRPCExporterPojo {

    private String instanceName;
    private String instanceClass;
    private String urlContext;


    private JSONRPCExporterPojo(){}

    public static JSONRPCExporterPojo create(ExportDeclaration exportDeclaration){

        JSONRPCExporterPojo dto=new JSONRPCExporterPojo();

        dto.instanceClass=exportDeclaration.getMetadata().get("fuchsia.export.jsonrpc.class").toString();
        dto.instanceName=exportDeclaration.getMetadata().get("fuchsia.export.jsonrpc.instance").toString();


        String url=exportDeclaration.getMetadata().get("fuchsia.export.jsonrpc.url.context");


        if(url!=null){
            dto.urlContext=url;
        }else {
            dto.urlContext="/JSONRPC";
        }

        return dto;

    }

    public String getInstanceName() {
        return instanceName;
    }

    public void setInstanceName(String instanceName) {
        this.instanceName = instanceName;
    }

    public String getInstanceClass() {
        return instanceClass;
    }

    public void setInstanceClass(String instanceClass) {
        this.instanceClass = instanceClass;
    }

    public String getUrlContext() {
        return urlContext;
    }

    public void setUrlContext(String urlContext) {
        this.urlContext = urlContext;
    }
}

@@ -674,16 +674,24 @@
 ing url=
+(String)
 exportDe
@@ -779,16 +779,36 @@
 rl!=null
+%7C%7Curl.equals(%22null%22)
 )%7B%0A     

fix compilation issue with JSONRPCExporter