com.plumtree.portalpages.rest
Class RESTErrors

java.lang.Object
  extended by com.plumtree.portalpages.rest.RESTErrors

public class RESTErrors
extends java.lang.Object

This class manages all the REST errors to provide easy lookup and make sure that there aren't any conflicts.


Field Summary
protected static XPHashtable ERRORS
          This needs to be initialized before any of the specific errors are created.
 
Constructor Summary
RESTErrors()
           
 
Method Summary
static void AddRestError(IRESTError _error)
          Add a REST error to the global map for easy lookup and conflict checking.
static IRESTError GetError(int _nCode)
          Lookup a IRestError object from the error code.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ERRORS

protected static final XPHashtable ERRORS
This needs to be initialized before any of the specific errors are created.

Constructor Detail

RESTErrors

public RESTErrors()
Method Detail

AddRestError

public static void AddRestError(IRESTError _error)
                         throws XPIllegalStateException
Add a REST error to the global map for easy lookup and conflict checking.

Parameters:
_error - the error to add.
Throws:
XPIllegalStateException - if the code is already in use.

GetError

public static IRESTError GetError(int _nCode)
Lookup a IRestError object from the error code.

Parameters:
_nCode - the error code to lookup
Returns:
the matching error object.
Throws:
XPIllegalArgumentException - if the error can not be found.



Copyright © 2002,2003,2004,2005 Plumtree Software, Inc., All Rights Reserved.