01: /*
02: ItsNat Java Web Application Framework
03: Copyright (C) 2007 Innowhere Software Services S.L., Spanish Company
04: Author: Jose Maria Arranz Santamaria
05:
06: This program is free software: you can redistribute it and/or modify
07: it under the terms of the GNU Affero General Public License as published by
08: the Free Software Foundation, either version 3 of the License, or
09: (at your option) any later version. See the GNU Affero General Public
10: License for more details. See the copy of the GNU Affero General Public License
11: included in this program. If not, see <http://www.gnu.org/licenses/>.
12: */
13:
14: package org.itsnat.core;
15:
16: import org.w3c.dom.DocumentFragment;
17:
18: /**
19: * Represents a markup fragment template. Concrete fragments are created
20: * using this template and can be inserted into documents.
21: *
22: * @see ItsNatServlet#registerDocFragmentTemplate(String,String,String)
23: * @see ItsNatServlet#getDocFragmentTemplate(String)
24: * @author Jose Maria Arranz Santamaria
25: */
26: public interface DocFragmentTemplate extends MarkupTemplate {
27: /**
28: * Creates a <code>org.w3c.dom.DocumentFragment</code> using the markup template.
29: * This <code>DocumentFragment</code> is ready to
30: * be inserted into the specified <code>org.w3c.dom.Document</code>.
31: *
32: * <p>If this template is an (X)HTML fragment the returned markup is
33: * the <body> content. If you want the <head> content use the specific
34: * {@link org.itsnat.core.html.HTMLDocFragmentTemplate} method.
35: * </p>
36: *
37: * @param docTarget the document used to create the fragment.
38: * @return the document fragment ready to be inserted.
39: * @see org.itsnat.core.html.HTMLDocFragmentTemplate#loadDocumentFragmentHead(ItsNatDocument)
40: * @see org.itsnat.core.html.HTMLDocFragmentTemplate#loadDocumentFragmentBody(ItsNatDocument)
41: */
42: public DocumentFragment loadDocumentFragment(
43: ItsNatDocument docTarget);
44: }
|