F
- the actual type of factory.public class DefaultLockableAmetysObject<F extends DefaultLockableAmetysObjectFactory> extends DefaultAmetysObject<F> implements LockableAmetysObject
DefaultAmetysObject
which is also a LockableAmetysObject
.PROTECTED_PROPERTIES
Constructor and Description |
---|
DefaultLockableAmetysObject(Node node,
String parentPath,
F factory)
Creates an
DefaultLockableAmetysObject . |
Modifier and Type | Method and Description |
---|---|
UserIdentity |
getLockOwner()
Returns the owner of the lock, or null if none
|
boolean |
isLocked()
Returns true if this
AmetysObject is locked |
void |
lock()
Locks this
AmetysObject |
void |
unlock()
Unlocks this
AmetysObject |
addAllowedGroups, addAllowedProfilesForAnonymous, addAllowedProfilesForAnyConnectedUser, addAllowedUsers, addDeniedGroups, addDeniedProfilesForAnonymous, addDeniedProfilesForAnyConnectedUser, addDeniedUsers, addLabel, checkpoint, copyNode, getAllLabels, getAllowedGroups, getAllowedProfilesForAnonymous, getAllowedProfilesForAnyConnectedUser, getAllowedProfilesForGroups, getAllowedProfilesForUser, getAllowedProfilesForUsers, getAllowedUsers, getAllRevisions, getBaseNode, getBaseVersion, getDeniedGroups, getDeniedProfilesForAnonymous, getDeniedProfilesForAnyConnectedUser, getDeniedProfilesForGroups, getDeniedProfilesForUser, getDeniedProfilesForUsers, getDeniedUsers, getLabels, getLabels, getNode, getRevision, getRevisionTimestamp, getRevisionTimestamp, getUnversionedMetadataHolder, getVersionHistory, removeAllowedGroups, removeAllowedGroups, removeAllowedProfilesForAnonymous, removeAllowedProfilesForAnyConnectedUser, removeAllowedUsers, removeAllowedUsers, removeDeniedGroups, removeDeniedGroups, removeDeniedProfilesForAnonymous, removeDeniedProfilesForAnyConnectedUser, removeDeniedUsers, removeDeniedUsers, removeLabel, restoreFromLabel, restoreFromNode, restoreFromRevision, switchToLabel, switchToRevision
_getFactory, _invalidateName, _invalidateParentPath, getId, getMetadataHolder, getName, getParent, getParentPath, getPath, needsSave, remove, rename, revertChanges, saveChanges
equals, hashCode, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
equals, getId, getName, getParent, getParentPath, getPath, hashCode
getMetadataHolder
needsSave, rename, revertChanges, saveChanges
public DefaultLockableAmetysObject(Node node, String parentPath, F factory)
DefaultLockableAmetysObject
.node
- the node backing this AmetysObject
parentPath
- the parentPath in the Ametys hierarchyfactory
- the DefaultAmetysObjectFactory which created the AmetysObjectpublic void lock() throws AmetysRepositoryException
LockableAmetysObject
AmetysObject
lock
in interface LockableAmetysObject
AmetysRepositoryException
- if a problem occurspublic void unlock() throws AmetysRepositoryException
LockableAmetysObject
AmetysObject
unlock
in interface LockableAmetysObject
AmetysRepositoryException
- if a problem occurspublic boolean isLocked() throws AmetysRepositoryException
LockAwareAmetysObject
AmetysObject
is lockedisLocked
in interface LockAwareAmetysObject
AmetysObject
is lockedAmetysRepositoryException
- if a problem occurspublic UserIdentity getLockOwner() throws AmetysRepositoryException
LockAwareAmetysObject
getLockOwner
in interface LockAwareAmetysObject
AmetysRepositoryException
- if a problem occurs