Author: angela
Date: Wed Aug 8 15:12:42 2012
New Revision: 1370800
URL: http://svn.apache.org/viewvc?rev=1370800&view=rev
Log:
OAK-66 : JCR Node Type Management
- move /jcr:system/jcr:nodeTypes to separate utility in order to make it
accessible elsewhere in the code
Added:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeConstants.java
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
Added:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeConstants.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeConstants.java?rev=1370800&view=auto
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeConstants.java
(added)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeConstants.java
Wed Aug 8 15:12:42 2012
@@ -0,0 +1,30 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.jackrabbit.oak.plugins.type;
+
+import org.apache.jackrabbit.JcrConstants;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * NodeTypeConstants... TODO
+ */
+public interface NodeTypeConstants {
+
+ String JCR_NODE_TYPES = "jcr:nodeTypes";
+ String NODE_TYPES_PATH = '/' + JcrConstants.JCR_SYSTEM + '/' +
JCR_NODE_TYPES;
+}
\ No newline at end of file
Modified:
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
URL:
http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java?rev=1370800&r1=1370799&r2=1370800&view=diff
==============================================================================
---
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
(original)
+++
jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/type/NodeTypeManagerImpl.java
Wed Aug 8 15:12:42 2012
@@ -53,10 +53,8 @@ import org.apache.jackrabbit.oak.namepat
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
-public class NodeTypeManagerImpl implements NodeTypeManager {
+public class NodeTypeManagerImpl implements NodeTypeManager, NodeTypeConstants
{
- private static final String NODE_TYPES_PATH = "/jcr:system/jcr:nodeTypes";
-
private final ContentSession session;
private final NameMapper mapper;
@@ -83,7 +81,7 @@ public class NodeTypeManagerImpl impleme
}
for (NodeTypeTemplate template : templates.values()) {
if (!template.isMixin()
- && !"nt:base".equals(template.getName())) {
+ &&
!JcrConstants.NT_BASE.equals(template.getName())) {
String[] supertypes =
template.getDeclaredSupertypeNames();
if (supertypes.length == 0) {