Examples of AiravataJCRRegistry


Examples of org.apache.airavata.registry.api.impl.AiravataJCRRegistry

    @Before
    public void setUp() throws Exception {
        Map<String,String> config = new HashMap<String,String>();
            config.put("org.apache.jackrabbit.repository.home","target");

        jcrRegistry = new AiravataJCRRegistry(null,
                "org.apache.jackrabbit.core.RepositoryFactoryImpl", "admin",
                "admin", config);

        // Host
        URL url = this.getClass().getClassLoader().getResource(GRAM_PROPERTIES);
View Full Code Here

Examples of org.apache.airavata.registry.api.impl.AiravataJCRRegistry

    public void testExecute() throws RegistryException {
        logger.info("Running RegistryServiceTest...");
        try {
            Map<String,String> config = new HashMap<String,String>();
            config.put("org.apache.jackrabbit.repository.home","target");
            jcrRegistry = new AiravataJCRRegistry(null, "org.apache.jackrabbit.core.RepositoryFactoryImpl", "admin", "admin",
                    config);
        } catch (RepositoryException e) {
            fail("Failed creating the JCR Registry");
        }
View Full Code Here

Examples of org.apache.airavata.registry.api.impl.AiravataJCRRegistry

    /*
     * Create database
     */
        Map<String,String> config = new HashMap<String,String>();
            config.put("org.apache.jackrabbit.repository.home","target");
    AiravataJCRRegistry jcrRegistry = new AiravataJCRRegistry(null,
        "org.apache.jackrabbit.core.RepositoryFactoryImpl", "admin",
        "admin", config);

    /*
     * Host
     */
    HostDescription host = new HostDescription();
    host.getType().setHostName("localhost");
    host.getType().setHostAddress("localhost");

    /*
     * App
     */
    ApplicationDeploymentDescription appDesc = new ApplicationDeploymentDescription();
    ApplicationDeploymentDescriptionType app = appDesc.getType();
    ApplicationName name = ApplicationName.Factory.newInstance();
    name.setStringValue("EchoLocal");
    app.setApplicationName(name);
   
    /*
     * Use bat file if it is compiled on Windows
     */
    if(SystemUtils.IS_OS_WINDOWS){
      URL url = this.getClass().getClassLoader().getResource("echo.bat");
      app.setExecutableLocation(url.getFile());
    }else{
      //for unix and Mac
      app.setExecutableLocation("/bin/echo")
    }
   
    /*
     * Default tmp location
     */
    String tempDir = System.getProperty("java.io.tmpdir");
    if(tempDir == null){
      tempDir = "/tmp";
    }
   
    app.setScratchWorkingDirectory(tempDir);
    app.setStaticWorkingDirectory(tempDir);
    app.setInputDataDirectory(tempDir + File.separator + "input");
    app.setOutputDataDirectory(tempDir + File.separator + "output");
    app.setStandardOutput(tempDir + File.separator + "echo.stdout");
    app.setStandardError(tempDir + File.separator + "echo.stdout");

    /*
     * Service
     */
    ServiceDescription serv = new ServiceDescription();
    serv.getType().setName("SimpleEcho");

    List<InputParameterType> inputList = new ArrayList<InputParameterType>();   
    InputParameterType input = InputParameterType.Factory.newInstance();
    input.setParameterName("echo_input");
    input.setParameterType(StringParameterType.Factory.newInstance());   
    inputList.add(input);
    InputParameterType[] inputParamList = inputList.toArray(new InputParameterType[inputList
        .size()]);
   
    List<OutputParameterType> outputList = new ArrayList<OutputParameterType>();
    OutputParameterType output = OutputParameterType.Factory.newInstance();
    output.setParameterName("echo_output");
    output.setParameterType(StringParameterType.Factory.newInstance());   
    outputList.add(output);
    OutputParameterType[] outputParamList = outputList
        .toArray(new OutputParameterType[outputList.size()]);
   
    serv.getType().setInputParametersArray(inputParamList);
    serv.getType().setOutputParametersArray(outputParamList);

    /*
     * Save to registry
     */
    jcrRegistry.saveHostDescription(host);
    jcrRegistry.saveDeploymentDescription(serv.getType().getName(), host
        .getType().getHostName(), appDesc);
    jcrRegistry.saveServiceDescription(serv);
    jcrRegistry.deployServiceOnHost(serv.getType().getName(), host
        .getType().getHostName());
  }
View Full Code Here

Examples of org.apache.airavata.registry.api.impl.AiravataJCRRegistry

      DefaultExecutionContext ec = new DefaultExecutionContext();
      ec.addNotifiable(new LoggingNotification());
      ct.setExecutionContext(ec);
             Map<String,String> config = new HashMap<String,String>();
            config.put("org.apache.jackrabbit.repository.home","target");
        AiravataJCRRegistry jcrRegistry = new AiravataJCRRegistry(null,
        "org.apache.jackrabbit.core.RepositoryFactoryImpl", "admin",
        "admin", config);

            ec.setRegistryService(jcrRegistry);
      ct.setServiceName("SimpleEcho");
View Full Code Here

Examples of org.apache.airavata.registry.api.impl.AiravataJCRRegistry

    /*
     * Create database
     */
        Map<String,String> config = new HashMap<String,String>();
            config.put("org.apache.jackrabbit.repository.home","target");
        jcrRegistry = new AiravataJCRRegistry(null,
        "org.apache.jackrabbit.core.RepositoryFactoryImpl", "admin",
        "admin", config);

    /*
     * Host
 
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.