GithubHelp home page GithubHelp logo

enhancedproperties's Issues

Support arrays and lists

There should be default getters and setters for arrays and lists.

The getters should have 3 parameters:

  • Key
  • Split by (A String which is used to split the value from the properties-file)
  • Optional: Default value (for example an empty array)

Example:
To read a list from a value like this, you would use ",":

myArray=one,two,three

Add possibility to write properties-files

Right now, the properties are read-only. It should be possible (and easy) to save changes.

  • add interface EnhancedWriteableProperties which extends EnhancedProperties with:
    • default setters (int, double, String,...)
    • save() method
  • add abstract class EnhancedWriteablePropertiesImpl which implements the new interface and extends EnhancedPropertiesImpl
  • make EnhancedPropertiesInFile and EnhancedPropertiesInFileOrResources extend the new class
  • add event listeners to listen for changed properties

Listen to external file changes

It should be possible to change files externally and reload the EnhancedProperties automatically

Additionally, you could call an event listener whenever the file was reloaded from disk

EnhancedPropertiesInFileOrResources should not throw an exception if the file in the file-system does not exist

Version used: 1.0.0

Description of the bug:
The application is implementing EnhancedPropertiesInFileOrResources with the annotation @ReadRule(preferredLocation = ReadRule.Location.FILE). The file in resources exists, but the one in the file-system doesn't.

To Reproduce:
Steps to reproduce the behavior:
(it could be useful to include code examples and the contents of your *.properties-files)

Expected behavior
The file in the file-system should be optional

System information:

  • OS: Windows 10
  • Java Version: 1.8.0_102
  • EnhancedProperties Version: 1.0.0

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.