blob: 328492237f287f04c910255c975ff815d1762a57 [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 org.eclipse.equinox.app.IApplicationContext;
import com.vaadin.server.Resource;
public interface IThemeResourceService {
/** The id. */
public static String ID = IThemeResourceService.class.getName();
/** 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,
/** html resource */
HTML
}
/**
* Inits the themeResourceService
*
* @param appContext the app context
* @param themeEngine the theme engine
*/
void init(IApplicationContext appContext, Object themeEngine);
/**
* 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);
}