public final class NameUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Pattern |
DOCUMENT_FILE_PATTERN
Deprecated.
since 3.0.0
Valid names:
Invalid names:
|
| Modifier and Type | Method and Description |
|---|---|
protected static String |
capitalize(String docName)
Capitalize initial letters in a document name.
|
static Set<String> |
getDocumentNames(File srcDir,
String docFile)
Returns names of directories that mirror the document names and contain
DocBook XML documents to build.
|
static String |
renameDoc(String projectName,
String docName,
String extension)
Rename document to reflect project and document name.
|
static String |
renameDoc(String projectName,
String docName,
String version,
String extension)
Rename document to reflect project and document name.
|
static void |
renameDocument(File builtDocument,
String docName,
String projectName)
Rename a single built document.
|
protected static String |
spacesToHyphens(String string)
Replace spaces with hyphens.
|
@Deprecated public static final Pattern DOCUMENT_FILE_PATTERN
Valid names:
Invalid names:
public static String renameDoc(String projectName, String docName, String extension)
projectName - Short name of the project, such as OpenAM, OpenDJ, OpenIDMdocName - Short name for the document, such as admin-guide,
release-notes, referenceextension - File name extension not including dot, e.g. pdfpublic static String renameDoc(String projectName, String docName, String version, String extension)
projectName - Short name of the project, such as OpenAM, OpenDJ, OpenIDMdocName - Short name for the document, such as admin-guide,
release-notes, referenceversion - Document version such as 10.0.0, 2.5.0, 2.0.2extension - File name extension not including dot, e.g. pdfprotected static String capitalize(String docName)
docName - Name of the document such as reference or admin-guideprotected static String spacesToHyphens(String string)
string - String in which to replace spaces with hyphenspublic static Set<String> getDocumentNames(File srcDir, String docFile)
srcDir - Directory containing DocBook XML sources. Document directories
like admin-guide or reference are one level below this
directory.docFile - Name of a file common to all documents to build, such as
index.xml.public static void renameDocument(File builtDocument, String docName, String projectName) throws IOException
index.pdf to OpenAM-Admin-Guide.pdf.builtDocument - File to rename, such as index.pdf.docName - Simple document name such as admin-guide.projectName - Project name, such as OpenAM.IOException - Something went wrong renaming the file.Copyright © 2025 Open Identity Platform Community. All rights reserved.