]> git.mxchange.org Git - jproduct-core.git/commitdiff
Continued:
authorRoland Häder <roland@mxchange.org>
Sat, 25 Apr 2020 18:31:25 +0000 (20:31 +0200)
committerRoland Häder <roland@mxchange.org>
Sat, 25 Apr 2020 18:31:25 +0000 (20:31 +0200)
- ops, needs to be updatedCategory to have it visible in other Java code

Signed-off-by: Roland Häder <roland@mxchange.org>
src/org/mxchange/jproduct/events/category/updated/AdminUpdatedCategoryEvent.java
src/org/mxchange/jproduct/events/category/updated/ObservableAdminUpdatedCategoryEvent.java

index f497b7e376fdb370eb32dd63e18a6917497d825d..75f8add9d203b6d7a993c3b1fb2d2b951df3340a 100644 (file)
@@ -34,39 +34,39 @@ public class AdminUpdatedCategoryEvent implements ObservableAdminUpdatedCategory
        /**
         * Category instance that has been added
         */
-       private final Category addedCategory;
+       private final Category updatedCategory;
 
        /**
         * Constructor with added category instance
         * <p>
-        * @param addedCategory Added category
+        * @param updatedCategory Added category
         */
-       public AdminUpdatedCategoryEvent (final Category addedCategory) {
+       public AdminUpdatedCategoryEvent (final Category updatedCategory) {
                // The category should be valid
-               if (null == addedCategory) {
+               if (null == updatedCategory) {
                        // Is NULL, throw NPE
-                       throw new NullPointerException("addedCategory is null"); //NOI18N
-               } else if (addedCategory.getCategoryI18nKey() == null) {
+                       throw new NullPointerException("updatedCategory is null"); //NOI18N
+               } else if (updatedCategory.getCategoryI18nKey() == null) {
                        // Is NULL, throw NPE again
-                       throw new NullPointerException("addedCategory.categoryI18nKey is null"); //NOI18N
-               } else if (addedCategory.getCategoryI18nKey().isEmpty()) {
+                       throw new NullPointerException("updatedCategory.categoryI18nKey is null"); //NOI18N
+               } else if (updatedCategory.getCategoryI18nKey().isEmpty()) {
                        // Empty title
-                       throw new IllegalArgumentException("addedCategory.categoryI18nKey is empty"); //NOI18N
-               } else if (addedCategory.getCategoryId() == null) {
+                       throw new IllegalArgumentException("updatedCategory.categoryI18nKey is empty"); //NOI18N
+               } else if (updatedCategory.getCategoryId() == null) {
                        // Id is NULL
-                       throw new NullPointerException("addedCategory.categoryId is null"); //NOI18N
-               } else if (addedCategory.getCategoryId() <= 0) {
+                       throw new NullPointerException("updatedCategory.categoryId is null"); //NOI18N
+               } else if (updatedCategory.getCategoryId() <= 0) {
                        // Not valid id
-                       throw new IllegalArgumentException(MessageFormat.format("addedCategory.categoryId={0} is not valid.", addedCategory.getCategoryId())); //NOI18N
+                       throw new IllegalArgumentException(MessageFormat.format("updatedCategory.categoryId={0} is not valid.", updatedCategory.getCategoryId())); //NOI18N
                }
 
                // Set it here
-               this.addedCategory = addedCategory;
+               this.updatedCategory = updatedCategory;
        }
 
        @Override
-       public Category getAddedCategory () {
-               return this.addedCategory;
+       public Category getUpdatedCategory () {
+               return this.updatedCategory;
        }
 
 }
index ae4a79b7cd675e7394138c37551fdcd38d81702c..69e480b93da21ebe3914291deac5e420dc69ae05 100644 (file)
@@ -31,6 +31,6 @@ public interface ObservableAdminUpdatedCategoryEvent extends Serializable {
         * <p>
         * @return Added category instance
         */
-       public Category getAddedCategory ();
+       public Category getUpdatedCategory ();
 
 }