jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r797139 - in /jackrabbit/trunk: jackrabbit-core/src/main/java/org/apache/jackrabbit/core/ jackrabbit-core/src/main/resources-filtered/org/apache/jackrabbit/core/ jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/
Date Thu, 23 Jul 2009 16:36:24 GMT
Author: stefan
Date: Thu Jul 23 16:36:23 2009
New Revision: 797139

URL: http://svn.apache.org/viewvc?rev=797139&view=rev
Log:
JCR-2062: JSR 283: Repository Compliance
JCR-1591: JSR 283: NodeType Management

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
    jackrabbit/trunk/jackrabbit-core/src/main/resources-filtered/org/apache/jackrabbit/core/repository.properties
    jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractRepository.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java?rev=797139&r1=797138&r2=797139&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/RepositoryImpl.java
Thu Jul 23 16:36:23 2009
@@ -33,6 +33,7 @@
 import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
+import java.util.Iterator;
 
 import javax.jcr.AccessDeniedException;
 import javax.jcr.Credentials;
@@ -43,9 +44,11 @@
 import javax.jcr.Session;
 import javax.jcr.SimpleCredentials;
 import javax.jcr.Value;
+import javax.jcr.ValueFactory;
+import javax.jcr.Repository;
+import javax.jcr.PropertyType;
+import javax.jcr.ValueFormatException;
 import javax.jcr.observation.Event;
-import javax.jcr.observation.EventIterator;
-import javax.jcr.observation.EventListener;
 import javax.jcr.observation.ObservationManager;
 import javax.security.auth.Subject;
 
@@ -100,6 +103,7 @@
 import org.apache.jackrabbit.core.version.InternalVersionManager;
 import org.apache.jackrabbit.core.version.InternalVersionManagerImpl;
 import org.apache.jackrabbit.core.xml.ClonedInputSource;
+import org.apache.jackrabbit.value.ValueFactoryImpl;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver;
 import org.apache.jackrabbit.spi.commons.namespace.RegistryNamespaceResolver;
@@ -116,7 +120,7 @@
  * A <code>RepositoryImpl</code> ...
  */
 public class RepositoryImpl extends AbstractRepository
-        implements javax.jcr.Repository, JackrabbitRepository, SessionListener, EventListener,
WorkspaceListener {
+        implements javax.jcr.Repository, JackrabbitRepository, SessionListener, WorkspaceListener
{
 
     private static Logger log = LoggerFactory.getLogger(RepositoryImpl.class);
 
@@ -151,19 +155,14 @@
     public static final NodeId NODETYPES_NODE_ID = NodeId.valueOf("deadbeef-cafe-cafe-cafe-babecafebabe");
 
     /**
-     * the name of the file system resource containing the properties of the
-     * repository.
+     * the name of the resource containing customized descriptors of the repository.
      */
-    private static final String PROPERTIES_RESOURCE = "rep.properties";
+    private static final String PROPERTIES_RESOURCE = "repository.properties";
 
     /**
-     * the repository properties.
+     * the repository descriptors, maps String keys to Value/Value[] objects
      */
-    private final Properties repProps;
-
-    // names of well-known repository properties
-    public static final String STATS_NODE_COUNT_PROPERTY = "jcr.repository.stats.nodes.count";
-    public static final String STATS_PROP_COUNT_PROPERTY = "jcr.repository.stats.properties.count";
+    private final Map<String, DescriptorValue> repDescriptors = new HashMap<String,
DescriptorValue>();
 
     private NodeId rootNodeId;
 
@@ -214,10 +213,6 @@
     private final Map<SessionImpl, SessionImpl> activeSessions =
             new ReferenceMap(ReferenceMap.WEAK, ReferenceMap.WEAK);
 
-    // misc. statistics
-    private long nodesCount;
-    private long propsCount;
-
     // flag indicating if repository has been shut down
     private boolean disposed;
 
@@ -295,10 +290,8 @@
             // init root node uuid
             rootNodeId = loadRootNodeId(metaDataStore);
 
-            // load repository properties
-            repProps = loadRepProps();
-            nodesCount = Long.parseLong(repProps.getProperty(STATS_NODE_COUNT_PROPERTY, "0"));
-            propsCount = Long.parseLong(repProps.getProperty(STATS_PROP_COUNT_PROPERTY, "0"));
+            // initialize repository descriptors
+            initRepositoryDescriptors();
 
             // create registries
             nsReg = createNamespaceRegistry(new BasedFileSystem(repStore, "/namespaces"));
@@ -1148,14 +1141,7 @@
             }
         }
 
-        if (repProps != null) {
-            // persist repository properties
-            try {
-                storeRepProps(repProps);
-            } catch (RepositoryException e) {
-                log.error("failed to persist repository properties", e);
-            }
-        }
+        repDescriptors.clear();
 
         if (dataStore != null) {
             try {
@@ -1201,6 +1187,10 @@
         return repConfig;
     }
 
+    InternalVersionManagerImpl getVersionManagerImpl() {
+        return vMgr;
+    }
+
     /**
      * Returns the repository file system.
      * @return repository file system
@@ -1210,104 +1200,154 @@
     }
 
     /**
-     * Sets the default properties of the repository.
-     * <p/>
-     * This method loads the <code>Properties</code> from the
-     * <code>org/apache/jackrabbit/core/repository.properties</code> resource
-     * found in the class path and (re)sets the statistics properties, if not
-     * present.
-     *
-     * @param props the properties object to load
-     *
-     * @throws RepositoryException if the properties can not be loaded
-     */
-    protected void setDefaultRepositoryProperties(Properties props)
-            throws RepositoryException {
-        InputStream in = RepositoryImpl.class.getResourceAsStream("repository.properties");
-        try {
-            props.load(in);
-            in.close();
-
-            // set counts
-            if (!props.containsKey(STATS_NODE_COUNT_PROPERTY)) {
-                props.setProperty(STATS_NODE_COUNT_PROPERTY, Long.toString(nodesCount));
-            }
-            if (!props.containsKey(STATS_PROP_COUNT_PROPERTY)) {
-                props.setProperty(STATS_PROP_COUNT_PROPERTY, Long.toString(propsCount));
-            }
-        } catch (IOException e) {
-            String msg = "Failed to load repository properties: " + e.toString();
-            log.error(msg);
-            throw new RepositoryException(msg, e);
-        }
-    }
-
-    /**
-     * Loads the repository properties by executing the following steps:
+     * Initializes the repository descriptors by executing the following steps:
      * <ul>
-     * <li> if the {@link #PROPERTIES_RESOURCE} exists in the meta data store,
-     * the properties are loaded from that resource.</li>
-     * <li> {@link #setDefaultRepositoryProperties(Properties)} is called
-     * afterwards in order to initialize/update the repository properties
-     * since some default properties might have changed and need updating.</li>
-     * <li> finally {@link #storeRepProps(Properties)} is called in order to
-     * persist the newly generated properties.</li>
+     * <li>Sets standard descriptors</li>
+     * <li>{@link #getCustomRepositoryDescriptors()} is called
+     * afterwards in order to add custom/overwrite standard repository decriptors.</li>
      * </ul>
      *
-     * @return the newly loaded/initialized repository properties
-     *
      * @throws RepositoryException
      */
-    protected Properties loadRepProps() throws RepositoryException {
-        FileSystemResource propFile = new FileSystemResource(metaDataStore, PROPERTIES_RESOURCE);
-        try {
-            Properties props = new Properties();
-            if (propFile.exists()) {
-                InputStream in = propFile.getInputStream();
-                try {
-                    props.load(in);
-                } finally {
-                    in.close();
-                }
-            }
-            // now set the default props
-            setDefaultRepositoryProperties(props);
-
-            // and store
-            storeRepProps(props);
+    protected void initRepositoryDescriptors() throws RepositoryException {
 
-            return props;
-
-        } catch (Exception e) {
-            String msg = "failed to load repository properties";
-            log.debug(msg);
-            throw new RepositoryException(msg, e);
+        ValueFactory valFactory = ValueFactoryImpl.getInstance();
+        Value valTrue = valFactory.createValue(true);
+        Value valFalse = valFactory.createValue(false);
+
+        setDescriptor(Repository.REP_NAME_DESC, "Jackrabbit");
+        setDescriptor(Repository.REP_VENDOR_DESC, "Apache Software Foundation");
+        setDescriptor(Repository.REP_VENDOR_URL_DESC, "http://jackrabbit.apache.org/");
+        setDescriptor(Repository.SPEC_NAME_DESC, "Content Repository API for Java(TM) Technology
Specification");
+        setDescriptor(Repository.SPEC_VERSION_DESC, "2.0");
+
+        setDescriptor(Repository.IDENTIFIER_STABILITY, Repository.IDENTIFIER_STABILITY_INDEFINITE_DURATION);
+        setDescriptor(Repository.LEVEL_1_SUPPORTED, valTrue);
+        setDescriptor(Repository.LEVEL_2_SUPPORTED, valTrue);
+        setDescriptor(Repository.WRITE_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED, valTrue);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED,
valTrue);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE, Repository.NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED,
valTrue);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED, valTrue);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED, valTrue);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_OVERRIDES_SUPPORTED, valFalse);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PRIMARY_ITEM_NAME_SUPPORTED, valTrue);
+
+        Value[] types = new Value[] {
+                valFactory.createValue(PropertyType.BINARY),
+                valFactory.createValue(PropertyType.BOOLEAN),
+                valFactory.createValue(PropertyType.DATE),
+                valFactory.createValue(PropertyType.DECIMAL),
+                valFactory.createValue(PropertyType.DOUBLE),
+                valFactory.createValue(PropertyType.LONG),
+                valFactory.createValue(PropertyType.NAME),
+                valFactory.createValue(PropertyType.PATH),
+                valFactory.createValue(PropertyType.REFERENCE),
+                valFactory.createValue(PropertyType.STRING),
+                valFactory.createValue(PropertyType.URI),
+                valFactory.createValue(PropertyType.WEAKREFERENCE),
+                valFactory.createValue(PropertyType.UNDEFINED)
+        };
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_PROPERTY_TYPES, types);
+
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED, valTrue);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED, valTrue);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED, valTrue);
+        setDescriptor(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED, valFalse);
+        setDescriptor(Repository.OPTION_ACCESS_CONTROL_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_LIFECYCLE_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_LOCKING_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_OBSERVATION_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_QUERY_SQL_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_RETENTION_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_SHAREABLE_NODES_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_SIMPLE_VERSIONING_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_TRANSACTIONS_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_UNFILED_CONTENT_SUPPORTED, valFalse);
+        setDescriptor(Repository.OPTION_UPDATE_MIXIN_NODE_TYPES_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_UPDATE_PRIMARY_NODE_TYPE_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_VERSIONING_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_WORKSPACE_MANAGEMENT_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_XML_EXPORT_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_XML_IMPORT_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_ACTIVITIES_SUPPORTED, valTrue);
+        setDescriptor(Repository.OPTION_BASELINES_SUPPORTED, valTrue);
+
+        setDescriptor(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED, valTrue);
+        setDescriptor(Repository.QUERY_JOINS, Repository.QUERY_JOINS_INNER_OUTER);
+
+        Value[] languages = new Value[] {
+                valFactory.createValue("javax.jcr.query.JCR-JQOM"),
+                valFactory.createValue("javax.jcr.query.JCR-SQL2")
+        };
+        setDescriptor(Repository.QUERY_LANGUAGES, languages);
+
+        setDescriptor(Repository.QUERY_STORED_QUERIES_SUPPORTED, valTrue);
+        setDescriptor(Repository.QUERY_XPATH_POS_INDEX, valTrue);
+        // Disabled since in default configuration document order is not supported.
+        // See https://issues.apache.org/jira/browse/JCR-1237 for details
+        setDescriptor(Repository.QUERY_XPATH_DOC_ORDER, valFalse);
+
+        // now set customized repository descriptor values (if any exist)
+        Properties props = getCustomRepositoryDescriptors();
+        if (props != null) {
+            for (Iterator it = props.keySet().iterator(); it.hasNext();) {
+                String key = (String) it.next();
+                setDescriptor(key, props.getProperty(key));
+            }
         }
     }
 
     /**
-     * Stores the properties to a persistent resource in the meta filesytem.
+     * Returns a <code>Properties</code> object containing custom repository
+     * descriptors or <code>null</code> if none exist.
+     * <p/>
+     * Overridable to allow subclasses to add custom descriptors or to
+     * override standard descriptor values.
+     * <p/>
+     * Note that the properties entries will be set as single-valued <code>STRING</code>
+     * descriptor values.
+     * <p/>
+     * This method tries to load the <code>Properties</code> from the
+     * <code>org/apache/jackrabbit/core/repository.properties</code> resource
+     * found in the class path.
      *
-     * @throws RepositoryException
+     * @throws RepositoryException if the properties can not be loaded
      */
-    protected void storeRepProps(Properties props) throws RepositoryException {
-        FileSystemResource propFile = new FileSystemResource(metaDataStore, PROPERTIES_RESOURCE);
-        try {
-            propFile.makeParentDirs();
-            OutputStream os = propFile.getOutputStream();
-            try {
-                props.store(os, null);
+    protected Properties getCustomRepositoryDescriptors() throws RepositoryException {
+        InputStream in = RepositoryImpl.class.getResourceAsStream(PROPERTIES_RESOURCE);
+        if (in != null) {
+            try {
+                Properties props = new Properties();
+                props.load(in);
+                return props;
+            } catch (IOException e) {
+                String msg = "Failed to load customized repository properties: " + e.toString();
+                log.error(msg);
+                throw new RepositoryException(msg, e);
             } finally {
-                // make sure stream is closed
-                os.close();
+                IOUtils.closeQuietly(in);
             }
-        } catch (Exception e) {
-            String msg = "failed to persist repository properties";
-            log.debug(msg);
-            throw new RepositoryException(msg, e);
+        } else {
+            return null;
         }
     }
 
+    protected void setDescriptor(String desc, String value) {
+        setDescriptor(desc, ValueFactoryImpl.getInstance().createValue(value));
+    }
+
+    protected void setDescriptor(String desc, Value value) {
+        repDescriptors.put(desc, new DescriptorValue(value));
+    }
+
+    protected void setDescriptor(String desc, Value[] values) {
+        repDescriptors.put(desc, new DescriptorValue(values));
+    }
+
     /**
      * Creates a workspace persistence manager based on the given
      * configuration. The persistence manager is instantiated using
@@ -1425,31 +1465,46 @@
      * {@inheritDoc}
      */
     public String getDescriptor(String key) {
-        return repProps.getProperty(key);
+        Value v = getDescriptorValue(key);
+        try {
+            return (v == null) ? null : v.getString();
+        } catch (RepositoryException e) {
+            log.error("corrupt descriptor value: " + key, e);
+            return null;
+        }
     }
 
     /**
      * {@inheritDoc}
      */
     public String[] getDescriptorKeys() {
-        String[] keys = repProps.keySet().toArray(new String[repProps.keySet().size()]);
+        String[] keys = repDescriptors.keySet().toArray(new String[repDescriptors.keySet().size()]);
         Arrays.sort(keys);
         return keys;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Value getDescriptorValue(String key) {
-        throw new UnsupportedOperationException(
-                "not implemented yet - see JCR-2062");
+        DescriptorValue descVal = repDescriptors.get(key);
+        return (descVal != null) ? descVal.getValue() : null;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public Value[] getDescriptorValues(String key) {
-        throw new UnsupportedOperationException(
-                "not implemented yet - see JCR-2062");
+        DescriptorValue descVal = repDescriptors.get(key);
+        return (descVal != null) ? descVal.getValues() : null;
     }
 
+    /**
+     * {@inheritDoc}
+     */
     public boolean isSingleValueDescriptor(String key) {
-        throw new UnsupportedOperationException(
-                "not implemented yet - see JCR-2062");
+        DescriptorValue descVal = repDescriptors.get(key);
+        return (descVal != null && descVal.getValue() != null);
     }
 
     //------------------------------------------------------< SessionListener >
@@ -1469,41 +1524,6 @@
         }
     }
 
-    //--------------------------------------------------------< EventListener >
-    /**
-     * {@inheritDoc}
-     */
-    public void onEvent(EventIterator events) {
-        // check status of this instance
-        if (disposed) {
-            // ignore, repository instance has been shut down
-            return;
-        }
-
-        synchronized (repProps) {
-            while (events.hasNext()) {
-                Event event = events.nextEvent();
-                long type = event.getType();
-                if ((type & Event.NODE_ADDED) == Event.NODE_ADDED) {
-                    nodesCount++;
-                    repProps.setProperty(STATS_NODE_COUNT_PROPERTY, Long.toString(nodesCount));
-                }
-                if ((type & Event.NODE_REMOVED) == Event.NODE_REMOVED) {
-                    nodesCount--;
-                    repProps.setProperty(STATS_NODE_COUNT_PROPERTY, Long.toString(nodesCount));
-                }
-                if ((type & Event.PROPERTY_ADDED) == Event.PROPERTY_ADDED) {
-                    propsCount++;
-                    repProps.setProperty(STATS_PROP_COUNT_PROPERTY, Long.toString(propsCount));
-                }
-                if ((type & Event.PROPERTY_REMOVED) == Event.PROPERTY_REMOVED) {
-                    propsCount--;
-                    repProps.setProperty(STATS_PROP_COUNT_PROPERTY, Long.toString(propsCount));
-                }
-            }
-        }
-    }
-
     //------------------------------------------< overridable factory methods >
     /**
      * Creates an instance of the {@link SessionImpl} class representing a
@@ -2004,12 +2024,6 @@
              * {@link org.apache.jackrabbit.core.state.SharedItemStateManager#createRootNodeState}
              */
 
-            // register the repository as event listener for keeping repository statistics
-            wsp.getObservationManager().addEventListener(RepositoryImpl.this,
-                    Event.NODE_ADDED | Event.NODE_REMOVED
-                    | Event.PROPERTY_ADDED | Event.PROPERTY_REMOVED,
-                    "/", true, null, null, false);
-
             // register SearchManager as event listener
             SearchManager searchMgr = getSearchManager();
             if (searchMgr != null) {
@@ -2337,8 +2351,28 @@
         }
     }
 
-    InternalVersionManagerImpl getVersionManagerImpl() {
-        return vMgr;
-    }
+    /**
+     * Represents a Repository Descriptor Value (either Value or Value[])
+     */
+    protected final class DescriptorValue {
+
+        private Value val;
+        private Value[] vals;
 
+        protected DescriptorValue(Value val) {
+            this.val = val;
+        }
+
+        protected DescriptorValue(Value[] vals) {
+            this.vals = vals;
+        }
+
+        protected Value getValue() {
+            return val;
+        }
+
+        protected Value[] getValues() {
+            return vals != null ? vals : new Value[] {val};
+        }
+    }
 }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/resources-filtered/org/apache/jackrabbit/core/repository.properties
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/resources-filtered/org/apache/jackrabbit/core/repository.properties?rev=797139&r1=797138&r2=797139&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/resources-filtered/org/apache/jackrabbit/core/repository.properties
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/resources-filtered/org/apache/jackrabbit/core/repository.properties
Thu Jul 23 16:36:23 2009
@@ -35,57 +35,3 @@
 
 # The descriptor for the version of this repository implementation.
 jcr.repository.version = ${pom.version}
-
-################################################################################
-# Repository features and support information
-#
-
-# The presence of this key indicates that this implementation supports
-# all level 1 features. This key will always be present.
-level.1.supported = true
-
-# The presence of this key indicates that this implementation supports all level 2 features.
-level.2.supported = true
-
-# The presence of this key indicates that this implementation supports transactions.
-option.transactions.supported = true
-
-# The presence of this key indicates that this implementation supports versioning.
-option.versioning.supported = true
-
-# The presence of this key indicates that this implementation supports simple versioning.
-option.simple.versioning.supported = true
-
-# The presence of this key indicates that this implementation supports activities.
-option.activities.supported = true
-
-# The presence of this key indicates that this implementation supports observation.
-option.observation.supported = true
-
-# The presence of this key indicates that this implementation supports locking.
-option.locking.supported = true
-
-# The presence of this key indicates that this implementation supports the SQL query language.
-option.query.sql.supported = true
-
-# The presence of this key indicates that this implementation supports access control.
-option.access.control.supported = true
-
-# The presence of this key indicates that this implementation supports node type management.
-option.node.type.management.supported = true
-
-# The presence of this key indicates that this implementation supports retention.
-option.retention.supported = true
-
-# The presence of this key indicates that this implementation supports shareable nodes.
-option.shareable.nodes.supported = true
-
-# The presence of this key indicates that the index position notation for same-name siblings
is supported within XPath queries.
-query.xpath.pos.index = true
-
-# The presence of this key indicates that XPath queries return results in document order.
-query.xpath.doc.order = false
-# Disabled since in default configuration document order is not supported.
-# See https://issues.apache.org/jira/browse/JCR-1237 for details
-
-

Modified: jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractRepository.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractRepository.java?rev=797139&r1=797138&r2=797139&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractRepository.java
(original)
+++ jackrabbit/trunk/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/commons/AbstractRepository.java
Thu Jul 23 16:36:23 2009
@@ -39,17 +39,11 @@
      */
     private static final Set<String> STANDARD_KEYS = new HashSet<String>() {{
         add(Repository.IDENTIFIER_STABILITY);
-        add(Repository.IDENTIFIER_STABILITY_INDEFINITE_DURATION);
-        add(Repository.IDENTIFIER_STABILITY_METHOD_DURATION);
-        add(Repository.IDENTIFIER_STABILITY_SAVE_DURATION);
-        add(Repository.IDENTIFIER_STABILITY_SESSION_DURATION);
         add(Repository.LEVEL_1_SUPPORTED);
         add(Repository.LEVEL_2_SUPPORTED);
+        add(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED);
         add(Repository.NODE_TYPE_MANAGEMENT_AUTOCREATED_DEFINITIONS_SUPPORTED);
         add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE);
-        add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE_MINIMAL);
-        add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE_MULTIPLE);
-        add(Repository.NODE_TYPE_MANAGEMENT_INHERITANCE_SINGLE);
         add(Repository.NODE_TYPE_MANAGEMENT_MULTIPLE_BINARY_PROPERTIES_SUPPORTED);
         add(Repository.NODE_TYPE_MANAGEMENT_MULTIVALUED_PROPERTIES_SUPPORTED);
         add(Repository.NODE_TYPE_MANAGEMENT_ORDERABLE_CHILD_NODES_SUPPORTED);
@@ -59,12 +53,13 @@
         add(Repository.NODE_TYPE_MANAGEMENT_RESIDUAL_DEFINITIONS_SUPPORTED);
         add(Repository.NODE_TYPE_MANAGEMENT_SAME_NAME_SIBLINGS_SUPPORTED);
         add(Repository.NODE_TYPE_MANAGEMENT_VALUE_CONSTRAINTS_SUPPORTED);
+        add(Repository.NODE_TYPE_MANAGEMENT_UPDATE_IN_USE_SUPORTED);
         add(Repository.OPTION_ACCESS_CONTROL_SUPPORTED);
         add(Repository.OPTION_JOURNALED_OBSERVATION_SUPPORTED);
         add(Repository.OPTION_LIFECYCLE_SUPPORTED);
         add(Repository.OPTION_LOCKING_SUPPORTED);
-        add(Repository.OPTION_NODE_TYPE_MANAGEMENT_SUPPORTED);
         add(Repository.OPTION_OBSERVATION_SUPPORTED);
+        add(Repository.OPTION_NODE_AND_PROPERTY_WITH_SAME_NAME_SUPPORTED);
         add(Repository.OPTION_QUERY_SQL_SUPPORTED);
         add(Repository.OPTION_RETENTION_SUPPORTED);
         add(Repository.OPTION_SHAREABLE_NODES_SUPPORTED);
@@ -78,13 +73,10 @@
         add(Repository.OPTION_XML_EXPORT_SUPPORTED);
         add(Repository.OPTION_XML_IMPORT_SUPPORTED);
         add(Repository.OPTION_ACTIVITIES_SUPPORTED);
-        // add(Repository.OPTION_BASELINES_SUPPORTED);
+        add(Repository.OPTION_BASELINES_SUPPORTED);
         
         add(Repository.QUERY_FULL_TEXT_SEARCH_SUPPORTED);
         add(Repository.QUERY_JOINS);
-        add(Repository.QUERY_JOINS_INNER);
-        add(Repository.QUERY_JOINS_INNER_OUTER);
-        add(Repository.QUERY_JOINS_NONE);
         add(Repository.QUERY_LANGUAGES);
         add(Repository.QUERY_STORED_QUERIES_SUPPORTED);
         add(Repository.QUERY_XPATH_DOC_ORDER);



Mime
View raw message