Package org.rodnansol.core.project
Class Project
- java.lang.Object
-
- org.rodnansol.core.project.Project
-
- Direct Known Subclasses:
GradleProject,MavenProject,SimpleProject
public abstract class Project extends Object
Class representing a project.- Since:
- 0.1.0
- Author:
- nandorholozsnyak
-
-
Field Summary
Fields Modifier and Type Field Description protected Filebasedirprotected List<String>modulesprotected Stringnameprotected ProjectTypeprojectType
-
Constructor Summary
Constructors Modifier Constructor Description protectedProject(File basedir, String name, ProjectType projectType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FilegetBasedir()StringgetDefaultAggregatedTargetFilePath(String extension)Returns the output file path based on theProjectinstance and template type value.StringgetDefaultOutputFolder()Returns the default output folder based on theProjectinstance.StringgetDefaultOutputFolder(String moduleName)Returns the default output folder based on theProjectinstance and module name (in multi-module setup).StringgetDefaultTargetFilePath(TemplateType templateType)Returns the output file path based on theProjectinstance and template type value.List<String>getModules()StringgetName()List<String>getPossibleMetadataFilePaths()Returns the list of the possible metadata file paths inside a project.ProjectTypegetProjectType()voidsetModules(List<String> modules)StringtoString()
-
-
-
Field Detail
-
basedir
protected final File basedir
-
name
protected final String name
-
projectType
protected final ProjectType projectType
-
-
Constructor Detail
-
Project
protected Project(File basedir, String name, ProjectType projectType)
-
-
Method Detail
-
getBasedir
public File getBasedir()
-
getName
public String getName()
-
getProjectType
public ProjectType getProjectType()
-
getDefaultOutputFolder
public String getDefaultOutputFolder(String moduleName)
Returns the default output folder based on theProjectinstance and module name (in multi-module setup).For example: multi-module-parent/multi-module-a/target/property-docs
- Parameters:
moduleName- module's name.- Returns:
- output folder based on the incoming parameters.
-
getDefaultOutputFolder
public String getDefaultOutputFolder()
Returns the default output folder based on theProjectinstance.For example: module-a/target/property-docs
- Returns:
- output folder based on the incoming parameter.
-
getDefaultTargetFilePath
public String getDefaultTargetFilePath(TemplateType templateType)
Returns the output file path based on theProjectinstance and template type value.For example: multi-module-parent/target/property-docs/multi-module-parent-property-docs-aggregated.md
- Parameters:
templateType- type of the template, the extension will be determined based on this.- Returns:
- target file path based on the project instance and template type.
-
getDefaultAggregatedTargetFilePath
public String getDefaultAggregatedTargetFilePath(String extension)
Returns the output file path based on theProjectinstance and template type value.For example: module-a/target/property-docs/module-a-property-docs.md
- Parameters:
extension- extension (like .md, .adoc etc)- Returns:
- target file path based on the incoming parameters.
-
-