use of org.opensmartgridplatform.ws.schema.core.secret.management.TypedSecrets in project open-smart-grid-platform by OSGP.
the class SecretManagementEndpoint method getNewSecrets.
public GetNewSecretsResponse getNewSecrets(final GetNewSecretsRequest request) throws OsgpException {
final GetNewSecretsResponse response = new GetNewSecretsResponse();
final SecretTypes soapSecretTypes = request.getSecretTypes();
final List<SecretType> secretTypeList = this.converter.convertToSecretTypes(soapSecretTypes);
final List<TypedSecret> typedSecrets = this.secretManagementService.retrieveNewSecrets(request.getDeviceId(), secretTypeList);
final TypedSecrets soapTypedSecrets = this.converter.convertToSoapTypedSecrets(typedSecrets);
response.setTypedSecrets(soapTypedSecrets);
return response;
}
use of org.opensmartgridplatform.ws.schema.core.secret.management.TypedSecrets in project open-smart-grid-platform by OSGP.
the class SecretManagementEndpoint method getSecrets.
public GetSecretsResponse getSecrets(final GetSecretsRequest request) throws OsgpException {
final GetSecretsResponse response = new GetSecretsResponse();
final SecretTypes soapSecretTypes = request.getSecretTypes();
final List<SecretType> secretTypeList = this.converter.convertToSecretTypes(soapSecretTypes);
final List<TypedSecret> typedSecrets = this.secretManagementService.retrieveSecrets(request.getDeviceId(), secretTypeList);
final TypedSecrets soapTypedSecrets = this.converter.convertToSoapTypedSecrets(typedSecrets);
response.setTypedSecrets(soapTypedSecrets);
return response;
}
use of org.opensmartgridplatform.ws.schema.core.secret.management.TypedSecrets in project open-smart-grid-platform by OSGP.
the class SoapEndpointDataTypeConverter method convertToSoapTypedSecrets.
public TypedSecrets convertToSoapTypedSecrets(final List<TypedSecret> typedSecrets) {
final TypedSecrets soapTypedSecrets = new TypedSecrets();
final List<org.opensmartgridplatform.ws.schema.core.secret.management.TypedSecret> soapTypedSecretList = soapTypedSecrets.getTypedSecret();
for (final TypedSecret typedSecret : typedSecrets) {
final org.opensmartgridplatform.ws.schema.core.secret.management.TypedSecret soapTypedSecret = this.encryptAndConvertSoapTypedSecret(typedSecret);
soapTypedSecretList.add(soapTypedSecret);
}
return soapTypedSecrets;
}
Aggregations