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.SimpleModelAwareAmetysObject<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,ModelAwareAmetysObject,ModifiableModelAwareAmetysObject,DataHolder,ModelAwareDataHolder,ModifiableDataHolder,ModifiableModelAwareDataHolder,JCRAmetysObject,ModelAwareJCRAmetysObject,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
__VERSION_COMPARATOR, PROTECTED_PROPERTIESFields inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
ALTERNATIVE_SUFFIX, STATUS_SUFFIX -
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.SimpleModelAwareAmetysObject
dataToJSON, dataToJSON, dataToJSONForEdition, dataToMap, dataToSAX, dataToSAX, dataToSAXForEdition, getComposite, getComposite, getDataHolder, getDefinition, getDifferences, getDifferences, getDifferences, getDifferences, getExternalComposite, getExternalComposite, getExternalRepeater, getExternalRepeater, getExternalValue, getLocalComposite, getLocalComposite, getLocalRepeater, getLocalRepeater, getLocalValue, getModel, getModelItemTypeExtensionPoint, getParentDataHolder, getRepeater, getRepeater, getRepositoryData, getRootDataHolder, getStatus, getType, getValueOfType, getValueOfTypeOrDefault, getValueOrDefault, getValueWithMultiValuedPathSegments, hasDefinition, hasDifferences, hasDifferences, hasDifferences, hasDifferences, hasExternalValue, hasExternalValueOrEmpty, hasLocalValue, hasLocalValueOrEmpty, hasValue, hasValue, hasValueOrEmpty, isMultiple, isMultiple, removeExternalizableMetadataIfExists, removeExternalValue, removeLocalValue, removeValue, setExternalValue, setLocalValue, setStatus, setValue, setValue, synchronizeValues, synchronizeValues, synchronizeValues, synchronizeValuesMethods 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
dataToJSON, dataToSAX, equals, getDataNames, getValue, getValueOrDefault, 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.data.holder.DataHolder
copyTo, copyTo, dataToJSON, dataToJSON, dataToSAX, dataToSAX, getValue, getValueOrDefault, hasValue, hasValueOrEmptyMethods inherited from interface org.ametys.plugins.repository.data.holder.ModelAwareDataHolder
dataToJSON, dataToJSON, dataToMap, dataToMap, dataToMap, dataToSAX, dataToSAX, getDataNamesMethods inherited from interface org.ametys.plugins.repository.ModifiableAmetysObject
needsSave, rename, revertChanges, saveChangesMethods inherited from interface org.ametys.plugins.repository.data.holder.ModifiableDataHolder
getRepositoryData, removeValue, synchronizeValuesMethods inherited from interface org.ametys.plugins.repository.metadata.ModifiableMetadataAwareAmetysObject
getMetadataHolderMethods inherited from interface org.ametys.plugins.repository.RemovableAmetysObject
remove
-
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
-