@Override public boolean invoke(String[] args) throws ContributionReadException, FileNotFoundException, XMLStreamException, ActivationException, ValidationException, URISyntaxException { if (args.length != 2) { System.err.println("Wrong number of args"); System.err.println(getShortHelp()); return true; } if (!!!shell.getNode().getInstalledContributionURIs().contains(args[0])) { System.err.println("contribution not installed: " + args[0]); return true; } File f = new File(IOHelper.getLocationAsURL(args[1]).toURI()); shell.getNode().addDeploymentComposite(args[0], new FileReader(f)); return true; }
for (String nodeName : standaloneNodes.keySet()) { Node node = standaloneNodes.get(nodeName); Map<String, List<String>> scs = node.getStartedCompositeURIs(); for (String curi : scs.keySet()) { for (String dc : scs.get(curi)) { out.println("Domain: " + node.getDomainName()); for (String curi : node.getStartedCompositeURIs().keySet()) { for (String compositeURI : node.getStartedCompositeURIs().get(curi)) { String runningNodeName = node.getRunningNodeName(curi, compositeURI); if (node.getLocalNodeName().equals(runningNodeName)) { runningNodeName = "this";
private void newContribution(File f) { try { node.installContribution(f.getName(), f.toURI().toURL().toString(), null, null); node.startDeployables(f.getName()); } catch (Exception e) { e.printStackTrace(); } } }
public String call() throws Exception { String response; try { Node node = getNode(); if ("start".equals(command)) { node.startComposite(contributionURI, compositeURI); response = "Started."; } else if ("stop".equals(command)) { node.stopComposite(contributionURI, compositeURI); response = "Stopped."; } else { response = "Unknown command: " + command; } } catch (Exception e) { response = "REMOTE EXCEPTION: " + e.getClass() + ":" + e.getMessage(); } return response; }
String curi = node.installContribution(null, f.getPath(), metaData, dependencyURIs); installed.add(curi); node.addDeploymentComposite(curi, new FileReader(f2)); node.startDeployables(curi);
boolean domains() { for (Node node : nodes.values()) { System.out.println(node.getDomainName()); } return true; }
ContributionDescription cd = getNode().getInstalledContribution(toks.get(1)); if (cd == null) { out.println("Contribution " + curi + " not installed"); for (String curi : getNode().getInstalledContributionURIs()) { out.println(" " + curi);
@Override public boolean invoke(String[] args) throws Exception { if (args.length != 2) { System.err.println("Wrong number of args"); System.err.println(getShortHelp()); return true; } shell.getNode().stopComposite(args[0], args[1]); return true; }
@Override public boolean invoke(String[] args) throws Exception { if (args.length == 2) { shell.getNode().startComposite(args[0], args[1]); } else if (args.length == 3) { shell.getNode().startComposite(args[0], args[1], args[2]); } else { System.err.println("Wrong number of args"); System.err.println(getShortHelp()); return true; } return true; }
String uri = getNode().installContribution(curi, curl, metaDataURL, duris); out.println("installed at: " + uri); return true;
boolean listComposites(final String curi) throws ContributionReadException, ValidationException { if (getNode() == null) { return true; } Contribution c = getNode().getContribution(curi); for (Artifact a : c.getArtifacts()) { if (a.getModel() instanceof Composite) { out.println(((Composite)a.getModel()).getName()); } } return true; }
boolean domainComposite() { Composite domainComposite = getNode().getDomainComposite(); System.out.println(Utils.modelToXML(domainComposite, true, runtime.getExtensionPointRegistry())); return true; }
@Override public int complete(final String buffer, final int cursor, final List clist) { if (shell.getNode() != null) { List<String> ics = shell.getNode().getInstalledContributionURIs(); setCandidateStrings(ics.toArray(new String[ics.size()])); } return super.complete(buffer, cursor, clist); }
String curi = node.installContribution(null, f.getPath(), metaData, dependencyURIs); installed.add(curi); node.addDeploymentComposite(curi, new FileReader(f2)); node.startDeployables(curi);
boolean domains() { for (Node node : nodes.values()) { System.out.println(node.getDomainName()); } return true; }
public String call() throws Exception { String response; try { Node node = getNode(); if ("start".equals(command)) { node.startComposite(contributionURI, compositeURI); response = "Started."; } else if ("stop".equals(command)) { node.stopComposite(contributionURI, compositeURI); response = "Stopped."; } else { response = "Unknown command: " + command; } } catch (Exception e) { response = "REMOTE EXCEPTION: " + e.getClass() + ":" + e.getMessage(); } return response; }
ContributionDescription cd = getNode().getInstalledContribution(toks.get(1)); if (cd == null) { out.println("Contribution " + curi + " not installed"); for (String curi : getNode().getInstalledContributionURIs()) { out.println(" " + curi);
@Override public boolean invoke(String[] args) throws Exception { if (args.length != 2) { System.err.println("Wrong number of args"); System.err.println(getShortHelp()); return true; } shell.getNode().stopComposite(args[0], args[1]); return true; }
@Override public boolean invoke(String[] args) throws Exception { if (args.length == 2) { shell.getNode().startComposite(args[0], args[1]); } else if (args.length == 3) { shell.getNode().startComposite(args[0], args[1], args[2]); } else { System.err.println("Wrong number of args"); System.err.println(getShortHelp()); return true; } return true; }
String uri = getNode().installContribution(curi, curl, metaDataURL, duris); out.println("installed at: " + uri); return true;