Class TextsProvider
- java.lang.Object
-
- net.sourceforge.jnlp.util.docprovider.TextsProvider
-
- Direct Known Subclasses:
IcedTeaWebTextsProvider,ItwebPluginTextProvider,ItwebSettingsTextsProvider,JavaWsTextsProvider,PolicyEditorTextsProvider
public abstract class TextsProvider extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringauthorLineImplprivate static java.lang.StringauthorsLineprivate static intBUF_SIZEstatic java.lang.StringDISTRO_PKGprivate java.nio.charset.Charsetencodingprotected booleanexpandVariablesprivate booleanforceTitlesprivate Formatterformatterprivate static java.lang.StringIT_BASEstatic java.lang.StringIT_MAINprivate static java.lang.StringIT_NEW_HOMEstatic java.lang.StringIT_QUICKstatic java.lang.StringITWstatic java.lang.StringITW_BUGSstatic java.lang.StringITW_BUGZILLAHOMEstatic java.lang.StringITW_EASstatic java.lang.StringITW_ECLIPSEstatic java.lang.StringITW_HOMEstatic java.lang.StringITW_ISSUESstatic java.lang.StringITW_PLUGINstatic java.lang.StringITW_PLUGIN_URLprivate static java.lang.StringITW_REPOstatic java.lang.StringITW_REPRODUCERSstatic java.lang.StringITW_STYLEprivate static java.lang.Stringlogo_nameprivate static java.lang.Stringlogo_urlprivate booleanpreparedprivate booleanseeAlso
-
Constructor Summary
Constructors Constructor Description TextsProvider(java.nio.charset.Charset encoding, Formatter formatter, boolean forceTitles, boolean expandFiles)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private static longcopy(java.io.InputStream from, java.io.OutputStream to)private static voidgenerateAll(java.io.File f, boolean expand)private java.lang.StringgenerateAuthorsSection(java.lang.String authors)private static voidgenerateHtmlTexts(java.io.File dir, boolean includeXmlHeader, boolean expand)private static voidgenerateHtmlTexts(java.io.File dir, boolean allowContext, boolean allowLogo, boolean includeXmlHeader, boolean titles, boolean expand)private static voidgenerateHtmlTextsUtf8(java.io.File dir, boolean includeXmlHeader, boolean expand)private static voidgenerateItwIntro(java.io.File f, boolean expand)private static voidgenerateManText(java.nio.charset.Charset encoding, java.io.File dir, boolean expand)private static voidgenerateManText(java.nio.charset.Charset encoding, java.io.File dir, boolean titles, boolean expand)private static voidgenerateOnlineHtmlHelp(java.io.File f, boolean expand)private static voidgeneratePlainTextDocs(java.io.File dir, int lineWidth, boolean expand)private static voidgeneratePlainTextDocs(java.nio.charset.Charset encoding, java.io.File dir, int lineWidth, boolean expand)static voidgenerateRuntimeHtmlTexts(java.io.File f)private java.lang.StringgetAuthors()private java.lang.StringgetBugs()java.lang.StringgetCommands()java.lang.StringgetDescription()private java.nio.charset.CharsetgetEncoding()java.lang.StringgetExamples()java.lang.StringgetFiles()protected java.lang.StringgetFiles(java.util.List<InfrastructureFileDescriptor> files)protected java.lang.StringgetFilesAppendix()FormattergetFormatter()private java.lang.StringgetHeader()abstract java.lang.StringgetId()java.lang.StringgetIntroduction()java.lang.StringgetOptions()private java.lang.StringgetSeeAlso()java.lang.StringgetSynopsis()private java.lang.StringgetTail()private booleanisSeeAlso()static voidmain(java.lang.String[] args)protected booleanmatchStringsValueWithInfrastructureFile(Setting entry, InfrastructureFileDescriptor f)protected java.lang.StringoptionsToString(java.util.List<CommandLineOptions> opts)TextsProviderprepare()(package private) java.lang.StringreadAuthors(java.lang.String authors)(package private) java.lang.StringreadAuthorsImpl(java.lang.String authors)private java.lang.StringremoveFileProtocol(java.lang.String s)private voidsetAuthorFilePath(java.lang.String authorFilePath)voidsetSeeAlso(boolean seeAlso)private voidwriteToDir(java.io.File dir)voidwriteToFile(java.io.File f)private voidwriteToStream(java.io.OutputStream os)java.lang.StringwriteToString()private java.lang.StringwriteToStringReal()private voidwriteToWriter(java.io.Writer w)
-
-
-
Field Detail
-
authorsLine
private static java.lang.String authorsLine
-
encoding
private final java.nio.charset.Charset encoding
-
formatter
private final Formatter formatter
-
forceTitles
private final boolean forceTitles
-
expandVariables
protected final boolean expandVariables
-
prepared
private boolean prepared
-
authorLineImpl
private java.lang.String authorLineImpl
-
seeAlso
private boolean seeAlso
-
IT_NEW_HOME
private static final java.lang.String IT_NEW_HOME
- See Also:
- Constant Field Values
-
IT_BASE
private static final java.lang.String IT_BASE
- See Also:
- Constant Field Values
-
ITW_HOME
public static final java.lang.String ITW_HOME
- See Also:
- Constant Field Values
-
ITW_EAS
public static final java.lang.String ITW_EAS
- See Also:
- Constant Field Values
-
ITW_STYLE
public static final java.lang.String ITW_STYLE
- See Also:
- Constant Field Values
-
ITW_ECLIPSE
public static final java.lang.String ITW_ECLIPSE
- See Also:
- Constant Field Values
-
ITW_REPO
private static final java.lang.String ITW_REPO
- See Also:
- Constant Field Values
-
ITW
public static final java.lang.String ITW
- See Also:
- Constant Field Values
-
ITW_PLUGIN
public static final java.lang.String ITW_PLUGIN
- See Also:
- Constant Field Values
-
DISTRO_PKG
public static final java.lang.String DISTRO_PKG
- See Also:
- Constant Field Values
-
IT_MAIN
public static final java.lang.String IT_MAIN
- See Also:
- Constant Field Values
-
IT_QUICK
public static final java.lang.String IT_QUICK
- See Also:
- Constant Field Values
-
ITW_ISSUES
public static final java.lang.String ITW_ISSUES
- See Also:
- Constant Field Values
-
ITW_REPRODUCERS
public static final java.lang.String ITW_REPRODUCERS
- See Also:
- Constant Field Values
-
ITW_BUGS
public static final java.lang.String ITW_BUGS
- See Also:
- Constant Field Values
-
ITW_PLUGIN_URL
public static final java.lang.String ITW_PLUGIN_URL
- See Also:
- Constant Field Values
-
ITW_BUGZILLAHOME
public static final java.lang.String ITW_BUGZILLAHOME
- See Also:
- Constant Field Values
-
logo_name
private static final java.lang.String logo_name
- See Also:
- Constant Field Values
-
logo_url
private static final java.lang.String logo_url
- See Also:
- Constant Field Values
-
BUF_SIZE
private static final int BUF_SIZE
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TextsProvider
public TextsProvider(java.nio.charset.Charset encoding, Formatter formatter, boolean forceTitles, boolean expandFiles)
-
-
Method Detail
-
getId
public abstract java.lang.String getId()
-
getHeader
private java.lang.String getHeader()
-
getTail
private java.lang.String getTail()
-
getIntroduction
public java.lang.String getIntroduction()
-
getSynopsis
public java.lang.String getSynopsis()
-
getDescription
public java.lang.String getDescription()
-
getOptions
public java.lang.String getOptions()
-
getCommands
public java.lang.String getCommands()
-
getExamples
public java.lang.String getExamples()
-
getFiles
public java.lang.String getFiles()
-
getFilesAppendix
protected java.lang.String getFilesAppendix()
-
getFiles
protected java.lang.String getFiles(java.util.List<InfrastructureFileDescriptor> files)
-
matchStringsValueWithInfrastructureFile
protected boolean matchStringsValueWithInfrastructureFile(Setting entry, InfrastructureFileDescriptor f)
-
getFormatter
public Formatter getFormatter()
-
getEncoding
private java.nio.charset.Charset getEncoding()
-
optionsToString
protected java.lang.String optionsToString(java.util.List<CommandLineOptions> opts)
-
getBugs
private java.lang.String getBugs()
-
getAuthors
private java.lang.String getAuthors()
-
getSeeAlso
private java.lang.String getSeeAlso()
-
prepare
public TextsProvider prepare()
-
writeToString
public java.lang.String writeToString()
-
writeToStringReal
private java.lang.String writeToStringReal()
-
writeToWriter
private void writeToWriter(java.io.Writer w) throws java.io.IOException- Throws:
java.io.IOException
-
writeToStream
private void writeToStream(java.io.OutputStream os) throws java.io.IOException- Throws:
java.io.IOException
-
writeToFile
public void writeToFile(java.io.File f) throws java.io.IOException- Throws:
java.io.IOException
-
writeToDir
private void writeToDir(java.io.File dir) throws java.io.IOException- Throws:
java.io.IOException
-
main
public static void main(java.lang.String[] args) throws java.io.IOException- Throws:
java.io.IOException
-
generateItwIntro
private static void generateItwIntro(java.io.File f, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
generateAll
private static void generateAll(java.io.File f, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
generateRuntimeHtmlTexts
public static void generateRuntimeHtmlTexts(java.io.File f) throws java.io.IOException- Throws:
java.io.IOException
-
generateOnlineHtmlHelp
private static void generateOnlineHtmlHelp(java.io.File f, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
generateHtmlTexts
private static void generateHtmlTexts(java.io.File dir, boolean includeXmlHeader, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
generateHtmlTextsUtf8
private static void generateHtmlTextsUtf8(java.io.File dir, boolean includeXmlHeader, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
generateHtmlTexts
private static void generateHtmlTexts(java.io.File dir, boolean allowContext, boolean allowLogo, boolean includeXmlHeader, boolean titles, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
generateManText
private static void generateManText(java.nio.charset.Charset encoding, java.io.File dir, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
generateManText
private static void generateManText(java.nio.charset.Charset encoding, java.io.File dir, boolean titles, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
generatePlainTextDocs
private static void generatePlainTextDocs(java.io.File dir, int lineWidth, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
generatePlainTextDocs
private static void generatePlainTextDocs(java.nio.charset.Charset encoding, java.io.File dir, int lineWidth, boolean expand) throws java.io.IOException- Throws:
java.io.IOException
-
copy
private static long copy(java.io.InputStream from, java.io.OutputStream to) throws java.io.IOException- Throws:
java.io.IOException
-
setAuthorFilePath
private void setAuthorFilePath(java.lang.String authorFilePath)
-
isSeeAlso
private boolean isSeeAlso()
- Returns:
- the seeAlso
-
setSeeAlso
public void setSeeAlso(boolean seeAlso)
- Parameters:
seeAlso- the seeAlso to set
-
removeFileProtocol
private java.lang.String removeFileProtocol(java.lang.String s)
-
readAuthors
java.lang.String readAuthors(java.lang.String authors)
-
readAuthorsImpl
java.lang.String readAuthorsImpl(java.lang.String authors) throws java.io.IOException- Throws:
java.io.IOException
-
generateAuthorsSection
private java.lang.String generateAuthorsSection(java.lang.String authors)
-
-