Skip to content

black-rusuz/Accounter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

58 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Accounter

Course project for SFedU. This API provides some tools for control your money.

Version 0.2:

  • Refactoring for all DataProviders done
  • Tests for all DataProviders' CRUD are ready with the cleanest code
  • Added tests for Use Cases methods
  • Added good CLI for Use Cases (but not for CRUD);

Methods

  • manageBalance(String action, long transactionId) — Root use case for managing current balance
  • calculateBalance() — Calculates current balance using all written transactions and appends it to Balance list
  • displayIncomesAndOutcomes() — Displays all written transactions
  • repeatTransaction(long transactionId) — Repeats selected transaction
  • makePlanBasedOnTransaction(long transactionId) — Creates plan based on selected transaction
  • managePlans(long planId, boolean execute) — Root use case for managing existing plans
  • displayPlans() — Displays all written plans
  • executePlanNow(long planId) — Appends transaction of selected plan

Parameters

  • For environment.properties file: -Dprops
  • For log4j2 file: -Dlog4j2.configurationFile

Datasources types:

  • CSV
  • XML
  • JDBC

Run commands constructor

1. Start with this:

java -jar

2. Specify environment.properties and log4j2 configuration file:

  • -Dprops=<your .properties file>
  • -Dlog4j2.configurationFile=<your log4j2 file>

3. Specify .jar file:

./Accounter.jar

4. End with any of these:

  • XML MANAGEBALANCE
  • CSV MANAGEBALANCE repeat <transactionId>
  • JDBC MANAGEBALANCE plan <transactionId>
  • XML MANAGEPLANS
  • CSV MANAGEPLANS <planId>
  • JDBC MANAGEPLANS <planId> true

For example:

  • java -jar -Dprops=./environment.properties -Dlog4j2.configurationFile=./log4j2.xml ./Accounter.jar XML MANAGEBALANCE
  • java -jar -Dprops=./environment.properties -Dlog4j2.configurationFile=./log4j2.xml ./Accounter.jar XML MANAGEBALANCE REPEAT 21
  • java -jar -Dprops=./environment.properties -Dlog4j2.configurationFile=./log4j2.xml ./Accounter.jar CSV MANAGEBALANCE PLAN 22
  • java -jar -Dprops=./environment.properties -Dlog4j2.configurationFile=./log4j2.xml ./Accounter.jar CSV MANAGEPLANS
  • java -jar -Dprops=./environment.properties -Dlog4j2.configurationFile=./log4j2.xml ./Accounter.jar JDBC MANAGEPLANS 31 TRUE
  • java -jar -Dprops=./environment.properties -Dlog4j2.configurationFile=./log4j2.xml ./Accounter.jar JDBC MANAGEPLANS 32 FALSE

TODO's:

  • Maybe make CRUD for CLI?

Known issues (*):

(づ。◕‿‿◕)づ

All known fixed.

About

Course project for SFedU

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages