// Copyright 2011 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

package org.apache.tapestry5.services.javascript;

import org.apache.tapestry5.ioc.services.SymbolSource;
import org.apache.tapestry5.services.AssetSource;

/**
 * Defines the types of extensions to a JavaScript stack that can be contributed to an extensible JavaScript stack.
 * 
 * @since 5.3
 * @see StackExtension
 * @see ExtensibleJavaScriptStack
 */
public enum StackExtensionType
{
    /**
     * A JavaScript library. The extension value will be converted using {@link AssetSource#getExpandedAsset(String)},
     * meaning that {@linkplain SymbolSource symbols} will be expanded.
     */
    LIBRARY,

    /**
     * A stylesheet. The extension value will be converted using {@link AssetSource#getExpandedAsset(String)},
     * meaning that {@linkplain SymbolSource symbols} will be expanded.
     */
    STYLESHEET,

    /** Extra JavaScript initialization (rarely used). No symbol expansion takes place. */
    INITIALIZATION;
}

@@ -10,16 +10,22 @@
 ght 2011
+, 2012
  The Apa
@@ -886,23 +886,8 @@
 .%0A *
- %0A * @since 5.3
 %0A * 
@@ -940,16 +940,30 @@
 ptStack%0A
+ * @since 5.3%0A
  */%0Apubl
@@ -1182,32 +1182,215 @@
 ll be expanded.%0A
+     *%0A     * @see JavaScriptSupport#importJavaScriptLibrary(org.apache.tapestry5.Asset)%0A     * @see org.apache.tapestry5.services.javascript.JavaScriptStack#getJavaScriptLibraries()%0A
      */%0A    LIBR
@@ -1582,24 +1582,192 @@
 e expanded.%0A
+     *%0A     * @see JavaScriptSupport#importStylesheet(org.apache.tapestry5.Asset)%0A     * @see org.apache.tapestry5.services.javascript.JavaScriptStack#getStylesheets()%0A
      */%0A    
@@ -1786,16 +1786,23 @@
 %0A    /**
+%0A     *
  Extra J
@@ -1873,16 +1873,279 @@
 s place.
+%0A     *%0A     * @see JavaScriptSupport#addScript(String, Object...)%0A     * @see org.apache.tapestry5.services.javascript.JavaScriptStack#getInitialization()%0A     * @deprecated Deprecated in 5.4 with no replacement; initialization may be removed in the future.%0A    
  */%0A    

Update documentation, and deprecate one option