Class CoolerThreadAccessControl

java.lang.Object
org.deltava.security.command.AccessControl
org.deltava.security.command.CoolerThreadAccessControl
All Implemented Interfaces:
Serializable

public final class CoolerThreadAccessControl extends AccessControl
An Access Controller for Water Cooler Threads.
Since:
1.0
Version:
11.1
Author:
Luke
See Also:
  • Constructor Details

    • CoolerThreadAccessControl

      public CoolerThreadAccessControl(SecurityContext ctx)
      Initializes the controller.
      Parameters:
      ctx - the Command context
  • Method Details

    • updateContext

      public void updateContext(MessageThread t, Channel c)
      Update the MessageThread to verify access to. Since this Access controller may be called many times in succession, it is more efficient to update the thread and channel rather than constantly creating a new CoolerThreadAccessControl object.
      Parameters:
      t - the Water Cooler message thread
      c - the Water Cooler Channel
      See Also:
    • updateContext

      public void updateContext(SecurityContext ctx)
      Updates the Security Context verify access with. Since this Access controller may be called many times in succession, it is more efficient to update the security context rather than constantly creating a new CoolerThreadAccessControl object.
      Parameters:
      ctx - the Command context
      See Also:
    • validate

      public void validate()
      Description copied from class: AccessControl
      Calculates access control rights
      Specified by:
      validate in class AccessControl
    • getCanRead

      public boolean getCanRead()
      Returns if the thread can be read.
      Returns:
      TRUE if it can be read, otherwise FALSE
    • getCanReply

      public boolean getCanReply()
      Returns if the thread can be replied to, or a new post can be made in the Channel.
      Returns:
      TRUE if it can be replied to, otherwise FALSE
    • getCanReport

      public boolean getCanReport()
      Returns whether the thread can be reported for content.
      Returns:
      TRUE if it can be reported, otherwise FALSE
    • getCanEdit

      public boolean getCanEdit()
      Returns if the last post can be edited.
      Returns:
      TRUE if the post can be edited, otherwise FALSE
    • getCanEditTitle

      public boolean getCanEditTitle()
      Returns if the thread title can be edited.
      Returns:
      TRUE if the title can be edited, otherwise FALSE
    • getCanAddImage

      public boolean getCanAddImage()
      Returns if a user can add a Linked Image to the thread.
      Returns:
      TRUE if an Image can be added, otherwise FALSE
    • getCanUnlinkImage

      public boolean getCanUnlinkImage()
      Returns if a user can remove a Linked Image from the thread.
      Returns:
      TRUE if an Image can be unlinked, otherwise FALSE
    • getCanRelinkImages

      public boolean getCanRelinkImages()
      Returns if a user can restore disable Linked Images in this thread.
      Returns:
      TRUE if disabled linked images exists and can be enabled, otherwise FALSE
    • getCanVote

      public boolean getCanVote()
      Returns if the user can cast a vote in the poll.
      Returns:
      TRUE if a vote can be cast, otherwise FALSE
    • getCanLock

      public boolean getCanLock()
      Returns if the thread can be locked.
      Returns:
      TRUE if it can be locked, otherwise FALSE
    • getCanUnlock

      public boolean getCanUnlock()
      Returns if the thread can be unlocked.
      Returns:
      TRUE if it can be unlocked, otherwise FALSE
    • getCanUnstick

      public boolean getCanUnstick()
      Returns if the thread can be unstuck.
      Returns:
      TRUE if the thread can be unstuck, otherwise FALSE
    • getCanDelete

      public boolean getCanDelete()
      Returns if the thread can be deleted.
      Returns:
      TRUE if the thread can be deleted, otherwise FALSE