Apache Jackrabbit : Proposed JCR 2.0 API Changes

Interface Changes

javax.jcr

javax.jcr.Binary [new]

  • void acquire() [new]

  • byte[] getBytes() [new]

  • long getSize() [new]

  • InputStream getStream() [new]

  • void release() [new]

javax.jcr.Node

  • void setPrimaryType(String nodeTypeName) [new]

  • NodeIterator merge(String srcWorkspace, boolean bestEffort, boolean isShallow) [new]

  • Node createConfiguration(Version baseline) [new]

  • void removeShare() [new]

  • void removeSharedSet() [new]

  • NodeIterator getSharedSet() [new]

  • void setHold(String holdID, boolean isDeep) [new]

  • void removeHold(String holdID) [new]

  • void setRetentionPolicy(Node policy) [new]

  • void removeRetentionPolicy() [new]

  • followLifecycleTransition(String transition) [new]

  • String[] getAllowedLifecycleTransistions() [new]

  • void checkpoint() [new]

  • Property setProperty(String name, InputStream value) [deprecated]

  • Property setProperty(String name, Binary value) [new]

  • String getUUID() [deprecated]

  • String getIdentifier() [new]

  • Property setProperty(String name, BigDecimal value) [new]

  • PropertyIterator getWeakReferences() [new]

  • PropertyIterator getWeakReferences(String name) [new]

  • PropertyIterator getReferences(String name) [new]

javax.jcr.Property

  • void setValue(InputStream value) [deprecated]

  • void setValue(Binary value) [new]

  • void setValue(BigDecimal value) [new]

  • InputStream getStream() [deprecated]

  • Binary getBinary() [new]

  • BigDecimal getDecimal() [new]

javax.jcr.PropertyType

  • DECIMAL [new]

  • WEAKREFERENCE [new]

  • URI [new]

javax.jcr.RangeIterator

  • long getNumberRemaining() [new]

javax.jcr.Repository

  • extends Referenceable [new]

  • OPTION_NODE_TYPE_REG_SUPPORTED [new]

  • OPTION_SIMPLE_VERSIONING_SUPPORTED [new]

  • OPTION_ACTIVITIES_SUPPORTED [new]

  • OPTION_BASELINES_SUPPORTED [new]

  • OPTION_JOURNALED_OBSERVATION_SUPPORTED [new]

  • OPTION_ACCESS_CONTROL_* [new]

  • OPTION_LIFECYCLE_SUPPORTED [new]

javax.jcr.Session

  • Access{{`Control}}`Manager getAccessControlManager() [new]

  • Lock[] getLocks() [new]

  • Node getNode(String absPath) [new]

  • Node getNodeByIdentifier(String id) [new]

  • Node getNodeByUUID(String uuid) [deprecated]

  • PrincipalManager getPrincipalManager() [new]

  • Property getProperty(String absPath) [new]

  • String move(String srcAbsPath, String destAbsPath) [was void before]

  • boolean nodeExists(String absPath) [new]

  • boolean propertyExists(String absPath) [new]

  • Node setActivity(Node activity) [new]

javax.jcr.Value

  • InputStream getStream() [deprecated]

  • Binary getBinary() [new]

  • BigDecimal getDecimal() [new]

javax.jcr.ValueFactory

  • Value createValue(BigDecimal value) [new]

  • Value createValue(InputStream value) [deprecated]

  • Binary createBinary(InputStream value) [new]

  • Value createValue(Binary binary) [new]

javax.jcr.Workspace

  • String copy(String srcAbsPath, String destAbsPath) [was void before]

  • String copy(String srcWorkspace, String srcAbsPath, String destAbsPath) [was void before]

  • String clone(String srcWorkspace, String srcAbsPath, String destAbsPath, boolean removeExisting) [was void before]

  • String move(String srcAbsPath, String destAbsPath) [was void before]

  • Workspace createWorkspace(String name) [new]

  • Workspace createWorkspace(String name, String srcWorkspace) [new]

  • void deleteWorkspace(String name) [new]

  • Node createActivity(String title) [new]

  • NodeIterator merge(Node activityNode) [new]

javax.jcr.lock

javax.jcr.lock.Lock

  • boolean isLockOwningSession() [new]

javax.jcr.nodetype

javax.jcr.nodetype.NodeDefinition

  • String[] getRequiredPrimaryTypeNames() [new]

  • String getDefaultPrimaryTypeName() [new]

javax.jcr.nodetype.NodeType

  • boolean canRemoveItem(String itemName) [deprecated]

  • boolean canRemoveNode(String nodeName) [new]

  • boolean canRemoveProperty(String propertyName) [new]

javax.jcr.nodetype.NodeTypeManager

  • boolean hasNodeType(String name) [new]

  • Node{{`Type}}`Template createNodeTypeTemplate() [new]

  • Node{{`Type}}Template createNodeTypeTemplate(NodeType`Definition ntd) [new]

  • Node{{`Definition}}`Template createNodeDefinitionTemplate() [new]

  • Property{{`Definition}}`Template createPropertyDefinitionTemplate() [new]

  • Node{{`Type registerNodeType(Node}}Type`Definition ntd, boolean allowUpdate) [new]

  • Node{{`Type}}`Iterator registerNodeTypes(Collection definitions, boolean allowUpdate) [new]

  • void unregisterNodeType(String name) [new]

  • void unregisterNodeTypes(String[] names) [new]

New Interfaces

  • javax.jcr.nodetype.Node{{`Type}}`Definition
  • javax.jcr.nodetype.Node{{`Definition}}`Template
  • javax.jcr.nodetype.Node{{`Type}}`Template
  • javax.jcr.nodetype.Property{{`Definition}}`Template

javax.jcr.observation

javax.jcr.observation.Event

  • String getSourcePath() [new]

  • String getIdentifier() [new]

  • String getSourceIdentifier() [new]

javax.jcr.observation.EventIterator

  • Calendar getDate() [new]

javax.jcr.observation.EventJournal

  • New interface

javax.jcr.query

javax.jcr.query.Query

  • XPATH, SQL [deprecated]

  • JCR_SQL2, JCR_JQOM [new]

  • SEARCH_VERSIONS, SEARCH_WORKSPACE, SEARCH_WORKSPACE_NO_SYSTEM [new]

  • QueryResult execute(int searchSpace) [new]

  • void setLimit(long limit) [new]

  • void setOffset(long offset) [new]

javax.jcr.query.QueryManager

  • PreparedQuery createPreparedQuery(String statement, String language) [new]

  • Query{{`Object}}Model`Factory getQOMFactory() [new]

javax.jcr.query.Row

  • Node getNode() [new]

  • Node getNode(String selectorName) [new]

  • String getPath() [new]

  • String getPath(String selectorName) [new]

  • double getScore() [new]

  • double getScore(String selectorName) [new]

javax.jcr.query.PreparedQuery

  • New interface

javax.jcr.query.qom

New package

javax.jcr.security

New package

javax.jcr.version

javax.jcr.version.Version

  • Node getFrozenNode() [new]

javax.jcr.version.VersionHistory

  • String getVersionableUUID() [deprecated]

  • String getVersionableIdentifier() [new]

  • NodeIterator getAllFrozenNodes() [new]

New Exceptions

  • javax.jcr.Invalid{{`Lifecycle}}Transition`Exception
  • javax.jcr.nodetype.Invalid{{`Node}}TypeDefinition`Exception
  • javax.jcr.nodetype.Node{{`Type}}Exists`Exception
  • javax.jcr.query.Search{{`Not}}Supported`Exception
  • javax.jcr.version.Label{{`Exists}}Version`Exception
  • javax.jcr.Invalid{{`Lifecycle}}Transition`Exception

javax.jcr.RepositoryException

  • String getMessage() [removed: in java.lang.Exception]

  • String getLocalizedMessage() [removed: in java.lang.Exception]

  • void printStackTrace(*) [removed: in java.lang.Exception]


Other changes

A few methods now throw an exception, for example Session.addLockToken.