Content Assembler API 2.1.2

com.endeca.content
Class ContentExceptionFactory

java.lang.Object
  extended by com.endeca.content.ContentExceptionFactory

public class ContentExceptionFactory
extends java.lang.Object

Provides convenience methods for constructing ContentException instances.

Since:
2.1.0
Version:
2.1.0

Constructor Summary
ContentExceptionFactory()
           
 
Method Summary
static ContentException forBadContentContext(ContentContext pContentContext)
          Manufactures a ContentException indicating that the evaluation context was not of the expected type.
static ContentException forGeneralError(ContentContext pContentContext, java.lang.Exception pCause)
          Manufactures a ContentException with the given cause.
static ContentException forGeneralError(ContentContext pContentContext, java.lang.String pMessage)
          Manufactures a ContentException with the given error message
static ContentException forGeneralError(ContentResource pContentResource, java.lang.Exception pCause)
          Manufactures a ContentException with the given cause.
static ContentException forUnexpectedNodeType(ContentContext pContentContext, short pNodeType)
          Manufactures a ContentException indicating that an unexpected XML node type was encountered.
static ContentException forUnexpectedTagName(ContentContext pContentContext, java.lang.String pTagName)
          Manufactures a ContentException indicating that an unexpected tag name was encountered.
static ContentException forUnexpectedTagName(ContentContext pContentContext, java.lang.String pTagName, java.lang.String pExpectedTagName)
          Manufactures a ContentException indicating that an unexpected tag name was encountered.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContentExceptionFactory

public ContentExceptionFactory()
Method Detail

forUnexpectedTagName

public static ContentException forUnexpectedTagName(ContentContext pContentContext,
                                                    java.lang.String pTagName,
                                                    java.lang.String pExpectedTagName)
Manufactures a ContentException indicating that an unexpected tag name was encountered.

Parameters:
pContentContext - The current evaluation context
pTagName - The actual tag name
pExpectedTagName - The expected tag name
Returns:
An instance of ContentException

forUnexpectedTagName

public static ContentException forUnexpectedTagName(ContentContext pContentContext,
                                                    java.lang.String pTagName)
Manufactures a ContentException indicating that an unexpected tag name was encountered.

Parameters:
pContentContext - The current evaluation context
pTagName - The actual tag name
Returns:
An instance of ContentException

forUnexpectedNodeType

public static ContentException forUnexpectedNodeType(ContentContext pContentContext,
                                                     short pNodeType)
Manufactures a ContentException indicating that an unexpected XML node type was encountered.

Parameters:
pContentContext - The current evaluation context
pNodeType - The actual node type
Returns:
An instance of ContentException

forBadContentContext

public static ContentException forBadContentContext(ContentContext pContentContext)
Manufactures a ContentException indicating that the evaluation context was not of the expected type.

Parameters:
pContentContext - The offending context
Returns:
An instance of ContentException

forGeneralError

public static ContentException forGeneralError(ContentContext pContentContext,
                                               java.lang.Exception pCause)
Manufactures a ContentException with the given cause.

Parameters:
pContentContext - The current evaluation context
pCause - The cause of our problems
Returns:
An instance of ContentException

forGeneralError

public static ContentException forGeneralError(ContentResource pContentResource,
                                               java.lang.Exception pCause)
Manufactures a ContentException with the given cause.

Parameters:
pContentResource - The content resource for which the exception was thrown
pCause - The cause of our problems
Returns:
An instance of ContentException

forGeneralError

public static ContentException forGeneralError(ContentContext pContentContext,
                                               java.lang.String pMessage)
Manufactures a ContentException with the given error message

Parameters:
pContentContext - The current evaluation context
pMessage - The message to include
Returns:
An instance of ContentException

Content Assembler API 2.1.2

Copyright © 2012 Endeca Technologies, Inc. All Rights Reserved.
@VERSION
PRODUCT: Content Assembler API (ContentAssemblerAPIJava)
VERSION: 2.1.2
BUILD:   54DEV
ARCH_OS: n/a
DATE:    2012-02-16T20:28:44-0500