org.sakaiproject.announcement.tool
Class AnnouncementAction.AnnouncementWrapper

java.lang.Object
  extended by org.sakaiproject.announcement.tool.AnnouncementAction.AnnouncementWrapper
All Implemented Interfaces:
Comparable, AnnouncementMessage, org.sakaiproject.entity.api.Entity, org.sakaiproject.message.api.Message
Enclosing class:
AnnouncementAction

public static class AnnouncementAction.AnnouncementWrapper
extends Object
implements AnnouncementMessage

Decorator for the "Message" class. It adds various properties to the decorated real Announcement message.


Field Summary
 
Fields inherited from interface org.sakaiproject.entity.api.Entity
SEPARATOR
 
Constructor Summary
AnnouncementAction.AnnouncementWrapper(AnnouncementAction.AnnouncementWrapper mWrapper)
          Constructor
AnnouncementAction.AnnouncementWrapper(AnnouncementMessage message, AnnouncementChannel currentChannel, AnnouncementChannel hostingChannel, AnnouncementActionState.DisplayOptions options, String range)
          Constructor
 
Method Summary
 int compareTo(Object arg0)
           
 AnnouncementMessageHeader getAnnouncementHeader()
           
 String getAuthorDisplayName()
           
 String getBody()
           
 String getChannelDisplayName()
          Returns the string that is used to show the channel to the user.
 org.sakaiproject.message.api.MessageHeader getHeader()
           
 String getId()
           
 AnnouncementMessage getMessage()
           
 org.sakaiproject.entity.api.ResourceProperties getProperties()
           
 String getRange()
          returns the range string
 String getReference()
           
 String getReference(String rootProperty)
           
 String getTrimmedBody()
           
 String getUrl()
           
 String getUrl(String rootProperty)
           
 boolean isEditable()
          Returns true if the message is editable.
 void setRange(String range)
          Set the range string
 Element toXml(Document doc, Stack stack)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnouncementAction.AnnouncementWrapper

public AnnouncementAction.AnnouncementWrapper(AnnouncementMessage message,
                                              AnnouncementChannel currentChannel,
                                              AnnouncementChannel hostingChannel,
                                              AnnouncementActionState.DisplayOptions options,
                                              String range)
Constructor

Parameters:
message - The message to be wrapped.
currentChannel - The channel in which the message is contained.
hostingChannel - The channel into which the message is being merged.
maxNumberOfChars - The maximum number of characters that will be returned by getTrimmedBody().

AnnouncementAction.AnnouncementWrapper

public AnnouncementAction.AnnouncementWrapper(AnnouncementAction.AnnouncementWrapper mWrapper)
Constructor

Parameters:
announcementWrapper - The message to be wrapped.
Method Detail

getMessage

public AnnouncementMessage getMessage()

getHeader

public org.sakaiproject.message.api.MessageHeader getHeader()
Specified by:
getHeader in interface org.sakaiproject.message.api.Message

getBody

public String getBody()
Specified by:
getBody in interface org.sakaiproject.message.api.Message

getTrimmedBody

public String getTrimmedBody()

getUrl

public String getUrl()
Specified by:
getUrl in interface org.sakaiproject.entity.api.Entity

getReference

public String getReference()
Specified by:
getReference in interface org.sakaiproject.entity.api.Entity

getReference

public String getReference(String rootProperty)
Specified by:
getReference in interface org.sakaiproject.entity.api.Entity

getUrl

public String getUrl(String rootProperty)
Specified by:
getUrl in interface org.sakaiproject.entity.api.Entity

getId

public String getId()
Specified by:
getId in interface org.sakaiproject.entity.api.Entity

getProperties

public org.sakaiproject.entity.api.ResourceProperties getProperties()
Specified by:
getProperties in interface org.sakaiproject.entity.api.Entity

getRange

public String getRange()
returns the range string

Returns:

setRange

public void setRange(String range)
Set the range string


toXml

public Element toXml(Document doc,
                     Stack stack)
Specified by:
toXml in interface org.sakaiproject.entity.api.Entity

compareTo

public int compareTo(Object arg0)
Specified by:
compareTo in interface Comparable

isEditable

public boolean isEditable()
Returns true if the message is editable.


getChannelDisplayName

public String getChannelDisplayName()
Returns the string that is used to show the channel to the user.


getAnnouncementHeader

public AnnouncementMessageHeader getAnnouncementHeader()
Specified by:
getAnnouncementHeader in interface AnnouncementMessage

getAuthorDisplayName

public String getAuthorDisplayName()


Copyright © 2003-2012 The Sakai Foundation. All Rights Reserved.