Search in sources :

Example 21 with Request

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

the class RequestMappingManagerTest method testGetAssetInformationRequest.

@Test
public void testGetAssetInformationRequest() throws InvalidRequestException {
    Request expected = GetAssetInformationRequest.builder().id(AAS.getIdentification()).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.GET).path("shells/" + EncodingHelper.base64UrlEncode(AAS.getIdentification().getIdentifier()) + "/aas/asset-information").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 22 with Request

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

the class RequestMappingManagerTest method testDeleteSubmodelById.

@Test
public void testDeleteSubmodelById() throws InvalidRequestException {
    Request expected = DeleteSubmodelByIdRequest.builder().id(SUBMODEL.getIdentification()).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.DELETE).path("submodels/" + EncodingHelper.base64UrlEncode(SUBMODEL.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 23 with Request

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

the class RequestMappingManagerTest method testGetAssetAdministrationShellById.

@Test
public void testGetAssetAdministrationShellById() throws InvalidRequestException {
    Request expected = GetAssetAdministrationShellByIdRequest.builder().id(AAS.getIdentification()).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.GET).path("shells/" + EncodingHelper.base64UrlEncode(AAS.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 24 with Request

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

the class RequestMappingManagerTest method testPutSubmodelElementByPath.

@Test
public void testPutSubmodelElementByPath() throws SerializationException, InvalidRequestException {
    Request expected = PutSubmodelElementByPathRequest.builder().id(SUBMODEL.getIdentification()).path(ReferenceHelper.toKeys(SUBMODEL_ELEMENT_REF)).submodelElement(SUBMODEL_ELEMENT).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.PUT).path("submodels/" + EncodingHelper.base64UrlEncode(SUBMODEL.getIdentification().getIdentifier()) + "/submodel/submodel-elements/" + ElementPathHelper.toElementPath(SUBMODEL_ELEMENT_REF)).body(serializer.write(SUBMODEL_ELEMENT)).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 25 with Request

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

the class RequestMappingManagerTest method testGetAssetAdministrationShell.

@Test
public void testGetAssetAdministrationShell() throws InvalidRequestException {
    Request expected = GetAssetAdministrationShellRequest.builder().id(AAS.getIdentification()).outputModifier(new OutputModifier.Builder().content(Content.Value).build()).build();
    Request actual = mappingManager.map(HttpRequest.builder().method(HttpMethod.GET).path("shells/" + EncodingHelper.base64UrlEncode(AAS.getIdentification().getIdentifier()) + "/aas").query("content=value").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)

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