Class Error

  • All Implemented Interfaces:
    Cloneable, Iterable<org.apache.abdera.model.Element>, org.apache.abdera.model.Base, org.apache.abdera.model.Element, org.apache.abdera.model.ExtensibleElement

    @Deprecated
    public class Error
    extends org.apache.abdera.model.ExtensibleElementWrapper
    Deprecated.
    Legacy AEM 6.x API.
    Abdera protocol error element. The Abdera error document provides a simple structure for reporting errors back to Abdera clients.
    • Constructor Summary

      Constructors 
      Constructor Description
      Error​(org.apache.abdera.factory.Factory factory, QName qname)
      Deprecated.
       
      Error​(org.apache.abdera.model.Element internal)
      Deprecated.
       
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      static Error create​(org.apache.abdera.Abdera abdera, int code, String message)
      Deprecated.
      Create a new Error object
      static Error create​(org.apache.abdera.Abdera abdera, int code, String message, Throwable t)
      Deprecated.
       
      static void create​(org.apache.abdera.writer.StreamWriter sw, int code, String message, Throwable t)
      Deprecated.
       
      int getCode()
      Deprecated.
      The code should typically match the HTTP status code; however, certain application scenarios may require the use of a different code
      String getMessage()
      Deprecated.
      Human-readable, language-sensitive description of the error
      Error setCode​(int code)
      Deprecated.
      The code should typically match the HTTP status code; however, certain application scenarios may require the use of a different code
      Error setMessage​(String message)
      Deprecated.
      Human-readable, language-sensitive description of the error
      void throwException()
      Deprecated.
      Will throw a ProtocolException that wraps this element.
      • Methods inherited from class org.apache.abdera.model.ExtensibleElementWrapper

        addExtension, addExtension, addExtension, addExtension, addExtension, addSimpleExtension, addSimpleExtension, getExtension, getExtension, getExtensions, getExtensions, getExtensions, getMustPreserveWhitespace, getSimpleExtension, getSimpleExtension, setMustPreserveWhitespace
      • Methods inherited from class org.apache.abdera.model.ElementWrapper

        addComment, clone, complete, declareNS, discard, equals, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDefaultWriterOptions, getDocument, getElements, getExtensionAttributes, getFactory, getFirstChild, getFirstChild, getInternal, getLanguage, getLanguageTag, getLocale, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, hashCode, iterator, removeAttribute, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setParentElement, setText, setText, toString, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo
      • Methods inherited from interface org.apache.abdera.model.Base

        addComment, clone, complete, getDefaultWriterOptions, getFactory, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo, writeTo
      • Methods inherited from interface org.apache.abdera.model.Element

        declareNS, discard, getAttributes, getAttributeValue, getAttributeValue, getBaseUri, getDocument, getElements, getExtensionAttributes, getFirstChild, getFirstChild, getLanguage, getLanguageTag, getLocale, getNamespaces, getNextSibling, getNextSibling, getParentElement, getPreviousSibling, getPreviousSibling, getQName, getResolvedBaseUri, getText, removeAttribute, removeAttribute, setAttributeValue, setAttributeValue, setBaseUri, setBaseUri, setLanguage, setParentElement, setText, setText
    • Field Detail

      • ERROR

        public static final QName ERROR
        Deprecated.
      • CODE

        public static final QName CODE
        Deprecated.
      • MESSAGE

        public static final QName MESSAGE
        Deprecated.
    • Constructor Detail

      • Error

        public Error​(org.apache.abdera.model.Element internal)
        Deprecated.
      • Error

        public Error​(org.apache.abdera.factory.Factory factory,
                     QName qname)
        Deprecated.
    • Method Detail

      • getCode

        public int getCode()
        Deprecated.
        The code should typically match the HTTP status code; however, certain application scenarios may require the use of a different code
      • setCode

        public Error setCode​(int code)
        Deprecated.
        The code should typically match the HTTP status code; however, certain application scenarios may require the use of a different code
      • getMessage

        public String getMessage()
        Deprecated.
        Human-readable, language-sensitive description of the error
      • setMessage

        public Error setMessage​(String message)
        Deprecated.
        Human-readable, language-sensitive description of the error
      • throwException

        public void throwException()
        Deprecated.
        Will throw a ProtocolException that wraps this element. This is useful on the client side to surface error responses
      • create

        public static Error create​(org.apache.abdera.Abdera abdera,
                                   int code,
                                   String message)
        Deprecated.
        Create a new Error object
      • create

        public static Error create​(org.apache.abdera.Abdera abdera,
                                   int code,
                                   String message,
                                   Throwable t)
        Deprecated.
      • create

        public static void create​(org.apache.abdera.writer.StreamWriter sw,
                                  int code,
                                  String message,
                                  Throwable t)
        Deprecated.