    001// Copyright 2011 The Apache Software Foundation
    002//
    003// Licensed under the Apache License, Version 2.0 (the "License");
    004// you may not use this file except in compliance with the License.
    005// You may obtain a copy of the License at
    006//
    007// http://www.apache.org/licenses/LICENSE-2.0
    008//
    009// Unless required by applicable law or agreed to in writing, software
    010// distributed under the License is distributed on an "AS IS" BASIS,
    011// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    012// See the License for the specific language governing permissions and
    013// limitations under the License.
    014
    015package org.apache.tapestry5.services.assets;
    016
    017import org.apache.tapestry5.ioc.Resource;
    018import org.apache.tapestry5.services.javascript.JavaScriptStack;
    019
    020/**
    021 * Defines additional features desired when accessing the content of a {@link Resource} as
    022 * a {@link StreamableResource}.
    023 *
    024 * @see StreamableResourceSource
    025 * @since 5.3
    026 */
    027public enum StreamableResourceProcessing
    028{
    029    /**
    030     * The default behavior when the client supports compression, and an individual (non-aggregated) resources
    031     * is being accessed. The resource may be minimized and both the compressed and uncompressed versions may be cached.
    032     */
    033    COMPRESSION_ENABLED,
    034
    035    /**
    036     * As with {@link #COMPRESSION_ENABLED}, but the final compression stage (and compression cache) is skipped. This is
    037     * appropriate
    038     * for individual resources where the client does not support compression.
    039     */
    040    COMPRESSION_DISABLED,
    041
    042    /**
    043     * Turns off all caching and minification of the resource, which is appropriate when the individual resource will be
    044     * aggregated with other resources to form a virtual composite.
    045     *
    046     * @see JavaScriptStack
    047     */
    048    FOR_AGGREGATION
    049}