1 /*******************************************************************************
2 * Copyright (c) 2012-2013 University of Stuttgart.
3 * All rights reserved. This program and the accompanying materials
4 * are made available under the terms of the Eclipse Public License v1.0
5 * and the Apache License 2.0 which both accompany this distribution,
6 * and are available at http://www.eclipse.org/legal/epl-v10.html
7 * and http://www.apache.org/licenses/LICENSE-2.0
10 * Oliver Kopp - initial API and implementation
11 *******************************************************************************/
12 package org.eclipse.winery.repository.resources;
14 import javax.ws.rs.core.Response;
16 import org.eclipse.winery.model.tosca.Definitions;
17 import org.eclipse.winery.common.ids.definitions.TOSCAComponentId;
19 public abstract class AbstractComponentInstanceWithReferencesResource extends AbstractComponentInstanceResource {
21 public AbstractComponentInstanceWithReferencesResource(TOSCAComponentId id) {
26 * Ensures that the presented XML is in line with the stored files
29 public Response getXML() {
30 this.synchronizeReferences();
31 return super.getXML();
35 public String getDefinitionsAsXMLString() {
36 this.synchronizeReferences();
37 return super.getDefinitionsAsXMLString();
41 public Definitions getDefinitions() {
42 this.synchronizeReferences();
43 return super.getDefinitions();
47 * Synchronizes the artifact references with the files stored in the
50 public abstract void synchronizeReferences();