Examples of SuccessResponse


Examples of com.cloud.api.response.SuccessResponse

    @Override
    public void execute(){
        UserContext.current().setEventDetails("UserId: "+getId());
        boolean result = _accountService.deleteUser(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(BaseCmd.INTERNAL_ERROR, "Failed to delete user");
        }
    }
View Full Code Here

Examples of eu.mosaic_cloud.platform.interop.idl.dfs.DFSPayloads.SuccessResponse

   
    final DFSHandlerMessage dfsMsg = (DFSHandlerMessage)message.specification;
   
    switch(dfsMsg) {
      case SUCCESS: {
        final SuccessResponse successPayload = (SuccessResponse)message.payload;
        final CompletionToken token = successPayload.getToken();
        this.transcript.traceDebugging ("processing the success response for pending request with token `%s`...", token.getMessageId ());
        if(successPayload.getSuccessful()){
          this.pendingRequests.succeed(token.getMessageId(), null);
        }else {
          this.pendingRequests.fail(token.getMessageId()new Exception ("I/O exception")); //TODO err message?
        }
      }
View Full Code Here

Examples of org.apache.cloudstack.api.response.SuccessResponse

    @Override
    public void execute(){
        boolean result = false;
        result = _s2sVpnService.deleteVpnGateway(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete customer VPN gateway");
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.api.response.SuccessResponse

    @Override
    public void execute() {
        boolean result = _storageService.deleteSecondaryStagingStore(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete secondary staging store");
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.api.response.SuccessResponse

    @Override
    public void execute(){
        UserContext.current().setEventDetails("Dedicated guest vlan range Id: " + id);
        boolean result = _networkService.releaseDedicatedGuestVlanRange(getId());
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to release dedicated guest vlan range");
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.api.response.SuccessResponse

            s_logger.warn("Exception: ", ex);
            throw new ServerApiException(ApiErrorCode.RESOURCE_IN_USE_ERROR, ex.getMessage());
        }

        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            s_logger.warn("Failed to delete counter with Id: " + getId());
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete counter.");
        }
View Full Code Here

Examples of org.apache.cloudstack.api.response.SuccessResponse

    @Override
    public void execute(){
        UserContext.current().setEventDetails("UserId: "+getId());
        boolean result = _regionService.deleteUser(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete user");
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.api.response.SuccessResponse

    @Override
    public void execute() {
        boolean result = _storageService.deleteImageStore(this);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete image store");
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.api.response.SuccessResponse

    @Override
    public void execute(){
        boolean result = _affinityGroupService.deleteAffinityGroup(id, accountName, domainId, name);
        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete affinity group");
        }
    }
View Full Code Here

Examples of org.apache.cloudstack.api.response.SuccessResponse

        //revoke corresponding firewall rule first
        boolean result  = _firewallService.revokeRelatedFirewallRule(id, true);
        result = result &&  _rulesService.revokePortForwardingRule(id, true);

        if (result) {
            SuccessResponse response = new SuccessResponse(getCommandName());
            this.setResponseObject(response);
        } else {
            throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to delete port forwarding rule");
        }
    }
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.