Class VitamError

    • Constructor Detail

      • VitamError

        protected VitamError()
      • VitamError

        public VitamError​(java.lang.String code)
        VitamError constructor
        Parameters:
        code - the code used to identify this error object
    • Method Detail

      • setCode

        public VitamError setCode​(java.lang.String code)
        Parameters:
        code - of error as integer
        Returns:
        the VitamError object with the code is setted
      • setContext

        public VitamError setContext​(java.lang.String context)
        Parameters:
        context - of error as String
        Returns:
        the VitamError object with the context is setted
      • setState

        public VitamError setState​(java.lang.String state)
        Parameters:
        state - of error as String
        Returns:
        the VitamError object with the error state is setted
      • setMessage

        public VitamError setMessage​(java.lang.String message)
        Parameters:
        message - of error as String
        Returns:
        the VitamError object with the error message is setted
      • setDescription

        public VitamError setDescription​(java.lang.String description)
        Parameters:
        description - of error as String
        Returns:
        the VitamError object with the description error is setted
      • addAllErrors

        public VitamError addAllErrors​(java.util.List<VitamError> errors)
        Parameters:
        errors - errors as List
        Returns:
        the VitamError object with the list of errors is setted
      • addToErrors

        public VitamError addToErrors​(VitamError error)
        Parameters:
        error - one error
        Returns:
        the VitamError object with the list of errors is setted
      • getCode

        public java.lang.String getCode()
        Returns:
        the code of the VitamError object
      • getContext

        public java.lang.String getContext()
        Returns:
        the context of the VitamError object
      • getState

        public java.lang.String getState()
        Returns:
        the state of the VitamError object
      • getMessage

        public java.lang.String getMessage()
        Returns:
        the message of the VitamError object
      • getDescription

        public java.lang.String getDescription()
        Returns:
        the description of the VitamError object
      • getErrors

        public java.util.List<VitamError> getErrors()
        Returns:
        the errors list of the VitamError object
      • toResponse

        public javax.ws.rs.core.Response toResponse()
        transform a RequestResponse to a standard response
        Specified by:
        toResponse in class RequestResponse
        Returns:
        Response
      • toStreamResponse

        public javax.ws.rs.core.Response toStreamResponse()
        transform a RequestResponse to a stream response
        Returns:
        Response