org.eclipse.kapua.service.account.Account.getName()方法的使用及代码示例

x33g5p2x  于2022-01-17 转载在 其他  
字(7.4k)|赞(0)|评价(0)|浏览(193)

本文整理了Java中org.eclipse.kapua.service.account.Account.getName()方法的一些代码示例,展示了Account.getName()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Account.getName()方法的具体详情如下:
包路径:org.eclipse.kapua.service.account.Account
类名称:Account
方法名:getName

Account.getName介绍

暂无

代码示例

代码示例来源:origin: eclipse/kapua

kcc.update(accessToken, account.getName(), accessToken.getScopeId(), accessToken.getUserId(), (((TransportConnector) context.getConnector()).getName()),
    brokerIpResolver.getBrokerIpOrHostName(), MULTI_ACCOUNT_CLIENT_ID);
kcc.updateOldConnectionId(CONNECTION_MAP.get(kcc.getFullClientId()));

代码示例来源:origin: org.eclipse.kapua/kapua-account-internal

if (settings.getString(SystemSettingKey.SYS_PROVISION_ACCOUNT_NAME).equals(accountx.getName())) {
  throw new KapuaIllegalAccessException(action.name());
if (settings.getString(SystemSettingKey.SYS_ADMIN_USERNAME).equals(accountx.getName())) {
  throw new KapuaIllegalAccessException(action.name());

代码示例来源:origin: eclipse/kapua

if (settings.getString(SystemSettingKey.SYS_PROVISION_ACCOUNT_NAME).equals(accountx.getName())) {
  throw new KapuaIllegalAccessException(action.name());
if (settings.getString(SystemSettingKey.SYS_ADMIN_USERNAME).equals(accountx.getName())) {
  throw new KapuaIllegalAccessException(action.name());

代码示例来源:origin: eclipse/kapua

kcc = new KapuaConnectionContext(brokerIdResolver.getBrokerId(this), brokerIpResolver.getBrokerIpOrHostName(), kapuaPrincipal, account.getName(), info, MULTI_ACCOUNT_CLIENT_ID);
kcc.updateOldConnectionId(CONNECTION_MAP.get(kcc.getFullClientId()));

代码示例来源:origin: eclipse/kapua

ArgumentValidator.notEmptyOrNull(account.getName(), "account.name");
ArgumentValidator.notNull(account.getOrganization(), "account.organization");
ArgumentValidator.match(account.getOrganization().getEmail(), CommonsValidationRegex.EMAIL_REGEXP, "account.organization.email");
  SystemSetting setting = SystemSetting.getInstance();
  if (setting.getString(SystemSettingKey.SYS_ADMIN_ACCOUNT).equals(account.getName())) {
    throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.parentAccountPath");
  if (!oldAccount.getName().equals(account.getName())) {
    throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.name");

代码示例来源:origin: eclipse/kapua

String msg = String.format("Message Store not enabled for account %s", messageInfo.getAccount().getName());
logger.debug(msg);
throw new ConfigurationException(msg);

代码示例来源:origin: org.eclipse.kapua/kapua-account-internal

ArgumentValidator.notEmptyOrNull(account.getName(), "account.name");
ArgumentValidator.notNull(account.getOrganization(), "account.organization");
ArgumentValidator.match(account.getOrganization().getEmail(), CommonsValidationRegex.EMAIL_REGEXP, "account.organization.email");
    throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.parentAccountPath");
  if (!oldAccount.getName().equals(account.getName())) {
    throw new KapuaAccountException(KapuaAccountErrorCodes.ILLEGAL_ARGUMENT, null, "account.name");

代码示例来源:origin: eclipse/kapua

@Override
public KuraRequestMessage translate(FROM_M kapuaMessage) throws KapuaException {
  //
  // Kura channel
  KapuaLocator locator = KapuaLocator.getInstance();
  AccountService accountService = locator.getService(AccountService.class);
  Account account = KapuaSecurityUtils.doPrivileged(() -> accountService.find(kapuaMessage.getScopeId()));
  Device device = null;
  DeviceRegistryService deviceService = locator.getService(DeviceRegistryService.class);
  if (kapuaMessage.getDeviceId() != null) {
    device = deviceService.find(kapuaMessage.getScopeId(), kapuaMessage.getDeviceId());
  }
  KuraRequestChannel kuraRequestChannel = translateChannel(kapuaMessage.getChannel());
  kuraRequestChannel.setScope(account.getName());
  kuraRequestChannel.setClientId(device != null ? device.getClientId() : kapuaMessage.getClientId());
  //
  // Kura payload
  KuraRequestPayload kuraPayload = translatePayload(kapuaMessage.getPayload());
  //
  // Return Kura Message
  return new KuraRequestMessage(kuraRequestChannel, kapuaMessage.getReceivedOn(), kuraPayload);
}

代码示例来源:origin: org.eclipse.kapua/kapua-translator-kapua-kura

@Override
public KuraRequestMessage translate(FROM_M kapuaMessage) throws KapuaException {
  //
  // Kura channel
  KapuaLocator locator = KapuaLocator.getInstance();
  AccountService accountService = locator.getService(AccountService.class);
  Account account = KapuaSecurityUtils.doPrivileged(() -> accountService.find(kapuaMessage.getScopeId()));
  Device device = null;
  DeviceRegistryService deviceService = locator.getService(DeviceRegistryService.class);
  if (kapuaMessage.getDeviceId() != null) {
    device = deviceService.find(kapuaMessage.getScopeId(), kapuaMessage.getDeviceId());
  }
  KuraRequestChannel kuraRequestChannel = translateChannel(kapuaMessage.getChannel());
  kuraRequestChannel.setScope(account.getName());
  kuraRequestChannel.setClientId(device != null ? device.getClientId() : kapuaMessage.getClientId());
  //
  // Kura payload
  KuraRequestPayload kuraPayload = translatePayload(kapuaMessage.getPayload());
  //
  // Return Kura Message
  return new KuraRequestMessage(kuraRequestChannel, kapuaMessage.getReceivedOn(), kuraPayload);
}

代码示例来源:origin: org.eclipse.kapua/kapua-translator-kapua-kura

@Override
public KuraDataMessage translate(KapuaDataMessage kapuaDataMessage)
    throws KapuaException {
  KapuaLocator locator = KapuaLocator.getInstance();
  AccountService accountService = locator.getService(AccountService.class);
  Account account = accountService.find(kapuaDataMessage.getScopeId());
  if (account == null) {
    throw new KapuaEntityNotFoundException(Account.TYPE, kapuaDataMessage.getScopeId());
  }
  //
  // Kapua Channel
  KuraDataChannel kuraDataChannel = translate(kapuaDataMessage.getChannel());
  kuraDataChannel.setClientId(kapuaDataMessage.getClientId());
  kuraDataChannel.setScope(account.getName());
  //
  // Kapua payload
  KuraDataPayload kuraDataPayload = translate(kapuaDataMessage.getPayload());
  kuraDataPayload.setBody(kapuaDataMessage.getPayload().getBody());
  kuraDataPayload.setMetrics(kapuaDataMessage.getPayload().getMetrics());
  kuraDataPayload.setPosition(TranslatorKapuaKuraUtils.translate(kapuaDataMessage.getPosition()));
  kuraDataPayload.setTimestamp(kapuaDataMessage.getSentOn());
  //
  // Kapua message
  KuraDataMessage kuraDataMessage = new KuraDataMessage();
  kuraDataMessage.setChannel(kuraDataChannel);
  kuraDataMessage.setPayload(kuraDataPayload);
  // Return Kapua Message
  return kuraDataMessage;
}

代码示例来源:origin: eclipse/kapua

@Override
public KuraDataMessage translate(KapuaDataMessage kapuaDataMessage)
    throws KapuaException {
  KapuaLocator locator = KapuaLocator.getInstance();
  AccountService accountService = locator.getService(AccountService.class);
  Account account = accountService.find(kapuaDataMessage.getScopeId());
  if (account == null) {
    throw new KapuaEntityNotFoundException(Account.TYPE, kapuaDataMessage.getScopeId());
  }
  //
  // Kapua Channel
  KuraDataChannel kuraDataChannel = translate(kapuaDataMessage.getChannel());
  kuraDataChannel.setClientId(kapuaDataMessage.getClientId());
  kuraDataChannel.setScope(account.getName());
  //
  // Kapua payload
  KuraDataPayload kuraDataPayload = translate(kapuaDataMessage.getPayload());
  kuraDataPayload.setBody(kapuaDataMessage.getPayload().getBody());
  kuraDataPayload.setMetrics(kapuaDataMessage.getPayload().getMetrics());
  kuraDataPayload.setPosition(TranslatorKapuaKuraUtils.translate(kapuaDataMessage.getPosition()));
  kuraDataPayload.setTimestamp(kapuaDataMessage.getSentOn());
  //
  // Kapua message
  KuraDataMessage kuraDataMessage = new KuraDataMessage();
  kuraDataMessage.setChannel(kuraDataChannel);
  kuraDataMessage.setPayload(kuraDataPayload);
  // Return Kapua Message
  return kuraDataMessage;
}

相关文章