poussecafe.doc.process.ModuleDocCreation Maven / Gradle / Ivy
The newest version!
package poussecafe.doc.process;
import javax.lang.model.element.PackageElement;
import javax.lang.model.element.TypeElement;
import poussecafe.doc.model.moduledoc.ModuleDoc;
import poussecafe.doc.model.moduledoc.ModuleDocFactory;
import poussecafe.doc.model.moduledoc.ModuleDocRepository;
import poussecafe.process.ExplicitDomainProcess;
public class ModuleDocCreation extends ExplicitDomainProcess {
@Deprecated(since = "0.17")
public void addModuleDoc(PackageElement classDoc) {
ModuleDoc moduleDoc = moduleDocFactory.newModuleDoc(classDoc);
runInTransaction(ModuleDoc.class, () -> moduleDocRepository.add(moduleDoc));
}
private ModuleDocFactory moduleDocFactory;
private ModuleDocRepository moduleDocRepository;
public void addModuleDoc(TypeElement classDoc) {
ModuleDoc moduleDoc = moduleDocFactory.newModuleDoc(classDoc);
runInTransaction(ModuleDoc.class, () -> moduleDocRepository.add(moduleDoc));
}
}