use of org.eclipse.winery.repository.rest.resources._support.GenericFileResource in project winery by eclipse.
the class NodeTypeResource method uploadArtifact.
@Path("artifacts/{name}")
public GenericFileResource uploadArtifact(@PathParam("name") String name) {
DirectoryId dir = new GenericDirectoryId(this.getId(), IdNames.FILES_DIRECTORY);
DirectoryId files = new GenericDirectoryId(dir, name);
return new GenericFileResource(files);
}
use of org.eclipse.winery.repository.rest.resources._support.GenericFileResource in project winery by eclipse.
the class NodeTemplateResource method postYamlArtifactFile.
@Path("yamlartifacts/{artifactId}")
public GenericFileResource postYamlArtifactFile(@PathParam("artifactId") String id) {
DirectoryId serviceTemplateYamlArtifactsDir = new GenericDirectoryId(getServiceTemplateResource().getId(), IdNames.FILES_DIRECTORY);
DirectoryId nodeTemplateYamlArtifactsDir = new GenericDirectoryId(serviceTemplateYamlArtifactsDir, nodeTemplate.getId());
DirectoryId yamlArtifactFilesDirectoryId = new GenericDirectoryId(nodeTemplateYamlArtifactsDir, id);
return new GenericFileResource(yamlArtifactFilesDirectoryId);
}
Aggregations