Interface Lockable

All Known Subinterfaces:
ContentPackage, Package, Project, ScheduleEntry, ScheduleTaskTemplate, Task, TemplatePackage

public interface Lockable
This interface provides methods for all elements which supports lock mechanism Date: 24.07.2006 Time: 07:45:22
Since:
4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether this object is changed locally or not.
    boolean
    Returns the lock state of this object.
    void
    Locks this object.
    void
    Discard local changes and load actual server version of this object
    void
    Saves this object.
    void
    Unlocks this object.
  • Method Details

    • lock

      Locks this object. If the version of this object has been changed on the server and it isn't changed locally it will be refreshed transparent.
      In case of local changes a ConcurrentModificationException will be thrown.
      Throws:
      ConcurrentChangeException - if this object is changed locally and it has changed on the server
      LockException - if the underlying object is already locked by another user
      Since:
      4.0
      See Also:
    • unlock

      void unlock()
      Unlocks this object.
      Since:
      4.0
    • isLocked

      boolean isLocked()
      Returns the lock state of this object.
      Returns:
      true if this object is locked, false otherwise
      Since:
      4.0
    • save

      void save()
      Saves this object. Requires a lock to this object.
      Since:
      4.0
    • isChanged

      boolean isChanged()
      Indicates whether this object is changed locally or not.
      Returns:
      true if this object is changed locally, false otherwise
      Since:
      4.0
    • refresh

      void refresh()
      Discard local changes and load actual server version of this object
      Since:
      4.0