Examples of createNew()


Examples of com.bradmcevoy.http.PutableResource.createNew()

                final String newName = path.getName();
                Runnable runnable = new Runnable() {

                    public void run() {
                        try {
                            putableResource.createNew( newName, out.getInputStream(), out.getSize(), null );
                        } catch( BadRequestException ex ) {
                            throw new RuntimeException( ex );
                        } catch( NotAuthorizedException ex ) {
                            throw new RuntimeException( ex );
                        } catch( ConflictException ex ) {
View Full Code Here

Examples of maze.model.MazeInfoModel.createNew()

      MazeInfoModel mim = Main.getPrimaryFrameInstance().getMazeInfoModel();

      if (result.equals(NewMazeDialog.MAZ))
      {
         MazeInfo newMi = mim.createNew("New Maze " + mLastNew, false);
         if (newMi == null)
         {
            JOptionPane.showMessageDialog(MazeEditorPage.this,
                                          "Unable to create new maze",
                                          "Maze Creation Error",
View Full Code Here

Examples of net.sourceforge.syncyoursecrets.gui.rcp.model.PWListContentProvider.createNew()

    // get the content provider and fill it with an empty list
    PWListContentProvider contentProvider = (PWListContentProvider) view
        .getContentProvider();
    try {
      contentProvider.createNew();
    } catch (ParserConfigurationException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      throw new ExecutionException("Creating new Content failed", e);
    }
View Full Code Here

Examples of net.sourceforge.syncyoursecrets.gui.rcp.model.list.PWListContentProvider.createNew()

    // get the content provider and fill it with an empty list
    PWListContentProvider contentProvider = (PWListContentProvider) view
        .getContentProvider();
    try {
      contentProvider.createNew();
    } catch (ParserConfigurationException e) {

      String msg = "Creating new Content failed";

      MessageDialog.showUnexpectedErrorMessage(msg, logger, e);
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigFactory.createNew()

      add(hostname1);
      add(hostname2);
    }};
   
    ConfigFactory configFactory = injector.getInstance(ConfigFactory.class);
    Config config = configFactory.createNew(cluster, "global",
        new HashMap<String,String>() {{ put("a", "b"); }});
    config.setVersionTag("version1");
    cluster.addConfig(config);
    cluster.addDesiredConfig("_test", config);
   
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigFactory.createNew()

      add(hostname1);
      add(hostname2);
    }};

    ConfigFactory configFactory = injector.getInstance(ConfigFactory.class);
    Config config = configFactory.createNew(cluster, "global",
      new HashMap<String, String>() {{
        put("a", "b");
      }});
    config.setVersionTag("version1");
    cluster.addConfig(config);
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigFactory.createNew()

    host.persist();
    c1.setDesiredStackVersion(new StackId("HDP-0.1"));
    clusters.mapHostToCluster("h1", "c1");
   
    ConfigFactory configFactory = injector.getInstance(ConfigFactory.class);
    Config config = configFactory.createNew(c1, "global",
        new HashMap<String,String>() {{ put("a", "b"); put("x", "y"); }});
   
    try {
      host.addDesiredConfig(c1.getClusterId(), true, "_test", config);
      Assert.fail("Expect failure when version is not specified.");
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigFactory.createNew()

   
    Map<String, DesiredConfig> map = host.getDesiredConfigs(c1.getClusterId());
    Assert.assertTrue("Expect desired config to contain global", map.containsKey("global"));
    Assert.assertEquals("Expect global user to be '_test'", "_test", map.get("global").getUser());
   
    config = configFactory.createNew(c1, "global",
        new HashMap<String,String>() {{ put("c", "d"); }});
    config.setVersionTag("v2");
    host.addDesiredConfig(c1.getClusterId(), true, "_test1", config);
   
    map = host.getDesiredConfigs(c1.getClusterId());
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigFactory.createNew()

    Cluster cluster = clusters.getCluster("c1");
    cluster.setDesiredStackVersion(new StackId("HDP-2.0.6"));
    cluster.setCurrentStackVersion(new StackId("HDP-2.0.6"));

    ConfigFactory cf = injector.getInstance(ConfigFactory.class);
    Config config1 = cf.createNew(cluster, "global",
        new HashMap<String, String>() {{
          put("key1", "value1");
        }});
    config1.setVersionTag("version1");
View Full Code Here

Examples of org.apache.ambari.server.state.ConfigFactory.createNew()

        new HashMap<String, String>() {{
          put("key1", "value1");
        }});
    config1.setVersionTag("version1");

    Config config2 = cf.createNew(cluster, "core-site",
        new HashMap<String, String>() {{
          put("key1", "value1");
        }});
    config2.setVersionTag("version1");
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.