]> git.mxchange.org Git - jcontacts-business-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Fri, 24 Apr 2020 00:42:44 +0000 (02:42 +0200)
committerRoland Häder <roland@mxchange.org>
Fri, 24 Apr 2020 00:42:44 +0000 (02:42 +0200)
- renamed branchOffice -> addedBranchOffice
- renamed BranchOfficeAddedEvent -> AdminBranchOfficeAddedEvent
- renamed ObservableBranchOfficeAddedEvent -> ObservableAdminBranchOfficeAddedEvent
- added event for when an administrator has updated a branch office

Signed-off-by: Roland Häder <roland@mxchange.org>
12 files changed:
src/org/mxchange/jcontactsbusiness/events/branchoffice/added/AdminBranchOfficeAddedEvent.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/events/branchoffice/added/BranchOfficeAddedEvent.java [deleted file]
src/org/mxchange/jcontactsbusiness/events/branchoffice/added/ObservableAdminBranchOfficeAddedEvent.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/events/branchoffice/added/ObservableBranchOfficeAddedEvent.java [deleted file]
src/org/mxchange/jcontactsbusiness/events/branchoffice/updated/AdminBranchOfficeUpdatedEvent.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/events/branchoffice/updated/ObservableAdminBranchOfficeUpdatedEvent.java [new file with mode: 0644]
src/org/mxchange/jcontactsbusiness/events/department/added/DepartmentAddedEvent.java
src/org/mxchange/jcontactsbusiness/events/department/added/ObservableDepartmentAddedEvent.java
src/org/mxchange/jcontactsbusiness/events/employee/added/ObservableEmployeeAddedEvent.java
src/org/mxchange/jcontactsbusiness/events/headquarter/added/ObservableHeadquarterAddedEvent.java
src/org/mxchange/jcontactsbusiness/events/opening_time/added/ObservableOpeningTimeAddedEvent.java
src/org/mxchange/jcontactsbusiness/events/opening_time/added/OpeningTimeAddedEvent.java

diff --git a/src/org/mxchange/jcontactsbusiness/events/branchoffice/added/AdminBranchOfficeAddedEvent.java b/src/org/mxchange/jcontactsbusiness/events/branchoffice/added/AdminBranchOfficeAddedEvent.java
new file mode 100644 (file)
index 0000000..8045429
--- /dev/null
@@ -0,0 +1,68 @@
+/*
+ * Copyright (C) 2017 - 2020 Free Software Foundation
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.events.branchoffice.added;
+
+import java.text.MessageFormat;
+import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
+
+/**
+ * An event being fired when a branch office has been added by an administrator.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class AdminBranchOfficeAddedEvent implements ObservableAdminBranchOfficeAddedEvent {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 572_367_561_659_109L;
+
+       /**
+        * Branch office instance being added
+        */
+       private final BranchOffice addedBranchOffice;
+
+       /**
+        * Constructor with branch office instance
+        * <p>
+        * @param addedBranchOffice Branch office instance
+        *
+        * @throws NullPointerException If the parameter is null
+        */
+       public AdminBranchOfficeAddedEvent (final BranchOffice addedBranchOffice) {
+               // Check parameter
+               if (null == addedBranchOffice) {
+                       // Throw NPE
+                       throw new NullPointerException("addedBranchOffice is null"); //NOI18N
+               } else if (addedBranchOffice.getBranchId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("addedBranchOffice.branchId is null"); //NOI18N
+               } else if (addedBranchOffice.getBranchId() < 1) {
+                       // Throw NPE again
+                       throw new NullPointerException(MessageFormat.format("addedBranchOffice.branchId={0} is not valid", addedBranchOffice.getBranchId())); //NOI18N
+               }
+
+               // Set it
+               this.addedBranchOffice = addedBranchOffice;
+       }
+
+       @Override
+       public BranchOffice getAddedBranchOffice () {
+               return this.addedBranchOffice;
+       }
+
+}
diff --git a/src/org/mxchange/jcontactsbusiness/events/branchoffice/added/BranchOfficeAddedEvent.java b/src/org/mxchange/jcontactsbusiness/events/branchoffice/added/BranchOfficeAddedEvent.java
deleted file mode 100644 (file)
index 56e6128..0000000
+++ /dev/null
@@ -1,67 +0,0 @@
-/*
- * Copyright (C) 2017 - 2020 Free Software Foundation
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontactsbusiness.events.branchoffice.added;
-
-import java.text.MessageFormat;
-import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
-
-/**
- * An event being fired when a branch office has been added
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public class BranchOfficeAddedEvent implements ObservableBranchOfficeAddedEvent {
-
-       /**
-        * Serial number
-        */
-       private static final long serialVersionUID = 572_367_561_659_109L;
-
-       /**
-        * Branch office instance being added
-        */
-       private final BranchOffice branchOffice;
-
-       /**
-        * Constructor with branch office instance
-        * <p>
-        * @param branchOffice Branch office instance
-        * @throws NullPointerException If the parameter is null
-        */
-       public BranchOfficeAddedEvent (final BranchOffice branchOffice) {
-               // Check parameter
-               if (null == branchOffice) {
-                       // Throw NPE
-                       throw new NullPointerException("branchOffice is null"); //NOI18N
-               } else if (branchOffice.getBranchId() == null) {
-                       // Throw NPE again
-                       throw new NullPointerException("branchOffice.branchId is null"); //NOI18N
-               } else if (branchOffice.getBranchId() < 1) {
-                       // Throw NPE again
-                       throw new NullPointerException(MessageFormat.format("branchOffice.branchId={0} is not valid", branchOffice.getBranchId())); //NOI18N
-               }
-
-               // Set it
-               this.branchOffice = branchOffice;
-       }
-
-       @Override
-       public BranchOffice getBranchOffice () {
-               return this.branchOffice;
-       }
-
-}
diff --git a/src/org/mxchange/jcontactsbusiness/events/branchoffice/added/ObservableAdminBranchOfficeAddedEvent.java b/src/org/mxchange/jcontactsbusiness/events/branchoffice/added/ObservableAdminBranchOfficeAddedEvent.java
new file mode 100644 (file)
index 0000000..8d85388
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2017 - 2020 Free Software Foundation
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.events.branchoffice.added;
+
+import java.io.Serializable;
+import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
+
+/**
+ * An interface for events being fired when a branch office has been added by an
+ * administrator.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminBranchOfficeAddedEvent extends Serializable {
+
+       /**
+        * Getter for added branch office instance
+        * <p>
+        * @return Added branch office instance
+        */
+       BranchOffice getAddedBranchOffice ();
+
+}
diff --git a/src/org/mxchange/jcontactsbusiness/events/branchoffice/added/ObservableBranchOfficeAddedEvent.java b/src/org/mxchange/jcontactsbusiness/events/branchoffice/added/ObservableBranchOfficeAddedEvent.java
deleted file mode 100644 (file)
index 6d7ae85..0000000
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2017 - 2020 Free Software Foundation
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- */
-package org.mxchange.jcontactsbusiness.events.branchoffice.added;
-
-import java.io.Serializable;
-import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
-
-/**
- * An interface for events being triggered when a branch office has been added.
- * <p>
- * @author Roland Häder<roland@mxchange.org>
- */
-public interface ObservableBranchOfficeAddedEvent extends Serializable {
-
-       /**
-        * Getter for branch office instance
-        * <p>
-        * @return Branch office instance
-        */
-       BranchOffice getBranchOffice ();
-
-}
diff --git a/src/org/mxchange/jcontactsbusiness/events/branchoffice/updated/AdminBranchOfficeUpdatedEvent.java b/src/org/mxchange/jcontactsbusiness/events/branchoffice/updated/AdminBranchOfficeUpdatedEvent.java
new file mode 100644 (file)
index 0000000..ffa308d
--- /dev/null
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2017 - 2020 Free Software Foundation
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.events.branchoffice.updated;
+
+import java.text.MessageFormat;
+import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
+
+/**
+ * An event being fired when a branch office has been updated by an
+ * administrator.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public class AdminBranchOfficeUpdatedEvent implements ObservableAdminBranchOfficeUpdatedEvent {
+
+       /**
+        * Serial number
+        */
+       private static final long serialVersionUID = 572_367_561_659_114L;
+
+       /**
+        * Branch office instance being added
+        */
+       private final BranchOffice updatedBranchOffice;
+
+       /**
+        * Constructor with branch office instance
+        * <p>
+        * @param updatedBranchOffice Branch office instance
+        * <p>
+        * @throws NullPointerException If the parameter is null
+        */
+       public AdminBranchOfficeUpdatedEvent (final BranchOffice updatedBranchOffice) {
+               // Check parameter
+               if (null == updatedBranchOffice) {
+                       // Throw NPE
+                       throw new NullPointerException("updatedBranchOffice is null"); //NOI18N
+               } else if (updatedBranchOffice.getBranchId() == null) {
+                       // Throw NPE again
+                       throw new NullPointerException("updatedBranchOffice.branchId is null"); //NOI18N
+               } else if (updatedBranchOffice.getBranchId() < 1) {
+                       // Throw NPE again
+                       throw new NullPointerException(MessageFormat.format("updatedBranchOffice.branchId={0} is not valid", updatedBranchOffice.getBranchId())); //NOI18N
+               }
+
+               // Set it
+               this.updatedBranchOffice = updatedBranchOffice;
+       }
+
+       @Override
+       public BranchOffice getUpdatedBranchOffice () {
+               return this.updatedBranchOffice;
+       }
+
+}
diff --git a/src/org/mxchange/jcontactsbusiness/events/branchoffice/updated/ObservableAdminBranchOfficeUpdatedEvent.java b/src/org/mxchange/jcontactsbusiness/events/branchoffice/updated/ObservableAdminBranchOfficeUpdatedEvent.java
new file mode 100644 (file)
index 0000000..70c37d1
--- /dev/null
@@ -0,0 +1,37 @@
+/*
+ * Copyright (C) 2017 - 2020 Free Software Foundation
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ */
+package org.mxchange.jcontactsbusiness.events.branchoffice.updated;
+
+import java.io.Serializable;
+import org.mxchange.jcontactsbusiness.model.branchoffice.BranchOffice;
+
+/**
+ * An interface for events being fired when an administrator has updated a
+ * branch office.
+ * <p>
+ * @author Roland Häder<roland@mxchange.org>
+ */
+public interface ObservableAdminBranchOfficeUpdatedEvent extends Serializable {
+
+       /**
+        * Getter for branch office instance
+        * <p>
+        * @return Branch office instance
+        */
+       BranchOffice getUpdatedBranchOffice ();
+
+}
index 92987f11be7575316eb11387dc6e02fb9a40a1c3..97de10d357b6d54bdd97e8f5f2a5c97ab5883ed1 100644 (file)
@@ -29,7 +29,7 @@ public class DepartmentAddedEvent implements ObservableDepartmentAddedEvent {
        /**
         * Serial number
         */
-       private static final long serialVersionUID = 572_367_561_659_110L;
+       private static final long serialVersionUID = 572_367_561_659_111L;
 
        /**
         * Branch office instance being added
@@ -40,6 +40,7 @@ public class DepartmentAddedEvent implements ObservableDepartmentAddedEvent {
         * Constructor with department instance
         * <p>
         * @param department Branch office instance
+        * <p>
         * @throws NullPointerException If the parameter is null
         */
        public DepartmentAddedEvent (final Department department) {
index 3181de1fff30918dae4791d37e9990e2f5f7762f..bbdae8c5b4ed4b8921c5934c9c4f0f017996b33d 100644 (file)
@@ -20,7 +20,7 @@ import java.io.Serializable;
 import org.mxchange.jcontactsbusiness.model.department.Department;
 
 /**
- * An interface for events being triggered when a department has been added.
+ * An interface for events being fired when a department has been added.
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
index a5c6e9dac4fe8d9f812f103402e1c97e0e9db020..1b37a5ae3f3c333e747206380ca7526a35d9fa4b 100644 (file)
@@ -20,7 +20,7 @@ import java.io.Serializable;
 import org.mxchange.jcontactsbusiness.model.employee.Employable;
 
 /**
- * An interface for events being triggered when a employee has been added.
+ * An interface for events being fired when a employee has been added.
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
index 09a9556891ad767cf6e1af4fe200aeaa5d4c6b18..1ac85611b01ee4427783ea40f703e95d2639c7ab 100644 (file)
@@ -20,7 +20,7 @@ import java.io.Serializable;
 import org.mxchange.jcontactsbusiness.model.headquarter.Headquarter;
 
 /**
- * An interface for events being triggered when a headquarter has been added.
+ * An interface for events being fired when a headquarter has been added.
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
index 037def4cadb55a7863f224f5cbb84364aba13624..3963de80511ec468ee50215593d3018709d08157 100644 (file)
@@ -20,7 +20,7 @@ import java.io.Serializable;
 import org.mxchange.jcontactsbusiness.model.opening_time.OpeningTime;
 
 /**
- * An interface for events being triggered when a opening time has been added.
+ * An interface for events being fired when a opening time has been added.
  * <p>
  * @author Roland Häder<roland@mxchange.org>
  */
index 526688320cb33d2bc81128a37b46740d48d44ac6..66f12d1722250c7c8e99ad73e996497a1983cd58 100644 (file)
@@ -29,7 +29,7 @@ public class OpeningTimeAddedEvent implements ObservableOpeningTimeAddedEvent {
        /**
         * Serial number
         */
-       private static final long serialVersionUID = 572_367_561_659_111L;
+       private static final long serialVersionUID = 572_367_561_659_113L;
 
        /**
         * Branch office instance being added
@@ -40,6 +40,7 @@ public class OpeningTimeAddedEvent implements ObservableOpeningTimeAddedEvent {
         * Constructor with opening time instance
         * <p>
         * @param openingTime Branch office instance
+        * <p>
         * @throws NullPointerException If the parameter is null
         */
        public OpeningTimeAddedEvent (final OpeningTime openingTime) {