37 lines
1.0 KiB
C#
37 lines
1.0 KiB
C#
using Core;
|
|
using Core.Actions;
|
|
using Core.Settings;
|
|
using Core.SpecConfig;
|
|
using Generator.DataSource.Settings;
|
|
using Generator.Mappers;
|
|
|
|
namespace Generator.Daos;
|
|
|
|
public class JavaDao : AbstractDao
|
|
{
|
|
|
|
public JavaDao(ConfigManager confManager) : base(confManager)
|
|
{ }
|
|
|
|
public JavaConfig GetJavaGenerate(ISpecFile file) => _confManager.Java.Map(_confManager, file);
|
|
|
|
public JavaPublish GetJavaPublish(GenerationType type, ISpecFile file)
|
|
{
|
|
var config = GetJavaGenerate(file);
|
|
return new JavaPublish
|
|
{
|
|
LocalRoot = config.LocalRoot,
|
|
DockerRoot = config.DockerRoot,
|
|
Image = config.BuildImage,
|
|
Registry = config.Registry,
|
|
TemplateFolder = config.TemplateFolder,
|
|
OutputFolder = config.OutputFolder(),
|
|
Group = file.MavenGroup,
|
|
Artifact = config.Artifact,
|
|
Version = config.Version,
|
|
Username = config.Username,
|
|
Password = config.Password,
|
|
};
|
|
}
|
|
|
|
} |