]> git.mxchange.org Git - jaddressbook-lib.git/blobdiff - Addressbook/src/org/mxchange/addressbook/application/AddressbookApplication.java
Auto-formation and yes, it is better this way
[jaddressbook-lib.git] / Addressbook / src / org / mxchange / addressbook / application / AddressbookApplication.java
index 78efb043b54a1454ae310a142c57faeeb83c7c91..2f4f185617f6c50bc821018a211a659b7cef5805 100644 (file)
@@ -25,92 +25,49 @@ import org.mxchange.addressbook.exceptions.UnhandledUserChoiceException;
 import org.mxchange.addressbook.manager.application.ApplicationManager;
 
 /**
- * ============================================
- * AddressbookApplication management:
- * ============================================
- * 
+ * ============================================ AddressbookApplication
+ * management: ============================================
+ *
  * Inernet("public" service) and Intranet
- * 
- * Version 1.0+:
- * - Single-user local application
- * - Fields:
- *   + Gender
- *   + Surname
- *   + Family name
- *   + Company name
- *   + Street + number
- *   + ZIP code
- *   + City
- *   + Landline number
- *   + Fax number
- *   + Cell phone number
- *   + Email address
- *   + Birth day
- *   + Comment (?)
- * - Edit own data
- * - Add new contact
- * - Edit contacts
- * - Delete contacts
- * - Categorization of contacts
- * 
- * Version 1.1+:
- * - Permanent storage in database
- * 
- * Version 2.0+:
- * - Multi-user web application
- * - Local user registration / login / resend confirmation link / password
- *   recovery
- * - User groups (aka. teams)
- * - Administration area (user role)
- *   + Create/edit/delete groups
- *   + Edit/delete/lock/unlock user
- *   + Assign user roles/rights
- * - Allow other users / groups to view addressbook
- *   + Full addressbook
- *   + Only some categories
- * - VCard export
- *   + Allow users/guests (not recommended)
- * - XML export of addressbook and compressable (ZIP)
- * - Form to contact other user/group without need of mail program
- *   + User can disabled this
- * - Directory for ussers/groups (who allowed to be listed)
- *   + Simple click to add user to own addressbook
- *   + Search form?
- * 
- * Version 2.1+:
- * - Multi-language support
- * 
- * Version 2.2+:("socialized")
- * - "Social login" (OpenID consumer)
- *   + Connect user account to social account
- *   + Sync own data?
- * - "Social profile"
- *   + OpenID provider
- *   + RSS/activity feed 
- * 
- * ============================================
- * Time esitmation:
- * ============================================
- * 1.0 (console):
- *   + 2 days
- * 
- * 1.1 (database):
- *   + 2 day
- *   + Initial tables: contacts, categories, contact_category
- * 
- * 2.0 (web):
- *   + 3 days
- *   + Additional tables: admins (?), admin_rights, groups,
- *    users, user_contacts, user_user_rights, user_category_rights, 
- * 
- * 2.1 (language)
- *   + 1 day
- *   + Additional tables: languages (disable, enable language "pack" ?)
- * 
- * 2.2 (social):
- *   + 3 days
- *   + Additional tables: ???
- * 
+ *
+ * Version 1.0+: - Single-user local application - Fields: + Gender + Surname +
+ * Family name + Company name + Street + number + ZIP code + City + Landline
+ * number + Fax number + Cell phone number + Email address + Birth day + Comment
+ * (?) - Edit own data - Add new contact - Edit contacts - Delete contacts -
+ * Categorization of contacts
+ *
+ * Version 1.1+: - Permanent storage in database
+ *
+ * Version 2.0+: - Multi-user web application - Local user registration / login
+ * / resend confirmation link / password recovery - User groups (aka. teams) -
+ * Administration area (user role) + Create/edit/delete groups +
+ * Edit/delete/lock/unlock user + Assign user roles/rights - Allow other users /
+ * groups to view addressbook + Full addressbook + Only some categories - VCard
+ * export + Allow users/guests (not recommended) - XML export of addressbook and
+ * compressable (ZIP) - Form to contact other user/group without need of mail
+ * program + User can disabled this - Directory for ussers/groups (who allowed
+ * to be listed) + Simple click to add user to own addressbook + Search form?
+ *
+ * Version 2.1+: - Multi-language support
+ *
+ * Version 2.2+:("socialized") - "Social login" (OpenID consumer) + Connect user
+ * account to social account + Sync own data? - "Social profile" + OpenID
+ * provider + RSS/activity feed
+ *
+ * ============================================ Time esitmation:
+ * ============================================ 1.0 (console): + 2 days
+ *
+ * 1.1 (database): + 2 day + Initial tables: contacts, categories,
+ * contact_category
+ *
+ * 2.0 (web): + 3 days + Additional tables: admins (?), admin_rights, groups,
+ * users, user_contacts, user_user_rights, user_category_rights,
+ *
+ * 2.1 (language) + 1 day + Additional tables: languages (disable, enable
+ * language "pack" ?)
+ *
+ * 2.2 (social): + 3 days + Additional tables: ???
+ *
  * @author Roland Haeder
  * @version 0.0
  * @since 0.0
@@ -127,6 +84,11 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
         */
        public static final String APP_VERSION = "0.0";
 
+       /**
+        * Self instance
+        */
+       private static Application selfInstance;
+
        /**
         * Console client is enabled by default
         */
@@ -137,6 +99,14 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
         */
        private boolean guiClient = false;
 
+       /**
+        * Protected constructor
+        */
+       protected AddressbookApplication () {
+               // Set own instance
+               selfInstance = this;
+       }
+
        /**
         * Getter for printable application name
         *
@@ -193,7 +163,7 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
                // Debug message
                this.getLogger().trace("CALLED!");
 
-       // @TODO The application should be running now
+               // @TODO The application should be running now
                // Output introduction
                this.showIntro();
 
@@ -334,4 +304,14 @@ public class AddressbookApplication extends BaseFrameworkSystem implements Appli
                this.getLogger().info("End of program (last line)");
                System.exit(0);
        }
+
+       /**
+        * Getter for this application
+        *
+        * @return Instance from this application
+        */
+       public static final Application getInstance () {
+               // Return it
+               return selfInstance;
+       }
 }