Search in sources :

Example 26 with ServiceTemplateId

use of org.eclipse.winery.model.ids.definitions.ServiceTemplateId in project winery by eclipse.

the class BackendUtils method createWrapperDefinitionsAndInitialEmptyElement.

public static TDefinitions createWrapperDefinitionsAndInitialEmptyElement(IRepository repository, DefinitionsChildId id) {
    final TDefinitions definitions = createWrapperDefinitions(id, repository);
    HasIdInIdOrNameField element;
    if (id instanceof RelationshipTypeImplementationId) {
        element = new TRelationshipTypeImplementation();
    } else if (id instanceof NodeTypeImplementationId) {
        element = new TNodeTypeImplementation();
    } else if (id instanceof RequirementTypeId) {
        element = new TRequirementType();
    } else if (id instanceof NodeTypeId) {
        element = new TNodeType();
    } else if (id instanceof RelationshipTypeId) {
        element = new TRelationshipType();
    } else if (id instanceof CapabilityTypeId) {
        element = new TCapabilityType();
    } else if (id instanceof DataTypeId) {
        element = new TDataType();
    } else if (id instanceof ArtifactTypeId) {
        element = new TArtifactType();
    } else if (id instanceof PolicyTypeId) {
        element = new TPolicyType();
    } else if (id instanceof PolicyTemplateId) {
        element = new TPolicyTemplate();
    } else if (id instanceof ServiceTemplateId) {
        element = new TServiceTemplate();
    } else if (id instanceof ArtifactTemplateId) {
        element = new TArtifactTemplate();
    } else if (id instanceof ComplianceRuleId) {
        element = new OTComplianceRule(new OTComplianceRule.Builder(id.getXmlId().getDecoded()));
    } else if (id instanceof PatternRefinementModelId) {
        element = new OTPatternRefinementModel(new OTPatternRefinementModel.Builder());
    } else if (id instanceof TopologyFragmentRefinementModelId) {
        element = new OTTopologyFragmentRefinementModel(new OTPatternRefinementModel.Builder());
    } else if (id instanceof TestRefinementModelId) {
        element = new OTTestRefinementModel(new OTTestRefinementModel.Builder());
    } else if (id instanceof InterfaceTypeId) {
        element = new TInterfaceType();
    } else if (id instanceof XSDImportId) {
        // TImport has no id; thus directly generating it without setting an id
        TImport tImport = new TImport();
        definitions.setElement(tImport);
        return definitions;
    } else {
        throw new IllegalStateException("Unhandled id branch. Could happen for XSDImportId");
    }
    copyIdToFields(element, id);
    definitions.setElement((TExtensibleElements) element);
    return definitions;
}
Also used : OTTopologyFragmentRefinementModel(org.eclipse.winery.model.tosca.extensions.OTTopologyFragmentRefinementModel) ArtifactTypeId(org.eclipse.winery.model.ids.definitions.ArtifactTypeId) TArtifactTemplate(org.eclipse.winery.model.tosca.TArtifactTemplate) TestRefinementModelId(org.eclipse.winery.model.ids.extensions.TestRefinementModelId) TImport(org.eclipse.winery.model.tosca.TImport) TCapabilityType(org.eclipse.winery.model.tosca.TCapabilityType) TDataType(org.eclipse.winery.model.tosca.TDataType) OTTestRefinementModel(org.eclipse.winery.model.tosca.extensions.OTTestRefinementModel) TRequirementType(org.eclipse.winery.model.tosca.TRequirementType) TNodeTypeImplementation(org.eclipse.winery.model.tosca.TNodeTypeImplementation) HasIdInIdOrNameField(org.eclipse.winery.model.tosca.HasIdInIdOrNameField) ComplianceRuleId(org.eclipse.winery.model.ids.extensions.ComplianceRuleId) InterfaceTypeId(org.eclipse.winery.model.ids.definitions.InterfaceTypeId) TArtifactType(org.eclipse.winery.model.tosca.TArtifactType) TPolicyType(org.eclipse.winery.model.tosca.TPolicyType) TopologyFragmentRefinementModelId(org.eclipse.winery.model.ids.extensions.TopologyFragmentRefinementModelId) TDefinitions(org.eclipse.winery.model.tosca.TDefinitions) TServiceTemplate(org.eclipse.winery.model.tosca.TServiceTemplate) NodeTypeImplementationId(org.eclipse.winery.model.ids.definitions.NodeTypeImplementationId) XSDImportId(org.eclipse.winery.model.ids.definitions.imports.XSDImportId) RelationshipTypeId(org.eclipse.winery.model.ids.definitions.RelationshipTypeId) CapabilityTypeId(org.eclipse.winery.model.ids.definitions.CapabilityTypeId) RelationshipTypeImplementationId(org.eclipse.winery.model.ids.definitions.RelationshipTypeImplementationId) ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId) ArtifactTemplateId(org.eclipse.winery.model.ids.definitions.ArtifactTemplateId) TNodeType(org.eclipse.winery.model.tosca.TNodeType) TRelationshipType(org.eclipse.winery.model.tosca.TRelationshipType) TPolicyTemplate(org.eclipse.winery.model.tosca.TPolicyTemplate) PatternRefinementModelId(org.eclipse.winery.model.ids.extensions.PatternRefinementModelId) PolicyTypeId(org.eclipse.winery.model.ids.definitions.PolicyTypeId) TRelationshipTypeImplementation(org.eclipse.winery.model.tosca.TRelationshipTypeImplementation) RequirementTypeId(org.eclipse.winery.model.ids.definitions.RequirementTypeId) DataTypeId(org.eclipse.winery.model.ids.definitions.DataTypeId) TInterfaceType(org.eclipse.winery.model.tosca.TInterfaceType) PolicyTemplateId(org.eclipse.winery.model.ids.definitions.PolicyTemplateId) NodeTypeId(org.eclipse.winery.model.ids.definitions.NodeTypeId) OTComplianceRule(org.eclipse.winery.model.tosca.extensions.OTComplianceRule) OTPatternRefinementModel(org.eclipse.winery.model.tosca.extensions.OTPatternRefinementModel)

Example 27 with ServiceTemplateId

use of org.eclipse.winery.model.ids.definitions.ServiceTemplateId in project winery by eclipse.

the class ConsistencyChecker method checkAllDefinitions.

private void checkAllDefinitions(IRepository repository) {
    final Path tempCsar;
    try {
        tempCsar = Files.createTempFile("Export", ".csar");
    } catch (IOException e) {
        LOGGER.debug("Could not create temp CSAR file", e);
        errorCollector.error("Could not create temp CSAR file");
        return;
    }
    float elementsChecked = 0;
    int size = allDefinitionsChildIds.size();
    Map<QName, TDefinitions> allQNameToDefinitionMapping = repository.getAllQNameToDefinitionsMapping();
    for (DefinitionsChildId id : allDefinitionsChildIds) {
        float progress = ++elementsChecked / size;
        if (configuration.getVerbosity().contains(ConsistencyCheckerVerbosity.OUTPUT_CURRENT_TOSCA_COMPONENT_ID)) {
            progressListener.updateProgress(progress, id.toReadableString());
        } else {
            progressListener.updateProgress(progress);
        }
        checkId(id, allQNameToDefinitionMapping);
        checkXmlSchemaValidation(id);
        checkReferencedQNames(id, allQNameToDefinitionMapping);
        checkPropertiesValidation(id);
        if (id instanceof ServiceTemplateId) {
            checkServiceTemplate((ServiceTemplateId) id);
        }
        if (configuration.isCheckDocumentation()) {
            checkDocumentation(id);
        }
        checkPlainConformance(id, tempCsar);
        checkCsar(id, tempCsar, repository);
    }
}
Also used : Path(java.nio.file.Path) DefinitionsChildId(org.eclipse.winery.model.ids.definitions.DefinitionsChildId) QName(javax.xml.namespace.QName) IOException(java.io.IOException) ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId) TDefinitions(org.eclipse.winery.model.tosca.TDefinitions)

Example 28 with ServiceTemplateId

use of org.eclipse.winery.model.ids.definitions.ServiceTemplateId in project winery by eclipse.

the class ConsistencyChecker method checkNamespaceUri.

public void checkNamespaceUri(@NonNull DefinitionsChildId id) {
    Objects.requireNonNull(id);
    String uriStr = id.getNamespace().getDecoded();
    if (!uriStr.trim().equals(uriStr)) {
        printAndAddError(id, "Namespace starts or ends with white spaces");
    }
    URI uri;
    try {
        uri = new URI(uriStr);
    } catch (URISyntaxException e) {
        LOGGER.debug("Invalid URI", e);
        printAndAddError(id, "Invalid URI: " + e.getMessage());
        return;
    }
    if (!uri.isAbsolute()) {
        printAndAddError(id, "URI is relative");
    }
    if ((uriStr.startsWith("http://www.opentosca.org/") && (!uriStr.toLowerCase().equals(uriStr)))) {
        // URI is not lowercase
        // There are some special URIs, which are OK
        String[] splitUri = uriStr.split("/");
        String lastElement = splitUri[splitUri.length - 1];
        String uriStrWithoutLastElement = uriStr.substring(0, (uriStr.length() - lastElement.length()));
        if (!(id.getXmlId().toString().startsWith(lastElement)) || (!uriStrWithoutLastElement.toLowerCase().equals(uriStrWithoutLastElement))) {
            printAndAddError(id, "opentosca URI is not lowercase");
        }
    }
    if (uriStr.endsWith("/")) {
        printAndAddError(id, "URI ends with a slash");
    }
    if (uriStr.contains(ARTEFACT_BE)) {
        printAndAddError(id, "artifact is spelled with i in American English, not artefact as in British English");
    }
    // We could just check OpenTOSCA namespace rule examples. However, this would be too strict
    // Here, the idea is to check whether a string of another (!) id class appers in the namespace
    // If this is the case, the namespace is not consistent
    // For instance, a node type residing in the namespace: http://servicetemplates.example.org should not exist.
    boolean namespaceUriContainsDifferentType = DefinitionsChildId.ALL_TOSCA_COMPONENT_ID_CLASSES.stream().filter(definitionsChildIdClass -> !definitionsChildIdClass.isAssignableFrom(id.getClass())).flatMap(definitionsChildIdClass -> {
        final String lowerCaseIdClass = IdUtil.getTypeForComponentId(definitionsChildIdClass).toLowerCase();
        return Stream.of(lowerCaseIdClass + "s", lowerCaseIdClass + "/");
    }).anyMatch(uriStr::contains);
    if (namespaceUriContainsDifferentType) {
        if ((id instanceof ServiceTemplateId) && (id.getNamespace().getDecoded().contains("compliance"))) {
            // special case, because TComplianceRule models a service template, but Compliance Rules are treated as Service Template during modeling
            // example: class org.eclipse.winery.common.ids.definitions.ServiceTemplateId / {http://www.compliance.opentosca.org/compliancerules}Satisfied_Compliance_Rule_Example_w1
            printAndAddWarning(id, "Cannot perform checks for compliance rules...");
        } else {
            printAndAddError(id, "Namespace URI contains tosca definitions name from other type. E.g., Namespace is ...servicetemplates..., but the type is an artifact template");
        }
    }
}
Also used : HasIdInIdOrNameField(org.eclipse.winery.model.tosca.HasIdInIdOrNameField) IdUtil(org.eclipse.winery.model.ids.IdUtil) URISyntaxException(java.net.URISyntaxException) LoggerFactory(org.slf4j.LoggerFactory) Namespace(org.eclipse.winery.model.ids.Namespace) TServiceTemplate(org.eclipse.winery.model.tosca.TServiceTemplate) Nullable(org.eclipse.jdt.annotation.Nullable) Map(java.util.Map) URI(java.net.URI) Path(java.nio.file.Path) ZipEntry(java.util.zip.ZipEntry) TDefinitions(org.eclipse.winery.model.tosca.TDefinitions) TEntityType(org.eclipse.winery.model.tosca.TEntityType) RepositoryFileReference(org.eclipse.winery.repository.common.RepositoryFileReference) StandardOpenOption(java.nio.file.StandardOpenOption) Set(java.util.Set) TNodeType(org.eclipse.winery.model.tosca.TNodeType) WinerysPropertiesDefinition(org.eclipse.winery.model.tosca.extensions.kvproperties.WinerysPropertiesDefinition) Collectors(java.util.stream.Collectors) Objects(java.util.Objects) List(java.util.List) PropertyDefinitionKV(org.eclipse.winery.model.tosca.extensions.kvproperties.PropertyDefinitionKV) Stream(java.util.stream.Stream) TExtensibleElements(org.eclipse.winery.model.tosca.TExtensibleElements) IRepository(org.eclipse.winery.repository.backend.IRepository) RepositoryCorruptException(org.eclipse.winery.repository.exceptions.RepositoryCorruptException) SAXException(org.xml.sax.SAXException) QName(javax.xml.namespace.QName) NonNull(org.eclipse.jdt.annotation.NonNull) DOMSource(javax.xml.transform.dom.DOMSource) ZipInputStream(java.util.zip.ZipInputStream) StreamSource(javax.xml.transform.stream.StreamSource) ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId) TEntityTemplate(org.eclipse.winery.model.tosca.TEntityTemplate) HashMap(java.util.HashMap) Source(javax.xml.transform.Source) Schema(javax.xml.validation.Schema) ArrayList(java.util.ArrayList) ToscaDocumentBuilderFactory(org.eclipse.winery.common.ToscaDocumentBuilderFactory) BackendUtils(org.eclipse.winery.repository.backend.BackendUtils) DefinitionsChildId(org.eclipse.winery.model.ids.definitions.DefinitionsChildId) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) XMLConstants(javax.xml.XMLConstants) OutputStream(java.io.OutputStream) CsarExporter(org.eclipse.winery.repository.export.CsarExporter) SchemaFactory(javax.xml.validation.SchemaFactory) Logger(org.slf4j.Logger) Files(java.nio.file.Files) IOException(java.io.IOException) Validator(javax.xml.validation.Validator) EntityTemplateId(org.eclipse.winery.model.ids.definitions.EntityTemplateId) Element(org.w3c.dom.Element) DocumentBuilder(javax.xml.parsers.DocumentBuilder) ModelUtilities(org.eclipse.winery.model.tosca.utils.ModelUtilities) Comparator(java.util.Comparator) Collections(java.util.Collections) InputStream(java.io.InputStream) NodeTypeId(org.eclipse.winery.model.ids.definitions.NodeTypeId) URISyntaxException(java.net.URISyntaxException) ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId) URI(java.net.URI)

Example 29 with ServiceTemplateId

use of org.eclipse.winery.model.ids.definitions.ServiceTemplateId in project winery by eclipse.

the class TopologyTemplateResourceTest method farmTopologyTemplateCanBeCreatedAsJson.

@Test
public void farmTopologyTemplateCanBeCreatedAsJson() throws Exception {
    this.setRevisionTo("1e2054315f18e80c466c26e6918d6506ce53f7f7");
    // Quick hack to ensure that the service template containing the topology template exists
    ServiceTemplateId id = new ServiceTemplateId("http://winery.opentosca.org/test/servicetemplates/fruits", "farm", false);
    RepositoryFactory.getRepository().flagAsExisting(id);
    this.assertPut("servicetemplates/http%253A%252F%252Fwinery.opentosca.org%252Ftest%252Fservicetemplates%252Ffruits/farm/topologytemplate/", "servicetemplates/farm_topologytemplate.json");
}
Also used : ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId) Test(org.junit.jupiter.api.Test) AbstractResourceTest(org.eclipse.winery.repository.rest.resources.AbstractResourceTest)

Example 30 with ServiceTemplateId

use of org.eclipse.winery.model.ids.definitions.ServiceTemplateId in project winery by eclipse.

the class RestUtils method getCsarOfSelectedResource.

/**
 * @param options the set of options that are applicable for exporting a csar
 */
public static Response getCsarOfSelectedResource(final AbstractComponentInstanceResource resource, CsarExportOptions options) {
    long start = System.currentTimeMillis();
    final CsarExporter exporter = new CsarExporter(RepositoryFactory.getRepository());
    Map<String, Object> exportConfiguration = new HashMap<>();
    StreamingOutput so = output -> {
        try {
            // check which options are chosen
            if (options.isAddToProvenance()) {
                // We wait for the accountability layer to confirm the transaction
                String result = exporter.writeCsarAndSaveManifestInProvenanceLayer(resource.getId(), output).get();
                LOGGER.debug("Stored state in accountability layer in transaction " + result);
            } else if (options.isIncludeDependencies() && resource.getId() instanceof ServiceTemplateId) {
                SelfContainmentPackager packager = new SelfContainmentPackager(RepositoryFactory.getRepository());
                DefinitionsChildId selfContainedVersion = packager.createSelfContainedVersion(resource.getId());
                exporter.writeSelfContainedCsar(RepositoryFactory.getRepository(), selfContainedVersion, output, exportConfiguration);
            } else {
                exporter.writeCsar(resource.getId(), output, exportConfiguration);
            }
            long duration = (System.currentTimeMillis() - start) / 1000;
            LOGGER.debug("CSAR export lasted {} min {} s", (int) duration / 60, duration % 60);
        } catch (Exception e) {
            LOGGER.error("Error while exporting CSAR", e);
            throw new WebApplicationException(e);
        }
    };
    String contentDisposition = String.format("attachment;filename=\"%s%s\"", resource.getXmlId().getEncoded(), Constants.SUFFIX_CSAR);
    return Response.ok().header("Content-Disposition", contentDisposition).type(MimeTypes.MIMETYPE_ZIP).entity(so).build();
}
Also used : MimeTypes(org.eclipse.winery.common.constants.MimeTypes) FormDataContentDisposition(org.glassfish.jersey.media.multipart.FormDataContentDisposition) FileTime(java.nio.file.attribute.FileTime) HasType(org.eclipse.winery.model.tosca.HasType) CsarExportConfiguration(org.eclipse.winery.repository.export.CsarExportConfiguration) TRelationshipTypeImplementation(org.eclipse.winery.model.tosca.TRelationshipTypeImplementation) WineryVersion(org.eclipse.winery.common.version.WineryVersion) MediaType(javax.ws.rs.core.MediaType) IPersistable(org.eclipse.winery.repository.rest.resources._support.IPersistable) Duration(java.time.Duration) Map(java.util.Map) GenericId(org.eclipse.winery.model.ids.GenericId) QNameApiData(org.eclipse.winery.repository.rest.resources.apiData.QNameApiData) TDefinitions(org.eclipse.winery.model.tosca.TDefinitions) WineryVersionUtils(org.eclipse.winery.repository.backend.WineryVersionUtils) EdmmManager(org.eclipse.winery.edmm.EdmmManager) GitAPIException(org.eclipse.jgit.api.errors.GitAPIException) QNameWithTypeApiData(org.eclipse.winery.repository.rest.resources.apiData.QNameWithTypeApiData) Constants(org.eclipse.winery.common.Constants) Set(java.util.Set) RelationshipTypeId(org.eclipse.winery.model.ids.definitions.RelationshipTypeId) CsarExportOptions(org.eclipse.winery.repository.export.CsarExportOptions) VersionUtils(org.eclipse.winery.common.version.VersionUtils) WebApplicationException(javax.ws.rs.WebApplicationException) LocalNameForAngular(org.eclipse.winery.repository.rest.datatypes.LocalNameForAngular) UriInfo(javax.ws.rs.core.UriInfo) QName(javax.xml.namespace.QName) LocalDateTime(java.time.LocalDateTime) ArrayList(java.util.ArrayList) RelationshipTypeImplementationId(org.eclipse.winery.model.ids.definitions.RelationshipTypeImplementationId) EdmmType(org.eclipse.winery.edmm.model.EdmmType) ArtifactTemplateId(org.eclipse.winery.model.ids.definitions.ArtifactTemplateId) XmlId(org.eclipse.winery.model.ids.XmlId) DefinitionsChildId(org.eclipse.winery.model.ids.definitions.DefinitionsChildId) TNodeTemplate(org.eclipse.winery.model.tosca.TNodeTemplate) ResourceResult(org.eclipse.winery.repository.rest.resources._support.ResourceResult) StringWriter(java.io.StringWriter) IOException(java.io.IOException) Family(javax.ws.rs.core.Response.Status.Family) TArtifactTemplate(org.eclipse.winery.model.tosca.TArtifactTemplate) UiConfigurationObject(org.eclipse.winery.common.configuration.UiConfigurationObject) ModelUtilities(org.eclipse.winery.model.tosca.utils.ModelUtilities) TNodeTypeImplementation(org.eclipse.winery.model.tosca.TNodeTypeImplementation) SortedSet(java.util.SortedSet) Date(java.util.Date) EdmmConverter(org.eclipse.winery.edmm.model.EdmmConverter) LoggerFactory(org.slf4j.LoggerFactory) Namespace(org.eclipse.winery.model.ids.Namespace) ArtifactTemplatesResource(org.eclipse.winery.repository.rest.resources.entitytemplates.artifacttemplates.ArtifactTemplatesResource) ContentDisposition(org.glassfish.jersey.media.multipart.ContentDisposition) NamespaceAndDefinedLocalNamesForAngular(org.eclipse.winery.repository.rest.datatypes.NamespaceAndDefinedLocalNamesForAngular) TServiceTemplate(org.eclipse.winery.model.tosca.TServiceTemplate) SelfContainmentPackager(org.eclipse.winery.repository.backend.selfcontainmentpackager.SelfContainmentPackager) ServiceTemplateResource(org.eclipse.winery.repository.rest.resources.servicetemplates.ServiceTemplateResource) Locale(java.util.Locale) FormDataBodyPart(org.glassfish.jersey.media.multipart.FormDataBodyPart) Util(org.eclipse.winery.repository.common.Util) URI(java.net.URI) QNameConverter(org.eclipse.winery.repository.rest.resources.apiData.converter.QNameConverter) RepositoryFileReference(org.eclipse.winery.repository.common.RepositoryFileReference) Collection(java.util.Collection) StreamingOutput(javax.ws.rs.core.StreamingOutput) TNodeType(org.eclipse.winery.model.tosca.TNodeType) Collectors(java.util.stream.Collectors) JAXBException(javax.xml.bind.JAXBException) RepositoryFactory(org.eclipse.winery.repository.backend.RepositoryFactory) Objects(java.util.Objects) ArtifactTemplateResource(org.eclipse.winery.repository.rest.resources.entitytemplates.artifacttemplates.ArtifactTemplateResource) List(java.util.List) NamespaceAndDefinedLocalNames(org.eclipse.winery.repository.backend.xsd.NamespaceAndDefinedLocalNames) HttpHeaders(javax.ws.rs.core.HttpHeaders) TExtensibleElements(org.eclipse.winery.model.tosca.TExtensibleElements) YamlExporter(org.eclipse.winery.repository.yaml.export.YamlExporter) Response(javax.ws.rs.core.Response) IRepository(org.eclipse.winery.repository.backend.IRepository) AccessControlException(java.security.AccessControlException) MediaTypes(org.eclipse.winery.repository.backend.constants.MediaTypes) Marshaller(javax.xml.bind.Marshaller) ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId) TEntityTemplate(org.eclipse.winery.model.tosca.TEntityTemplate) HashMap(java.util.HashMap) HashSet(java.util.HashSet) ClientBuilder(javax.ws.rs.client.ClientBuilder) TConstraint(org.eclipse.winery.model.tosca.TConstraint) BackendUtils(org.eclipse.winery.repository.backend.BackendUtils) Application(org.eclipse.winery.model.selfservice.Application) NodeTypeImplementationId(org.eclipse.winery.model.ids.definitions.NodeTypeImplementationId) Status(javax.ws.rs.core.Response.Status) JAXBContext(javax.xml.bind.JAXBContext) CsarExporter(org.eclipse.winery.repository.export.CsarExporter) ToscaExportUtil(org.eclipse.winery.repository.export.ToscaExportUtil) Logger(org.slf4j.Logger) Environments(org.eclipse.winery.common.configuration.Environments) AbstractComponentInstanceResource(org.eclipse.winery.repository.rest.resources._support.AbstractComponentInstanceResource) TTag(org.eclipse.winery.model.tosca.TTag) ToscaElementId(org.eclipse.winery.model.ids.elements.ToscaElementId) GitBasedRepository(org.eclipse.winery.repository.backend.filebased.GitBasedRepository) EntityGraph(io.github.edmm.core.parser.EntityGraph) NamespaceManager(org.eclipse.winery.repository.backend.NamespaceManager) TRelationshipType(org.eclipse.winery.model.tosca.TRelationshipType) ComponentId(org.eclipse.winery.repository.rest.datatypes.ComponentId) PolicyTemplateId(org.eclipse.winery.model.ids.definitions.PolicyTemplateId) AbstractComponentsResource(org.eclipse.winery.repository.rest.resources._support.AbstractComponentsResource) InputStream(java.io.InputStream) NodeTypeId(org.eclipse.winery.model.ids.definitions.NodeTypeId) IHasName(org.eclipse.winery.repository.rest.resources._support.IHasName) WebApplicationException(javax.ws.rs.WebApplicationException) HashMap(java.util.HashMap) DefinitionsChildId(org.eclipse.winery.model.ids.definitions.DefinitionsChildId) SelfContainmentPackager(org.eclipse.winery.repository.backend.selfcontainmentpackager.SelfContainmentPackager) StreamingOutput(javax.ws.rs.core.StreamingOutput) ServiceTemplateId(org.eclipse.winery.model.ids.definitions.ServiceTemplateId) GitAPIException(org.eclipse.jgit.api.errors.GitAPIException) WebApplicationException(javax.ws.rs.WebApplicationException) IOException(java.io.IOException) JAXBException(javax.xml.bind.JAXBException) AccessControlException(java.security.AccessControlException) CsarExporter(org.eclipse.winery.repository.export.CsarExporter) UiConfigurationObject(org.eclipse.winery.common.configuration.UiConfigurationObject)

Aggregations

ServiceTemplateId (org.eclipse.winery.model.ids.definitions.ServiceTemplateId)126 Test (org.junit.jupiter.api.Test)73 TServiceTemplate (org.eclipse.winery.model.tosca.TServiceTemplate)44 ArrayList (java.util.ArrayList)41 TTopologyTemplate (org.eclipse.winery.model.tosca.TTopologyTemplate)40 TNodeTemplate (org.eclipse.winery.model.tosca.TNodeTemplate)35 QName (javax.xml.namespace.QName)25 IOException (java.io.IOException)24 IRepository (org.eclipse.winery.repository.backend.IRepository)19 List (java.util.List)17 POST (javax.ws.rs.POST)17 Path (javax.ws.rs.Path)16 Produces (javax.ws.rs.Produces)16 HashMap (java.util.HashMap)15 TopologyWrapper (org.eclipse.winery.repository.targetallocation.util.TopologyWrapper)15 Map (java.util.Map)14 TRelationshipTemplate (org.eclipse.winery.model.tosca.TRelationshipTemplate)14 URI (java.net.URI)13 NodeTypeId (org.eclipse.winery.model.ids.definitions.NodeTypeId)13 TNodeType (org.eclipse.winery.model.tosca.TNodeType)13