Search in sources :

Example 6 with DomainResponse

use of org.apache.cloudstack.api.response.DomainResponse in project cloudstack by apache.

the class UpdateDomainCmd method execute.

@Override
public void execute() {
    CallContext.current().setEventDetails("Domain Id: " + getId());
    Domain domain = _regionService.updateDomain(this);
    if (domain != null) {
        DomainResponse response = _responseGenerator.createDomainResponse(domain);
        response.setResponseName(getCommandName());
        this.setResponseObject(response);
    } else {
        throw new ServerApiException(ApiErrorCode.INTERNAL_ERROR, "Failed to update domain");
    }
}
Also used : ServerApiException(org.apache.cloudstack.api.ServerApiException) DomainResponse(org.apache.cloudstack.api.response.DomainResponse) Domain(com.cloud.domain.Domain)

Aggregations

DomainResponse (org.apache.cloudstack.api.response.DomainResponse)6 Domain (com.cloud.domain.Domain)5 ArrayList (java.util.ArrayList)2 List (java.util.List)2 ServerApiException (org.apache.cloudstack.api.ServerApiException)2 ListResponse (org.apache.cloudstack.api.response.ListResponse)2 DomainJoinVO (com.cloud.api.query.vo.DomainJoinVO)1 ResponseView (org.apache.cloudstack.api.ResponseObject.ResponseView)1 ListDomainsCmdByAdmin (org.apache.cloudstack.api.command.admin.domain.ListDomainsCmdByAdmin)1