/* * [RSSEnd.java] * * Summary: Generate an RSS feed item, both inline HTML and export XML item to file. * * Copyright: (c) 2008-2017 Roedy Green, Canadian Mind Products, http://mindprod.com * * Licence: This software may be copied and used freely for any purpose but military. * http://mindprod.com/contact/nonmil.html * * Requires: JDK 1.8+ * * Created with: JetBrains IntelliJ IDEA IDE http://www.jetbrains.com/idea/ * * Version History: * 1.0 2008-08-01 */ package com.mindprod.htmlmacros.macro; import com.mindprod.htmlmacros.support.RSSBatchExport; import com.mindprod.htmlmacros.support.RSSBatchLog; import static java.lang.System.*; /** * Generate an RSS feed item, both inline HTML and export XML item to file. *

* Suppresses expansion of RSS macros, saving them up to be sorted and later * expanded when RRSEnd macro encountered. * * @author Roedy Green, Canadian Mind Products * @version 1.0 2008-08-01 * @see com.mindprod.htmlmacros.macro.RSS * @see com.mindprod.htmlmacros.macro.RSSBatchExport#expandBatch * @see com.mindprod.htmlmacros.macro.RSSBegin * @since 2008-08-01 */ public final class RSSEnd extends Macro { /** * how to use the RSSEnd macro */ /** * how to use the macro */ private static final String USAGE = "\nRSSEnd macro has no parameters"; /** * * Suppresses expansion of RSS macros, saving them up to be sorted and later * expanded when RRSEnd macro encountered.. *

* * * @param parms five parms as strings * * @param quiet true if want output suppressed. * @param verbose @return expanded macro text */ public String expandMacro( String[] parms, final boolean quiet, final boolean verbose ) { if ( !quiet ) { out.print( "R" ); } if ( parms.length != 0 ) { throw new IllegalArgumentException( USAGE ); } RSSBatchLog.endBatch(); // we need to expandNoRef the batch in the context of the page where the RSSEnd was found, // vis a vis converting webroot relative links to relative ones. return RSSBatchExport.expandBatch( fileBeingProcessed ); } }