Package org.apache.jackrabbit.spi
@Version("3.0.0")
package org.apache.jackrabbit.spi
Defines the interfaces of the JCR SPI (Service Provider Interface).
The SPI cuts the JCR stack into two parts:
- Above the SPI an implementation that wishes to expose the JCR API again needs to implement the transient item space, the session local namespace mapping and various conversions from the value representation in the SPI to the resolved values in the JCR API.
- An implementation of the SPI interfaces has to deal with the persistent view of a JCR repository. This includes almost all aspects of the JSR 170 specification, except the previously stated transient space and the session local namespace resolution to prefixes.
Observation
Because one of the goals of this SPI is to make it easier to implement a remoting layer using various existing protocols, the observation mechanism has been design with this goal in mind. Instead of a listener registration with a callback for each event bundle, the SPI uses a polling mechanism with a timeout:RepositoryService.getEvents(). With every call to this method the
repository is advised to return the events that occurred since the last
call. As a reference to the last retrieved
EventBundle the
SessionInfo contains a bundle identifier
which is automatically updated on each call to
RepositoryService.getEvents(). While this design allows for
a polling implementation on top of the SPI it is also well suited for a
listener based observation implementation on top of the SPI. With only
little thread synchronization overhead events can be acquired using a
timeout of Long.MAX_VALUE.
If an SPI implementation does not support observation, the method
RepositoryService.getEvents() will always throw an
UnsupportedRepositoryOperationException.
-
ClassDescriptionThe
Batchdefines an ordered list of of operations that must be executed at once on the persistent layer.ChildInfo...Eventis similar to the regular JCR Event and adds additional information about the affected item.AnEventBundleis similar to theEventIteratorinterface.AnEventFilteris applied to the events as generated on the repository server.IdFactorydefines methods to construct newItemIds.AnItemIdidentifies an item using a combination of unique ID and path.ItemInfoCacheinstances are responsible for cachingItemInfos along with an opaque generation counter.ItemInfoCache.Entry<T extends ItemInfo>This class represents a cache entry.LockInfois used to transport lock information across the SPI boundary.ANameis a combination of a namespace URI and a local part.NameFactory...NodeIdidentifies a node on the SPI layer.TheNodeInfoprovides the basic information required to build nodes making up the repository hierarchy.ThePathinterface defines the SPI level representation of a JCR path.Object representation of a single JCR path element.PathFactory...PrivilegeDefinition...PropertyIdidentifies a property on the SPI layer.ThePropertyInfoprovides the basic information to build aProperty.QItemDefinitionis the SPI representation of anitem definition.QNodeDefinitionis the SPI representation of anode definition.QNodeTypeDefinitionis the SPI representation of anode type.QPropertyDefinitionis the SPI representation of aproperty definition.QueryInfois the the return value ofRepositoryService.executeQuery(SessionInfo, String, String, Map, long, long, Map)which is used to run a query on theRepositoryService.QueryResultRowrepresents the SPI equivalent of a query result row.QValueis the SPI representation of ajcr value.QValueConstraintis used to check the syntax of a value constraint and to test if a specific value satisfies it.QValueFactorydefines methods to createQValueinstances.TheRepositoryServiceinterface defines methods used to retrieve information from the persistent layer of the repository as well as the methods that modify its persistent state.Factory for creatingRepositoryServiceinstances.SessionInfois created uponRepositoryService.obtain(javax.jcr.Credentials, String)orRepositoryService.obtain(SessionInfo, String)and will be used for any call on the RepositoryService that requires user and workspace identification.Subscriptiondefines a marker interface for an event subscription.Interface for building a hierarchy of JCR items on the SPI layer.XASessionInfoextends theSessionInfoand provides access to the XAResource of the session info.