You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by kw...@apache.org on 2025/01/15 16:17:07 UTC
(jackrabbit) 01/01: JCR-5127 Deprecate constants which are defined in expanded form in JCR 2.0 API
This is an automated email from the ASF dual-hosted git repository.
kwin pushed a commit to branch feature/deprecate-jcr-constants
in repository https://gitbox.apache.org/repos/asf/jackrabbit.git
commit af9b19fddf4a7b39a63ea9413c6c507fc45a6ee5
Author: Konrad Windszus <kw...@apache.org>
AuthorDate: Wed Jan 15 17:17:01 2025 +0100
JCR-5127 Deprecate constants which are defined in expanded form in JCR
2.0 API
---
.../java/org/apache/jackrabbit/JcrConstants.java | 138 ++++++++++++++++++++-
1 file changed, 134 insertions(+), 4 deletions(-)
diff --git a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java
index e5160ca6c..71e44b568 100644
--- a/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java
+++ b/jackrabbit-jcr-commons/src/main/java/org/apache/jackrabbit/JcrConstants.java
@@ -27,20 +27,24 @@ import javax.jcr.Session;
* {@link Session#setNamespacePrefix(String, String)} method. As a result, the
* constants may not refer to the respective items.
* <p>
- * On the other hand, the constants in {@link javax.jcr.nodetype.NodeType} and
- * {@link javax.jcr.Property} are more complete (covering
- * <a href="https://s.apache.org/jcr-2.0-javadoc/">JCR 2.0</a> as well) and also
- * define names using <i>expanded</i> form, which is immune to session local
+ * On the other hand, the constants in {@link javax.jcr.nodetype.NodeType},
+ * {@link javax.jcr.Nodex}, {@link javax.jcr.Property} and {@link javax.jcr.Workspace}
+ * are more complete (covering <a href="https://s.apache.org/jcr-2.0-javadoc/">JCR 2.0</a>
+ * as well) and also define names using <i>expanded</i> form, which is immune to session local
* remappings.
*/
public interface JcrConstants {
/**
* jcr:autoCreated
+ * @deprecated Use {@link javax.jcr.Property#JCR_AUTOCREATED} instead
*/
+ @Deprecated
public static final String JCR_AUTOCREATED = "jcr:autoCreated";
/**
* jcr:baseVersion
+ * @deprecated Use {@link javax.jcr.Property#JCR_BASE_VERSION} instead
*/
+ @Deprecated
public static final String JCR_BASEVERSION = "jcr:baseVersion";
/**
* jcr:child
@@ -48,183 +52,273 @@ public interface JcrConstants {
public static final String JCR_CHILD = "jcr:child";
/**
* jcr:childNodeDefinition
+ * @deprecated Use {@link javax.jcr.nodetype.NodeTypeDefinition#NT_CHILD_NODE_DEFINITION} instead
*/
+ @Deprecated
public static final String JCR_CHILDNODEDEFINITION = "jcr:childNodeDefinition";
/**
* jcr:content
+ * @deprecated Use {@link javax.jcr.Node#JCR_CONTENT} instead
*/
+ @Deprecated
public static final String JCR_CONTENT = "jcr:content";
/**
* jcr:created
+ * @deprecated Use {@link javax.jcr.Property#JCR_CREATED} instead
*/
+ @Deprecated
public static final String JCR_CREATED = "jcr:created";
/**
* jcr:data
+ * @deprecated Use {@link javax.jcr.Property#JCR_DATA} instead
*/
+ @Deprecated
public static final String JCR_DATA = "jcr:data";
/**
* jcr:defaultPrimaryType
+ * @deprecated Use {@link javax.jcr.Property#JCR_DEFAULT_PRIMARY_TYPE} instead
*/
+ @Deprecated
public static final String JCR_DEFAULTPRIMARYTYPE = "jcr:defaultPrimaryType";
/**
* jcr:defaultValues
+ * @deprecated Use {@link javax.jcr.Property#JCR_DEFAULT_VALUES} instead
*/
+ @Deprecated
public static final String JCR_DEFAULTVALUES = "jcr:defaultValues";
/**
* jcr:encoding
+ * @deprecated Use {@link javax.jcr.Property#JCR_ENCODING} instead
*/
+ @Deprecated
public static final String JCR_ENCODING = "jcr:encoding";
/**
* jcr:frozenMixinTypes
+ * @deprecated Use {@link javax.jcr.Property#JCR_FROZEN_MIXIN_TYPES} instead
*/
+ @Deprecated
public static final String JCR_FROZENMIXINTYPES = "jcr:frozenMixinTypes";
/**
* jcr:frozenNode
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_FROZEN_NODE} instead
*/
+ @Deprecated
public static final String JCR_FROZENNODE = "jcr:frozenNode";
/**
* jcr:frozenPrimaryType
+ * @deprecated Use {@link javax.jcr.Property#JCR_FROZEN_PRIMARY_TYPE} instead
*/
+ @Deprecated
public static final String JCR_FROZENPRIMARYTYPE = "jcr:frozenPrimaryType";
/**
* jcr:frozenUuid
+ * @deprecated Use {@link javax.jcr.Property#JCR_FROZEN_UUID} instead
*/
+ @Deprecated
public static final String JCR_FROZENUUID = "jcr:frozenUuid";
/**
* jcr:hasOrderableChildNodes
+ * @deprecated Use {@link javax.jcr.Property#JCR_HAS_ORDERABLE_CHILD_NODES} instead
*/
+ @Deprecated
public static final String JCR_HASORDERABLECHILDNODES = "jcr:hasOrderableChildNodes";
/**
* jcr:isCheckedOut
+ * @deprecated Use {@link javax.jcr.Property#JCR_IS_CHECKED_OUT} instead
*/
+ @Deprecated
public static final String JCR_ISCHECKEDOUT = "jcr:isCheckedOut";
/**
* jcr:isMixin
+ * @deprecated Use {@link javax.jcr.Property#JCR_IS_MIXIN} instead
*/
+ @Deprecated
public static final String JCR_ISMIXIN = "jcr:isMixin";
/**
* jcr:language
+ * @deprecated Use {@link javax.jcr.Property#JCR_LANGUAGE} instead
*/
+ @Deprecated
public static final String JCR_LANGUAGE = "jcr:language";
/**
* jcr:lastModified
+ * @deprecated Use {@link javax.jcr.Property#JCR_LAST_MODIFIED} instead
*/
+ @Deprecated
public static final String JCR_LASTMODIFIED = "jcr:lastModified";
/**
* jcr:lockIsDeep
+ * @deprecated Use {@link javax.jcr.Property#JCR_LOCK_IS_DEEP} instead
*/
+ @Deprecated
public static final String JCR_LOCKISDEEP = "jcr:lockIsDeep";
/**
* jcr:lockOwner
+ * @deprecated Use {@link javax.jcr.Property#JCR_LOCK_OWNER} instead
*/
+ @Deprecated
public static final String JCR_LOCKOWNER = "jcr:lockOwner";
/**
* jcr:mandatory
+ * @deprecated Use {@link javax.jcr.Property#JCR_MANDATORY} instead
*/
+ @Deprecated
public static final String JCR_MANDATORY = "jcr:mandatory";
/**
* jcr:mergeFailed
+ * @deprecated Use {@link javax.jcr.Property#JCR_MERGE_FAILED} instead
*/
+ @Deprecated
public static final String JCR_MERGEFAILED = "jcr:mergeFailed";
/**
* jcr:mimeType
+ * @deprecated Use {@link javax.jcr.Property#JCR_MIME_TYPE} instead
*/
+ @Deprecated
public static final String JCR_MIMETYPE = "jcr:mimeType";
/**
* jcr:mixinTypes
+ * @deprecated Use {@link javax.jcr.Property#JCR_MIXIN_TYPES} instead
*/
+ @Deprecated
public static final String JCR_MIXINTYPES = "jcr:mixinTypes";
/**
* jcr:multiple
+ * @deprecated Use {@link javax.jcr.Property#JCR_MULTIPLE} instead
*/
+ @Deprecated
public static final String JCR_MULTIPLE = "jcr:multiple";
/**
* jcr:name
+ * @deprecated Use {@link javax.jcr.Property#JCR_NAME} instead
*/
+ @Deprecated
public static final String JCR_NAME = "jcr:name";
/**
* jcr:nodeTypeName
+ * @deprecated Use {@link javax.jcr.Property#JCR_NODE_TYPE_NAME} instead
*/
+ @Deprecated
public static final String JCR_NODETYPENAME = "jcr:nodeTypeName";
/**
* jcr:onParentVersion
+ * @deprecated Use {@link javax.jcr.Property#JCR_ON_PARENT_VERSION} instead
*/
+ @Deprecated
public static final String JCR_ONPARENTVERSION = "jcr:onParentVersion";
/**
* jcr:predecessors
+ * @deprecated Use {@link javax.jcr.Property#JCR_PREDECESSORS} instead
*/
+ @Deprecated
public static final String JCR_PREDECESSORS = "jcr:predecessors";
/**
* jcr:primaryItemName
+ * @deprecated Use {@link javax.jcr.Property#JCR_PRIMARY_ITEM_NAME} instead
*/
+ @Deprecated
public static final String JCR_PRIMARYITEMNAME = "jcr:primaryItemName";
/**
* jcr:primaryType
+ * @deprecated Use {@link javax.jcr.Property#JCR_PRIMARY_TYPE} instead
*/
+ @Deprecated
public static final String JCR_PRIMARYTYPE = "jcr:primaryType";
/**
* jcr:propertyDefinition
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_PROPERTY_DEFINITION} instead
*/
+ @Deprecated
public static final String JCR_PROPERTYDEFINITION = "jcr:propertyDefinition";
/**
* jcr:protected
+ * @deprecated Use {@link javax.jcr.Property#JCR_PROTECTED} instead
*/
+ @Deprecated
public static final String JCR_PROTECTED = "jcr:protected";
/**
* jcr:requiredPrimaryTypes
+ * @deprecated Use {@link javax.jcr.Property#JCR_REQUIRED_PRIMARY_TYPES} instead
*/
+ @Deprecated
public static final String JCR_REQUIREDPRIMARYTYPES = "jcr:requiredPrimaryTypes";
/**
* jcr:requiredType
+ * @deprecated Use {@link javax.jcr.Property#JCR_REQUIRED_TYPE} instead
*/
+ @Deprecated
public static final String JCR_REQUIREDTYPE = "jcr:requiredType";
/**
* jcr:rootVersion
+ * @deprecated Use {@link javax.jcr.Node#JCR_ROOT_VERSION} instead
*/
+ @Deprecated
public static final String JCR_ROOTVERSION = "jcr:rootVersion";
/**
* jcr:sameNameSiblings
+ * @deprecated Use {@link javax.jcr.Property#JCR_SAME_NAME_SIBLINGS} instead
*/
+ @Deprecated
public static final String JCR_SAMENAMESIBLINGS = "jcr:sameNameSiblings";
/**
* jcr:statement
+ * @deprecated Use {@link javax.jcr.Property#JCR_STATEMENT} instead
*/
+ @Deprecated
public static final String JCR_STATEMENT = "jcr:statement";
/**
* jcr:successors
+ * @deprecated Use {@link javax.jcr.Property#JCR_SUCCESSORS} instead
*/
+ @Deprecated
public static final String JCR_SUCCESSORS = "jcr:successors";
/**
* jcr:supertypes
+ * @deprecated Use {@link javax.jcr.Property#JCR_SUPERTYPES} instead
*/
+ @Deprecated
public static final String JCR_SUPERTYPES = "jcr:supertypes";
/**
* jcr:system
+ * @deprecated Use {@link javax.jcr.Workspace#NAME_SYSTEM_NODE} instead
*/
+ @Deprecated
public static final String JCR_SYSTEM = "jcr:system";
/**
* jcr:uuid
+ * @deprecated Use {@link javax.jcr.Property#JCR_UUID} instead
*/
+ @Deprecated
public static final String JCR_UUID = "jcr:uuid";
/**
* jcr:valueConstraints
+ * @deprecated Use {@link javax.jcr.Property#JCR_VALUE_CONSTRAINTS} instead
*/
+ @Deprecated
public static final String JCR_VALUECONSTRAINTS = "jcr:valueConstraints";
/**
* jcr:versionHistory
+ * @deprecated Use {@link javax.jcr.Property#JCR_VERSION_HISTORY} instead
*/
+ @Deprecated
public static final String JCR_VERSIONHISTORY = "jcr:versionHistory";
/**
* jcr:versionLabels
+ * @deprecated Use {@link javax.jcr.Node#JCR_VERSION_LABELS} instead
*/
+ @Deprecated
public static final String JCR_VERSIONLABELS = "jcr:versionLabels";
/**
* jcr:versionStorage
+ * @deprecated Use {@link javax.jcr.Workspace#NAME_VERSION_STORAGE_NODE} instead
*/
+ @Deprecated
public static final String JCR_VERSIONSTORAGE = "jcr:versionStorage";
/**
* jcr:versionableUuid
+ * @deprecated Use {@link javax.jcr.Property#JCR_VERSIONABLE_UUID} instead
*/
+ @Deprecated
public static final String JCR_VERSIONABLEUUID = "jcr:versionableUuid";
/**
@@ -238,43 +332,63 @@ public interface JcrConstants {
/**
* mix:lockable
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#MIX_LOCKABLE} instead
*/
+ @Deprecated
public static final String MIX_LOCKABLE = "mix:lockable";
/**
* mix:referenceable
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#MIX_REFERENCEABLE} instead
*/
+ @Deprecated
public static final String MIX_REFERENCEABLE = "mix:referenceable";
/**
* mix:versionable
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#MIX_VERSIONABLE} instead
*/
+ @Deprecated
public static final String MIX_VERSIONABLE = "mix:versionable";
/**
* mix:shareable
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#MIX_SHAREABLE} instead
*/
+ @Deprecated
public static final String MIX_SHAREABLE = "mix:shareable";
/**
* nt:base
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_BASE} instead
*/
+ @Deprecated
public static final String NT_BASE = "nt:base";
/**
* nt:childNodeDefinition
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_CHILD_NODE_DEFINITION} instead
*/
+ @Deprecated
public static final String NT_CHILDNODEDEFINITION = "nt:childNodeDefinition";
/**
* nt:file
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_FILE} instead
*/
+ @Deprecated
public static final String NT_FILE = "nt:file";
/**
* nt:folder
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_FOLDER} instead
*/
+ @Deprecated
public static final String NT_FOLDER = "nt:folder";
/**
* nt:frozenNode
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_FROZEN_NODE} instead
*/
+ @Deprecated
public static final String NT_FROZENNODE = "nt:frozenNode";
/**
* nt:hierarchyNode
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_HIERARCHY_NODE} instead
*/
+ @Deprecated
public static final String NT_HIERARCHYNODE = "nt:hierarchyNode";
/**
* nt:linkedFile
@@ -282,31 +396,45 @@ public interface JcrConstants {
public static final String NT_LINKEDFILE = "nt:linkedFile";
/**
* nt:nodeType
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_NODE_TYPE} instead
*/
+ @Deprecated
public static final String NT_NODETYPE = "nt:nodeType";
/**
* nt:propertyDefinition
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_PROPERTY_DEFINITION} instead
*/
+ @Deprecated
public static final String NT_PROPERTYDEFINITION = "nt:propertyDefinition";
/**
* nt:query
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_QUERY} instead
*/
+ @Deprecated
public static final String NT_QUERY = "nt:query";
/**
* nt:resource
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_RESOURCE} instead
*/
+ @Deprecated
public static final String NT_RESOURCE = "nt:resource";
/**
* nt:unstructured
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_UNSTRUCTURED} instead
*/
+ @Deprecated
public static final String NT_UNSTRUCTURED = "nt:unstructured";
/**
* nt:version
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_VERSION} instead
*/
+ @Deprecated
public static final String NT_VERSION = "nt:version";
/**
* nt:versionHistory
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_VERSION_HISTORY} instead
*/
+ @Deprecated
public static final String NT_VERSIONHISTORY = "nt:versionHistory";
/**
* nt:versionLabels
@@ -314,6 +442,8 @@ public interface JcrConstants {
public static final String NT_VERSIONLABELS = "nt:versionLabels";
/**
* nt:versionedChild
+ * @deprecated Use {@link javax.jcr.nodetype.NodeType#NT_VERSIONED_CHILD} instead
*/
+ @Deprecated
public static final String NT_VERSIONEDCHILD = "nt:versionedChild";
}