Class DefaultLockableAmetysObject<F extends DefaultLockableAmetysObjectFactory>
java.lang.Object
org.ametys.plugins.repository.AbstractAmetysObject
org.ametys.plugins.repository.jcr.SimpleAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultAmetysObject<F>
org.ametys.plugins.repository.jcr.DefaultLockableAmetysObject<F>
- Type Parameters:
F- the actual type of factory.
- All Implemented Interfaces:
ACLAmetysObject,AmetysObject,JCRAmetysObject,LockableAmetysObject,LockAwareAmetysObject,MetadataAwareAmetysObject,ModifiableMetadataAwareAmetysObject,ModifiableACLAmetysObject,ModifiableAmetysObject,RemovableAmetysObject,DataAndVersionAwareAmetysObject,ModifiableDataAwareVersionableAmetysObject,VersionableAmetysObject,VersionAwareAmetysObject
- Direct Known Subclasses:
JCRResource
public class DefaultLockableAmetysObject<F extends DefaultLockableAmetysObjectFactory>
extends DefaultAmetysObject<F>
implements LockableAmetysObject
DefaultAmetysObject which is also a LockableAmetysObject.-
Field Summary
Fields inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
PROTECTED_PROPERTIES -
Constructor Summary
ConstructorsConstructorDescriptionDefaultLockableAmetysObject(javax.jcr.Node node, String parentPath, F factory) Creates anDefaultLockableAmetysObject. -
Method Summary
Modifier and TypeMethodDescriptionReturns the owner of the lock, or null if nonebooleanisLocked()Returns true if thisAmetysObjectis lockedvoidlock()Locks thisAmetysObjectvoidSets a lock info on the current context for this objectvoidunlock()Unlocks thisAmetysObjectMethods inherited from class org.ametys.plugins.repository.jcr.DefaultAmetysObject
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, addLabel, checkpoint, copyNode, disallowInheritance, getAllLabels, getAllRevisions, getBaseNode, getBaseVersion, getLabels, getLabels, getNode, getProfilesForAnonymousAndAnyConnectedUser, getProfilesForGroups, getProfilesForUsers, getRevision, getRevisionTimestamp, getRevisionTimestamp, getUnversionedDataHolder, getVersionHistory, isInheritanceDisallowed, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers, removeLabel, restoreFromLabel, restoreFromNode, restoreFromRevision, switchToLabel, switchToRevisionMethods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChangesMethods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCodeMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
-
Constructor Details
-
DefaultLockableAmetysObject
Creates anDefaultLockableAmetysObject.- Parameters:
node- the node backing thisAmetysObjectparentPath- the parentPath in the Ametys hierarchyfactory- the DefaultAmetysObjectFactory which created the AmetysObject
-
-
Method Details
-
lock
Description copied from interface:LockableAmetysObjectLocks thisAmetysObject- Specified by:
lockin interfaceLockableAmetysObject- Throws:
AmetysRepositoryException- if a problem occurs
-
unlock
Description copied from interface:LockableAmetysObjectUnlocks thisAmetysObject- Specified by:
unlockin interfaceLockableAmetysObject- Throws:
AmetysRepositoryException- if a problem occurs
-
setLockInfoOnCurrentContext
Description copied from interface:LockableAmetysObjectSets a lock info on the current context for this object- Specified by:
setLockInfoOnCurrentContextin interfaceLockableAmetysObject- Throws:
AmetysRepositoryException- if an error occurs
-
isLocked
Description copied from interface:LockAwareAmetysObjectReturns true if thisAmetysObjectis locked- Specified by:
isLockedin interfaceLockAwareAmetysObject- Returns:
- true if this
AmetysObjectis locked - Throws:
AmetysRepositoryException- if a problem occurs
-
getLockOwner
Description copied from interface:LockAwareAmetysObjectReturns the owner of the lock, or null if none- Specified by:
getLockOwnerin interfaceLockAwareAmetysObject- Returns:
- the owner of the lock, or null if none
- Throws:
AmetysRepositoryException- if a problem occurs
-