org.outerj.daisy.httpconnector.spi
Class HttpUtil
java.lang.Object
org.outerj.daisy.httpconnector.spi.HttpUtil
public class HttpUtil
- extends Object
|
Method Summary |
static org.outerx.daisy.x10.ErrorDocument |
buildErrorXml(Throwable throwable)
|
static boolean |
getBooleanParam(ServletRequest request,
String name)
|
static boolean |
getBooleanParam(ServletRequest request,
String name,
boolean defaultValue)
|
static long |
getBranchId(ServletRequest request,
Repository repository)
|
static long |
getBranchId(ServletRequest request,
Repository repository,
String paramName)
|
static int |
getIntParam(ServletRequest request,
String name,
int defaultValue)
|
static long |
getLanguageId(ServletRequest request,
Repository repository)
|
static long |
getLanguageId(ServletRequest request,
Repository repository,
String paramName)
|
static long |
getLongParam(ServletRequest request,
String name)
|
static String |
getStringParam(ServletRequest request,
String name)
|
static String |
getStringParam(ServletRequest request,
String name,
String defaultValue)
|
static long |
parseId(String name,
String value)
|
static void |
sendCustomError(String message,
int code,
HttpServletResponse response)
|
static void |
sendCustomError(Throwable throwable,
int code,
HttpServletResponse response)
|
HttpUtil
public HttpUtil()
sendCustomError
public static void sendCustomError(String message,
int code,
HttpServletResponse response)
throws IOException
- Throws:
IOException
sendCustomError
public static void sendCustomError(Throwable throwable,
int code,
HttpServletResponse response)
throws IOException
- Throws:
IOException
buildErrorXml
public static org.outerx.daisy.x10.ErrorDocument buildErrorXml(Throwable throwable)
getStringParam
public static String getStringParam(ServletRequest request,
String name)
throws Exception
- Throws:
Exception
getStringParam
public static String getStringParam(ServletRequest request,
String name,
String defaultValue)
throws Exception
- Throws:
Exception
getIntParam
public static int getIntParam(ServletRequest request,
String name,
int defaultValue)
throws Exception
- Throws:
Exception
getLongParam
public static long getLongParam(ServletRequest request,
String name)
throws Exception
- Throws:
Exception
getBooleanParam
public static boolean getBooleanParam(ServletRequest request,
String name)
throws Exception
- Throws:
Exception
getBooleanParam
public static boolean getBooleanParam(ServletRequest request,
String name,
boolean defaultValue)
throws Exception
- Throws:
Exception
getBranchId
public static long getBranchId(ServletRequest request,
Repository repository)
throws BadRequestException,
RepositoryException
- Throws:
BadRequestException
RepositoryException
getBranchId
public static long getBranchId(ServletRequest request,
Repository repository,
String paramName)
throws BadRequestException,
RepositoryException
- Throws:
BadRequestException
RepositoryException
getLanguageId
public static long getLanguageId(ServletRequest request,
Repository repository)
throws BadRequestException,
RepositoryException
- Throws:
BadRequestException
RepositoryException
getLanguageId
public static long getLanguageId(ServletRequest request,
Repository repository,
String paramName)
throws BadRequestException,
RepositoryException
- Throws:
BadRequestException
RepositoryException
parseId
public static long parseId(String name,
String value)
throws BadRequestException
- Throws:
BadRequestException