Search in sources :

Example 1 with Request

use of de.fraunhofer.iosb.ilt.faaast.service.model.api.Request in project FAAAST-Service by FraunhoferIOSB.

the class RequestMappingManagerTest method testGetAllAssetAdministrationShellsRequest.

@Test
public void testGetAllAssetAdministrationShellsRequest() throws InvalidRequestException {
    Request expected = GetAllAssetAdministrationShellsRequest.builder().outputModifier(OutputModifier.DEFAULT).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.GET).path("shells").build());
    Assert.assertEquals(expected, actual);
}
Also used : GetAllAssetAdministrationShellsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsRequest) InvokeOperationSyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationSyncRequest) PutSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelElementByPathRequest) PutConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutConceptDescriptionByIdRequest) PutSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelRequest) SetSubmodelElementValueByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.SetSubmodelElementValueByPathRequest) GetAllConceptDescriptionsByIsCaseOfRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIsCaseOfRequest) DeleteAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAllAssetLinksByIdRequest) PostSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementByPathRequest) PostConceptDescriptionRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostConceptDescriptionRequest) PostAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAssetAdministrationShellRequest) PostAASXPackageRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAASXPackageRequest) GetAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellByIdRequest) InvokeOperationAsyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationAsyncRequest) GetAllSubmodelElementsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelElementsRequest) GetAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetLinksByIdRequest) PutSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelByIdRequest) HttpRequest(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpRequest) PutAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellRequest) DeleteConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteConceptDescriptionByIdRequest) GetAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetInformationRequest) GetAllSubmodelsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsRequest) DeleteSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelReferenceRequest) PostSubmodelElementRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementRequest) Request(de.fraunhofer.iosb.ilt.faaast.service.model.api.Request) GetAllSubmodelsBySemanticIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsBySemanticIdRequest) GetSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelByIdRequest) PostSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelRequest) DeleteSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelElementByPathRequest) GetAllSubmodelsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsByIdShortRequest) GetSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelElementByPathRequest) GetOperationAsyncResultRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetOperationAsyncResultRequest) GetAllSubmodelReferencesRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelReferencesRequest) PutAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellByIdRequest) GetAllConceptDescriptionsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIdShortRequest) PostAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAllAssetLinksByIdRequest) DeleteSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelByIdRequest) GetAllConceptDescriptionsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsRequest) PutAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetInformationRequest) DeleteAASXPackageByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAASXPackageByIdRequest) GetAllConceptDescriptionsByDataSpecificationReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByDataSpecificationReferenceRequest) GetAASXByPackageIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAASXByPackageIdRequest) GetAllAssetAdministrationShellIdsByAssetLinkRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellIdsByAssetLinkRequest) GetAllAssetAdministrationShellsByAssetIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByAssetIdRequest) GetAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellRequest) GetSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelRequest) GetAllAssetAdministrationShellsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByIdShortRequest) DeleteAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAssetAdministrationShellByIdRequest) PostSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelReferenceRequest) GetAllAASXPackageIdsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAASXPackageIdsRequest) GetConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetConceptDescriptionByIdRequest) Test(org.junit.Test)

Example 2 with Request

use of de.fraunhofer.iosb.ilt.faaast.service.model.api.Request in project FAAAST-Service by FraunhoferIOSB.

the class RequestMappingManagerTest method testGetOperationAsyncResult.

@Test
public void testGetOperationAsyncResult() throws InvalidRequestException {
    final String handleId = UUID.randomUUID().toString();
    Request expected = GetOperationAsyncResultRequest.builder().handleId(handleId).path(ReferenceHelper.toKeys(OPERATION_REF)).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.GET).path("submodels/" + EncodingHelper.base64UrlEncode(SUBMODEL.getIdentification().getIdentifier()) + "/submodel/submodel-elements/" + ElementPathHelper.toElementPath(OPERATION_REF) + "/operation-results/" + EncodingHelper.base64UrlEncode(handleId)).build());
    Assert.assertEquals(expected, actual);
}
Also used : GetAllAssetAdministrationShellsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsRequest) InvokeOperationSyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationSyncRequest) PutSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelElementByPathRequest) PutConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutConceptDescriptionByIdRequest) PutSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelRequest) SetSubmodelElementValueByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.SetSubmodelElementValueByPathRequest) GetAllConceptDescriptionsByIsCaseOfRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIsCaseOfRequest) DeleteAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAllAssetLinksByIdRequest) PostSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementByPathRequest) PostConceptDescriptionRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostConceptDescriptionRequest) PostAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAssetAdministrationShellRequest) PostAASXPackageRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAASXPackageRequest) GetAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellByIdRequest) InvokeOperationAsyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationAsyncRequest) GetAllSubmodelElementsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelElementsRequest) GetAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetLinksByIdRequest) PutSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelByIdRequest) HttpRequest(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpRequest) PutAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellRequest) DeleteConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteConceptDescriptionByIdRequest) GetAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetInformationRequest) GetAllSubmodelsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsRequest) DeleteSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelReferenceRequest) PostSubmodelElementRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementRequest) Request(de.fraunhofer.iosb.ilt.faaast.service.model.api.Request) GetAllSubmodelsBySemanticIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsBySemanticIdRequest) GetSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelByIdRequest) PostSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelRequest) DeleteSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelElementByPathRequest) GetAllSubmodelsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsByIdShortRequest) GetSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelElementByPathRequest) GetOperationAsyncResultRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetOperationAsyncResultRequest) GetAllSubmodelReferencesRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelReferencesRequest) PutAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellByIdRequest) GetAllConceptDescriptionsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIdShortRequest) PostAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAllAssetLinksByIdRequest) DeleteSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelByIdRequest) GetAllConceptDescriptionsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsRequest) PutAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetInformationRequest) DeleteAASXPackageByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAASXPackageByIdRequest) GetAllConceptDescriptionsByDataSpecificationReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByDataSpecificationReferenceRequest) GetAASXByPackageIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAASXByPackageIdRequest) GetAllAssetAdministrationShellIdsByAssetLinkRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellIdsByAssetLinkRequest) GetAllAssetAdministrationShellsByAssetIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByAssetIdRequest) GetAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellRequest) GetSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelRequest) GetAllAssetAdministrationShellsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByIdShortRequest) DeleteAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAssetAdministrationShellByIdRequest) PostSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelReferenceRequest) GetAllAASXPackageIdsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAASXPackageIdsRequest) GetConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetConceptDescriptionByIdRequest) Test(org.junit.Test)

Example 3 with Request

use of de.fraunhofer.iosb.ilt.faaast.service.model.api.Request in project FAAAST-Service by FraunhoferIOSB.

the class RequestMappingManagerTest method testPostConceptDescription.

@Test
public void testPostConceptDescription() throws SerializationException, InvalidRequestException {
    Request expected = PostConceptDescriptionRequest.builder().conceptDescription(CONCEPT_DESCRIPTION).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.POST).path("concept-descriptions").body(serializer.write(CONCEPT_DESCRIPTION)).build());
    Assert.assertEquals(expected, actual);
}
Also used : GetAllAssetAdministrationShellsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsRequest) InvokeOperationSyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationSyncRequest) PutSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelElementByPathRequest) PutConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutConceptDescriptionByIdRequest) PutSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelRequest) SetSubmodelElementValueByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.SetSubmodelElementValueByPathRequest) GetAllConceptDescriptionsByIsCaseOfRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIsCaseOfRequest) DeleteAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAllAssetLinksByIdRequest) PostSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementByPathRequest) PostConceptDescriptionRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostConceptDescriptionRequest) PostAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAssetAdministrationShellRequest) PostAASXPackageRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAASXPackageRequest) GetAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellByIdRequest) InvokeOperationAsyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationAsyncRequest) GetAllSubmodelElementsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelElementsRequest) GetAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetLinksByIdRequest) PutSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelByIdRequest) HttpRequest(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpRequest) PutAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellRequest) DeleteConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteConceptDescriptionByIdRequest) GetAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetInformationRequest) GetAllSubmodelsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsRequest) DeleteSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelReferenceRequest) PostSubmodelElementRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementRequest) Request(de.fraunhofer.iosb.ilt.faaast.service.model.api.Request) GetAllSubmodelsBySemanticIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsBySemanticIdRequest) GetSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelByIdRequest) PostSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelRequest) DeleteSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelElementByPathRequest) GetAllSubmodelsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsByIdShortRequest) GetSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelElementByPathRequest) GetOperationAsyncResultRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetOperationAsyncResultRequest) GetAllSubmodelReferencesRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelReferencesRequest) PutAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellByIdRequest) GetAllConceptDescriptionsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIdShortRequest) PostAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAllAssetLinksByIdRequest) DeleteSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelByIdRequest) GetAllConceptDescriptionsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsRequest) PutAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetInformationRequest) DeleteAASXPackageByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAASXPackageByIdRequest) GetAllConceptDescriptionsByDataSpecificationReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByDataSpecificationReferenceRequest) GetAASXByPackageIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAASXByPackageIdRequest) GetAllAssetAdministrationShellIdsByAssetLinkRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellIdsByAssetLinkRequest) GetAllAssetAdministrationShellsByAssetIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByAssetIdRequest) GetAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellRequest) GetSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelRequest) GetAllAssetAdministrationShellsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByIdShortRequest) DeleteAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAssetAdministrationShellByIdRequest) PostSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelReferenceRequest) GetAllAASXPackageIdsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAASXPackageIdsRequest) GetConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetConceptDescriptionByIdRequest) Test(org.junit.Test)

Example 4 with Request

use of de.fraunhofer.iosb.ilt.faaast.service.model.api.Request in project FAAAST-Service by FraunhoferIOSB.

the class RequestMappingManagerTest method testGetConceptDescriptionById.

@Test
public void testGetConceptDescriptionById() throws InvalidRequestException {
    Request expected = GetConceptDescriptionByIdRequest.builder().id(CONCEPT_DESCRIPTION.getIdentification()).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.GET).path("concept-descriptions/" + EncodingHelper.base64UrlEncode(CONCEPT_DESCRIPTION.getIdentification().getIdentifier())).build());
    Assert.assertEquals(expected, actual);
}
Also used : GetAllAssetAdministrationShellsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsRequest) InvokeOperationSyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationSyncRequest) PutSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelElementByPathRequest) PutConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutConceptDescriptionByIdRequest) PutSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelRequest) SetSubmodelElementValueByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.SetSubmodelElementValueByPathRequest) GetAllConceptDescriptionsByIsCaseOfRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIsCaseOfRequest) DeleteAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAllAssetLinksByIdRequest) PostSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementByPathRequest) PostConceptDescriptionRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostConceptDescriptionRequest) PostAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAssetAdministrationShellRequest) PostAASXPackageRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAASXPackageRequest) GetAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellByIdRequest) InvokeOperationAsyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationAsyncRequest) GetAllSubmodelElementsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelElementsRequest) GetAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetLinksByIdRequest) PutSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelByIdRequest) HttpRequest(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpRequest) PutAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellRequest) DeleteConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteConceptDescriptionByIdRequest) GetAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetInformationRequest) GetAllSubmodelsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsRequest) DeleteSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelReferenceRequest) PostSubmodelElementRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementRequest) Request(de.fraunhofer.iosb.ilt.faaast.service.model.api.Request) GetAllSubmodelsBySemanticIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsBySemanticIdRequest) GetSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelByIdRequest) PostSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelRequest) DeleteSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelElementByPathRequest) GetAllSubmodelsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsByIdShortRequest) GetSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelElementByPathRequest) GetOperationAsyncResultRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetOperationAsyncResultRequest) GetAllSubmodelReferencesRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelReferencesRequest) PutAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellByIdRequest) GetAllConceptDescriptionsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIdShortRequest) PostAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAllAssetLinksByIdRequest) DeleteSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelByIdRequest) GetAllConceptDescriptionsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsRequest) PutAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetInformationRequest) DeleteAASXPackageByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAASXPackageByIdRequest) GetAllConceptDescriptionsByDataSpecificationReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByDataSpecificationReferenceRequest) GetAASXByPackageIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAASXByPackageIdRequest) GetAllAssetAdministrationShellIdsByAssetLinkRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellIdsByAssetLinkRequest) GetAllAssetAdministrationShellsByAssetIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByAssetIdRequest) GetAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellRequest) GetSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelRequest) GetAllAssetAdministrationShellsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByIdShortRequest) DeleteAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAssetAdministrationShellByIdRequest) PostSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelReferenceRequest) GetAllAASXPackageIdsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAASXPackageIdsRequest) GetConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetConceptDescriptionByIdRequest) Test(org.junit.Test)

Example 5 with Request

use of de.fraunhofer.iosb.ilt.faaast.service.model.api.Request in project FAAAST-Service by FraunhoferIOSB.

the class RequestMappingManagerTest method testGetAllConceptDescriptionsByIsCaseOf.

@Test
public void testGetAllConceptDescriptionsByIsCaseOf() throws InvalidRequestException {
    Reference isCaseOf = CONCEPT_DESCRIPTION.getIsCaseOfs().get(0);
    Request expected = GetAllConceptDescriptionsByIsCaseOfRequest.builder().isCaseOf(isCaseOf).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.GET).path("concept-descriptions").query("isCaseOf=" + EncodingHelper.base64UrlEncode(AasUtils.asString(isCaseOf))).build());
    Assert.assertEquals(expected, actual);
}
Also used : Reference(io.adminshell.aas.v3.model.Reference) GetAllAssetAdministrationShellsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsRequest) InvokeOperationSyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationSyncRequest) PutSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelElementByPathRequest) PutConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutConceptDescriptionByIdRequest) PutSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelRequest) SetSubmodelElementValueByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.SetSubmodelElementValueByPathRequest) GetAllConceptDescriptionsByIsCaseOfRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIsCaseOfRequest) DeleteAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAllAssetLinksByIdRequest) PostSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementByPathRequest) PostConceptDescriptionRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostConceptDescriptionRequest) PostAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAssetAdministrationShellRequest) PostAASXPackageRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAASXPackageRequest) GetAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellByIdRequest) InvokeOperationAsyncRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.InvokeOperationAsyncRequest) GetAllSubmodelElementsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelElementsRequest) GetAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetLinksByIdRequest) PutSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutSubmodelByIdRequest) HttpRequest(de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpRequest) PutAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellRequest) DeleteConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteConceptDescriptionByIdRequest) GetAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetInformationRequest) GetAllSubmodelsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsRequest) DeleteSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelReferenceRequest) PostSubmodelElementRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelElementRequest) Request(de.fraunhofer.iosb.ilt.faaast.service.model.api.Request) GetAllSubmodelsBySemanticIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsBySemanticIdRequest) GetSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelByIdRequest) PostSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelRequest) DeleteSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelElementByPathRequest) GetAllSubmodelsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelsByIdShortRequest) GetSubmodelElementByPathRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelElementByPathRequest) GetOperationAsyncResultRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetOperationAsyncResultRequest) GetAllSubmodelReferencesRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllSubmodelReferencesRequest) PutAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetAdministrationShellByIdRequest) GetAllConceptDescriptionsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIdShortRequest) PostAllAssetLinksByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostAllAssetLinksByIdRequest) DeleteSubmodelByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelByIdRequest) GetAllConceptDescriptionsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsRequest) PutAssetInformationRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PutAssetInformationRequest) DeleteAASXPackageByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAASXPackageByIdRequest) GetAllConceptDescriptionsByDataSpecificationReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByDataSpecificationReferenceRequest) GetAASXByPackageIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAASXByPackageIdRequest) GetAllAssetAdministrationShellIdsByAssetLinkRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellIdsByAssetLinkRequest) GetAllAssetAdministrationShellsByAssetIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByAssetIdRequest) GetAssetAdministrationShellRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAssetAdministrationShellRequest) GetSubmodelRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetSubmodelRequest) GetAllAssetAdministrationShellsByIdShortRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByIdShortRequest) DeleteAssetAdministrationShellByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAssetAdministrationShellByIdRequest) PostSubmodelReferenceRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.PostSubmodelReferenceRequest) GetAllAASXPackageIdsRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAASXPackageIdsRequest) GetConceptDescriptionByIdRequest(de.fraunhofer.iosb.ilt.faaast.service.model.request.GetConceptDescriptionByIdRequest) Test(org.junit.Test)

Aggregations

Request (de.fraunhofer.iosb.ilt.faaast.service.model.api.Request)55 HttpRequest (de.fraunhofer.iosb.ilt.faaast.service.endpoint.http.model.HttpRequest)54 DeleteAASXPackageByIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAASXPackageByIdRequest)53 DeleteAllAssetLinksByIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAllAssetLinksByIdRequest)53 DeleteAssetAdministrationShellByIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteAssetAdministrationShellByIdRequest)53 DeleteConceptDescriptionByIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteConceptDescriptionByIdRequest)53 DeleteSubmodelByIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelByIdRequest)53 DeleteSubmodelElementByPathRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelElementByPathRequest)53 DeleteSubmodelReferenceRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.DeleteSubmodelReferenceRequest)53 GetAASXByPackageIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAASXByPackageIdRequest)53 GetAllAASXPackageIdsRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAASXPackageIdsRequest)53 GetAllAssetAdministrationShellIdsByAssetLinkRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellIdsByAssetLinkRequest)53 GetAllAssetAdministrationShellsByAssetIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByAssetIdRequest)53 GetAllAssetAdministrationShellsByIdShortRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsByIdShortRequest)53 GetAllAssetAdministrationShellsRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetAdministrationShellsRequest)53 GetAllAssetLinksByIdRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllAssetLinksByIdRequest)53 GetAllConceptDescriptionsByDataSpecificationReferenceRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByDataSpecificationReferenceRequest)53 GetAllConceptDescriptionsByIdShortRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIdShortRequest)53 GetAllConceptDescriptionsByIsCaseOfRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsByIsCaseOfRequest)53 GetAllConceptDescriptionsRequest (de.fraunhofer.iosb.ilt.faaast.service.model.request.GetAllConceptDescriptionsRequest)53