/* * [RFE.java] * * Summary: Generate a reference to a bug in the Oracle RFE database. * * Copyright: (c) 2009-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.8 2009-02-06 include go package in ZIP bundle. * 1.9 2014-04-13 allowed for alphanumeric ids. */ package com.mindprod.htmlmacros.macro; import com.mindprod.fastcat.FastCat; import static java.lang.System.*; /** * Generate a reference to a bug in the Oracle RFE database. * * @author Roedy Green, Canadian Mind Products * @version 1.9 2014-04-13 allowed for alphanumeric ids. * @see Bug * @since 2009 */ public final class RFE extends Macro { /** * how to use the macro */ private static final String USAGE = "\nRFE macro needs rfeID description"; /** * guts to Generate reference to a Oracle RFE request. * * @param refID usually 7 digits. * @param description description of the enhancement request * * @return expanded to reference Oracle rfe database */ private static String expand( final String refID, final String description ) { final FastCat sb = new FastCat( 8 ); sb.append( "\n
Oracle RFE number ", refID, " : ", description, "
\n" ); return sb.toString(); } /** * typical use: * * @param parms number and description * @param quiet true if want output suppressed. * @param verbose @return expanded macro HTML */ public String expandMacro( final String[] parms, final boolean quiet, final boolean verbose ) { if ( !quiet ) { out.print( "R" ); } if ( parms.length != 2 ) { throw new IllegalArgumentException( USAGE ); } final String refID = parms[ 0 ]; final String description = parms[ 1 ]; return expand( refID, description ); } }