package seedu.geekeep.commons.core;

import java.util.Objects;
import java.util.logging.Level;

/**
 * Config values used by the app
 */
public class Config {

    public static final String DEFAULT_CONFIG_FILE = "config.json";

    // Config values customizable through config file
    private String appTitle = "Address App";
    private Level logLevel = Level.INFO;
    private String userPrefsFilePath = "preferences.json";
    private String addressBookFilePath = "data/addressbook.xml";
    private String addressBookName = "MyAddressBook";


    public String getAppTitle() {
        return appTitle;
    }

    public void setAppTitle(String appTitle) {
        this.appTitle = appTitle;
    }

    public Level getLogLevel() {
        return logLevel;
    }

    public void setLogLevel(Level logLevel) {
        this.logLevel = logLevel;
    }

    public String getUserPrefsFilePath() {
        return userPrefsFilePath;
    }

    public void setUserPrefsFilePath(String userPrefsFilePath) {
        this.userPrefsFilePath = userPrefsFilePath;
    }

    public String getAddressBookFilePath() {
        return addressBookFilePath;
    }

    public void setAddressBookFilePath(String addressBookFilePath) {
        this.addressBookFilePath = addressBookFilePath;
    }

    public String getAddressBookName() {
        return addressBookName;
    }

    public void setAddressBookName(String addressBookName) {
        this.addressBookName = addressBookName;
    }


    @Override
    public boolean equals(Object other) {
        if (other == this) {
            return true;
        }
        if (!(other instanceof Config)) { //this handles null as well.
            return false;
        }

        Config o = (Config) other;

        return Objects.equals(appTitle, o.appTitle)
                && Objects.equals(logLevel, o.logLevel)
                && Objects.equals(userPrefsFilePath, o.userPrefsFilePath)
                && Objects.equals(addressBookFilePath, o.addressBookFilePath)
                && Objects.equals(addressBookName, o.addressBookName);
    }

    @Override
    public int hashCode() {
        return Objects.hash(appTitle, logLevel, userPrefsFilePath, addressBookFilePath, addressBookName);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("App title : " + appTitle);
        sb.append("\nCurrent log level : " + logLevel);
        sb.append("\nPreference file Location : " + userPrefsFilePath);
        sb.append("\nLocal data file location : " + addressBookFilePath);
        sb.append("\nAddressBook name : " + addressBookName);
        return sb.toString();
    }

}

@@ -311,19 +311,52 @@
  = %22
-Address App
+GeeKeep - Command Line Featured Task Manager
 %22;%0A 
@@ -469,35 +469,31 @@
 vate String 
-addressBook
+geeKeep
 FilePath = %22
@@ -501,19 +501,15 @@
 ata/
-addressbook
+geekeep
 .xml
@@ -534,40 +534,32 @@
 ing 
-addressBookName = %22MyAddressBook
+geeKeepName = %22MyGeeKeep
 %22;%0A%0A
@@ -1094,27 +1094,23 @@
 ring get
-AddressBook
+Geekeep
 FilePath
@@ -1129,27 +1129,23 @@
  return 
-addressBook
+geeKeep
 FilePath
@@ -1199,27 +1199,23 @@
 (String 
-addressBook
+geeKeep
 FilePath
@@ -1235,41 +1235,33 @@
 his.
-addressBookFilePath = addressBook
+geeKeepFilePath = geeKeep
 File
@@ -1329,27 +1329,23 @@
  return 
-addressBook
+geeKeep
 Name;%0A  
@@ -1391,27 +1391,23 @@
 (String 
-addressBook
+geeKeep
 Name) %7B%0A
@@ -1423,37 +1423,29 @@
 his.
-addressBookName = addressBook
+geeKeepName = geeKeep
 Name
@@ -1934,27 +1934,23 @@
 .equals(
-addressBook
+geeKeep
 FilePath
@@ -1953,27 +1953,23 @@
 Path, o.
-addressBook
+geeKeep
 FilePath
@@ -2008,38 +2008,30 @@
 als(
-addressBookName, o.addressBook
+geeKeepName, o.geeKeep
 Name
@@ -2153,40 +2153,32 @@
 th, 
-addressBookFilePath, addressBook
+geeKeepFilePath, geeKeep
 Name
@@ -2506,27 +2506,23 @@
 n : %22 + 
-addressBook
+geeKeep
 FilePath
@@ -2572,19 +2572,15 @@
 %22 + 
-addressBook
+geeKeep
 Name

Rename addressbook geekeep in Config class