本文整理了Java中org.eclipse.kapua.service.account.Account.getParentAccountPath()
方法的一些代码示例,展示了Account.getParentAccountPath()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Account.getParentAccountPath()
方法的具体详情如下:
包路径:org.eclipse.kapua.service.account.Account
类名称:Account
方法名:getParentAccountPath
[英]Return the parent account path.
The account path is a '/' separated list of the parents account identifiers in reverse order (so it should be read from right to left).
e.g. The parent account path 7/14/15 mens that the current account has 15 as parent, then 15 has 14 as parent and 14 has 7 as parent.
[中]返回父帐户路径。
帐户路径是以“/”分隔的父帐户标识符列表,顺序相反(因此应该从右向左读取)。
e、 g.父帐户路径7/14/15表示当前帐户有15个作为父帐户,然后15个帐户有14个作为父帐户,14个帐户有7个作为父帐户。
代码示例来源:origin: org.eclipse.kapua/kapua-account-internal
@Override
public AccountListResult findChildsRecursively(KapuaId scopeId) throws KapuaException {
//
// Argument validation
ArgumentValidator.notNull(scopeId, "scopeId");
//
// Make sure account exists
Account account = findById(scopeId);
if (account == null) {
throw new KapuaEntityNotFoundException(Account.TYPE, scopeId);
}
//
// Check Access
authorizationService.checkPermission(permissionFactory.newPermission(AccountDomains.ACCOUNT_DOMAIN, Actions.read, account.getId()));
return entityManagerSession.onResult(em -> {
AccountListResult result = null;
TypedQuery<Account> q;
q = em.createNamedQuery("Account.findChildAccountsRecursive", Account.class);
q.setParameter("parentAccountPath", "\\" + account.getParentAccountPath() + "/%");
result = new AccountListResultImpl();
result.addItems(q.getResultList());
return result;
});
}
代码示例来源:origin: eclipse/kapua
@Override
public AccountListResult findChildsRecursively(KapuaId scopeId) throws KapuaException {
//
// Argument validation
ArgumentValidator.notNull(scopeId, "scopeId");
//
// Make sure account exists
Account account = findById(scopeId);
if (account == null) {
throw new KapuaEntityNotFoundException(Account.TYPE, scopeId);
}
//
// Check Access
authorizationService.checkPermission(permissionFactory.newPermission(AccountDomains.ACCOUNT_DOMAIN, Actions.read, account.getId()));
return entityManagerSession.onResult(em -> {
AccountListResult result = null;
TypedQuery<Account> q;
q = em.createNamedQuery("Account.findChildAccountsRecursive", Account.class);
q.setParameter("parentAccountPath", "\\" + account.getParentAccountPath() + "/%");
result = new AccountListResultImpl();
result.addItems(q.getResultList());
return result;
});
}
代码示例来源:origin: org.eclipse.kapua/kapua-security-shiro
String parentAccountPath = account.getParentAccountPath();
代码示例来源:origin: eclipse/kapua
String parentAccountPath = account.getParentAccountPath();
代码示例来源:origin: org.eclipse.kapua/kapua-account-internal
throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.scopeId");
if (!oldAccount.getParentAccountPath().equals(account.getParentAccountPath())) {
throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.parentAccountPath");
代码示例来源:origin: eclipse/kapua
throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.scopeId");
if (!oldAccount.getParentAccountPath().equals(account.getParentAccountPath())) {
throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.parentAccountPath");
代码示例来源:origin: eclipse/kapua
String parentAccountPath = AccountDAO.find(em, null, accountCreator.getScopeId()).getParentAccountPath() + "/" + account.getId();
account.setParentAccountPath(parentAccountPath);
return AccountDAO.update(em, account);
代码示例来源:origin: org.eclipse.kapua/kapua-account-internal
String parentAccountPath = AccountDAO.find(em, null, accountCreator.getScopeId()).getParentAccountPath() + "/" + account.getId();
account.setParentAccountPath(parentAccountPath);
return AccountDAO.update(em, account);
内容来源于网络,如有侵权,请联系作者删除!