Search in sources :

Example 1 with SecretType

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;
}
Also used : SecretType(org.opensmartgridplatform.ws.schema.core.secret.management.SecretType) SecretTypes(org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes) GetSecretsRequest(org.opensmartgridplatform.ws.schema.core.secret.management.GetSecretsRequest)

Example 2 with SecretType

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);
}
Also used : SecretType(org.opensmartgridplatform.ws.schema.core.secret.management.SecretType) SecretTypes(org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes) ActivateSecretsRequest(org.opensmartgridplatform.ws.schema.core.secret.management.ActivateSecretsRequest)

Example 3 with SecretType

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;
}
Also used : SecretType(org.opensmartgridplatform.ws.schema.core.secret.management.SecretType) SecretTypes(org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes) GetNewSecretsRequest(org.opensmartgridplatform.ws.schema.core.secret.management.GetNewSecretsRequest)

Aggregations

SecretType (org.opensmartgridplatform.ws.schema.core.secret.management.SecretType)3 SecretTypes (org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes)3 ActivateSecretsRequest (org.opensmartgridplatform.ws.schema.core.secret.management.ActivateSecretsRequest)1 GetNewSecretsRequest (org.opensmartgridplatform.ws.schema.core.secret.management.GetNewSecretsRequest)1 GetSecretsRequest (org.opensmartgridplatform.ws.schema.core.secret.management.GetSecretsRequest)1