Package org.eclipse.orion.server.cf.objects

Examples of org.eclipse.orion.server.cf.objects.Space


      ServerStatus status = HttpUtil.executeMethod(getSpaceMethod);
      if (!status.isOK())
        return status;

      space = new Space().setCFJSON(status.getJsonData());
      JSONObject result = space.toJSON();

      return new ServerStatus(Status.OK_STATUS, HttpServletResponse.SC_OK, result);
    } catch (ConnectTimeoutException e) {
      String msg = NLS.bind("An error occurred when performing operation {0}", commandName); //$NON-NLS-1$
View Full Code Here


          ServerStatus status = HttpUtil.executeMethod(getDomainsMethod);
          if (!status.isOK())
            return status;

          Space space = new Space().setCFJSON(status.getJsonData());
          return new ServerStatus(Status.OK_STATUS, HttpServletResponse.SC_OK, space.toJSON());
        } catch (Exception e) {
          String msg = NLS.bind("Failed to handle request for {0}", pathString); //$NON-NLS-1$
          ServerStatus status = new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_INTERNAL_SERVER_ERROR, msg, e);
          logger.error(msg, e);
          return status;
View Full Code Here

        return new ServerStatus(IStatus.ERROR, HttpServletResponse.SC_NOT_FOUND, "Space not found", null);
      }

      if (this.space == null || "".equals(this.space)) {
        JSONObject space = spaces.getJSONObject(0);
        target.setSpace(new Space().setCFJSON(space));
      } else {
        for (int i = 0; i < spaces.length(); i++) {
          JSONObject spaceJSON = spaces.getJSONObject(i);
          if ((!isGuid && space.equals(spaceJSON.getJSONObject("entity").getString("name"))) || (isGuid && space.equals(spaceJSON.getJSONObject("metadata").getString("guid")))) {
            target.setSpace(new Space().setCFJSON(spaceJSON));
            break;
          }
        }
      }
View Full Code Here

TOP

Related Classes of org.eclipse.orion.server.cf.objects.Space

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.