Search in sources :

Example 6 with SecretTypes

use of org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes 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;
}
Also used : GetNewSecretsResponse(org.opensmartgridplatform.ws.schema.core.secret.management.GetNewSecretsResponse) SecretType(org.opensmartgridplatform.secretmanagement.application.domain.SecretType) SecretTypes(org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes) TypedSecrets(org.opensmartgridplatform.ws.schema.core.secret.management.TypedSecrets) TypedSecret(org.opensmartgridplatform.secretmanagement.application.domain.TypedSecret)

Example 7 with SecretTypes

use of org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes 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;
}
Also used : GetSecretsResponse(org.opensmartgridplatform.ws.schema.core.secret.management.GetSecretsResponse) SecretType(org.opensmartgridplatform.secretmanagement.application.domain.SecretType) SecretTypes(org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes) TypedSecrets(org.opensmartgridplatform.ws.schema.core.secret.management.TypedSecrets) TypedSecret(org.opensmartgridplatform.secretmanagement.application.domain.TypedSecret)

Example 8 with SecretTypes

use of org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes in project open-smart-grid-platform by OSGP.

the class SecretManagementEndpoint method activateSecrets.

public ActivateSecretsResponse activateSecrets(final ActivateSecretsRequest request) throws OsgpException {
    final SecretTypes soapSecretTypes = request.getSecretTypes();
    this.secretManagementService.activateNewSecrets(request.getDeviceId(), this.converter.convertToSecretTypes(soapSecretTypes));
    return new ActivateSecretsResponse();
}
Also used : ActivateSecretsResponse(org.opensmartgridplatform.ws.schema.core.secret.management.ActivateSecretsResponse) SecretTypes(org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes)

Aggregations

SecretTypes (org.opensmartgridplatform.ws.schema.core.secret.management.SecretTypes)8 SecretType (org.opensmartgridplatform.secretmanagement.application.domain.SecretType)3 TypedSecret (org.opensmartgridplatform.secretmanagement.application.domain.TypedSecret)3 SecretType (org.opensmartgridplatform.ws.schema.core.secret.management.SecretType)3 TypedSecrets (org.opensmartgridplatform.ws.schema.core.secret.management.TypedSecrets)3 GenerateAndStoreSecretsResponse (org.opensmartgridplatform.ws.schema.core.secret.management.GenerateAndStoreSecretsResponse)2 SecurityKeyType (org.opensmartgridplatform.adapter.protocol.dlms.domain.entities.SecurityKeyType)1 ActivateSecretsRequest (org.opensmartgridplatform.ws.schema.core.secret.management.ActivateSecretsRequest)1 ActivateSecretsResponse (org.opensmartgridplatform.ws.schema.core.secret.management.ActivateSecretsResponse)1 GenerateAndStoreSecretsRequest (org.opensmartgridplatform.ws.schema.core.secret.management.GenerateAndStoreSecretsRequest)1 GetNewSecretsRequest (org.opensmartgridplatform.ws.schema.core.secret.management.GetNewSecretsRequest)1 GetNewSecretsResponse (org.opensmartgridplatform.ws.schema.core.secret.management.GetNewSecretsResponse)1 GetSecretsRequest (org.opensmartgridplatform.ws.schema.core.secret.management.GetSecretsRequest)1 GetSecretsResponse (org.opensmartgridplatform.ws.schema.core.secret.management.GetSecretsResponse)1 TypedSecret (org.opensmartgridplatform.ws.schema.core.secret.management.TypedSecret)1