org.ztemplates.message
Class ZMessages

java.lang.Object
  extended by org.ztemplates.message.ZMessages

public class ZMessages
extends Object

container for messages, keeps messages created by a validator or any other program part

Author:
gerd

Constructor Summary
ZMessages()
           
 
Method Summary
 void addError(String text, ZProperty... propertyArr)
          utilitiy
 void addErrorMessage(String text, String... propertyNameArr)
          Deprecated. 
 void addErrorPropertyMessage(String text, ZProperty... propertyArr)
          Deprecated. 
 void addErrorPropertyNames(String text, String... propertyNameArr)
          utilitiy
 void addInfo(String text, ZProperty... propertyArr)
          utilitiy
 void addInfoMessage(String text, String... propertyNameArr)
          Deprecated. 
 void addInfoPropertyMessage(String text, ZProperty... propertyArr)
          Deprecated. 
 void addInfoPropertyNames(String text, String... propertyNameArr)
          utilitiy
 void addMessage(ZMessage msg)
           
 void addWarning(String text, ZProperty... propertyArr)
          utilitiy
 void addWarningMessage(String text, String... propertyNameArr)
          Deprecated. 
 void addWarningPropertyMessage(String text, ZProperty... propertyArr)
          Deprecated. 
 void addWarningPropertyNames(String text, String... propertyNameArr)
          utilitiy
 void clearMessages()
           
 org.json.JSONArray createGlobalMessagesJSON()
           
 org.json.JSONObject createMessagesJSON()
           
 org.json.JSONObject createPropertyMessagesJSON()
           
 List<ZMessage> getErrors()
           
 List<ZMessage> getGlobalMessages()
          Messages that are not bound to a specific property, like database constraint violations or general infos
 String getGlobalMessagesJSON()
           
 List<ZMessage> getInfo()
           
 List<ZMessage> getMessages()
           
 String getMessagesJSON()
           
 List<ZMessage> getPropertyMessages(String propName)
          messages bound to a property
 String getPropertyMessagesJSON()
           
 Set<String> getPropertyNames()
           
 List<ZMessage> getType(String type)
           
 List<ZMessage> getWarnings()
           
 boolean isEmpty()
           
 boolean isErrors()
           
 boolean isInfos()
           
 boolean isPropertyErrors()
           
 boolean isPropertyWarnings()
           
 boolean isType(String type)
           
 boolean isWarnings()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ZMessages

public ZMessages()
Method Detail

clearMessages

public void clearMessages()

addMessage

public void addMessage(ZMessage msg)

addInfoPropertyNames

public void addInfoPropertyNames(String text,
                                 String... propertyNameArr)
utilitiy

Parameters:
text -
propertyNameArr -

addInfo

public void addInfo(String text,
                    ZProperty... propertyArr)
utilitiy

Parameters:
text -
propertyNameArr -

addErrorPropertyNames

public void addErrorPropertyNames(String text,
                                  String... propertyNameArr)
utilitiy

Parameters:
text -
propertyNameArr -

addError

public void addError(String text,
                     ZProperty... propertyArr)
utilitiy

Parameters:
text -
propertyNameArr -

addWarningPropertyNames

public void addWarningPropertyNames(String text,
                                    String... propertyNameArr)
utilitiy

Parameters:
text -
propertyNameArr -

addWarning

public void addWarning(String text,
                       ZProperty... propertyArr)
utilitiy

Parameters:
text -
propertyNameArr -

getMessages

public List<ZMessage> getMessages()

getMessagesJSON

public String getMessagesJSON()

createMessagesJSON

public org.json.JSONObject createMessagesJSON()
                                       throws org.json.JSONException
Throws:
org.json.JSONException

getGlobalMessagesJSON

public String getGlobalMessagesJSON()

getPropertyMessagesJSON

public String getPropertyMessagesJSON()

createGlobalMessagesJSON

public org.json.JSONArray createGlobalMessagesJSON()
                                            throws org.json.JSONException
Throws:
org.json.JSONException

createPropertyMessagesJSON

public org.json.JSONObject createPropertyMessagesJSON()
                                               throws org.json.JSONException
Throws:
org.json.JSONException

getPropertyMessages

public List<ZMessage> getPropertyMessages(String propName)
messages bound to a property

Parameters:
propName -
Returns:

getPropertyNames

public Set<String> getPropertyNames()

getGlobalMessages

public List<ZMessage> getGlobalMessages()
Messages that are not bound to a specific property, like database constraint violations or general infos

Returns:

getErrors

public List<ZMessage> getErrors()

getWarnings

public List<ZMessage> getWarnings()

getInfo

public List<ZMessage> getInfo()

getType

public List<ZMessage> getType(String type)

isEmpty

public boolean isEmpty()

isErrors

public boolean isErrors()

isWarnings

public boolean isWarnings()

isPropertyWarnings

public boolean isPropertyWarnings()

isPropertyErrors

public boolean isPropertyErrors()

isInfos

public boolean isInfos()

isType

public boolean isType(String type)

addInfoMessage

@Deprecated
public void addInfoMessage(String text,
                                      String... propertyNameArr)
Deprecated. 


addInfoPropertyMessage

@Deprecated
public void addInfoPropertyMessage(String text,
                                              ZProperty... propertyArr)
Deprecated. 


addErrorMessage

@Deprecated
public void addErrorMessage(String text,
                                       String... propertyNameArr)
Deprecated. 


addErrorPropertyMessage

@Deprecated
public void addErrorPropertyMessage(String text,
                                               ZProperty... propertyArr)
Deprecated. 


addWarningMessage

@Deprecated
public void addWarningMessage(String text,
                                         String... propertyNameArr)
Deprecated. 


addWarningPropertyMessage

@Deprecated
public void addWarningPropertyMessage(String text,
                                                 ZProperty... propertyArr)
Deprecated. 



Copyright © 2011. All Rights Reserved.