use of org.opensmartgridplatform.ws.schema.core.secret.management.SecretType in project open-smart-grid-platform by OSGP.
the class SecretManagementService method createGetSecretsRequest.
private GetSecretsRequest createGetSecretsRequest(final String deviceIdentification, final List<SecurityKeyType> keyTypes) {
final GetSecretsRequest request = new GetSecretsRequest();
request.setDeviceId(deviceIdentification);
request.setSecretTypes(new SecretTypes());
final List<SecretType> secretTypeList = request.getSecretTypes().getSecretType();
keyTypes.stream().forEach(kt -> secretTypeList.add(kt.toSecretType()));
return request;
}
use of org.opensmartgridplatform.ws.schema.core.secret.management.SecretType in project open-smart-grid-platform by OSGP.
the class SecretManagementService method activateNewKeys.
public void activateNewKeys(final MessageMetadata messageMetadata, final String deviceIdentification, final List<SecurityKeyType> keyTypes) {
final ActivateSecretsRequest request = new ActivateSecretsRequest();
request.setDeviceId(deviceIdentification);
request.setSecretTypes(new SecretTypes());
final List<SecretType> secretTypeList = request.getSecretTypes().getSecretType();
keyTypes.forEach(kt -> secretTypeList.add(kt.toSecretType()));
this.secretManagementClient.activateSecretsRequest(messageMetadata, request);
}
use of org.opensmartgridplatform.ws.schema.core.secret.management.SecretType in project open-smart-grid-platform by OSGP.
the class SecretManagementService method createGetNewSecretsRequest.
private GetNewSecretsRequest createGetNewSecretsRequest(final String deviceIdentification, final List<SecurityKeyType> keyTypes) {
final GetNewSecretsRequest request = new GetNewSecretsRequest();
request.setDeviceId(deviceIdentification);
request.setSecretTypes(new SecretTypes());
final List<SecretType> secretTypeList = request.getSecretTypes().getSecretType();
keyTypes.stream().forEach(kt -> secretTypeList.add(kt.toSecretType()));
return request;
}
Aggregations