Class ErrorWebService


  • @Service("errorWebService")
    @Produces("application/json")
    @Path("/error")
    public class ErrorWebService
    extends BaseWebService
    The Service contains methods to get localized errors
    Author:
    solomax
    • Constructor Summary

      Constructors 
      Constructor Description
      ErrorWebService()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.apache.openmeetings.db.dto.basic.ServiceResult get​(java.lang.String key, long lang)
      loads an Error-Object.
      void report​(java.lang.String sid, java.lang.String message)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ErrorWebService

        public ErrorWebService()
    • Method Detail

      • get

        @GET
        @Path("/{key}/{lang}")
        public org.apache.openmeetings.db.dto.basic.ServiceResult get​(@PathParam("key")
                                                                      java.lang.String key,
                                                                      @PathParam("lang")
                                                                      long lang)
        loads an Error-Object. If a Method returns a negative Result, its an Error-id, it needs a languageId to specify in which language you want to display/read the error-message. English has the Language-ID one, for different one see the list of languages
        Parameters:
        key - the error key for ex. `error.unknown`
        lang - The id of the language
        Returns:
        - error with the code given
      • report

        @POST
        @Path("/report/")
        public void report​(@QueryParam("sid")
                           java.lang.String sid,
                           @QueryParam("message")
                           java.lang.String message)