@OpenApiAll
public interface ILockProjectService
Modifier and Type | Interface and Description |
---|---|
static class |
ILockProjectService.LockOptions
Locking operation options
|
Modifier and Type | Method and Description |
---|---|
boolean |
canBeDecompositionLocked(IProject project)
Check if project decomposition can be locked by current user
|
boolean |
canBeDecompositionUnlocked(IProject project)
Check if project decomposition can be unlocked by current user
|
boolean |
canBeLocked(Element element)
Check if given element can be locked by current user.
|
boolean |
canBeLocked(ModuleUsage moduleUsage)
Check if given usage can be locked by current user.
|
boolean |
canBeOptionsLocked(IProject project,
java.lang.String options)
Check if options can be locked.
|
boolean |
canBeOptionsUnlocked(IProject project,
java.lang.String options)
Check if options can be unlocked.
|
boolean |
canBeUnlocked(Element element)
Check if given element can be unlocked by current user.
|
boolean |
canBeUnlocked(ModuleUsage moduleUsage)
Check if given usage can be unlocked by current user.
|
LockInfo |
getDecompositionLock(IProject project)
Return decomposition lock
|
java.util.Collection<Element> |
getLockedBy(java.lang.String user)
Collect all elements locked by given user
|
java.util.Collection<Element> |
getLockedByMe()
Collect all elements locked by current user
|
java.util.Collection<Element> |
getLockedElements()
Returns collection of locked elements.
|
java.util.Collection<java.lang.String> |
getLockedElementUsers()
Returns collection of locked elements owners in the server.
|
java.util.Collection<ModuleUsage> |
getLockedModules()
Collect all usages locked by any user
|
LockInfo |
getLockInfo(Element element)
Return lock information on given element
|
LockInfo |
getLockInfo(ModuleUsage moduleUsage)
Return lock information on given usage
|
java.util.Collection<ModuleUsage> |
getModulesLockedBy(java.lang.String user)
Collect all usages locked by given user
|
java.util.Collection<ModuleUsage> |
getModulesLockedByMe()
Collect all usages locked by current user
|
LockInfo |
getOptionsLock(IProject project,
java.lang.String options)
Get options lock data.
|
boolean |
hasLockedElements()
Check if project has some locked data
|
boolean |
hasPermissionToLock(Element element)
Check permissions for element.
|
boolean |
isDecompositionLocked(IProject project)
Check if decomposition model is locked
|
boolean |
isDecompositionLockedByMe(IProject project)
Checks for decomposition model lock
|
boolean |
isLocked(Element element)
Check if element is locked
|
boolean |
isLocked(ModuleUsage moduleUsage)
Check if usage is locked
|
boolean |
isLockedBy(Element element,
java.lang.String user)
Check if given element is locked by a user
|
boolean |
isLockedByMe(Element element)
Check if the given element has lock on it, and this lock owner is current user.
|
boolean |
isLockedByMe(ModuleUsage moduleUsage)
Check if the given usage has lock on it, and this lock owner is current user.
|
boolean |
isOptionsLocked(IProject project,
java.lang.String options)
Check if given options are locked.
|
boolean |
isOptionsLockedByMe(IProject project,
java.lang.String options)
Check if options locked by current user.
|
default boolean |
lockElements(java.util.Collection<? extends Element> elements,
boolean lockRecursively,
ProgressStatus status)
Lock given elements.
|
boolean |
lockElements(java.util.Collection<? extends Element> elements,
ILockProjectService.LockOptions options,
ProgressStatus status)
Lock given elements.
|
default boolean |
lockElements(java.util.Collection<? extends Element> elements,
ProgressStatus status)
Lock given elements.
|
boolean |
lockModules(java.util.Collection<ModuleUsage> moduleUsages,
boolean checkForNewVersion,
boolean lockAsManyAsPossible,
ProgressStatus status)
Lock given usages.
|
boolean |
lockModules(java.util.Collection<ModuleUsage> moduleUsages,
boolean checkForNewVersion,
ProgressStatus status)
Lock given usages.
|
void |
setCacheOptionsLock(boolean value)
Sets whether options lock should be cached or not.
|
boolean |
setDecompositionLockedByMe(IProject project,
boolean locked,
ProgressStatus status)
Lock/Unlock decomposition model.
|
boolean |
setOptionsLockedByMe(IProject project,
java.lang.String options,
boolean locked,
ProgressStatus status)
Lock/unlock options.
|
boolean |
unlockElements(java.util.Collection<? extends Element> elements,
boolean unlockRecursively,
ProgressStatus status)
Unlock given elements.
|
boolean |
unlockElements(java.util.Collection<? extends Element> elements,
boolean unlockRecursively,
ProgressStatus status,
boolean unlockOnlyMyLocks)
Unlock given elements.
|
boolean |
unlockElements(java.util.Collection<? extends Element> elements,
boolean unlockRecursively,
ProgressStatus status,
java.util.Collection<Element> elementsToUnlock,
boolean unlockOnlyMyLocks)
Unlock given elements.
|
boolean |
unlockElements(java.util.Collection<? extends Element> elements,
ProgressStatus status)
Unlock given elements.
|
boolean |
unlockElements(java.util.Collection<? extends Element> elements,
ProgressStatus status,
boolean unlockOnlyMyLocks)
Unlock given elements.
|
boolean |
unlockModules(java.util.Collection<ModuleUsage> moduleUsages,
ProgressStatus status)
Unlock given usages.
|
void |
updateLocks(ProgressStatus status)
Update local information about locks from server.
|
boolean isLocked(Element element)
element
- elementboolean hasLockedElements()
boolean isLockedBy(Element element, java.lang.String user)
element
- elementuser
- user@CheckForNull LockInfo getLockInfo(Element element)
element
- elementLockInfo getLockInfo(ModuleUsage moduleUsage)
moduleUsage
- module usageboolean isLocked(ModuleUsage moduleUsage)
moduleUsage
- usageboolean isLockedByMe(Element element)
element
- element to check for locked user.boolean isLockedByMe(ModuleUsage moduleUsage)
moduleUsage
- usage to check for locked user.java.util.Collection<Element> getLockedBy(java.lang.String user)
user
- userjava.util.Collection<Element> getLockedByMe()
java.util.Collection<ModuleUsage> getModulesLockedBy(@CheckForNull java.lang.String user)
user
- userjava.util.Collection<ModuleUsage> getModulesLockedByMe()
java.util.Collection<ModuleUsage> getLockedModules()
boolean canBeLocked(Element element)
element
- elementboolean canBeUnlocked(Element element)
element
- elementboolean canBeLocked(ModuleUsage moduleUsage)
moduleUsage
- usageboolean canBeUnlocked(ModuleUsage moduleUsage)
moduleUsage
- usagedefault boolean lockElements(java.util.Collection<? extends Element> elements, boolean lockRecursively, @CheckForNull ProgressStatus status)
elements
- elementslockRecursively
- lock children recursivelystatus
- progress statusdefault boolean lockElements(java.util.Collection<? extends Element> elements, @CheckForNull ProgressStatus status)
elements
- elementsstatus
- progress statusboolean lockElements(java.util.Collection<? extends Element> elements, ILockProjectService.LockOptions options, @CheckForNull ProgressStatus status)
elements
- elementsstatus
- progress statusoptions
- lock operation optionsboolean unlockElements(java.util.Collection<? extends Element> elements, boolean unlockRecursively, @CheckForNull ProgressStatus status, boolean unlockOnlyMyLocks)
elements
- elementsunlockRecursively
- children recursivelystatus
- progress statusunlockOnlyMyLocks
- unlock only my locked elements (used for ESI projects)boolean unlockElements(java.util.Collection<? extends Element> elements, boolean unlockRecursively, @CheckForNull ProgressStatus status, java.util.Collection<Element> elementsToUnlock, boolean unlockOnlyMyLocks)
elements
- elementsunlockRecursively
- children recursivelystatus
- progress statuselementsToUnlock
- elements to unlockunlockOnlyMyLocks
- unlock only my locked elements (used for ESI projects)boolean unlockModules(java.util.Collection<ModuleUsage> moduleUsages, @CheckForNull ProgressStatus status)
moduleUsages
- elementsstatus
- progress statusboolean lockModules(java.util.Collection<ModuleUsage> moduleUsages, boolean checkForNewVersion, @CheckForNull ProgressStatus status)
moduleUsages
- elementscheckForNewVersion
- check if new project version exists on server before lockingstatus
- progress statusboolean lockModules(java.util.Collection<ModuleUsage> moduleUsages, boolean checkForNewVersion, boolean lockAsManyAsPossible, @CheckForNull ProgressStatus status)
moduleUsages
- elementscheckForNewVersion
- check if new project version exists on server before lockinglockAsManyAsPossible
- stop without locking any usages if there is at least one usage which cannot be lockedstatus
- progress statusvoid updateLocks(@CheckForNull ProgressStatus status)
status
- progressjava.util.Collection<Element> getLockedElements()
java.util.Collection<java.lang.String> getLockedElementUsers()
boolean isDecompositionLockedByMe(IProject project)
project
- project which decomposition model is lockedboolean isDecompositionLocked(IProject project)
project
- projectboolean setDecompositionLockedByMe(IProject project, boolean locked, @CheckForNull ProgressStatus status)
project
- project which decomposition model is lockedlocked
- new lock valuestatus
- progress statusLockInfo getDecompositionLock(IProject project)
project
- projectboolean canBeDecompositionLocked(IProject project)
project
- projectboolean canBeDecompositionUnlocked(IProject project)
project
- projectboolean isOptionsLocked(IProject project, java.lang.String options)
project
- project.options
- options.boolean isOptionsLockedByMe(IProject project, java.lang.String options)
project
- project.options
- options.boolean canBeOptionsLocked(IProject project, java.lang.String options)
project
- project.options
- options.boolean canBeOptionsUnlocked(IProject project, java.lang.String options)
project
- project.options
- options.boolean setOptionsLockedByMe(IProject project, java.lang.String options, boolean locked, @CheckForNull ProgressStatus status)
project
- project.options
- optionlocked
- true to lock, false to unlockstatus
- status.@CheckForNull LockInfo getOptionsLock(IProject project, java.lang.String options)
project
- projectoptions
- optionsvoid setCacheOptionsLock(boolean value)
value
- if true then options lock should be cached on the first call.boolean unlockElements(java.util.Collection<? extends Element> elements, ProgressStatus status, boolean unlockOnlyMyLocks)
elements
- elementsstatus
- progress statusunlockOnlyMyLocks
- unlock only my locked elements (used for ESI projects)boolean unlockElements(java.util.Collection<? extends Element> elements, boolean unlockRecursively, @CheckForNull ProgressStatus status)
elements
- elementsunlockRecursively
- children recursivelystatus
- progress statusboolean unlockElements(java.util.Collection<? extends Element> elements, @CheckForNull ProgressStatus status)
elements
- elementsstatus
- progress statusboolean hasPermissionToLock(Element element)
element
- element to check