org.objectweb.dsrg.sofa.repository.core
Class SofaHttpConstantsClient

java.lang.Object
  extended by org.objectweb.dsrg.sofa.repository.core.SofaHttpConstantsClient

public class SofaHttpConstantsClient
extends java.lang.Object

This class is used for holding HTTP error constants for HTTP status 404 to signalize specific errors. This class must be compatible with SofaHttpConstants class in RepositoryWebApp.


Field Summary
static java.lang.String ERROR_INVALID_QUERY
          Error constant for message when query in request is invalid.
static java.lang.String ERROR_JAR_ENTRY_NOT_FOUND
          Error constant for message when requested jar entry not found.
static java.lang.String ERROR_MESSAGE_PREFIX
          String prefix of returning error message
static java.lang.String ERROR_MESSAGE_SEPARATOR
          This string separates error code and error text in message.
static java.lang.String ERROR_REPOSITORY_FILE_NOT_FOUND
          Error constant for message when repository file not found.
static java.lang.String QUERY_PARAM_JAR_PART
          Parameter name in query part of request URL for specifying JAR EntryName to look for on the server.
static java.lang.String QUERY_PARAM_RECURSIVE
          Parameter name in query part of reuqest URL for specifying, if RepositoryServer should look for class in CodeBundles recursively.
 
Method Summary
static java.io.IOException getExceptionForMessage(java.lang.String requestURI, java.lang.String errorText)
          Parses error text from Sofa servlet and returns specific IOException which should be thrown.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERROR_MESSAGE_SEPARATOR

public static final java.lang.String ERROR_MESSAGE_SEPARATOR
This string separates error code and error text in message.

See Also:
Constant Field Values

ERROR_MESSAGE_PREFIX

public static final java.lang.String ERROR_MESSAGE_PREFIX
String prefix of returning error message

See Also:
Constant Field Values

ERROR_REPOSITORY_FILE_NOT_FOUND

public static final java.lang.String ERROR_REPOSITORY_FILE_NOT_FOUND
Error constant for message when repository file not found.

See Also:
Constant Field Values

ERROR_JAR_ENTRY_NOT_FOUND

public static final java.lang.String ERROR_JAR_ENTRY_NOT_FOUND
Error constant for message when requested jar entry not found.

See Also:
Constant Field Values

ERROR_INVALID_QUERY

public static final java.lang.String ERROR_INVALID_QUERY
Error constant for message when query in request is invalid.

See Also:
Constant Field Values

QUERY_PARAM_JAR_PART

public static final java.lang.String QUERY_PARAM_JAR_PART
Parameter name in query part of request URL for specifying JAR EntryName to look for on the server. Content is String.

See Also:
Constant Field Values

QUERY_PARAM_RECURSIVE

public static final java.lang.String QUERY_PARAM_RECURSIVE
Parameter name in query part of reuqest URL for specifying, if RepositoryServer should look for class in CodeBundles recursively. Content is Boolean.

See Also:
Constant Field Values
Method Detail

getExceptionForMessage

public static java.io.IOException getExceptionForMessage(java.lang.String requestURI,
                                                         java.lang.String errorText)
Parses error text from Sofa servlet and returns specific IOException which should be thrown.

Parameters:
requestURI - URI of request which ended by error
errorText - Returned error text from Sofa servlet
Returns:
Specific IOException for specific error codes, in current implementation it can be FileNotFoundException, JarException, MalformedURLException