Class Response
- java.lang.Object
-
- org.bedework.bwcli.copiedCalFacade.responses.Response
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AdminGroupsResponse
public class Response extends Object implements Serializable
Base for service responses- Author:
- Mike Douglass douglm - spherical cow
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classResponse.Status
-
Constructor Summary
Constructors Constructor Description Response()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T extends Response>
Terror(T resp, String msg)static <T extends Response>
Terror(T resp, Throwable t)intgetId()StringgetMessage()Response.StatusgetStatus()static <T extends Response>
Tinvalid(T resp, String msg)booleanisOk()static <T extends Response>
TnotOk(T resp, Response.Status status, String msg)static Responseok()static <T extends Response>
Tok(T resp, String msg)voidsetId(int val)voidsetMessage(String val)voidsetStatus(Response.Status val)StringtoString()voidtoStringSegment(org.bedework.util.misc.ToString ts)
-
-
-
Method Detail
-
setStatus
public void setStatus(Response.Status val)
- Parameters:
val- status
-
getStatus
public Response.Status getStatus()
- Returns:
- status
-
setMessage
public void setMessage(String val)
- Parameters:
val- a message
-
getMessage
public String getMessage()
- Returns:
- a message or null
-
isOk
public boolean isOk()
-
setId
public void setId(int val)
- Parameters:
val- an id to identify the request
-
getId
public int getId()
- Returns:
- an id to identify the request
-
ok
public static Response ok()
-
notOk
public static <T extends Response> T notOk(T resp, Response.Status status, String msg)
-
toStringSegment
public void toStringSegment(org.bedework.util.misc.ToString ts)
-
-