package org.opencps.dossiermgt.action.util;

public class NotificationUtil {
	private static final String SMS_TRUE = "sms=true";
	private static final String EMAIL_TRUE = "email=true";
	private static final String COMMA = ",";
	
	public static boolean isSendSMS(String condition) {
		String[] conditionArr = condition.split(COMMA);
		for (String tempCondition : conditionArr) {
			if (SMS_TRUE.equalsIgnoreCase(tempCondition)) {
				return true;
			}
		}
		
		return false;
	}

	public static boolean isSendEmail(String condition) {
		String[] conditionArr = condition.split(COMMA);
		for (String tempCondition : conditionArr) {
			if (EMAIL_TRUE.equalsIgnoreCase(tempCondition)) {
				return true;
			}
		}
		
		return false;
	}
}

@@ -173,24 +173,137 @@
 email=true%22;
+%0A%0A%09private static final String SMS_FALSE = %22sms=false%22;%0A%09private static final String EMAIL_FALSE = %22email=false%22;
 %0A%09private st
@@ -524,34 +524,32 @@
 (tempCondition))
- %7B
 %0A%09%09%09%09return true
@@ -549,33 +549,78 @@
 rn true;%0A%09%09%09
-%7D%0A%09%09%7D
+else if (SMS_FALSE.equalsIgnoreCase(tempCondition))
 %0A%09%09
-%0A
 %09%09return fal
@@ -623,16 +623,35 @@
  false;%0A
+%09%09%7D%0A%09%09return true;%0A
 %09%7D%0A%0A%09pub
@@ -847,18 +847,16 @@
 dition))
- %7B
 %0A%09%09%09%09ret
@@ -872,16 +872,83 @@
 %0A%09%09%09
-%7D%0A%09%09%7D
+else if (EMAIL_FALSE.equalsIgnoreCase(tempCondition))%0A%09%09%09%09return false;
 %0A%09%09
+%7D
 %0A%09%09r
@@ -949,24 +949,23 @@
 %09%7D%0A%09%09return 
-fals
+tru
 e;%0A%09%7D%0A%7D%0A

fix originality