edu.wisc.my.portlets.bookmarks.dao.file
Class FileSystemBookmarkStore

java.lang.Object
  extended by edu.wisc.my.portlets.bookmarks.dao.file.FileSystemBookmarkStore
All Implemented Interfaces:
BookmarkStore

public class FileSystemBookmarkStore
extends java.lang.Object
implements BookmarkStore

Version:
$Revision: 12150 $
Author:
Eric Dalquist eric.dalquist@doit.wisc.edu

Field Summary
protected  org.apache.commons.logging.Log logger
           
 
Constructor Summary
FileSystemBookmarkStore()
           
 
Method Summary
 BookmarkSet createBookmarkSet(java.lang.String owner, java.lang.String name)
          Creates a BookmarkSet and stores it in the persistent store.
 java.lang.String getBaseStorePath()
           
 BookmarkSet getBookmarkSet(java.lang.String owner, java.lang.String name)
          Gets a BookmarkSet for the specified owner and name.
protected  java.io.File getStoreDirectory()
           
protected  java.io.File getStoreFile(java.lang.String owner, java.lang.String name)
          Generates the File object to use for storing, retrieving and deleting the bookmark set.
protected  java.lang.String getStoreFileName(java.lang.String owner, java.lang.String name)
          Generates the file name String for an owner and book name.
 void removeBookmarkSet(java.lang.String owner, java.lang.String name)
          Removes a BookmarkSet from the persistent store.
 void setBaseStorePath(java.lang.String baseStorePath)
           
 void storeBookmarkSet(BookmarkSet bookmarkSet)
          Stores a new BookmarkSet or updates an existing BookmarkSet.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final org.apache.commons.logging.Log logger
Constructor Detail

FileSystemBookmarkStore

public FileSystemBookmarkStore()
Method Detail

getBaseStorePath

public java.lang.String getBaseStorePath()
Returns:
Returns the baseStorePath.

setBaseStorePath

public void setBaseStorePath(java.lang.String baseStorePath)
Parameters:
baseStorePath - The baseStorePath to set.

getBookmarkSet

public BookmarkSet getBookmarkSet(java.lang.String owner,
                                  java.lang.String name)
Description copied from interface: BookmarkStore
Gets a BookmarkSet for the specified owner and name. If no BookmarkSet can be found for the owner and name null is retuned.

Specified by:
getBookmarkSet in interface BookmarkStore
Parameters:
owner - The owner of the BookmarkSet to retreive.
name - The name of the BookmarkSet to retrieve.
Returns:
The BookmarkSet for the name and owner, null if one is not found for the owner and name.
See Also:
BookmarkStore.getBookmarkSet(java.lang.String, java.lang.String)

storeBookmarkSet

public void storeBookmarkSet(BookmarkSet bookmarkSet)
Description copied from interface: BookmarkStore
Stores a new BookmarkSet or updates an existing BookmarkSet. BookmarkSets are keyed uniquely using the name and owner fields.

Specified by:
storeBookmarkSet in interface BookmarkStore
Parameters:
bookmarkSet - The BookmarkSet to persist. TODO should this return something?
See Also:
BookmarkStore.storeBookmarkSet(edu.wisc.my.portlets.bookmarks.domain.BookmarkSet)

removeBookmarkSet

public void removeBookmarkSet(java.lang.String owner,
                              java.lang.String name)
Description copied from interface: BookmarkStore
Removes a BookmarkSet from the persistent store. If a BookmarkSet matching the owner and name cannot be found this is a noop.

Specified by:
removeBookmarkSet in interface BookmarkStore
Parameters:
owner - The owner of the BookmarkSet to remove.
name - The name of the BookmarkSet to remove.
See Also:
BookmarkStore.removeBookmarkSet(java.lang.String, java.lang.String)

createBookmarkSet

public BookmarkSet createBookmarkSet(java.lang.String owner,
                                     java.lang.String name)
Description copied from interface: BookmarkStore
Creates a BookmarkSet and stores it in the persistent store.

Specified by:
createBookmarkSet in interface BookmarkStore
Parameters:
owner - The owner of the BookmarkSet to create.
name - The name of the BookmarkSet to create.
Returns:
The new BookmarkSet.
See Also:
BookmarkStore.createBookmarkSet(java.lang.String, java.lang.String)

getStoreFileName

protected java.lang.String getStoreFileName(java.lang.String owner,
                                            java.lang.String name)
Generates the file name String for an owner and book name.

Parameters:
owner - The owner of the bookmark set.
name - The name of the bookmark set.
Returns:
The file name for the owner and name.

getStoreFile

protected java.io.File getStoreFile(java.lang.String owner,
                                    java.lang.String name)
Generates the File object to use for storing, retrieving and deleting the bookmark set.

Parameters:
owner - The owner of the bookmark set.
name - The name of the bookmark set.
Returns:
The File for the owner and name.

getStoreDirectory

protected java.io.File getStoreDirectory()
Returns:
The directory to store AddressBooks in.


Copyright © 1998-2007 Java Architectures Special Interest Group. All Rights Reserved.