api: Annotate domain apis

Signed-off-by: Rohit Yadav <bhaisaab@apache.org>
This commit is contained in:
Rohit Yadav 2012-12-18 13:38:27 -08:00
parent 16be94e9d7
commit e940562dca
5 changed files with 11 additions and 8 deletions

View File

@ -43,7 +43,8 @@ public class CreateDomainCmd extends BaseCmd {
private String domainName;
@IdentityMapper(entityTableName="domain")
@Parameter(name=ApiConstants.PARENT_DOMAIN_ID, type=CommandType.LONG, description="assigns new domain a parent domain by domain ID of the parent. If no parent domain is specied, the ROOT domain is assumed.")
@Parameter(name=ApiConstants.PARENT_DOMAIN_ID, type=CommandType.UUID, entityType=DomainResponse.class,
description="assigns new domain a parent domain by domain ID of the parent. If no parent domain is specied, the ROOT domain is assumed.")
private Long parentDomainId;
@Parameter(name=ApiConstants.NETWORK_DOMAIN, type=CommandType.STRING, description="Network domain for networks in the domain")

View File

@ -16,6 +16,7 @@
// under the License.
package org.apache.cloudstack.api.command.admin.domain;
import org.apache.cloudstack.api.response.DomainResponse;
import org.apache.log4j.Logger;
import org.apache.cloudstack.api.ApiConstants;
@ -40,8 +41,8 @@ public class DeleteDomainCmd extends BaseAsyncCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
@IdentityMapper(entityTableName="domain")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="ID of domain to delete")
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DomainResponse.class,
required=true, description="ID of domain to delete")
private Long id;
@Parameter(name=ApiConstants.CLEANUP, type=CommandType.BOOLEAN, description="true if all domain resources (child domains, accounts) have to be cleaned up, false otherwise")

View File

@ -41,8 +41,8 @@ public class ListDomainChildrenCmd extends BaseListCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
@IdentityMapper(entityTableName="domain")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="list children domain by parent domain ID.")
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DomainResponse.class,
description="list children domain by parent domain ID.")
private Long id;
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="list children domains by name")

View File

@ -42,7 +42,8 @@ public class ListDomainsCmd extends BaseListCmd {
/////////////////////////////////////////////////////
@IdentityMapper(entityTableName="domain")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, description="List domain by domain ID.")
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DomainResponse.class,
description="List domain by domain ID.")
private Long id;
@Parameter(name=ApiConstants.LEVEL, type=CommandType.INTEGER, description="List domains by domain level.")

View File

@ -38,8 +38,8 @@ public class UpdateDomainCmd extends BaseCmd {
//////////////// API parameters /////////////////////
/////////////////////////////////////////////////////
@IdentityMapper(entityTableName="domain")
@Parameter(name=ApiConstants.ID, type=CommandType.LONG, required=true, description="ID of domain to update")
@Parameter(name=ApiConstants.ID, type=CommandType.UUID, entityType=DomainResponse.class,
required=true, description="ID of domain to update")
private Long id;
@Parameter(name=ApiConstants.NAME, type=CommandType.STRING, description="updates domain with this name")