Package com.jalios.jcms.result
Class AbstractResult
- java.lang.Object
-
- com.jalios.jcms.result.AbstractResult
-
- All Implemented Interfaces:
java.io.Serializable
- Direct Known Subclasses:
Result
,ServiceResponse
public abstract class AbstractResult extends java.lang.Object implements java.io.Serializable
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractResult(JcmsMessage.Level level, java.lang.String message, java.lang.Object... params)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getMessage(java.lang.String lang)
java.lang.String
getMessage(java.lang.String lang, ParamResolver resolver)
boolean
isSuccess()
void
sendMessage(java.io.Writer out, java.lang.String lang)
Method to be called after initializing Result object.void
sendMessage(java.io.Writer out, java.lang.String lang, ParamResolver resolver)
Method to be called after initializing Result object.void
sendMessage(javax.servlet.http.HttpServletRequest request, java.lang.String lang)
Method to be called after initializing Result object.void
sendMessage(javax.servlet.http.HttpServletRequest request, java.lang.String lang, ParamResolver resolver)
Method to be called after initializing Result object.
-
-
-
Constructor Detail
-
AbstractResult
protected AbstractResult(JcmsMessage.Level level, java.lang.String message, java.lang.Object... params)
-
-
Method Detail
-
isSuccess
public boolean isSuccess()
-
getMessage
public java.lang.String getMessage(java.lang.String lang)
-
getMessage
public java.lang.String getMessage(java.lang.String lang, ParamResolver resolver)
-
sendMessage
public void sendMessage(javax.servlet.http.HttpServletRequest request, java.lang.String lang)
Method to be called after initializing Result object.- Parameters:
request
-HttpServletRequest
lang
- current language
-
sendMessage
public void sendMessage(javax.servlet.http.HttpServletRequest request, java.lang.String lang, ParamResolver resolver)
Method to be called after initializing Result object.- Parameters:
request
-HttpServletRequest
lang
- current languageresolver
- callback to resolve param values
-
sendMessage
public void sendMessage(java.io.Writer out, java.lang.String lang) throws java.io.IOException
Method to be called after initializing Result object.- Parameters:
out
-Writer
lang
- current language- Throws:
java.io.IOException
-
sendMessage
public void sendMessage(java.io.Writer out, java.lang.String lang, ParamResolver resolver) throws java.io.IOException
Method to be called after initializing Result object.- Parameters:
out
-Writer
lang
- current languageresolver
- callback to resolve param values- Throws:
java.io.IOException
-
-