Movatterモバイル変換


[0]ホーム

URL:


24 Repository Compliance

A JCR implementationmust support thebasic repository features:

These features must besupported by all JCR repositories.

In addition, arepositorymay support any subset of theadditionalfeatures defined in sections §10 to §23.

The presence of eachadditional feature is individually testable either through queryingthe value of a repository descriptor (see §24.2RepositoryDescriptors) or testing for the availability of a specific nodetype (see §24.3Node Type-Related Features), thus allowingan application to programmatically determine the capabilities of aspecific JCR implementation.

An implementation thatsupports all the additional features defined in this specificationis afully-compliant repository.

24.1 Definition of Support

By indicating supportfor testable feature, a repository asserts that it fully conforms tothe semantics of that feature as defined in this specification, withtwo possible exceptions:

However, to indicatethat it supports a testable feature, a repository is only requiredto support that feature in some, not all, contexts. For example, arepository may restrict its support for a feature based on accesscontrol, path, or other criteria.

24.2 Repository Descriptors

Repository descriptorsare used to test support for repository features that have abehavioral (as opposed to a data-model) aspect.

Each descriptor isidentified by a uniquekey, which is a string. Animplementation must recognize all the standard keys defined in thisspecification and may recognize additional implementation-specifickeys. The full set of valid keys (both standard andimplementation-specific) for an implementation is returned by

.

The method

returnsifis the name of a standard descriptor defined within thisspecification andif it is either a valid implementation-specific key or not a validkey.

The method

returnsifis the name of a single value descriptor andotherwise.

The value of aparticular descriptor is found by passing that descriptor's key toeither

or

.

depending on whetherthat key is defined to return a single or a multiple value.

The JCR 1.0 method

is still supported asa convenience method. The call

is equivalent to

24.2.1 Repository Information

24.2.2 General

24.2.3 Node Operations

24.2.4 Node Type Management

These repositorydescriptors characterize the types of nodes an API consumer mayregister (see §19Node Type Management). They do notconstrain a repository's built-in node types (see §3.7NodeTypes).

24.2.5 Query

).

24.2.6 Deprecated Descriptors

24.2.7 Implementation-Specific Descriptors

Implementers are freeto introduce their own descriptors. The descriptor keys should useJava package-style names in namespaces controlled by theimplementer. Themethod must return false for these keys.

24.3 Node Type-Related Features

The node type registryis used to test support for features which correspond to aJCR-defined node type. For example, support forreferenceablenodes as a feature is equivalent to support for the node type.Such features are more data model-oriented than the behavioralfeatures reported by descriptors.

Testing for theavailability of a particular node type is done using

Any node typesassociated with a particular feature are described in the sectiondescribing that feature.

The presence of theindicated node types in the node type registry (tested with,see §8.1NodeTypeManager Object) indicates support for thecorresponding feature.

24.4 Implementation Issues

JCR adapters builtagainst some existing repositories may require a connection to theback-end repository to determine whether a feature is supported.Using methods on(as opposed, for example, to methods on)to test support for a feature is therefore potentially problematic.However, several approaches are open to such adapters:


[8]ページ先頭

©2009-2025 Movatter.jp