Skip to content

Commit

Permalink
Fixed some warns.
Browse files Browse the repository at this point in the history
  • Loading branch information
Acarus committed Sep 29, 2016
1 parent d9dabbb commit ead7305
Show file tree
Hide file tree
Showing 11 changed files with 600 additions and 371 deletions.
Expand Up @@ -48,7 +48,8 @@ public interface ConfigurationService {
* @param version the version * @param version the version
* @return the found configuration object * @return the found configuration object
*/ */
ConfigurationDto findConfigurationByEndpointGroupIdAndVersion(String endpointGroupId, int version); ConfigurationDto findConfigurationByEndpointGroupIdAndVersion(String endpointGroupId,
int version);


/** /**
* Find default configuration by configuration schema id. * Find default configuration by configuration schema id.
Expand All @@ -73,7 +74,9 @@ public interface ConfigurationService {
* @param includeDeprecated the include deprecated * @param includeDeprecated the include deprecated
* @return the list of structure records * @return the list of structure records
*/ */
Collection<ConfigurationRecordDto> findAllConfigurationRecordsByEndpointGroupId(String endpointGroupId, boolean includeDeprecated); Collection<ConfigurationRecordDto> findAllConfigurationRecordsByEndpointGroupId(
String endpointGroupId,
boolean includeDeprecated);


/** /**
* Find configuration record by schema id and group id. * Find configuration record by schema id and group id.
Expand All @@ -82,7 +85,9 @@ public interface ConfigurationService {
* @param endpointGroupId the endpoint group id * @param endpointGroupId the endpoint group id
* @return the structure record dto * @return the structure record dto
*/ */
ConfigurationRecordDto findConfigurationRecordBySchemaIdAndEndpointGroupId(String schemaId, String endpointGroupId); ConfigurationRecordDto findConfigurationRecordBySchemaIdAndEndpointGroupId(
String schemaId,
String endpointGroupId);


/** /**
* Find all vacant configuration schemas by group id. * Find all vacant configuration schemas by group id.
Expand Down Expand Up @@ -131,7 +136,9 @@ public interface ConfigurationService {
* @param deactivatedUsername the deactivated username * @param deactivatedUsername the deactivated username
* @return the change configuration notification * @return the change configuration notification
*/ */
ChangeConfigurationNotification deleteConfigurationRecord(String schemaId, String groupId, String deactivatedUsername); ChangeConfigurationNotification deleteConfigurationRecord(String schemaId,
String groupId,
String deactivatedUsername);


/** /**
* Find configurations by endpoint group id. * Find configurations by endpoint group id.
Expand Down Expand Up @@ -167,19 +174,21 @@ public interface ConfigurationService {
ConfigurationSchemaDto findConfSchemaByAppIdAndVersion(String applicationId, int version); ConfigurationSchemaDto findConfSchemaByAppIdAndVersion(String applicationId, int version);


/** /**
* Save Configuration schema. Please see {@link ConfigurationService#saveConfSchema(ConfigurationSchemaDto, * Save Configuration schema.
* String)} * Please see {@link ConfigurationService#saveConfSchema(ConfigurationSchemaDto,String)}
* *
* @param configurationSchema the configuration schema * @param configurationSchema the configuration schema
* @param groupId group id for generated default configuration based on schema * @param groupId group id for generated default configuration based on schema
* @return the configuration schema dto * @return the configuration schema dto
*/ */
ConfigurationSchemaDto saveConfSchema(ConfigurationSchemaDto configurationSchema, String groupId); ConfigurationSchemaDto saveConfSchema(ConfigurationSchemaDto configurationSchema,
String groupId);


/** /**
* Save Configuration schema. <p> During saving new configuration schema will be generated: <ul> * Save Configuration schema. <p> During saving new configuration schema will be generated: <ul>
* <li>Base Schema</li> <li>Override Schema</li> <li>Protocol Schema</li> <li>Base Data - * <li>Base Schema</li> <li>Override Schema</li> <li>Protocol Schema</li> <li>Base Data -
* Configuration attached to default group</li> </ul> After that will added information to history * Configuration attached to default group</li> </ul> After that will added information
* to history
* {@link HistoryService#saveHistory(HistoryDto historyDto)} * {@link HistoryService#saveHistory(HistoryDto historyDto)}
* *
* @param configurationSchema the configuration schema * @param configurationSchema the configuration schema
Expand Down
Expand Up @@ -91,19 +91,21 @@ public List<SdkKey> getCachedSdkKeys(String applicationId) {
@Cacheable(RECORD_LIBRARY_CACHE) @Cacheable(RECORD_LIBRARY_CACHE)
public FileData getRecordLibrary(RecordKey key) throws KaaAdminServiceException { public FileData getRecordLibrary(RecordKey key) throws KaaAdminServiceException {
try { try {
return controlService.generateRecordStructureLibrary(key.getApplicationId(), key.getSchemaVersion()); return controlService.generateRecordStructureLibrary(
} catch (ControlServiceException e) { key.getApplicationId(), key.getSchemaVersion());
throw Utils.handleException(e); } catch (ControlServiceException ex) {
throw Utils.handleException(ex);
} }
} }


@Override @Override
@Cacheable(RECORD_SCHEMA_CACHE) @Cacheable(RECORD_SCHEMA_CACHE)
public FileData getRecordSchema(RecordKey key) throws KaaAdminServiceException { public FileData getRecordSchema(RecordKey key) throws KaaAdminServiceException {
try { try {
return controlService.getRecordStructureSchema(key.getApplicationId(), key.getSchemaVersion()); return controlService.getRecordStructureSchema(
} catch (ControlServiceException e) { key.getApplicationId(), key.getSchemaVersion());
throw Utils.handleException(e); } catch (ControlServiceException ex) {
throw Utils.handleException(ex);
} }
} }


Expand All @@ -112,8 +114,8 @@ public FileData getRecordSchema(RecordKey key) throws KaaAdminServiceException {
public FileData getRecordData(RecordKey key) throws KaaAdminServiceException { public FileData getRecordData(RecordKey key) throws KaaAdminServiceException {
try { try {
return controlService.getRecordStructureData(key); return controlService.getRecordStructureData(key);
} catch (ControlServiceException e) { } catch (ControlServiceException ex) {
throw Utils.handleException(e); throw Utils.handleException(ex);
} }
} }


Expand All @@ -134,10 +136,13 @@ public FileData getExportedCtlSchema(CtlSchemaExportKey key)
case LIBRARY: case LIBRARY:
return controlService.exportCtlSchemaFlatAsLibrary(schemaFound); return controlService.exportCtlSchemaFlatAsLibrary(schemaFound);
default: default:
throw new IllegalArgumentException("The export method " + key.getExportMethod().name() + " is not currently supported!"); throw new IllegalArgumentException(
"The export method "
+ key.getExportMethod().name()
+ " is not currently supported!");
} }
} catch (ControlServiceException e) { } catch (ControlServiceException ex) {
throw Utils.handleException(e); throw Utils.handleException(ex);
} }
} }


Expand All @@ -153,5 +158,4 @@ public void removeUploadedFile(String key) {
// Do nothing // Do nothing
} }



} }

0 comments on commit ead7305

Please sign in to comment.