Package org.structr.rest

Examples of org.structr.rest.RestMethodResult.addContent()


              for (final RestMethodResult r : results) {

                final GraphObject objectCreated = r.getContent().get(0);
                if (!result.getContent().contains(objectCreated)) {

                  result.addContent(objectCreated);
                }

              }

              // remove Location header if more than one object was
View Full Code Here


      final RestMethodResult result = new RestMethodResult(HttpServletResponse.SC_CREATED);
      if (newNode != null) {

        result.addHeader("Location", buildLocationHeader(newNode));
        result.addContent(newNode);
      }

      result.serializeAsPrimitiveArray(true);
     
      // finally: return 201 Created
View Full Code Here

        String id = (String)o;

        AbstractNode node = (AbstractNode) StructrApp.getInstance().get(id);
        if (node != null) {
          result.addContent(node);
        }
      }
    }

    return result;
View Full Code Here

        String query                 = queryObject.toString();
        List<GraphObject> resultList = StructrApp.getInstance(securityContext).command(CypherQueryCommand.class).execute(query, propertySet);

        for (GraphObject obj : resultList) {

          result.addContent(obj);
        }

      }

      return result;
View Full Code Here

      if (user != null) {

        logger.log(Level.INFO, "Login successfull: {0}", new Object[]{ user });

        RestMethodResult methodResult = new RestMethodResult(200);
        methodResult.addContent(user);

        return methodResult;
      }

    }
View Full Code Here

    for (final Entry<String, String> entry : metadata.entrySet()) {
      map.setProperty(new StringProperty(entry.getKey()), entry.getValue());
    }

    result.addContent(map);

    return result;
  }

  @Export
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.