blob: 4110a4ca0349b07cfae89b57534554d3541c73f0 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* 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:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*/
package org.eclipse.osbp.ui.api.themes;
import java.io.InputStream;
import com.vaadin.server.Resource;
public interface IThemeResourceService {
/** all available theme resource types */
static public enum ThemeResourceType {
/** any "big" images like background images */
IMAGE,
/** any "small" icons, mostly 16x16 px */
ICON,
/** flag icon, mostly 16x16 px */
FLAG,
}
/**
* Resets the base paths of the theme resource
*/
void reset();
/**
* @param themeResourceType
* @return the file extension defined for the theme resource type
*/
String getThemeResourceTypeExtension(ThemeResourceType themeResourceType);
/**
* @param themeResourceType
* @return the path defined for the theme resource type
*/
String getThemeResourceTypePath(ThemeResourceType themeResourceType);
/**
* @param resourceID
* @param themeResourceType
* @return the full qualified uri for the resource id of the theme resource type
*/
String getThemeURI(String resourceID, ThemeResourceType themeResourceType);
/**
* @param resourceID
* @param themeResourceType
* @return the resource for the resource id of the theme resource type
*/
Resource getThemeResource(String resourceID, ThemeResourceType themeResourceType);
/**
* Gets the theme resource input stream.
*
* @param resourceURL the resource URL
* @return the theme resource input stream
*/
InputStream getThemeResourceInputStream(String resourceURL);
}