Codota Logo
NotFoundException.<init>
Code IndexAdd Codota to your IDE (free)

How to use
org.kaaproject.kaa.server.common.dao.exception.NotFoundException
constructor

Best Java code snippets using org.kaaproject.kaa.server.common.dao.exception.NotFoundException.<init> (Showing top 13 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
OutputStreamWriter o =
  • Codota IconOutputStream out;new OutputStreamWriter(out)
  • Codota IconOutputStream out;String charsetName;new OutputStreamWriter(out, charsetName)
  • Codota IconHttpURLConnection connection;new OutputStreamWriter(connection.getOutputStream())
  • Smart code suggestions by Codota
}
origin: kaaproject/kaa

/**
 * Check schema.
 *
 * @param schemaDto the schema dto
 * @param file      the file
 * @throws NotFoundException the control service exception
 */
private void checkSchema(VersionDto schemaDto, RecordFiles file) throws NotFoundException {
 if (schemaDto == null) {
  throw new NotFoundException("Schema " + file + " not found!");
 }
}
origin: kaaproject/kaa

private ServerProfileSchemaDto getServerProfileSchema(String applicationId,
                           Integer serverProfileVersion)
  throws Exception {
 ServerProfileSchemaDto serverProfileSchema =
   this.controlService.getServerProfileSchemaByApplicationIdAndVersion(
     applicationId, serverProfileVersion);
 if (serverProfileSchema == null) {
  throw new NotFoundException("No server-side endpoint profile schema found!");
 }
 return serverProfileSchema;
}
origin: kaaproject/kaa

@Override
public CTLSchemaDto getCtlSchemaById(String schemaId) throws ControlServiceException {
 CTLSchemaDto ctlSchemaDto = ctlService.findCtlSchemaById(schemaId);
 if (ctlSchemaDto == null) {
  LOG.error("CTL schema with Id [{}] not found!", schemaId);
  throw new NotFoundException("CTL schema not found!");
 }
 return ctlSchemaDto;
}
origin: kaaproject/kaa

@Override
public EndpointSpecificConfigurationDto findEndpointSpecificConfiguration(byte[] endpointKeyHash, Integer confSchemaVersion) {
 Optional<EndpointSpecificConfigurationDto> result;
 if (confSchemaVersion == null) {
  result = endpointSpecificConfigurationService.findActiveConfigurationByEndpointKeyHash(endpointKeyHash);
 } else {
  result = endpointSpecificConfigurationService.findByEndpointKeyHashAndConfSchemaVersion(endpointKeyHash, confSchemaVersion);
 }
 return result.orElseThrow(() -> new NotFoundException("Endpoint specific configuration not found"));
}
origin: kaaproject/kaa

@Override
public EndpointSpecificConfigurationDto deleteEndpointSpecificConfiguration(byte[] endpointKeyHash, Integer confSchemaVersion) {
 Optional<EndpointSpecificConfigurationDto> result;
 if (confSchemaVersion == null) {
  result = endpointSpecificConfigurationService.deleteActiveConfigurationByEndpointKeyHash(endpointKeyHash);
 } else {
  result = endpointSpecificConfigurationService.deleteByEndpointKeyHashAndConfSchemaVersion(endpointKeyHash, confSchemaVersion);
 }
 EndpointSpecificConfigurationDto configuration = result
   .orElseThrow(() -> new NotFoundException("Endpoint specific configuration not found"));
 sendEndpointConfigurationRefreshMessage(configuration);
 return configuration;
}
origin: kaaproject/kaa

@Override
public FileData getRecordStructureSchema(String applicationId, int logSchemaVersion)
  throws ControlServiceException {
 ApplicationDto application = applicationService.findAppById(applicationId);
 if (application == null) {
  throw new NotFoundException("Application not found!");
 }
 LogSchemaDto logSchema = logSchemaService
   .findLogSchemaByAppIdAndVersion(applicationId, logSchemaVersion);
 if (logSchema == null) {
  throw new NotFoundException("Log schema not found!");
 }
 Schema recordWrapperSchema = null;
 try {
  CTLSchemaDto logCtlSchema = getCtlSchemaById(logSchema.getCtlSchemaId());
  recordWrapperSchema = RecordWrapperSchemaGenerator
    .generateRecordWrapperSchema(logCtlSchema.getBody());
 } catch (IOException ex) {
  LOG.error("Unable to get Record Structure Schema", ex);
  throw new ControlServiceException(ex);
 }
 String libraryFileName = MessageFormatter
   .arrayFormat(SCHEMA_NAME_PATTERN, new Object[] {logSchemaVersion}).getMessage();
 String schemaInJson = recordWrapperSchema.toString(true);
 byte[] schemaData = schemaInJson.getBytes(StandardCharsets.UTF_8);
 FileData schema = new FileData();
 schema.setFileName(libraryFileName);
 schema.setFileData(schemaData);
 return schema;
}
origin: kaaproject/kaa

@Override
public FileData generateRecordStructureLibrary(String applicationId, int logSchemaVersion)
  throws ControlServiceException {
 ApplicationDto application = applicationService.findAppById(applicationId);
 if (application == null) {
  throw new NotFoundException("Application not found!");
 }
 LogSchemaDto logSchema = logSchemaService.findLogSchemaByAppIdAndVersion(applicationId,
   logSchemaVersion);
 if (logSchema == null) {
  throw new NotFoundException("Log schema not found!");
 }
 try {
  CTLSchemaDto logCtlSchema = getCtlSchemaById(logSchema.getCtlSchemaId());
  Schema recordWrapperSchema = RecordWrapperSchemaGenerator
    .generateRecordWrapperSchema(getFlatSchemaByCtlSchemaId(logCtlSchema.getId()));
  String fileName = MessageFormatter.arrayFormat(LOG_SCHEMA_LIBRARY_NAME_PATTERN,
    new Object[] {logSchemaVersion}).getMessage();
  return SchemaLibraryGenerator.generateSchemaLibrary(recordWrapperSchema, fileName);
 } catch (Exception ex) {
  LOG.error("Unable to generate Record Structure Library", ex);
  throw new ControlServiceException(ex);
 }
}
origin: kaaproject/kaa

ApplicationDto application = applicationService.findAppById(key.getApplicationId());
if (application == null) {
 throw new NotFoundException("Application not found!");
origin: kaaproject/kaa

@Override
public SdkProfileDto createSdkProfile(SdkProfileDto sdkProfile) throws KaaAdminServiceException {
 this.checkAuthority(KaaAuthorityDto.TENANT_DEVELOPER, KaaAuthorityDto.TENANT_USER);
 try {
  this.checkApplicationId(sdkProfile.getApplicationId());
  sdkProfile.setCreatedUsername(getCurrentUser().getUsername());
  sdkProfile.setCreatedTime(System.currentTimeMillis());
  ApplicationDto application = controlService.getApplication(sdkProfile.getApplicationId());
  if (application == null) {
   throw new NotFoundException("Application not found!");
  }
  sdkProfile.setApplicationToken(application.getApplicationToken());
  return controlService.saveSdkProfile(sdkProfile);
 } catch (Exception cause) {
  throw Utils.handleException(cause);
 }
}
origin: kaaproject/kaa

@Override
public ConfigurationRecordDto findConfigurationRecordBySchemaIdAndEndpointGroupId(
  String schemaId, String endpointGroupId) {
 ConfigurationRecordDto record = new ConfigurationRecordDto();
 Collection<ConfigurationDto> configurations = convertDtoList(
     configurationDao.findActualBySchemaIdAndGroupId(schemaId, endpointGroupId));
 if (configurations != null) {
  for (ConfigurationDto configuration : configurations) {
   if (configuration.getStatus() == UpdateStatus.ACTIVE) {
    record.setActiveStructureDto(configuration);
   } else if (configuration.getStatus() == UpdateStatus.INACTIVE) {
    record.setInactiveStructureDto(configuration);
   }
  }
 }
 if (!record.hasActive()) {
  ConfigurationDto deprecatedConfiguration = getDto(
      configurationDao.findLatestDeprecated(schemaId, endpointGroupId));
  if (deprecatedConfiguration != null) {
   record.setActiveStructureDto(deprecatedConfiguration);
  }
 }
 if (record.isEmpty()) {
  LOG.debug("Can't find related Configuration record.");
  throw new NotFoundException("Configuration record not found, schemaId: "
                + schemaId + ", endpointGroupId: "
                + endpointGroupId); // NOSONAR
 }
 return record;
}
origin: kaaproject/kaa

     + "server schema {} and group {}.", endpointProfileSchemaId,
  serverProfileSchemaId, endpointGroupId);
throw new NotFoundException("Profile filter record not found, endpointProfileSchemaId: "
              + endpointProfileSchemaId + ", serverProfileSchemaId: "
              + serverProfileSchemaId + " endpointGroupId: " + endpointGroupId);
origin: kaaproject/kaa

@Override
public void editUserConfiguration(EndpointUserConfigurationDto configuration)
  throws ControlServiceException {
 ApplicationDto appDto = applicationService.findAppByApplicationToken(
   configuration.getAppToken());
 EndpointUserDto userDto = endpointService.findEndpointUserByExternalIdAndTenantId(
   configuration.getUserId(), appDto.getTenantId());
 if (userDto == null) {
  throw new NotFoundException("Specified user not found!");
 }
 configuration.setUserId(userDto.getId());
 configuration = userConfigurationService.saveUserConfiguration(configuration);
 EndpointObjectHash hash = EndpointObjectHash.fromString(configuration.getBody());
 checkNeighbors();
 OperationsNodeInfo server = resolve(configuration.getUserId());
 if (server != null) {
  UserConfigurationUpdate msg = new UserConfigurationUpdate(appDto.getTenantId(),
    configuration.getUserId(), configuration.getAppToken(),
    configuration.getSchemaVersion(), hash.getDataBuf());
  if (LOG.isTraceEnabled()) {
   LOG.trace("Sending message {} to [{}]", msg, Neighbors.getServerId(
     server.getConnectionInfo()));
  }
  neighbors.sendMessage(server.getConnectionInfo(), OperationsServiceMsg.fromUpdate(msg));
 } else {
  LOG.warn("Can't find server for user [{}]", configuration.getUserId());
 }
}
origin: kaaproject/kaa

    sdkProfile.getProfileSchemaVersion());
if (profileSchema == null) {
 throw new NotFoundException("Profile schema not found!");
    sdkProfile.getConfigurationSchemaVersion());
if (configurationSchema == null) {
 throw new NotFoundException("Configuration schema not found!");
 throw new NotFoundException("Default configuration not found!");
    NotificationTypeDto.USER, sdkProfile.getNotificationSchemaVersion());
if (notificationSchema == null) {
 throw new NotFoundException("Notification schema not found!");
 throw new NotFoundException("Log schema not found!");
org.kaaproject.kaa.server.common.dao.exceptionNotFoundException<init>

Popular methods of NotFoundException

    Popular in Java

    • Creating JSON documents from java classes using gson
    • setRequestProperty (URLConnection)
    • getSystemService (Context)
    • onCreateOptionsMenu (Activity)
    • BigDecimal (java.math)
      An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
    • Date (java.sql)
      A class which can consume and produce dates in SQL Date format. Dates are represented in SQL as yyyy
    • ServletException (javax.servlet)
      Defines a general exception a servlet can throw when it encounters difficulty.
    • JFileChooser (javax.swing)
    • BasicDataSource (org.apache.commons.dbcp)
      Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
    • LoggerFactory (org.slf4j)
      The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now