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}