@Override public long getEntityOwnerId() { Account caller = CallContext.current().getCallingAccount(); if ((accountName != null && domainId == null) || (domainId != null && accountName == null)) { throw new InvalidParameterValueException("Account name and domain id must be specified together"); } if (accountName != null) { return _accountService.finalizeOwner(caller, accountName, domainId, null).getId(); } return caller.getId(); }
@Override public long getEntityOwnerId() { Account caller = CallContext.current().getCallingAccount(); //For domain wide affinity groups (if the affinity group processor type allows it) if(projectId == null && domainId != null && accountName == null && _accountService.isRootAdmin(caller.getId())){ return Account.ACCOUNT_ID_SYSTEM; } Account owner = _accountService.finalizeOwner(caller, accountName, domainId, projectId); if(owner == null){ return caller.getAccountId(); } return owner.getAccountId(); }
@Override public long getEntityOwnerId() { Account caller = CallContext.current().getCallingAccount(); //For domain wide affinity groups (if the affinity group processor type allows it) if(projectId == null && domainId != null && accountName == null && _accountService.isRootAdmin(caller.getId())){ return Account.ACCOUNT_ID_SYSTEM; } Account owner = _accountService.finalizeOwner(caller, accountName, domainId, projectId); if(owner == null){ return caller.getAccountId(); } return owner.getAccountId(); }
Account caller = CallContext.current().getCallingAccount(); if (accountName != null && domainId != null) { Account account = _accountService.finalizeOwner(caller, accountName, domainId, projectId); return account.getId(); } else if (projectId != null) {
@Override public long getEntityOwnerId() { final Account caller = CallContext.current().getCallingAccount(); if ((accountName != null && domainId == null) || (domainId != null && accountName == null)) { throw new InvalidParameterValueException("Account name and domain id must be specified together"); } if (accountName != null) { return _accountService.finalizeOwner(caller, accountName, domainId, null).getId(); } return caller.getId(); }
@Override public long getEntityOwnerId() { final Account caller = CallContext.current().getCallingAccount(); //For domain wide affinity groups (if the affinity group processor type allows it) if (projectId == null && domainId != null && accountName == null && _accountService.isRootAdmin(caller.getId())) { return Account.ACCOUNT_ID_SYSTEM; } final Account owner = _accountService.finalizeOwner(caller, accountName, domainId, projectId); if (owner == null) { return caller.getAccountId(); } return owner.getAccountId(); }
@Override public long getEntityOwnerId() { final Account caller = CallContext.current().getCallingAccount(); //For domain wide affinity groups (if the affinity group processor type allows it) if (projectId == null && domainId != null && accountName == null && _accountService.isRootAdmin(caller.getId())) { return Account.ACCOUNT_ID_SYSTEM; } final Account owner = _accountService.finalizeOwner(caller, accountName, domainId, projectId); if (owner == null) { return caller.getAccountId(); } return owner.getAccountId(); }
final Account caller = CallContext.current().getCallingAccount(); if (accountName != null && domainId != null) { final Account account = _accountService.finalizeOwner(caller, accountName, domainId, projectId); return account.getId(); } else if (projectId != null) {