001/*
002 * (C) Copyright 2015 Nuxeo SA (http://nuxeo.com/) and contributors.
003 *
004 * All rights reserved. This program and the accompanying materials
005 * are made available under the terms of the GNU Lesser General Public License
006 * (LGPL) version 2.1 which accompanies this distribution, and is available at
007 * http://www.gnu.org/licenses/lgpl-2.1.html
008 *
009 * This library is distributed in the hope that it will be useful,
010 * but WITHOUT ANY WARRANTY; without even the implied warranty of
011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012 * Lesser General Public License for more details.
013 *
014 * Contributors:
015 *     Anahide Tchertchian
016 */
017
018package org.nuxeo.ecm.web.resources.api;
019
020import java.io.Serializable;
021import java.util.List;
022
023/**
024 * Typed Web resource (js, css, bundle).
025 *
026 * @since 7.3
027 */
028public interface Resource extends Serializable {
029
030    /**
031     * Marker for Nuxeo web resources, used by URI locators.
032     */
033    public static final String PREFIX = "nuxeo:";
034
035    String getName();
036
037    String getType();
038
039    String getPath();
040
041    String getURI();
042
043    /**
044     * Names of the resource dependencies.
045     */
046    List<String> getDependencies();
047
048    /**
049     * Names of the resource processors, hooking features like flavor replacement on the resource.
050     */
051    List<String> getProcessors();
052
053    /**
054     * Returns true if resource can be minimized.
055     * <p>
056     * Returns true by default if not specified.
057     */
058    boolean isShrinkable();
059
060}