@Override public ItsNatDocumentTemplate registerItsNatDocumentTemplate( String name, String mime, Object source) { ItsNatDocumentTemplateImpl docTemplate = ItsNatDocumentTemplateImpl.createItsNatDocumentTemplate(name, mime, source, this); registerItsNatDocumentTemplate(docTemplate); return docTemplate; }
@Override public ItsNatDocumentTemplate registerItsNatDocumentTemplateAttachedServer( String name, String mime) { ItsNatStfulDocumentTemplateAttachedServerImpl docTemplate = ItsNatDocumentTemplateImpl.createItsNatStfulDocumentTemplateAttachedServer( name, mime, this); registerItsNatDocumentTemplate(docTemplate); return docTemplate; }
protected void registerItsNatDocumentTemplate(ItsNatDocumentTemplateImpl docTemplate) { Object res = pages.put(docTemplate.getName(), docTemplate); if (res != null) throw new ItsNatException( "One document template is already registered with this name:" + docTemplate.getName()); }