/** * Copyright (c) 2014 Data In Motion and others. * All rights reserved. * * This program and the accompanying materials are made available under the terms of the * Eclipse Public License v1.0 which accompanies this distribution, and is available at * http://www.eclipse.org/legal/epl-v10.html * * Contributors: * Data In Motion - initial API and implementation */ package org.gecko.util.uriprovider; /** * Interface for providing location URI. Beneath the known schemes, there are additional supported schemes: *
  • EWS - Eclipse workspace
  • *
  • TMP - OS temp folder
  • *
    * To define an Eclipse workspace location provider, the following properties are necessary: *
  • ID =
  • *
  • SCHEME = SCHEME_EWS
  • *
  • PROJECT =
  • *
  • PATH = (optional)
  • *
  • FILE = (optional)
  • *
  • CONTEXT = (optional)
  • *
    * The DISPOSE feature is not supported here. *
    * To define a temp location provider, the following properties are necessary: *
  • ID =
  • *
  • SCHEME = SCHEME_TMP
  • *
  • PATH = (optional)
  • *
  • FILE = (optional)
  • *
  • DISPOSE = (optional default=FALSE)
  • *
  • CONTEXT = (optional)
  • *
    * To define a file location provider, the following properties are necessary: *
  • ID =
  • *
  • SCHEME = SCHEME_FILE
  • *
  • LOCATION =
  • *
  • PATH = (optional)
  • *
  • FILE = (optional)
  • *
  • DISPOSE = (optional default=FALSE)
  • *
  • CONTEXT = (optional)
  • *
    * To define a mongo location provider, the following properties are necessary: *
  • ID =
  • *
  • SCHEME = "MONGODB"
  • *
  • LOCATION =
  • *
  • PATH =
  • *
  • CONTEXT = (optional)
  • *
  • user = (optional)
  • *
  • pwd = (optional)
  • * @author Mark Hoffmann * @since 01.09.2014 */ public interface LocationUriProvider { /* Scheme for Eclipse workspace locations */ public static final String SCHEME_EWS = "ews"; /* Scheme for temp folder locations */ public static final String SCHEME_TMP = "tmp"; /* Scheme for file locations */ public static final String SCHEME_FILE = "file"; public static final String ID = "id"; public static final String SCHEME = "scheme"; public static final String BASE_LOCATION = "location"; public static final String PATH = "path"; public static final String CONTEXT = "context"; /* Only used when scheme is EWS */ public static final String PROJECT = "project"; /* Optional to define a file */ public static final String FILE = "file"; /* * Setting this property as Boolean value, indicates to cleanup the files and folders on component de-activation. * This property is not supported for all implementations. */ public static final String DISPOSE = "dispose"; /** * Returns the location id * @return the location id */ public String getId(); /** * Returns the location URI as {@link String} * @return the location URI as {@link String} */ public String getLocationUri(); }