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
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
ConstructorDescriptionDefaultLockableAmetysObject
(javax.jcr.Node node, String parentPath, F factory) Creates anDefaultLockableAmetysObject
. -
Method Summary
Modifier and TypeMethodDescriptionReturns the owner of the lock, or null if noneboolean
isLocked()
Returns true if thisAmetysObject
is lockedvoid
lock()
Locks thisAmetysObject
void
unlock()
Unlocks thisAmetysObject
Methods 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, switchToRevision
Methods inherited from class org.ametys.plugins.repository.jcr.SimpleAmetysObject
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
Methods inherited from class org.ametys.plugins.repository.AbstractAmetysObject
equals, hashCode, toString
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.ametys.plugins.repository.AmetysObject
equals, getId, getName, getParent, getParentPath, getPath, hashCode
Methods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChanges
-
Constructor Details
-
DefaultLockableAmetysObject
Creates anDefaultLockableAmetysObject
.- Parameters:
node
- the node backing thisAmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the DefaultAmetysObjectFactory which created the AmetysObject
-
-
Method Details
-
lock
Description copied from interface:LockableAmetysObject
Locks thisAmetysObject
- Specified by:
lock
in interfaceLockableAmetysObject
- Throws:
AmetysRepositoryException
- if a problem occurs
-
unlock
Description copied from interface:LockableAmetysObject
Unlocks thisAmetysObject
- Specified by:
unlock
in interfaceLockableAmetysObject
- Throws:
AmetysRepositoryException
- if a problem occurs
-
isLocked
Description copied from interface:LockAwareAmetysObject
Returns true if thisAmetysObject
is locked- Specified by:
isLocked
in interfaceLockAwareAmetysObject
- Returns:
- true if this
AmetysObject
is locked - Throws:
AmetysRepositoryException
- if a problem occurs
-
getLockOwner
Description copied from interface:LockAwareAmetysObject
Returns the owner of the lock, or null if none- Specified by:
getLockOwner
in interfaceLockAwareAmetysObject
- Returns:
- the owner of the lock, or null if none
- Throws:
AmetysRepositoryException
- if a problem occurs
-