Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.sitemap.bean
Class Bookmarks  view Bookmarks download Bookmarks.java

java.lang.Object
  extended bycom.RuntimeCollective.sitemap.bean.Bookmarks

public class Bookmarks
extends java.lang.Object

A collection of bookmarked content for a SitemapUser. You should not directly instantiate a Bookmarks object; just call Bookmarks.getBookmarksForUser(User user).

Version:
$Id: Bookmarks.java,v 1.7 2003/09/30 15:12:59 joe Exp $

Field Summary
private  java.util.Vector bookmarks
           
private  com.RuntimeCollective.webapps.bean.User user
           
 
Constructor Summary
private Bookmarks(com.RuntimeCollective.webapps.bean.User user)
          Make a new Bookmarks object, containing all bookmarks for this particular user
 
Method Summary
 boolean addBookmark(int id)
           
 boolean addBookmark(SiteLocation sl)
           
private  void addSorted(SiteLocation sl)
          Add the given SiteLocation to the bookmarks vector, in the right location (sort by SiteLocation name).
 java.util.Iterator getAllBookmarks()
          An alternative name for calling "iterator"
static Bookmarks getBookmarksForUser(com.RuntimeCollective.webapps.bean.User user)
          Get a collection of bookmarks for this user
 java.util.Iterator iterator()
          Return an iterator of all live SiteLocation bookmarks.
 java.util.Iterator iteratorIncludeDead()
          Return an iterator of all SiteLocation bookmarks, whether they're live or dead.
 boolean removeBookmark(int id)
           
 boolean removeBookmark(SiteLocation sl)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bookmarks

private java.util.Vector bookmarks

user

private com.RuntimeCollective.webapps.bean.User user
Constructor Detail

Bookmarks

private Bookmarks(com.RuntimeCollective.webapps.bean.User user)
           throws java.sql.SQLException
Make a new Bookmarks object, containing all bookmarks for this particular user

Method Detail

getBookmarksForUser

public static Bookmarks getBookmarksForUser(com.RuntimeCollective.webapps.bean.User user)
                                     throws java.sql.SQLException
Get a collection of bookmarks for this user


addBookmark

public boolean addBookmark(int id)
                    throws java.sql.SQLException

addBookmark

public boolean addBookmark(SiteLocation sl)
                    throws java.sql.SQLException

addSorted

private void addSorted(SiteLocation sl)
Add the given SiteLocation to the bookmarks vector, in the right location (sort by SiteLocation name).


removeBookmark

public boolean removeBookmark(SiteLocation sl)
                       throws java.sql.SQLException

removeBookmark

public boolean removeBookmark(int id)
                       throws java.sql.SQLException

getAllBookmarks

public java.util.Iterator getAllBookmarks()
An alternative name for calling "iterator"


iterator

public java.util.Iterator iterator()
Return an iterator of all live SiteLocation bookmarks. (SiteLocations that are not currently live will still be saved as the users' bookmarks; they just won't be displayed.)


iteratorIncludeDead

public java.util.Iterator iteratorIncludeDead()
Return an iterator of all SiteLocation bookmarks, whether they're live or dead.