edu.harvard.med.countway.dl.rest
Class Utils
java.lang.Object
edu.harvard.med.countway.dl.rest.Utils
public class Utils
- extends java.lang.Object
|
Constructor Summary |
Utils()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Utils
public Utils()
getBadRequestResponse
public static javax.ws.rs.core.Response getBadRequestResponse(java.lang.String msg)
getBadRequestResponse
public static javax.ws.rs.core.Response getBadRequestResponse(java.lang.Throwable thr)
getNotFoundResponse
public static javax.ws.rs.core.Response getNotFoundResponse(java.lang.String msg)
getServerErrorResponse
public static javax.ws.rs.core.Response getServerErrorResponse(java.lang.String msg)
getServerErrorResponse
public static javax.ws.rs.core.Response getServerErrorResponse(java.lang.Throwable thr)
getOkResponse
public static javax.ws.rs.core.Response getOkResponse(java.lang.String msg)
getCreatedResponse
public static javax.ws.rs.core.Response getCreatedResponse(java.net.URI uri)
getUpdatedResponse
public static javax.ws.rs.core.Response getUpdatedResponse(java.net.URI uri)
getDeletedResponse
public static javax.ws.rs.core.Response getDeletedResponse()
getStackTrace
public static java.lang.String getStackTrace(java.lang.Throwable thr)
stringToInteger
public static java.lang.Integer stringToInteger(java.lang.String string)
unmarshal
public static <T> T unmarshal(javax.xml.bind.JAXBContext jaxbc,
java.lang.String xml)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
marshal
public static <T> java.lang.String marshal(javax.xml.bind.JAXBContext jaxbc,
T obj)
throws javax.xml.bind.JAXBException
- Throws:
javax.xml.bind.JAXBException
getIntegerListFromStringList
public static java.util.List<java.lang.Integer> getIntegerListFromStringList(java.util.List<java.lang.String> list)
getIntegerArrayFromStringList
public static java.lang.Integer[] getIntegerArrayFromStringList(java.util.List<java.lang.String> list)
Copyright © 2010. All Rights Reserved.