001/*license*\
002   Codelet: Copyright (C) 2014, Jeff Epstein (aliteralmind __DASH__ github __AT__ yahoo __DOT__ com)
003
004   This software is dual-licensed under the:
005   - Lesser General Public License (LGPL) version 3.0 or, at your option, any later version;
006   - Apache Software License (ASL) version 2.0.
007
008   Either license may be applied at your discretion. More information may be found at
009   - http://en.wikipedia.org/wiki/Multi-licensing.
010
011   The text of both licenses is available in the root directory of this project, under the names "LICENSE_lgpl-3.0.txt" and "LICENSE_asl-2.0.txt". The latest copies may be downloaded at:
012   - LGPL 3.0: https://www.gnu.org/licenses/lgpl-3.0.txt
013   - ASL 2.0: http://www.apache.org/licenses/LICENSE-2.0.txt
014\*license*/
015package  com.github.aliteralmind.codelet.alter;
016   import  com.github.xbn.linefilter.alter.TextLineAlterer;
017   import  java.util.LinkedHashMap;
018/**
019   <p>Defines alterers used by all pre-built customizers, which are also accessible in custom customizers. The fully-qualified class name of your implementation is specified in the {@link com.github.aliteralmind.codelet.CodeletBaseConfig#DEFAULT_ALTERERS_CLASS_NAME default_alterers_class_name} configuration variable.</p>
020
021   <p><b>Implementation requirements:</b><ul>
022      <li>All functions must return a non-{@code null} map, where no key is {@code null} or empty, and no value is {@code null}.</li>
023      <li>There must be a no-parameter constructor.</li>
024   </ul>
025
026   <p>Alterations are made in the same order as they are returned by the iterator. When used by {@linkplain com.github.aliteralmind.codelet.BasicCustomizers pre-built customizers}, these default alterations take place after all others (they are added to the end of the {@linkplain com.github.aliteralmind.codelet.CustomizationInstructions#orderedAlterers(Appendable, NullElement, ExpirableElements, MultiAlterType, TextLineAlterer...) alter-array}).</p>
027
028   <p>It is strongly recommended that at least the {@linkplain com.github.xbn.linefilter.alter.NewTextLineAltererFor#escapeHtml() escape html alterer} be returned by all {@code getFor} functions. This is in fact the only alterer returned by all functions in {@link DefaultDefaultAlterGetter}.</p>
029
030 * @since  0.1.0
031 * @author  Copyright (C) 2014, Jeff Epstein ({@code aliteralmind __DASH__ github __AT__ yahoo __DOT__ com}), dual-licensed under the LGPL (version 3.0 or later) or the ASL (version 2.0). See source code for details. <a href="http://codelet.aliteralmind.com">{@code http://codelet.aliteralmind.com}</a>, <a href="https://github.com/aliteralmind/codelet">{@code https://github.com/aliteralmind/codelet}</a>
032 **/
033public interface DefaultAlterGetter  {
034   /**
035        <p>Default alterers for (source-code) {@link com.github.aliteralmind.codelet.CodeletType#SOURCE_CODE {@.codelet}} taglets, when {@linkplain DefaultAlterGetter configured}.</p>
036
037        <p>This is also used by {@code {@.codelet.and.out}} taglets.</p>
038
039    * @return  A non-{@code null} map, where no key is {@code null} or empty, and no value is {@code null}. Each value <i>should</i> be unique.
040        @see  #getForCodeletDotOut()
041        @see  #getForFileTextlet()
042    **/
043   LinkedHashMap<String,TextLineAlterer> getForSourceCodelet();
044   /**
045      <p>Default alterers for {@link com.github.aliteralmind.codelet.CodeletType#CONSOLE_OUT {@.codelet.out}} taglets, when {@linkplain DefaultAlterGetter configured}.</p>
046
047        <p>This is also used by {@code {@.codelet.and.out}} taglets.</p>
048
049    * @return  A non-{@code null} map, where no key is {@code null} or empty, and no value is {@code null}. Each value <i>should</i> be unique.
050    * @see  #getForSourceCodelet()
051    */
052   LinkedHashMap<String,TextLineAlterer> getForCodeletDotOut();
053   /*
054      <p>Default alterers for {@link com.github.aliteralmind.codelet.CodeletType#SOURCE_AND_OUT {@.codelet.and.out}} taglets, when {@linkplain DefaultAlterGetter configured}.</p>
055
056    * @return  A non-{@code null} map, where no key is {@code null} or empty, and no value is {@code null}. Each value <i>should</i> be unique.
057    * @see  #getForSourceCodelet()
058   LinkedHashMap<String,TextLineAlterer> getForCodeletAndOut();
059    */
060   /**
061      <p>Default alterers for {@link com.github.aliteralmind.codelet.CodeletType#FILE_TEXT {@.file.textlet}} taglets, when {@linkplain DefaultAlterGetter configured}.</p>
062
063    * @return  A non-{@code null} map, where no key is {@code null} or empty, and no value is {@code null}. Each value <i>should</i> be unique.
064    * @see  #getForSourceCodelet()
065    */
066   LinkedHashMap<String,TextLineAlterer> getForFileTextlet();
067}