Examples of readEntity()


Examples of javax.ws.rs.core.Response.readEntity()

      response = databaseClient.getAssociationById( id );
      if ( response.getStatus() == Response.Status.NOT_FOUND.getStatusCode() ) {
        return null;
      }
      else if ( response.getStatus() == Response.Status.OK.getStatusCode() ) {
        return response.readEntity( AssociationDocument.class );
      }
      else {
        GenericResponse responseEntity = response.readEntity( GenericResponse.class );
        throw logger.errorRetrievingAssociation( id, response.getStatus(), responseEntity.getError(), responseEntity.getReason() );
      }
View Full Code Here

Examples of org.apache.olingo.odata2.api.processor.part.EntityProcessor.readEntity()

    when(entitySet.countEntitySet(any(UriInfoImpl.class), anyString())).thenAnswer(getAnswer());
    when(entitySet.createEntity(any(UriInfoImpl.class), any(InputStream.class), anyString(), anyString())).thenAnswer(
        getAnswer());

    EntityProcessor entity = mock(EntityProcessor.class);
    when(entity.readEntity(any(UriInfoImpl.class), anyString())).thenAnswer(getAnswer());
    when(entity.existsEntity(any(UriInfoImpl.class), anyString())).thenAnswer(getAnswer());
    when(entity.deleteEntity(any(UriInfoImpl.class), anyString())).thenAnswer(getAnswer());
    when(entity.updateEntity(any(UriInfoImpl.class), any(InputStream.class), anyString(), anyBoolean(), anyString()))
        .thenAnswer(getAnswer());
View Full Code Here

Examples of org.glassfish.jersey.server.ContainerRequest.readEntity()

            Object value;
            if ((Request.class.isAssignableFrom(rawType) || ContainerRequestContext.class.isAssignableFrom(rawType))
                    && rawType.isInstance(requestContext)) {
                value = requestContext;
            } else {
                value = requestContext.readEntity(rawType, parameter.getType(), parameter.getAnnotations());
                if (rawType.isPrimitive() && value == null) {
                    throw new BadRequestException(Response.status(Response.Status.BAD_REQUEST)
                            .entity(LocalizationMessages.ERROR_PRIMITIVE_TYPE_NULL()).build());
                }
            }
View Full Code Here

Examples of smilehouse.util.SimpleParser.readEntity()

            // ----------------------------------------------------------
            // Go recursively through the menus searching the desired one
            // ----------------------------------------------------------
            SimpleParser.Entity entity;
            while((entity = parser.readEntity()) != null) {
                if(entity.getKeyword() == MENU) {
                    // Get the next main menu and push it to the stack
                    SimpleParser.Record mainMenu = entity.getRecord();
                    menus.push(mainMenu);
                    if(searchMenuPath(menus, upItems, tabSetId)) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.