Package org.zkybase.cmdb.cli.request

Examples of org.zkybase.cmdb.cli.request.DeleteRequest


    setUpTestObjects();
    setUpDependencies();
  }
 
  private void setUpTestObjects() {
    this.request = new DeleteRequest();
    request.id = 57L;
  }
View Full Code Here


  public Request parse(String[] tokens) {
    if (tokens.length != 1) {
      throw new ParseException("delete requires exactly one argument.");
    }
   
    DeleteRequest request = new DeleteRequest();
    try {
      request.id = Long.parseLong(tokens[0]);
    } catch (NumberFormatException e) {
      throw new ParseException("id must be an integer.");
    }
View Full Code Here

  /* (non-Javadoc)
   * @see org.zkybase.cmdb.cli.Command#execute(org.zkybase.cmdb.cli.Request)
   */
  @Override
  public void execute(Request request) {
    DeleteRequest deleteRequest = (DeleteRequest) request;
    zkybase.applications().delete(deleteRequest.id);
  }
View Full Code Here

TOP

Related Classes of org.zkybase.cmdb.cli.request.DeleteRequest

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.