View Javadoc

1   /**
2    * This file Copyright (c) 2003-2011 Magnolia International
3    * Ltd.  (http://www.magnolia-cms.com). All rights reserved.
4    *
5    *
6    * This file is dual-licensed under both the Magnolia
7    * Network Agreement and the GNU General Public License.
8    * You may elect to use one or the other of these licenses.
9    *
10   * This file is distributed in the hope that it will be
11   * useful, but AS-IS and WITHOUT ANY WARRANTY; without even the
12   * implied warranty of MERCHANTABILITY or FITNESS FOR A
13   * PARTICULAR PURPOSE, TITLE, or NONINFRINGEMENT.
14   * Redistribution, except as permitted by whichever of the GPL
15   * or MNA you select, is prohibited.
16   *
17   * 1. For the GPL license (GPL), you can redistribute and/or
18   * modify this file under the terms of the GNU General
19   * Public License, Version 3, as published by the Free Software
20   * Foundation.  You should have received a copy of the GNU
21   * General Public License, Version 3 along with this program;
22   * if not, write to the Free Software Foundation, Inc., 51
23   * Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
24   *
25   * 2. For the Magnolia Network Agreement (MNA), this file
26   * and the accompanying materials are made available under the
27   * terms of the MNA which accompanies this distribution, and
28   * is available at http://www.magnolia-cms.com/mna.html
29   *
30   * Any modifications to this file must keep this entire header
31   * intact.
32   *
33   */
34  package info.magnolia.cms.core;
35  
36  
37  /**
38   * Constant for node-types used within Magnolia. Does not use {@link org.apache.jackrabbit.JcrConstants} from Jackrabbit's common-jar as these
39   * are not composed out of prefix and suffix so it would not be conveniently possible to query e.g. if a NodeType starts with
40   * MgnlNodeType.JCR_PREFIX.
41   *
42   * @version $Id$
43   */
44  public final class MgnlNodeType {
45  
46      /**
47       * Prefix for our nodeTypes.
48       */
49      public static final String NT_PREFIX = "nt:";
50  
51      /**
52       * Prefix for our mixin's.
53       */
54      public static final String MIX_PREFIX = "mix:";
55  
56      /**
57       * Prefix for mgnl-properties.
58       */
59      public static final String MGNL_PREFIX = "mgnl:";
60  
61      /**
62       * Prefix for jcr-properties.
63       */
64      public static final String JCR_PREFIX = "jcr:";
65  
66      /**
67       * Node type: base.
68       */
69      public static final String NT_BASE = NT_PREFIX + "base";
70  
71      /**
72       * Node type: unstructured.
73       */
74      public static final String NT_UNSTRUCTURED = NT_PREFIX + "unstructured";
75  
76      /**
77       * Node type: hierarchyNode.
78       */
79      public static final String NT_HIERARCHY = NT_PREFIX + "hierarchyNode";
80  
81      /**
82       * Node type: folder.
83       * <p/>
84       * TODO dlipp: shouldn't it be called MGNL_FOLDER???
85       */
86      public static final String NT_FOLDER = MGNL_PREFIX + "folder";
87  
88      /**
89       * Node type: file.
90       */
91      public static final String NT_FILE = NT_PREFIX + "file";
92  
93      /**
94       * Node type: resource.
95       */
96      public static final String NT_RESOURCE = MGNL_PREFIX + "resource";
97  
98      /**
99       * Node type: metadata.
100      */
101     public static final String NT_METADATA = MGNL_PREFIX + "metaData";
102 
103     /**
104      * Node type: content.
105      */
106     public static final String NT_CONTENT = MGNL_PREFIX + "content";
107 
108     /**
109      * Node type: content node.
110      */
111     public static final String NT_CONTENTNODE = MGNL_PREFIX + "contentNode";
112 
113     public static final String NT_PAGE = MGNL_PREFIX + "page";
114     public static final String NT_AREA = MGNL_PREFIX + "area";
115     public static final String NT_COMPONENT = MGNL_PREFIX + "component";
116 
117     /**
118      * TODO dlipp: to be replaced by mgnl:property? NodeData is Content-API term...
119      */
120     public static final String MGNL_NODE_DATA = MGNL_PREFIX + "nodeData";
121 
122     public static final String NT_FROZENNODE = NT_PREFIX + "frozenNode";
123 
124     public static final String USER = MGNL_PREFIX + "user";
125 
126     public static final String ROLE = MGNL_PREFIX + "role";
127 
128     public static final String GROUP = MGNL_PREFIX + "group";
129 
130     public static final String SYSTEM = MGNL_PREFIX + "reserve";
131 
132     // Mixins
133 
134     /**
135      * Mixin: node has access control.
136      */
137     public static final String MIX_ACCESSCONTROLLABLE = MIX_PREFIX + "accessControllable";
138 
139     /**
140      * Mixin: node can be referenced.
141      */
142     public static final String MIX_REFERENCEABLE = MIX_PREFIX + "referenceable";
143 
144     /**
145      * Mixin: node can be versioned.
146      */
147     public static final String MIX_VERSIONABLE = MIX_PREFIX + "versionable";
148 
149     public static final String MIX_LOCKABLE = MIX_PREFIX + "lockable";
150 
151     // TODO dlipp: shouldn't that constant be called MGNL_DELETED???
152     public static final String MIX_DELETED = MGNL_PREFIX + "deleted";
153 
154     // JCR properties.
155 
156     public static final String JCR_FROZENNODE = JCR_PREFIX + "frozenNode";
157 
158     public static final String JCR_FROZEN_PRIMARY_TYPE = JCR_PREFIX + "frozenPrimaryType";
159 
160     public static final String JCR_PRIMARY_TYPE = JCR_PREFIX + "primaryType";
161 
162     public static final String JCR_DATA = JCR_PREFIX + "data";
163 
164     public static final String JCR_CONTENT = JCR_PREFIX + "content";
165 
166 }