roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agillil...@apache.org
Subject svn commit: r395368 - /incubator/roller/branches/roller-newbackend/src/org/roller/model/BookmarkManager.java
Date Wed, 19 Apr 2006 19:39:24 GMT
Author: agilliland
Date: Wed Apr 19 12:39:23 2006
New Revision: 395368

URL: http://svn.apache.org/viewcvs?rev=395368&view=rev
Log:
code reformatting.


Modified:
    incubator/roller/branches/roller-newbackend/src/org/roller/model/BookmarkManager.java

Modified: incubator/roller/branches/roller-newbackend/src/org/roller/model/BookmarkManager.java
URL: http://svn.apache.org/viewcvs/incubator/roller/branches/roller-newbackend/src/org/roller/model/BookmarkManager.java?rev=395368&r1=395367&r2=395368&view=diff
==============================================================================
--- incubator/roller/branches/roller-newbackend/src/org/roller/model/BookmarkManager.java
(original)
+++ incubator/roller/branches/roller-newbackend/src/org/roller/model/BookmarkManager.java
Wed Apr 19 12:39:23 2006
@@ -1,62 +1,78 @@
 
 package org.roller.model;
 
+import java.io.Serializable;
+import java.util.List;
 import org.roller.RollerException;
 import org.roller.pojos.Assoc;
 import org.roller.pojos.BookmarkData;
 import org.roller.pojos.FolderData;
 import org.roller.pojos.WebsiteData;
 
-import java.io.Serializable;
-import java.util.List;
-
 
-/** 
+/**
  * Interface to Bookmark Management. Provides methods for retrieving, storing,
  * moving, removing and querying for folders and bookmarks.
- * 
- * @author David M Johnson
  */
-public interface BookmarkManager extends Serializable
-{
-	//---------------------------------------------------------- Bookmark CRUD
-
+public interface BookmarkManager extends Serializable {
+    
+    
     /** Create new bookmark, NOT a persistent instance. */
     public BookmarkData createBookmark();
     
     /** Create new bookmark, NOT a persistent instance. */
     public BookmarkData createBookmark(
-        FolderData parent, 
-        String name, 
-        String desc, 
-        String url, 
-        String feedUrl,
-        Integer weight, 
-        Integer priority, 
-        String image) throws RollerException;
-
+            FolderData parent,
+            String name,
+            String desc,
+            String url,
+            String feedUrl,
+            Integer weight,
+            Integer priority,
+            String image) throws RollerException;
+    
+    
+    public void storeBookmark(BookmarkData bookmark) throws RollerException;
+    
+    
+    /** Delete bookmark by ID. */
+    public void removeBookmark(String id) throws RollerException;
+    
+    
     /** Retrieve bookmark by ID, a persistent instance. */
     public BookmarkData retrieveBookmark(String id) throws RollerException;
-
     
-    public void storeBookmark(BookmarkData bookmark) throws RollerException;
+    
+    /**
+     * @param data
+     * @param subfolders
+     * @return
+     */
+    public List retrieveBookmarks(FolderData data, boolean subfolders)
+            throws RollerException;
     
     
-	/** Delete bookmark by ID. */
-	public void removeBookmark(String id) throws RollerException;
-
-	//------------------------------------------------------------ Folder CRUD 
-
     /** Create new folder, NOT a persistent instance. */
     public FolderData createFolder();
     
     /** Create new folder, NOT a persistent instance. */
     public FolderData createFolder(
-        FolderData parent,
-        String name, 
-        String desc, 
-        WebsiteData website) throws RollerException;
-
+            FolderData parent,
+            String name,
+            String desc,
+            WebsiteData website) throws RollerException;
+    
+    
+    /**
+     * @param folder
+     * @param ancestor
+     * @param relation
+     * @return
+     */
+    public Assoc createFolderAssoc(
+            FolderData folder, FolderData ancestor, String relation)
+            throws RollerException;
+    
     
     public void storeFolder(FolderData folder) throws RollerException;
     
@@ -64,134 +80,128 @@
     public void removeFolder(FolderData folder) throws RollerException;
     
     
-    /** Retrieve folder by ID, a persistent instance. */
+    /** 
+     * Retrieve folder by ID, a persistent instance. 
+     */
     public FolderData retrieveFolder(String id) throws RollerException;
-
-    /**
-     * Determine if folder is in use.  A folder is <em>in use</em> if it contains
any bookmarks
-     * or has any children.
-     * @param folder
-     * @return true if the folder contains bookmarks or has children, false otherwise.
-     * @throws RollerException
+    
+    
+    /** 
+     * Get all folders for a website.
+     *
+     * @param website Website.
      */
-    public boolean isFolderInUse(FolderData folder) throws RollerException;
+    public List getAllFolders(WebsiteData wd) throws RollerException;
     
-	/** Store folder object, becomes a persistent instance. */
-	//public void storeFolder(FolderData data) throws RollerException;
-
-	/** 
-     * Remove folder by ID, does not cascade to subfolders and bookmarks.
-     * You should instead use FolderData.remove() to remove a folder. 
-     */
-	//public void removeFolder(String id) throws RollerException;
-	
-    //------------------------------------------------------------- Operations
-
-    /** Import bookmarks from OPML string into specified folder. 
-      * @param site Website.
-      * @param folder Name of folder to hold bookmarks.
-      * @param opml OPML data to be imported. 
-      */
-    public void importBookmarks(WebsiteData site, String folder, String opml) 
-        throws RollerException;
-    
-	/** Move contents of folder to another folder.
-	  * @param src Source folder.
-	  * @param dest Destination folder.
-	  */
-	public void moveFolderContents(FolderData src, FolderData dest) 
-		throws RollerException;
-
-    /**
-     * Delete contents of specified folder.
+    
+    /** 
+     * Get top level folders for a website.
+     *
+     * @param website Website.
+     */
+    public FolderData getRootFolder(WebsiteData website) throws RollerException;
+    
+    
+    /** 
+     * Get folder specified by website and folderPath.
+     *
+     * @param website Website of folder.
+     * @param folderPath Path of folder, relative to folder root.
      */
-    public void deleteFolderContents(FolderData src) throws RollerException;
+    public FolderData getFolder(WebsiteData website, String folderPath)
+            throws RollerException;
     
-    //---------------------------------------------------------------- Queries 
-
-    /** Get all folders for a website.
-      * @param website Website.
-      */
-    public List getAllFolders(WebsiteData wd) throws RollerException;
-
-    /** Get top level folders for a website.
-      * @param website Website.
-      */
-    public FolderData getRootFolder(WebsiteData website) 
-        throws RollerException;
-
-	/** Get folder specified by website and folderPath. 
-	  * @param website Website of folder.
-	  * @param folderPath Path of folder, relative to folder root.
-	  */
-	public FolderData getFolder(WebsiteData website, String folderPath) 
-		throws RollerException;
-
     /**
      * Get absolute path to folder, appropriate for use by getFolderByPath().
+     *
      * @param folder Folder.
      * @return Forward slash separated path string.
      */
     public String getPath(FolderData folder) throws RollerException;
-
+    
+    
     /**
      * Get subfolder by path relative to specified folder.
+     *
      * @param folder  Root of path or null to start at top of folder tree.
      * @param path    Path of folder to be located.
      * @param website Website of folders.
      * @return FolderData specified by path or null if not found.
      */
-    public FolderData getFolderByPath(
-        WebsiteData wd, FolderData folder, String string) 
-        throws RollerException;
-
+    public FolderData getFolderByPath(WebsiteData wd, FolderData folder, String string)
+            throws RollerException;
+    
+    
     /**
+     * Determine if folder is in use.  A folder is <em>in use</em> if it contains
any bookmarks
+     * or has any children.
+     *
      * @param folder
-     * @param ancestor
-     * @param relation
-     * @return
+     * @return true if the folder contains bookmarks or has children, false otherwise.
+     * @throws RollerException
      */
-    public Assoc createFolderAssoc(
-        FolderData folder, FolderData ancestor, String relation) 
-        throws RollerException;
-        
+    public boolean isFolderInUse(FolderData folder) throws RollerException;
+    
+    
     /**
-     * @param data
-     * @param subfolders
-     * @return
+     * Check duplicate folder name.
      */
-    public List retrieveBookmarks(FolderData data, boolean subfolders)
-        throws RollerException;
-
+    public boolean isDuplicateFolderName(FolderData data) throws RollerException;
+    
+    
     /**
-     * Check duplicate folder name. 
+     * Determines if folder is descendent of folder.
      */
-    public boolean isDuplicateFolderName(FolderData data) throws RollerException;
-
+    public boolean isDescendentOf(FolderData data, FolderData ancestor) throws RollerException;
+    
+    
     /**
      */
     public Assoc getFolderParentAssoc(FolderData data) throws RollerException;
-
+    
     /**
      */
     public List getFolderChildAssocs(FolderData data) throws RollerException;
-
+    
     /**
      */
     public List getAllFolderDecscendentAssocs(FolderData data) throws RollerException;
-
+    
     /**
      */
     public List getFolderAncestorAssocs(FolderData data) throws RollerException;
-
+    
+    
+    /** 
+     * Import bookmarks from OPML string into specified folder.
+     *
+     * @param site Website.
+     * @param folder Name of folder to hold bookmarks.
+     * @param opml OPML data to be imported.
+     */
+    public void importBookmarks(WebsiteData site, String folder, String opml)
+            throws RollerException;
+    
+    
+    /** 
+     * Move contents of folder to another folder.
+     *
+     * @param src Source folder.
+     * @param dest Destination folder.
+     */
+    public void moveFolderContents(FolderData src, FolderData dest)
+            throws RollerException;
+    
     /**
-     * Release all resources associated with Roller session.
+     * Delete contents of specified folder.
      */
-    public void release();
-
+    public void deleteFolderContents(FolderData src) throws RollerException;
+    
+    
     /**
-     * Determines if folder is descendent of folder.
+     * Release all resources associated with Roller session.
      */
-    public boolean isDescendentOf(FolderData data, FolderData ancestor) throws RollerException;
+    public void release();
+    
 }
 



Mime
View raw message