Package au.net.causal.projo.prefs

Examples of au.net.causal.projo.prefs.PreferencesException


        csvWriter.write(colValueList);
      }
      catch (IOException e)
      {
        //Should not happen since string writer doesn't throw I/O errors
        throw new PreferencesException(e);
      }
     
      String completeValue = buf.toString();
      chain.putValue(colKey, completeValue, keyMetadata.withDataType(String.class));
      log.debug("Wrote value " + completeValue + " for key " + key);
View Full Code Here


         
          cache.put(key, values);
        }
        catch (IOException e)
        {
          throw new PreferencesException("Error parsing CSV value: " + sValue, e);
        }
      }
     
      if (index < values.size())
        return((T)values.get(index));
View Full Code Here

        T theValue = (T)Enum.valueOf((Class)enumType, storeValue);
        enumValue = theValue;
      }
      catch (IllegalArgumentException e)
      {
        throw new PreferencesException("Invalid store value for enum type " + enumType.getCanonicalName() + ": " + storeValue);
      }
    }
   
    TransformResult<T> result = new TransformResult<>(enumValue);
   
View Full Code Here

    {
      return(Short.valueOf(s));
    }
    catch (NumberFormatException e)
    {
      throw new PreferencesException("Failed to convert value '" + s + "' to a short.", e);
    }
  }
View Full Code Here

  public <T> TransformResult<T> applyGet(String key, PreferenceKeyMetadata<T> keyMetadata, TransformGetChain chain) throws PreferencesException
  {
    if (!isSecure(keyMetadata))
      return(null);
   
    throw new PreferencesException("Attempt to read secure value under '" + key + "' but no security configured.");
  }
View Full Code Here

  public <T> boolean applyPut(String key, T value, PreferenceKeyMetadata<T> keyMetadata, TransformPutChain chain) throws PreferencesException
  {
    if (!isSecure(keyMetadata))
      return(false);
   
    throw new PreferencesException("Attempt to store secure value under '" + key + "' but no security configured.");
  }
View Full Code Here

           //End of System.in stream possible I guess, regard as a cancel
           password = null;
         }
       }
       else
         throw new PreferencesException("Console not available, cannot read password from user securely.");
    }
    else
    {
      if (mode == Mode.ENCRYPTION)
      {
View Full Code Here

    {
      child.removeNode();
    }
    catch (BackingStoreException e)
    {
      throw new PreferencesException(e);
    }
  }
View Full Code Here

    {
      pref.clear();
    }
    catch (BackingStoreException e)
    {
      throw new PreferencesException(e);
    }
  }
View Full Code Here

    {
      return(ImmutableSet.<String>builder().add(pref.keys()).build());
    }
    catch (BackingStoreException e)
    {
      throw new PreferencesException(e);
    }
  }
View Full Code Here

TOP

Related Classes of au.net.causal.projo.prefs.PreferencesException

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.