org.outerj.daisy.httpconnector
Class HttpUtil
java.lang.Object
org.outerj.daisy.httpconnector.HttpUtil
public class HttpUtil
- extends java.lang.Object
Method Summary |
static org.outerx.daisy.x10.ErrorDocument |
buildErrorXml(java.lang.Throwable throwable)
|
static boolean |
getBooleanParam(org.mortbay.http.HttpRequest request,
java.lang.String name)
|
static long |
getBranchId(org.mortbay.http.HttpRequest request,
org.outerj.daisy.repository.Repository repository)
|
static long |
getBranchId(org.mortbay.http.HttpRequest request,
org.outerj.daisy.repository.Repository repository,
java.lang.String paramName)
|
static long |
getLanguageId(org.mortbay.http.HttpRequest request,
org.outerj.daisy.repository.Repository repository)
|
static long |
getLanguageId(org.mortbay.http.HttpRequest request,
org.outerj.daisy.repository.Repository repository,
java.lang.String paramName)
|
static long |
getLongParam(org.mortbay.http.HttpRequest request,
java.lang.String name)
|
static java.lang.String |
getStringParam(org.mortbay.http.HttpRequest request,
java.lang.String name)
|
static java.lang.String |
getStringParam(org.mortbay.http.HttpRequest request,
java.lang.String name,
java.lang.String defaultValue)
|
static long |
parseId(java.lang.String name,
java.lang.String value)
|
static void |
sendCustomError(java.lang.String message,
int code,
org.mortbay.http.HttpResponse response)
|
static void |
sendCustomError(java.lang.Throwable throwable,
int code,
org.mortbay.http.HttpResponse response)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
HttpUtil
public HttpUtil()
sendCustomError
public static void sendCustomError(java.lang.String message,
int code,
org.mortbay.http.HttpResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
sendCustomError
public static void sendCustomError(java.lang.Throwable throwable,
int code,
org.mortbay.http.HttpResponse response)
throws java.io.IOException
- Throws:
java.io.IOException
buildErrorXml
public static org.outerx.daisy.x10.ErrorDocument buildErrorXml(java.lang.Throwable throwable)
getStringParam
public static java.lang.String getStringParam(org.mortbay.http.HttpRequest request,
java.lang.String name)
throws java.lang.Exception
- Throws:
java.lang.Exception
getStringParam
public static java.lang.String getStringParam(org.mortbay.http.HttpRequest request,
java.lang.String name,
java.lang.String defaultValue)
throws java.lang.Exception
- Throws:
java.lang.Exception
getLongParam
public static long getLongParam(org.mortbay.http.HttpRequest request,
java.lang.String name)
throws java.lang.Exception
- Throws:
java.lang.Exception
getBooleanParam
public static boolean getBooleanParam(org.mortbay.http.HttpRequest request,
java.lang.String name)
throws java.lang.Exception
- Throws:
java.lang.Exception
getBranchId
public static long getBranchId(org.mortbay.http.HttpRequest request,
org.outerj.daisy.repository.Repository repository)
throws BadRequestException,
org.outerj.daisy.repository.RepositoryException
- Throws:
BadRequestException
org.outerj.daisy.repository.RepositoryException
getBranchId
public static long getBranchId(org.mortbay.http.HttpRequest request,
org.outerj.daisy.repository.Repository repository,
java.lang.String paramName)
throws BadRequestException,
org.outerj.daisy.repository.RepositoryException
- Throws:
BadRequestException
org.outerj.daisy.repository.RepositoryException
getLanguageId
public static long getLanguageId(org.mortbay.http.HttpRequest request,
org.outerj.daisy.repository.Repository repository)
throws BadRequestException,
org.outerj.daisy.repository.RepositoryException
- Throws:
BadRequestException
org.outerj.daisy.repository.RepositoryException
getLanguageId
public static long getLanguageId(org.mortbay.http.HttpRequest request,
org.outerj.daisy.repository.Repository repository,
java.lang.String paramName)
throws BadRequestException,
org.outerj.daisy.repository.RepositoryException
- Throws:
BadRequestException
org.outerj.daisy.repository.RepositoryException
parseId
public static long parseId(java.lang.String name,
java.lang.String value)
throws BadRequestException
- Throws:
BadRequestException
Copyright © -2012 . All Rights Reserved.