Package org.apache.jackrabbit.jcr2spi
Class SessionImpl
- java.lang.Object
-
- org.apache.jackrabbit.commons.AbstractSession
-
- org.apache.jackrabbit.jcr2spi.SessionImpl
-
- All Implemented Interfaces:
Session,ManagerProvider,org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver
- Direct Known Subclasses:
XASessionImpl
public class SessionImpl extends org.apache.jackrabbit.commons.AbstractSession implements org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver, ManagerProvider
SessionImpl...
-
-
Field Summary
-
Fields inherited from interface javax.jcr.Session
ACTION_ADD_NODE, ACTION_READ, ACTION_REMOVE, ACTION_SET_PROPERTY
-
-
Method Summary
-
-
-
Method Detail
-
getRepository
public Repository getRepository()
- Specified by:
getRepositoryin interfaceSession- See Also:
Session.getRepository()
-
getUserID
public String getUserID()
- Specified by:
getUserIDin interfaceSession- See Also:
Session.getUserID()
-
getAttribute
public Object getAttribute(String name)
Always returnsnull.- Specified by:
getAttributein interfaceSession- See Also:
Session.getAttribute(String)
-
getAttributeNames
public String[] getAttributeNames()
Always returns an empty String array.- Specified by:
getAttributeNamesin interfaceSession- See Also:
Session.getAttributeNames()
-
getWorkspace
public Workspace getWorkspace()
- Specified by:
getWorkspacein interfaceSession- See Also:
Session.getWorkspace()
-
impersonate
public Session impersonate(Credentials credentials) throws LoginException, RepositoryException
- Specified by:
impersonatein interfaceSession- Overrides:
impersonatein classorg.apache.jackrabbit.commons.AbstractSession- Throws:
LoginExceptionRepositoryException- See Also:
Session.impersonate(Credentials)
-
getRootNode
public Node getRootNode() throws RepositoryException
- Specified by:
getRootNodein interfaceSession- Throws:
RepositoryException- See Also:
Session.getRootNode()
-
getNodeByUUID
public Node getNodeByUUID(String uuid) throws ItemNotFoundException, RepositoryException
- Specified by:
getNodeByUUIDin interfaceSession- Throws:
ItemNotFoundExceptionRepositoryException- See Also:
Session.getNodeByUUID(String)
-
getItem
public Item getItem(String absPath) throws PathNotFoundException, RepositoryException
- Specified by:
getItemin interfaceSession- Overrides:
getItemin classorg.apache.jackrabbit.commons.AbstractSession- Throws:
PathNotFoundExceptionRepositoryException- See Also:
Session.getItem(String)
-
itemExists
public boolean itemExists(String absPath) throws RepositoryException
- Specified by:
itemExistsin interfaceSession- Overrides:
itemExistsin classorg.apache.jackrabbit.commons.AbstractSession- Throws:
RepositoryException- See Also:
Session.itemExists(String)
-
move
public void move(String srcAbsPath, String destAbsPath) throws ItemExistsException, PathNotFoundException, VersionException, ConstraintViolationException, LockException, RepositoryException
- Specified by:
movein interfaceSession- Throws:
ItemExistsExceptionPathNotFoundExceptionVersionExceptionConstraintViolationExceptionLockExceptionRepositoryException- See Also:
Session.move(String, String)
-
save
public void save() throws AccessDeniedException, ConstraintViolationException, InvalidItemStateException, VersionException, LockException, RepositoryException- Specified by:
savein interfaceSession- Throws:
AccessDeniedExceptionConstraintViolationExceptionInvalidItemStateExceptionVersionExceptionLockExceptionRepositoryException- See Also:
Session.save()
-
refresh
public void refresh(boolean keepChanges) throws RepositoryException- Specified by:
refreshin interfaceSession- Throws:
RepositoryException- See Also:
Session.refresh(boolean)
-
hasPendingChanges
public boolean hasPendingChanges() throws RepositoryException- Specified by:
hasPendingChangesin interfaceSession- Throws:
RepositoryException- See Also:
Session.hasPendingChanges()
-
getValueFactory
public ValueFactory getValueFactory() throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
getValueFactoryin interfaceSession- Throws:
UnsupportedRepositoryOperationExceptionRepositoryException- See Also:
Session.getValueFactory()
-
checkPermission
public void checkPermission(String absPath, String actions) throws AccessControlException, RepositoryException
- Specified by:
checkPermissionin interfaceSession- Throws:
AccessControlExceptionRepositoryException- See Also:
Session.checkPermission(String, String)
-
getImportContentHandler
public ContentHandler getImportContentHandler(String parentAbsPath, int uuidBehavior) throws PathNotFoundException, ConstraintViolationException, VersionException, LockException, RepositoryException
- Specified by:
getImportContentHandlerin interfaceSession- Throws:
PathNotFoundExceptionConstraintViolationExceptionVersionExceptionLockExceptionRepositoryException- See Also:
Session.getImportContentHandler(String, int)
-
importXML
public void importXML(String parentAbsPath, InputStream in, int uuidBehavior) throws IOException, PathNotFoundException, ItemExistsException, ConstraintViolationException, VersionException, InvalidSerializedDataException, LockException, RepositoryException
- Specified by:
importXMLin interfaceSession- Overrides:
importXMLin classorg.apache.jackrabbit.commons.AbstractSession- Throws:
IOExceptionPathNotFoundExceptionItemExistsExceptionConstraintViolationExceptionVersionExceptionInvalidSerializedDataExceptionLockExceptionRepositoryException- See Also:
Session.importXML(String, java.io.InputStream, int)
-
setNamespacePrefix
public void setNamespacePrefix(String prefix, String uri) throws RepositoryException
- Specified by:
setNamespacePrefixin interfaceSession- Overrides:
setNamespacePrefixin classorg.apache.jackrabbit.commons.AbstractSession- Throws:
RepositoryException- See Also:
Session.setNamespacePrefix(String, String)
-
logout
public void logout()
- Specified by:
logoutin interfaceSession- Overrides:
logoutin classorg.apache.jackrabbit.commons.AbstractSession- See Also:
Session.logout()
-
isLive
public boolean isLive()
- Specified by:
isLivein interfaceSession- See Also:
Session.isLive()
-
addLockToken
public void addLockToken(String lt)
- Specified by:
addLockTokenin interfaceSession- See Also:
Session.addLockToken(String)
-
getLockTokens
public String[] getLockTokens()
- Specified by:
getLockTokensin interfaceSession- See Also:
Session.getLockTokens()
-
removeLockToken
public void removeLockToken(String lt)
- Specified by:
removeLockTokenin interfaceSession- See Also:
Session.removeLockToken(String)
-
getAccessControlManager
public AccessControlManager getAccessControlManager() throws RepositoryException
- Specified by:
getAccessControlManagerin interfaceSession- Throws:
RepositoryException- See Also:
Session.getAccessControlManager()
-
getNode
public Node getNode(String absPath) throws RepositoryException
- Specified by:
getNodein interfaceSession- Overrides:
getNodein classorg.apache.jackrabbit.commons.AbstractSession- Throws:
RepositoryException- See Also:
Session.getNode(String)
-
getNodeByIdentifier
public Node getNodeByIdentifier(String id) throws RepositoryException
- Specified by:
getNodeByIdentifierin interfaceSession- Throws:
RepositoryException- See Also:
Session.getNodeByIdentifier(String)
-
getProperty
public Property getProperty(String absPath) throws RepositoryException
- Specified by:
getPropertyin interfaceSession- Overrides:
getPropertyin classorg.apache.jackrabbit.commons.AbstractSession- Throws:
RepositoryException- See Also:
Session.getProperty(String)
-
getRetentionManager
public RetentionManager getRetentionManager() throws UnsupportedRepositoryOperationException, RepositoryException
- Specified by:
getRetentionManagerin interfaceSession- Throws:
UnsupportedRepositoryOperationExceptionRepositoryException- See Also:
Session.getRetentionManager()
-
hasCapability
public boolean hasCapability(String methodName, Object target, Object[] arguments) throws RepositoryException
- Specified by:
hasCapabilityin interfaceSession- Throws:
RepositoryException- See Also:
Session.hasCapability(String, Object, Object[])
-
hasPermission
public boolean hasPermission(String absPath, String actions) throws RepositoryException
- Specified by:
hasPermissionin interfaceSession- Throws:
RepositoryException- See Also:
Session.hasPermission(String, String)
-
nodeExists
public boolean nodeExists(String absPath) throws RepositoryException
- Specified by:
nodeExistsin interfaceSession- Overrides:
nodeExistsin classorg.apache.jackrabbit.commons.AbstractSession- Throws:
RepositoryException- See Also:
Session.nodeExists(String)
-
propertyExists
public boolean propertyExists(String absPath) throws RepositoryException
- Specified by:
propertyExistsin interfaceSession- Overrides:
propertyExistsin classorg.apache.jackrabbit.commons.AbstractSession- Throws:
RepositoryException- See Also:
Session.propertyExists(String)
-
removeItem
public void removeItem(String absPath) throws RepositoryException
- Specified by:
removeItemin interfaceSession- Overrides:
removeItemin classorg.apache.jackrabbit.commons.AbstractSession- Throws:
RepositoryException- See Also:
Session.removeItem(String)
-
getPrefix
public String getPrefix(String uri) throws NamespaceException
- Specified by:
getPrefixin interfaceorg.apache.jackrabbit.spi.commons.namespace.NamespaceResolver- Throws:
NamespaceException- See Also:
NamespaceResolver.getPrefix(String)
-
getURI
public String getURI(String prefix) throws NamespaceException
- Specified by:
getURIin interfaceorg.apache.jackrabbit.spi.commons.namespace.NamespaceResolver- Throws:
NamespaceException- See Also:
NamespaceResolver.getURI(String)
-
addListener
public void addListener(SessionListener listener)
Add aSessionListener- Parameters:
listener- the new listener to be informed on modifications
-
removeListener
public void removeListener(SessionListener listener)
Remove aSessionListener- Parameters:
listener- an existing listener
-
createWorkspaceInstance
protected WorkspaceImpl createWorkspaceInstance(RepositoryConfig config, org.apache.jackrabbit.spi.SessionInfo sessionInfo) throws RepositoryException
- Throws:
RepositoryException
-
createSessionItemStateManager
protected SessionItemStateManager createSessionItemStateManager(UpdatableItemStateManager workspaceStateManager, ItemStateFactory isf) throws RepositoryException
- Throws:
RepositoryException
-
createItemManager
protected ItemManager createItemManager(HierarchyManager hierarchyManager)
-
getNamePathResolver
public org.apache.jackrabbit.spi.commons.conversion.NamePathResolver getNamePathResolver()
- Specified by:
getNamePathResolverin interfaceManagerProvider- See Also:
ManagerProvider.getNamePathResolver()
-
getNameResolver
public org.apache.jackrabbit.spi.commons.conversion.NameResolver getNameResolver()
- Specified by:
getNameResolverin interfaceManagerProvider- See Also:
ManagerProvider.getNameResolver()
-
getPathResolver
public org.apache.jackrabbit.spi.commons.conversion.PathResolver getPathResolver()
- Specified by:
getPathResolverin interfaceManagerProvider- See Also:
ManagerProvider.getPathResolver()
-
getNamespaceResolver
public org.apache.jackrabbit.spi.commons.namespace.NamespaceResolver getNamespaceResolver()
- Specified by:
getNamespaceResolverin interfaceManagerProvider- See Also:
ManagerProvider.getNamespaceResolver()
-
getHierarchyManager
public HierarchyManager getHierarchyManager()
- Specified by:
getHierarchyManagerin interfaceManagerProvider- See Also:
ManagerProvider.getHierarchyManager()
-
getLockStateManager
public LockStateManager getLockStateManager()
Description copied from interface:ManagerProviderReturns theLockStateManagerassociated with thisManagerProvider.- Specified by:
getLockStateManagerin interfaceManagerProvider- Returns:
- the
LockStateManagerassociated with thisManagerProvider - See Also:
ManagerProvider.getLockStateManager()
-
getAccessManager
public AccessManager getAccessManager()
- Specified by:
getAccessManagerin interfaceManagerProvider- See Also:
ManagerProvider.getAccessManager()
-
getVersionStateManager
public VersionManager getVersionStateManager()
Description copied from interface:ManagerProviderReturns theVersionManagerassociated with thisManagerProvider.- Specified by:
getVersionStateManagerin interfaceManagerProvider- Returns:
- the
VersionManagerassociated with thisManagerProvider - See Also:
ManagerProvider.getVersionStateManager()
-
getItemDefinitionProvider
public ItemDefinitionProvider getItemDefinitionProvider()
- Specified by:
getItemDefinitionProviderin interfaceManagerProvider- See Also:
ManagerProvider.getItemDefinitionProvider()
-
getNodeTypeDefinitionProvider
public NodeTypeDefinitionProvider getNodeTypeDefinitionProvider()
- Specified by:
getNodeTypeDefinitionProviderin interfaceManagerProvider- See Also:
ManagerProvider.getNodeTypeDefinitionProvider()
-
getEffectiveNodeTypeProvider
public EffectiveNodeTypeProvider getEffectiveNodeTypeProvider()
- Specified by:
getEffectiveNodeTypeProviderin interfaceManagerProvider- See Also:
ManagerProvider.getEffectiveNodeTypeProvider()
-
getQValueFactory
public org.apache.jackrabbit.spi.QValueFactory getQValueFactory() throws RepositoryException- Specified by:
getQValueFactoryin interfaceManagerProvider- Throws:
RepositoryException- See Also:
ManagerProvider.getQValueFactory()
-
getAccessControlProvider
public AccessControlProvider getAccessControlProvider() throws RepositoryException
- Specified by:
getAccessControlProviderin interfaceManagerProvider- Throws:
RepositoryException- See Also:
ManagerProvider.getAccessControlProvider()
-
getJcrValueFactory
public ValueFactory getJcrValueFactory() throws RepositoryException
Description copied from interface:ManagerProviderSame asSession.getValueFactory()but omits the check, if this repository is really level 2 compliant. Therefore, this method may be used for internal functionality only, that require creation and conversion of JCR values.- Specified by:
getJcrValueFactoryin interfaceManagerProvider- Returns:
- Throws:
RepositoryException- See Also:
ManagerProvider.getJcrValueFactory()
-
getValidator
public ItemStateValidator getValidator()
-
getIdFactory
public org.apache.jackrabbit.spi.IdFactory getIdFactory() throws RepositoryException- Throws:
RepositoryException
-
getNameFactory
public org.apache.jackrabbit.spi.NameFactory getNameFactory() throws RepositoryException- Throws:
RepositoryException
-
-