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.backend;
14 import java.util.Date;
16 import org.apache.commons.configuration.Configuration;
17 import org.eclipse.winery.common.RepositoryFileReference;
18 import org.eclipse.winery.common.ids.GenericId;
21 * Provides interface to the backend.
23 * Currently a file-based backend is implemented. In the future, a git-based or
24 * a database-based backend is possible.
26 * The properties are managed by org.apache.commons.configuration. In case a new
27 * backend is added, the appropriate implementation of
28 * org.apache.commons.configuration.AbstrctConfiguration has to be chosen.
31 public interface IRepository extends IGenericRepository {
34 * Returns the configuration of the specified id
36 * If the associated TOSCA element does not exist, an empty configuration is
37 * returned. That means, the associated TOSCA element is created (SIDE
40 * The returned configuration ensures that autoSave is activated
42 * @param id may be a reference to a TOSCAcomponent or to a nested
44 * @return a Configuration, where isAutoSave == true
46 Configuration getConfiguration(GenericId id);
49 * Enables resources to define additional properties. Currently used for
52 * Currently, more a quick hack. A generic TagsManager should be introduced
53 * to enable auto completion of tag names
55 * If the associated TOSCA element does not exist, an empty configuration is
56 * returned. That means, the associated TOSCA element is created (SIDE
59 Configuration getConfiguration(RepositoryFileReference ref);
63 * @return the last change date of the configuration belonging to the given
64 * id. NULL if the associated TOSCA element does not exist.
66 Date getConfigurationLastUpdate(GenericId id);