mirror of
https://git.imnavajas.es/jjimenez/erp-imprimelibros.git
synced 2026-01-13 08:58:48 +00:00
preparando el imprimir
This commit is contained in:
@ -0,0 +1,18 @@
|
||||
// com.imprimelibros.erp.pdf.TemplateRegistry.java
|
||||
package com.imprimelibros.erp.pdf;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class TemplateRegistry {
|
||||
private final PdfModuleConfig config;
|
||||
|
||||
public TemplateRegistry(PdfModuleConfig config) {
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public String resolve(DocumentType type, String templateId) {
|
||||
if (config.getTemplates() == null) return null;
|
||||
return config.getTemplates().get(type.name() + ":" + templateId);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user