Package freenet.config

Examples of freenet.config.InvalidConfigValueException


          found = true;
          break;
        }
      }
      if (!found)
        throw new InvalidConfigValueException("Invalid store type");

      synchronized(this) { // Serialise this part.
        String suffix = getStoreSuffix();
        if (val.equals("salt-hash")) {
          byte[] key;
                    try {
                        synchronized(Node.this) {
                            if(keys == null) throw new MasterKeysWrongPasswordException();
                            key = keys.clientCacheMasterKey;
                            clientCacheType = val;
                        }
                    } catch (MasterKeysWrongPasswordException e1) {
                        setClientCacheAwaitingPassword();
                        throw new InvalidConfigValueException("You must enter the password");
          }
          try {
            initSaltHashClientCacheFS(suffix, true, key);
          } catch (NodeInitException e) {
            Logger.error(this, "Unable to create new store", e);
            System.err.println("Unable to create new store: "+e);
            e.printStackTrace();
            // FIXME l10n both on the NodeInitException and the wrapper message
            throw new InvalidConfigValueException("Unable to create new store: "+e);
          }
        } else if(val.equals("ram")) {
          initRAMClientCacheFS();
        } else /*if(val.equals("none")) */{
          initNoClientCacheFS();
 
View Full Code Here


    public void set(String val) throws InvalidConfigValueException {
      if(val == null || get().equalsIgnoreCase(val)) return;
      try {
        NodeL10n.getBase().setLanguage(BaseL10n.LANGUAGE.mapToLanguage(val));
      } catch (MissingResourceException e) {
        throw new InvalidConfigValueException(e.getLocalizedMessage());
      }
      PluginManager.setLanguage(NodeL10n.getBase().getSelectedLanguage());
    }
View Full Code Here

            new UpdateURICallback());

    try {
      updateURI = new FreenetURI(updaterConfig.getString("URI"));
    } catch (MalformedURLException e) {
      throw new InvalidConfigValueException(l10n("invalidUpdateURI",
          "error", e.getLocalizedMessage()));
    }
    updateURI = updateURI.setSuggestedEdition(Version.buildNumber());
    if(updateURI.hasMetaStrings())
      throw new InvalidConfigValueException(l10n("updateURIMustHaveNoMetaStrings"));
    if(!updateURI.isUSK())
      throw new InvalidConfigValueException(l10n("updateURIMustBeAUSK"));

    updaterConfig.register("revocationURI", REVOCATION_URI, 4, true, false,
        "NodeUpdateManager.revocationURI",
        "NodeUpdateManager.revocationURILong",
        new UpdateRevocationURICallback());

    try {
      revocationURI = new FreenetURI(
          updaterConfig.getString("revocationURI"));
    } catch (MalformedURLException e) {
      throw new InvalidConfigValueException(l10n("invalidRevocationURI",
          "error", e.getLocalizedMessage()));
    }

    LegacyJarFetcher.LegacyFetchCallback legacyFetcherCallback = new LegacyJarFetcher.LegacyFetchCallback() {
View Full Code Here

    public void set(String val) throws InvalidConfigValueException {
      FreenetURI uri;
      try {
        uri = new FreenetURI(val);
      } catch (MalformedURLException e) {
        throw new InvalidConfigValueException(l10n(
            "invalidUpdateURI", "error",
            e.getLocalizedMessage()));
      }
      if(updateURI.hasMetaStrings())
        throw new InvalidConfigValueException(l10n("updateURIMustHaveNoMetaStrings"));
      if(!updateURI.isUSK())
        throw new InvalidConfigValueException(l10n("updateURIMustBeAUSK"));
      setURI(uri);
    }
View Full Code Here

    public void set(String val) throws InvalidConfigValueException {
      FreenetURI uri;
      try {
        uri = new FreenetURI(val);
      } catch (MalformedURLException e) {
        throw new InvalidConfigValueException(l10n(
            "invalidRevocationURI", "error",
            e.getLocalizedMessage()));
      }
      setRevocationURI(uri);
    }
View Full Code Here

TOP

Related Classes of freenet.config.InvalidConfigValueException

Copyright © 2018 www.massapicom. 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.