You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by bh...@apache.org on 2013/01/12 03:44:31 UTC
[2/11] git commit: ApiServer: Get rid of IdentityDao,
reuse domain manager to get domain id
ApiServer: Get rid of IdentityDao, reuse domain manager to get domain id
Signed-off-by: Rohit Yadav <bh...@apache.org>
Project: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/commit/24687973
Tree: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/tree/24687973
Diff: http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/diff/24687973
Branch: refs/heads/master
Commit: 24687973a8ea8e2f665945295a6b34a19d93b02b
Parents: 31dd412
Author: Rohit Yadav <bh...@apache.org>
Authored: Fri Jan 11 14:07:27 2013 -0800
Committer: Rohit Yadav <bh...@apache.org>
Committed: Fri Jan 11 18:44:19 2013 -0800
----------------------------------------------------------------------
server/src/com/cloud/api/ApiServer.java | 14 +++-----------
1 files changed, 3 insertions(+), 11 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-cloudstack/blob/24687973/server/src/com/cloud/api/ApiServer.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/api/ApiServer.java b/server/src/com/cloud/api/ApiServer.java
index 7663e8e..d34af67 100755
--- a/server/src/com/cloud/api/ApiServer.java
+++ b/server/src/com/cloud/api/ApiServer.java
@@ -131,7 +131,6 @@ import com.cloud.utils.concurrency.NamedThreadFactory;
import com.cloud.utils.db.SearchCriteria;
import com.cloud.utils.db.Transaction;
import com.cloud.utils.exception.CSExceptionErrorCode;
-import com.cloud.uuididentity.dao.IdentityDao;
public class ApiServer implements HttpRequestHandler {
private static final Logger s_logger = Logger.getLogger(ApiServer.class.getName());
@@ -680,20 +679,13 @@ public class ApiServer implements HttpRequestHandler {
if (ex instanceof ServerApiException && ((ServerApiException) ex).getErrorCode() == BaseCmd.UNSUPPORTED_ACTION_ERROR) {
throw (ServerApiException) ex;
}
- s_logger.error("unable to verifty request signature", ex);
+ s_logger.error("unable to verify request signature", ex);
}
return false;
}
- public Long fetchDomainId(String domainUUID){
- ComponentLocator locator = ComponentLocator.getLocator(ManagementServer.Name);
- IdentityDao identityDao = locator.getDao(IdentityDao.class);
- try{
- Long domainId = identityDao.getIdentityId("domain", domainUUID);
- return domainId;
- }catch(InvalidParameterValueException ex){
- return null;
- }
+ public Long fetchDomainId(String domainUUID) {
+ return _domainMgr.getDomain(domainUUID).getId();
}
public void loginUser(HttpSession session, String username, String password, Long domainId, String domainPath, String loginIpAddress ,Map<String, Object[]> requestParameters) throws CloudAuthenticationException {