Package org.osgi.service.prefs

Examples of org.osgi.service.prefs.Preferences.nodeExists()


      //TODO once bug 90500 is fixed, should be simpler
      // for now, take the long way
      if (!node.nodeExists(projectName))
        return false;
      node = node.node(projectName);
      if (!node.nodeExists(Platform.PI_RUNTIME))
        return false;
      node = node.node(Platform.PI_RUNTIME);
      if (!node.nodeExists(CONTENT_TYPE_PREF_NODE))
        return false;
      node = node.node(CONTENT_TYPE_PREF_NODE);
View Full Code Here


        return false;
      node = node.node(projectName);
      if (!node.nodeExists(Platform.PI_RUNTIME))
        return false;
      node = node.node(Platform.PI_RUNTIME);
      if (!node.nodeExists(CONTENT_TYPE_PREF_NODE))
        return false;
      node = node.node(CONTENT_TYPE_PREF_NODE);
      return node.getBoolean(PREF_LOCAL_CONTENT_TYPE_SETTINGS, false);
    } catch (BackingStoreException e) {
      // exception treated when retrieving the project preferences
View Full Code Here

    try {
      //TODO once bug 90500 is fixed, should be as simple as this:
      //      String path = project.getName() + IPath.SEPARATOR + ResourcesPlugin.PI_RESOURCES + IPath.SEPARATOR + ENCODING_PREF_NODE;
      //      return node.nodeExists(path) ? node.node(path) : null;
      // for now, take the long way
      if (!node.nodeExists(project.getName()))
        return null;
      node = node.node(project.getName());
      if (!node.nodeExists(ResourcesPlugin.PI_RESOURCES))
        return null;
      node = node.node(ResourcesPlugin.PI_RESOURCES);
View Full Code Here

      //      return node.nodeExists(path) ? node.node(path) : null;
      // for now, take the long way
      if (!node.nodeExists(project.getName()))
        return null;
      node = node.node(project.getName());
      if (!node.nodeExists(ResourcesPlugin.PI_RESOURCES))
        return null;
      node = node.node(ResourcesPlugin.PI_RESOURCES);
      if (!node.nodeExists(ENCODING_PREF_NODE))
        return null;
      return node.node(ENCODING_PREF_NODE);
View Full Code Here

        return null;
      node = node.node(project.getName());
      if (!node.nodeExists(ResourcesPlugin.PI_RESOURCES))
        return null;
      node = node.node(ResourcesPlugin.PI_RESOURCES);
      if (!node.nodeExists(ENCODING_PREF_NODE))
        return null;
      return node.node(ENCODING_PREF_NODE);
    } catch (BackingStoreException e) {
      // nodeExists failed
      String message = Messages.resources_readingEncoding;
View Full Code Here

    }

    protected boolean loadState() {
        try {
            Preferences prefs = preferences.getUserPreferences("FeaturesServiceState");
            if (prefs.nodeExists("repositories")) {
                Set<URI> repositories = loadSet(prefs.node("repositories"));
                for (URI repo : repositories) {
                    internalAddRepository(repo);
                }
                installed = loadMap(prefs.node("features"));
View Full Code Here

  @Override
  public PuppetDBConnectionPreferences add(String hostname, int port) throws BackingStoreException {
    PuppetDBConnectionPreferencesImpl pa = new PuppetDBConnectionPreferencesImpl(hostname, port);
    String ident = pa.getIdentifier();
    Preferences root = getPuppetDBNode();
    if(root.nodeExists(ident))
      throw new IllegalArgumentException("A node for " + ident + " already exists");
    root.node(ident);
    pa.makePersistent();
    return pa;
  }
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.