Class DocFileManager
java.lang.Object
org.hibernate.tool.internal.export.doc.DocFileManager
Class used to manage the files created during the documentation generation
process. This manager is needed to manage references between files.
- Author:
- Ricardo C. Moral, Amit Bhayani
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic voidcopy(ClassLoader loader, String fileName, File to) Copy a File.Returns the DocFile responsible for generating allclasses.htmlReturns the DocFile responsible for generating allpackages.htmlReturn the all schemas DocFile.Return the all tables DocFile.Returns the DocFolder for the helper files.Returns the class index DocFileReturns the summary index DocFileReturns the DocFile for the CSS definitions.Returns the DocFile responsible to generate the .html for each classes.Get the DocFile corresponding to POJOClass.Returns the DocFile for the extends Image.Returns the DocFile for the Hibernate Image.Returns the DocFile for the main index.getPackageEntityListDocFile(String packageName) Returns the DocFile responsible to generate classes.html corresponding to packageName passedgetPackageSummaryDocFile(String packageName) get DocFile responsible to generate summary.html for corresponding packageName passedReturn the relative reference between the specified files.getSchemaSummaryDocFile(String schemaName) Return the summary DocFile for the specified schema FQN.getSchemaTableListDocFile(String schemaName) Return the Table List DocFile for the specified schema FQN.getTableDocFile(org.hibernate.mapping.Table table) Return the DocFile for the specified Table.Return the table index DocFile.Return the table summary DocFile.
-
Constructor Details
-
DocFileManager
Constructor.- Parameters:
docHelper- the doc helper.pRootFolder- the root folder for the documentation.
-
-
Method Details
-
getRootDocFolder
-
getAssetsDocFolder
Returns the DocFolder for the helper files.- Returns:
- the value.
-
getCssStylesDocFile
Returns the DocFile for the CSS definitions.- Returns:
- the value.
-
getHibernateImageDocFile
Returns the DocFile for the Hibernate Image.- Returns:
- the value.
-
getExtendsImageDocFile
Returns the DocFile for the extends Image.- Returns:
- the value.
-
getMainIndexDocFile
Returns the DocFile for the main index.- Returns:
- the value.
-
getTableIndexDocFile
Return the table index DocFile.- Returns:
- the table index DocFile.
-
getClassIndexDocFile
Returns the class index DocFile- Returns:
- class index DocFile
-
getClassSummaryFile
Returns the summary index DocFile- Returns:
- summary index DocFile
-
getAllPackagesDocFile
Returns the DocFile responsible for generating allpackages.html- Returns:
- DocFile
-
getAllEntitiesDocFile
Returns the DocFile responsible for generating allclasses.html- Returns:
-
getPackageEntityListDocFile
Returns the DocFile responsible to generate classes.html corresponding to packageName passed- Parameters:
packageName- Package name which acts as key to get DocFile value object from packageEntityListDocFile- Returns:
- DocFile for classes.html
-
getTableSummaryDocFile
Return the table summary DocFile.- Returns:
- the table summary DocFile.
-
getAllSchemasDocFile
Return the all schemas DocFile.- Returns:
- the all schemas DocFile.
-
getAllTablesDocFile
Return the all tables DocFile.- Returns:
- the all tables DocFile.
-
getTableDocFile
Return the DocFile for the specified Table.- Parameters:
table- the Table.- Returns:
- the DocFile.
-
getEntityDocFileByDeclarationName
Get the DocFile corresponding to POJOClass. But if the POJOClass is ComponentPOJO, it is created on fly and we are not implementing .equals method hence get by getQualifiedDeclarationName.- Parameters:
pc- DocFile corresponding to this POJOClass- Returns:
- DocFile
-
getEntityDocFile
Returns the DocFile responsible to generate the .html for each classes.- Parameters:
pc- The DocFile corresponding to this pc is retrieved from entityDocFiles- Returns:
- DocFile
-
getSchemaSummaryDocFile
Return the summary DocFile for the specified schema FQN.- Parameters:
schemaName- the name of the schema.- Returns:
- the DocFile.
-
getPackageSummaryDocFile
get DocFile responsible to generate summary.html for corresponding packageName passed- Parameters:
packageName- DocFile corresponding to this packagename is retrieved from packageSummaryDocFiles- Returns:
- DocFile
-
getSchemaTableListDocFile
Return the Table List DocFile for the specified schema FQN.- Parameters:
schemaName- the name of the schema.- Returns:
- the DocFile.
-
getRef
Return the relative reference between the specified files.- Parameters:
from- the origin.to- the target.- Throws:
IllegalArgumentException- if any parameter is null.
-
copy
Copy a File. TODO: this method ignores custom provided templatepath. Want to call freemarker to get the resourceloaders but they are hidden, so we need another way. ..and if we use currentthread classloader you might conflict with the projects tools.jar- Parameters:
fileName- the name of the file to copy.to- the target file.- Throws:
IOException- in case of error.
-