本文整理了Java中org.eclipse.kapua.service.account.Account.getScopeId()
方法的一些代码示例,展示了Account.getScopeId()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Account.getScopeId()
方法的具体详情如下:
包路径:org.eclipse.kapua.service.account.Account
类名称:Account
方法名:getScopeId
暂无
代码示例来源:origin: eclipse/kapua
@Given("^A full set of device privileges for account \"(.+)\"$")
public void setAccountDevicePrivileges(String name) throws KapuaException {
KapuaSecurityUtils.doPrivileged(() -> {
Account account = accountService.findByName(name);
Map<String, Object> valueMap = new HashMap<>();
valueMap.put("infiniteChildEntities", true);
valueMap.put("maxNumberChildEntities", 1000);
deviceRegistryService.setConfigValues(account.getId(), account.getScopeId(), valueMap);
});
}
代码示例来源:origin: eclipse/kapua
@Given("^The default connection coupling mode for account \"(.+)\" is set to \"(.+)\"$")
public void setDeviceConnectionCouplingMode(String name, String mode) throws KapuaException {
KapuaSecurityUtils.doPrivileged(() -> {
Account account = accountService.findByName(name);
Map<String, Object> valueMap = new HashMap<>();
// valueMap.put("infiniteChildEntities", true);
// valueMap.put("maxNumberChildEntities", 1000);
valueMap.put("deviceConnectionUserCouplingDefaultMode", mode);
deviceConnectionService.setConfigValues(account.getId(), account.getScopeId(), valueMap);
});
}
代码示例来源:origin: eclipse/kapua
@When("^I try to delete account \"(.*)\"$")
public void deleteAccount(String accountName) throws KapuaException {
Account accountToDelete;
accountToDelete = accountService.findByName(accountName);
if (accountToDelete != null) {
accountService.delete(accountToDelete.getScopeId(), accountToDelete.getId());
}
}
代码示例来源:origin: eclipse/kapua
@Given("^I set the database to device timestamp indexing$")
public void setDatabaseToDeviceTimestampIndexing() throws KapuaException {
Account account = (Account) stepData.get("LastAccount");
updateConfiguration(messageStoreService, account.getId(), account.getScopeId(),
DataIndexBy.DEVICE_TIMESTAMP, MetricsIndexBy.TIMESTAMP, 30, true);
}
代码示例来源:origin: eclipse/kapua
@Given("^I set the database to server timestamp indexing$")
public void setDatabaseToServerTimestampIndexing() throws KapuaException {
Account account = (Account) stepData.get("LastAccount");
updateConfiguration(messageStoreService, account.getId(), account.getScopeId(),
DataIndexBy.SERVER_TIMESTAMP, MetricsIndexBy.TIMESTAMP, 30, true);
}
代码示例来源:origin: eclipse/kapua
@When("^I configure the device service$")
public void setDeviceServiceConfig(List<TestConfig> testConfigs)
throws Exception {
Account tmpAccount = (Account) stepData.get("LastAccount");
Map<String, Object> valueMap = new HashMap<>();
for (TestConfig config : testConfigs) {
config.addConfigToMap(valueMap);
}
try {
primeException();
deviceRegistryService.setConfigValues(tmpAccount.getId(), tmpAccount.getScopeId(), valueMap);
} catch (KapuaException ex) {
verifyException(ex);
}
}
代码示例来源:origin: eclipse/kapua
@When("^I configure the tag service$")
public void setTagServiceConfig(List<TestConfig> testConfigs)
throws Exception {
Account tmpAccount = (Account) stepData.get("LastAccount");
Map<String, Object> valueMap = new HashMap<>();
for (TestConfig config : testConfigs) {
config.addConfigToMap(valueMap);
}
try {
primeException();
tagService.setConfigValues(tmpAccount.getId(), tmpAccount.getScopeId(), valueMap);
} catch (KapuaException ex) {
verifyException(ex);
}
}
代码示例来源:origin: eclipse/kapua
userService.setConfigValues(account.getId(), account.getScopeId(), userValues);
deviceRegistryService.setConfigValues(account.getId(), account.getScopeId(), deviceRegistryValues);
代码示例来源:origin: eclipse/kapua
@Given("^Tag Service configuration$")
public void setConfigurationValue(List<TestConfig> testConfigs)
throws Exception {
Account lastAcc = (Account) stepData.get("LastAccount");
KapuaId scopeId = DEFAULT_SCOPE_ID;
KapuaId parentId = DEFAULT_SCOPE_ID;
if (lastAcc != null) {
scopeId = lastAcc.getId();
parentId = lastAcc.getScopeId();
}
Map<String, Object> valueMap = new HashMap<>();
for (TestConfig config : testConfigs) {
config.addConfigToMap(valueMap);
}
try {
// stepData.put("isException", false);
primeException();
tagService.setConfigValues(scopeId, parentId, valueMap);
} catch (KapuaException ke) {
// stepData.put("isException", true);
// stepData.put("exception", ke);
verifyException(ke);
}
}
代码示例来源:origin: eclipse/kapua
@When("^I configure user service$")
public void setUserServiceConfig(List<TestConfig> testConfigs)
throws Exception {
Map<String, Object> valueMap = new HashMap<>();
KapuaId accId;
KapuaId scopeId;
Account tmpAccount = (Account) stepData.get("LastAccount");
if (tmpAccount != null) {
accId = tmpAccount.getId();
scopeId = tmpAccount.getScopeId();
} else {
accId = new KapuaEid(BigInteger.ONE);
scopeId = new KapuaEid(BigInteger.ONE);
}
for (TestConfig config : testConfigs) {
config.addConfigToMap(valueMap);
}
primeException();
try {
userService.setConfigValues(accId, scopeId, valueMap);
} catch (KapuaException ex) {
verifyException(ex);
}
}
代码示例来源:origin: eclipse/kapua
@When("^I configure credential service$")
public void setCredentialServiceConfig(List<TestConfig> testConfigs)
throws Exception {
Map<String, Object> valueMap = new HashMap<>();
KapuaId accId;
KapuaId scopeId;
Account tmpAccount = (Account) stepData.get("LastAccount");
if (tmpAccount != null) {
accId = tmpAccount.getId();
scopeId = tmpAccount.getScopeId();
} else {
accId = new KapuaEid(BigInteger.ONE);
scopeId = new KapuaEid(BigInteger.ONE);
}
for (TestConfig config : testConfigs) {
config.addConfigToMap(valueMap);
}
primeException();
try {
credentialService.setConfigValues(accId, scopeId, valueMap);
} catch (KapuaException ex) {
verifyException(ex);
}
}
代码示例来源:origin: org.eclipse.kapua/kapua-account-internal
} else {
authorizationService.checkPermission(permissionFactory.newPermission(AccountDomains.ACCOUNT_DOMAIN, Actions.write, account.getScopeId()));
if (oldAccount.getScopeId() != null) {
parentAccount = KapuaSecurityUtils.doPrivileged(() -> find(oldAccount.getScopeId()));
if (!Objects.equals(oldAccount.getScopeId(), account.getScopeId())) {
throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.scopeId");
代码示例来源:origin: org.eclipse.kapua/kapua-security-shiro
Account account = KapuaSecurityUtils.doPrivileged(() -> ACCOUNT_SERVICE.find(permission.getTargetScopeId()));
if (account != null && account.getScopeId() != null) {
String parentAccountPath = account.getParentAccountPath();
代码示例来源:origin: eclipse/kapua
} else {
authorizationService.checkPermission(permissionFactory.newPermission(AccountDomains.ACCOUNT_DOMAIN, Actions.write, account.getScopeId()));
if (oldAccount.getScopeId() != null) {
parentAccount = KapuaSecurityUtils.doPrivileged(() -> find(oldAccount.getScopeId()));
if (!Objects.equals(oldAccount.getScopeId(), account.getScopeId())) {
throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.scopeId");
代码示例来源:origin: eclipse/kapua
Account account = KapuaSecurityUtils.doPrivileged(() -> ACCOUNT_SERVICE.find(permission.getTargetScopeId()));
if (account != null && account.getScopeId() != null) {
String parentAccountPath = account.getParentAccountPath();
代码示例来源:origin: eclipse/kapua
query.setScopeId(account.getScopeId());
endpointInfoCount = EndpointInfoDAO.count(em, query);
代码示例来源:origin: eclipse/kapua
query.setScopeId(account.getScopeId());
endpointInfoListResult = EndpointInfoDAO.query(em, query);
内容来源于网络,如有侵权,请联系作者删除!