return userResponse;
}
@Override
public DomainResponse createDomainResponse(Domain domain) {
DomainResponse domainResponse = new DomainResponse();
domainResponse.setDomainName(domain.getName());
domainResponse.setId(domain.getId());
domainResponse.setLevel(domain.getLevel());
domainResponse.setNetworkDomain(domain.getNetworkDomain());
domainResponse.setParentDomainId(domain.getParent());
StringBuilder domainPath = new StringBuilder("ROOT");
(domainPath.append(domain.getPath())).deleteCharAt(domainPath.length() - 1);
domainResponse.setPath(domainPath.toString());
if (domain.getParent() != null) {
domainResponse.setParentDomainName(ApiDBUtils.findDomainById(domain.getParent()).getName());
}
if (domain.getChildCount() > 0) {
domainResponse.setHasChild(true);
}
domainResponse.setObjectName("domain");
return domainResponse;
}