1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.jetspeed.page.document;
18
19 /***
20 * <p>
21 * DocumentHandlerFactory
22 * </p>
23 * <p>
24 * Factory for generating <code>DocumentHandlers</code> for specific document types
25 * </p>
26 * @author <a href="mailto:weaver@apache.org">Scott T. Weaver</a>
27 * @version $Id: DocumentHandlerFactory.java 516448 2007-03-09 16:25:47Z ate $
28 *
29 */
30 public interface DocumentHandlerFactory
31 {
32 /***
33 *
34 * <p>
35 * getDocumentHandler
36 * </p>
37 *
38 * @param documentType document type to retreive a handler for. Examples: .psml, .link
39 * @return DocumentHanlder for the <code>documentType</code> indicated. Never returns <code>null.</code>
40 * @throws UnsupportedDocumentTypeException If no handler has been registered for the
41 * <code>documentType</code> argument.
42 */
43 DocumentHandler getDocumentHandler(String documentType) throws UnsupportedDocumentTypeException;
44
45 /***
46 *
47 * <p>
48 * getDocumentHandlerForPath
49 * </p>
50 *
51 * @param documentPath
52 * @return
53 * @throws UnsupportedDocumentTypeException
54 */
55 DocumentHandler getDocumentHandlerForPath( String documentPath) throws UnsupportedDocumentTypeException;
56
57 /***
58 *
59 * <p>
60 * addDocumentHandler
61 * </p>
62 *
63 * @param documentHandler
64 */
65 void registerDocumentHandler(DocumentHandler documentHandler) throws DocumentTypeAlreadyRegisteredException;
66
67 /***
68 * <p>
69 * getConstraintsEnabled
70 * </p>
71 *
72 * @return enabled indicator
73 */
74 boolean getConstraintsEnabled();
75
76 /***
77 * <p>
78 * setConstraintsEnabled
79 * </p>
80 *
81 * @param enabled indicator
82 */
83 void setConstraintsEnabled(boolean enabled);
84
85 /***
86 * <p>
87 * getPermissionsEnabled
88 * </p>
89 *
90 * @return enabled indicator
91 */
92 boolean getPermissionsEnabled();
93
94 /***
95 * <p>
96 * setPermissionsEnabled
97 * </p>
98 *
99 * @param enabled indicator
100 */
101 void setPermissionsEnabled(boolean enabled);
102 }