1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.portals.graffito.jcr.persistence.impl;
17
18 import org.apache.commons.logging.Log;
19 import org.apache.commons.logging.LogFactory;
20
21 import org.apache.portals.graffito.jcr.exception.CustomNodeTypeCreationException;
22 import org.apache.portals.graffito.jcr.persistence.CustomNodeTypeCreator;
23 import org.apache.portals.graffito.jcr.persistence.PersistenceManager;
24
25 /*** Default implementation of the jackrabbit custom node creator.
26 *
27 * @author <a href="mailto:okiessler@apache.org">Oliver Kiessler</a>
28 * @version $Id: Exp $
29 */
30 public class CustomNodeTypeCreatorImpl implements CustomNodeTypeCreator {
31
32 /*** Logger.
33 */
34 private final static Log log = LogFactory.getLog(CustomNodeTypeCreatorImpl.class);
35
36 /*** Session to the jcr repository.
37 */
38 private PersistenceManagerImpl jcrSession;
39
40 /*** Creates a new instance of CustomNodeTypeCreatorImpl. */
41 public CustomNodeTypeCreatorImpl()
42 {
43 }
44
45 /*** Creates a new instance of CustomNodeTypeCreatorImpl with a jcr session.
46 * @param jcrSession JcrSession
47 */
48 public CustomNodeTypeCreatorImpl(PersistenceManagerImpl jcrSession)
49 {
50 this.jcrSession = jcrSession;
51 }
52
53 /*** This method is supposed to create custom node types on repository
54 * setup.
55 *
56 * @throws org.apache.portals.graffito.jcr.exception.CustomNodeTypeCreationException
57 * @return true/false
58 */
59 public boolean createInitialJcrCustomNodeTypes() throws CustomNodeTypeCreationException
60 {
61
62
63
64 return true;
65 }
66
67 /*** Method to add a jcr custom node type to an existing jcr repository.
68 *
69 * @throws org.apache.portals.graffito.jcr.exception.CustomNodeTypeCreationException
70 * @return true/false
71 */
72 public boolean addJcrCustomNodeType() throws CustomNodeTypeCreationException
73 {
74
75
76
77 return false;
78 }
79
80 /*** Setter for property jcrSession.
81 *
82 * @param jcrSession JcrSession
83 */
84 public void setJcrSession(PersistenceManagerImpl jcrSession)
85 {
86 this.jcrSession = jcrSession;
87 }
88
89 /*** Getter for property jcrSession.
90 *
91 * @return jcrSession
92 */
93 public PersistenceManager getJcrSession()
94 {
95 return jcrSession;
96 }
97 }