Class Board

Object
Board
All Implemented Interfaces:
Serializable, DisplayInterface, Ownage

@Entity public class Board extends Object implements Serializable, DisplayInterface, Ownage
Author:
maartenl
See Also:
  • Constructor Details

  • Method Details

    • getId

      public Long getId()
    • setId

      public void setId(Long id)
    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getDescription

      public String getDescription()
    • setDescription

      public void setDescription(String description)
    • getCreation

      public LocalDateTime getCreation()
    • setCreation

      public void setCreation(LocalDateTime creation)
    • getOwner

      public Admin getOwner()
      Description copied from interface: Ownage
      Retrieves the owner, the administrator, of this object. In case this is null, anyone can edit the object.
      Specified by:
      getOwner in interface Ownage
      Returns:
    • setOwner

      public void setOwner(Admin owner)
      Description copied from interface: Ownage
      Sets the owner, the administrator, of this object.
      Specified by:
      setOwner in interface Ownage
      Parameters:
      owner - the owner/administrator of the object. In case this is null, which is allowed, any administrator can edit this object. This is what happens when an object is "disowned".
    • getRoom

      public Room getRoom()
      The room in which this message board resides.
      Returns:
      Room, cannot be null.
    • setRoom

      public void setRoom(Room room)
      Sets the room in which this message board resides.
      Parameters:
      room - The room. Cannot be null.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object object)
      Overrides:
      equals in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • addMessage

      public boolean addMessage(User aUser, String message)
    • getMainTitle

      public String getMainTitle() throws MudException
      Description copied from interface: DisplayInterface
      The title as visible on the screen.
      Specified by:
      getMainTitle in interface DisplayInterface
      Returns:
      Throws:
      MudException
    • getImage

      public String getImage() throws MudException
      Description copied from interface: DisplayInterface
      Returns an url pointing to an image.
      Specified by:
      getImage in interface DisplayInterface
      Returns:
      Throws:
      MudException
    • getBody

      public String getBody() throws MudException
      Description copied from interface: DisplayInterface
      The body to be displayed on the screen. In general the first letter of the body is converted to an image on the client side.
      Specified by:
      getBody in interface DisplayInterface
      Returns:
      Throws:
      MudException