001package votorola.s.gwt.scene.feed;  // Copyright 2010-2012, Michael Allan. Christian Weilbach. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE.
002
003import java.util.Date;
004import votorola.a.count.Poll;
005import votorola.a.diff.DiffLook;
006import votorola.s.gwt.stage.Message;
007
008
009/** A real-world event as formalized in a bite feed.  It provides accessors for all
010  * possible properties, although only a subset is likely to be backed by actual values in
011  * particular instances.  Which properties are backed and which are unbacked will vary
012  * according to the feed from which the bite has issued.  The API docs for the various
013  * accessors will specify the behaviour to expect for unbacked properties.
014  */
015public interface Bite
016{
017
018
019    /** The difference associated with this bite.
020      *
021      *     @return the difference, or null if none is associated with this bite.
022      */
023    public DiffLook difference();
024
025
026
027    /** The first message associated with this bite.
028      *
029      *     @return the first message, or null if none is associated with this bite.
030      */
031    public Message message();
032
033
034
035    /** All messages associated with this bite.
036      *
037      *     @return a collection of messages, the form of the collection depending on the
038      *       implementation.
039      */
040    public Object messages();
041
042
043
044    /** The date on which the bite was parsed into the database.
045      *
046      *     @return the date, or null if none is associated with this bite.
047      */
048    public Date sentDate();
049
050
051
052    /** The first person associated with this bite.
053      *
054      *     @return the first person, or null if nobody is associated with this bite.
055      */
056    public Person person();
057
058
059
060    /** All persons associated with this bite.
061      *
062      *     @return a collection of persons, the form of the collection depending on the
063      *       implementation.
064      */
065    public Object persons();
066
067
068
069    /** The poll associated with this bite.
070      *
071      *     @return the poll, or null if none is associated with this bite.
072      */
073    public Poll poll();
074
075
076}