Package se.sperber.cryson.listener

Examples of se.sperber.cryson.listener.ListenerNotificationBatch


  @PUT
  @Path("{entity_name}")
  public Response createEntity(@Context UriInfo uriInfo, @Context HttpHeaders httpHeaders, @PathParam("entity_name") String entityName, String json) {
    try {
      ListenerNotificationBatch listenerNotificationBatch = new ListenerNotificationBatch(uriInfo, httpHeaders);
      Response response = crysonService.createEntity(entityName, json, listenerNotificationBatch);
      notifyCommit(listenerNotificationBatch);
      return response;
    } catch(Throwable t) {
      return translateThrowable(t);
View Full Code Here


  @POST
  @Path("commit")
  public Response commit(@Context UriInfo uriInfo, @Context HttpHeaders httpHeaders, String json) {
    try {
      ListenerNotificationBatch listenerNotificationBatch = new ListenerNotificationBatch(uriInfo, httpHeaders);
      JsonElement committedEntities = crysonSerializer.parse(json);
      crysonService.validatePermissions(committedEntities);
      List<Object> persistedEntites = new ArrayList<Object>();
      List<Object> updatedEntities = new ArrayList<Object>();
      JsonObject responseJsonObject = crysonService.commit(committedEntities, listenerNotificationBatch, persistedEntites, updatedEntities);
View Full Code Here

    }
  }
 
  public Response commitEntity(Object entity, UriInfo uriInfo, HttpHeaders httpHeaders) {
    try {
      ListenerNotificationBatch listenerNotificationBatch = new ListenerNotificationBatch(uriInfo, httpHeaders);
      Response response = crysonService.commitEntity(entity, listenerNotificationBatch);
      notifyCommit(listenerNotificationBatch);
      return response;
    } catch(Throwable t) {
      return translateThrowable(t);
View Full Code Here

TOP

Related Classes of se.sperber.cryson.listener.ListenerNotificationBatch

Copyright © 2018 www.massapicom. 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.