Update of /cvsroot/roller/roller/src/org/roller/model
In directory sc8-pr-cvs1:/tmp/cvs-serv7610/src/org/roller/model
Modified Files:
RefererManager.java UserManager.java BookmarkManager.java
Log Message:
Further refactoring of biz and persistence layers:
- moved all base managers over to Query API.
- made begin, commit, and rollback behavior consistent.
- removed Hibernate and Castor specific methods.
- moved persistence package up to org.roller level.
Index: RefererManager.java
===================================================================
RCS file: /cvsroot/roller/roller/src/org/roller/model/RefererManager.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** RefererManager.java 18 Nov 2003 04:20:56 -0000 1.16
--- RefererManager.java 29 Nov 2003 19:11:21 -0000 1.17
***************
*** 4,7 ****
--- 4,8 ----
import org.roller.ThreadManager;
import org.roller.pojos.RefererData;
+ import org.roller.pojos.WebsiteData;
import java.util.List;
***************
*** 23,27 ****
* @throws RollerException
*/
! public List getReferers( String userName )
throws RollerException;
--- 24,28 ----
* @throws RollerException
*/
! public List getReferers(WebsiteData website)
throws RollerException;
***************
*** 32,36 ****
* @throws RollerException
*/
! public List getTodaysReferers( String userName )
throws RollerException;
--- 33,37 ----
* @throws RollerException
*/
! public List getTodaysReferers(WebsiteData website)
throws RollerException;
***************
*** 42,46 ****
* @throws RollerException
*/
! public List getReferersToDate( String userName, String date )
throws RollerException;
--- 43,47 ----
* @throws RollerException
*/
! public List getReferersToDate(WebsiteData website, String date)
throws RollerException;
***************
*** 49,53 ****
* @return List of WebsiteDisplayData objects.
*/
! public List getDaysPopularWebsites( int max) throws RollerException;
/**
--- 50,54 ----
* @return List of WebsiteDisplayData objects.
*/
! public List getDaysPopularWebsites(int max) throws RollerException;
/**
***************
*** 57,61 ****
* @throws RollerException
*/
! public List getReferersToEntry( String entryid )
throws RollerException;
--- 58,62 ----
* @throws RollerException
*/
! public List getReferersToEntry(String entryid)
throws RollerException;
***************
*** 71,78 ****
/** Get user's day hits */
! public int getDayHits( String username ) throws RollerException;
/** Get user's all-time total hits */
! public int getTotalHits( String username ) throws RollerException;
//--------------------------------------------- Referer processing methods
--- 72,79 ----
/** Get user's day hits */
! public int getDayHits(WebsiteData website) throws RollerException;
/** Get user's all-time total hits */
! public int getTotalHits(WebsiteData website) throws RollerException;
//--------------------------------------------- Referer processing methods
***************
*** 82,86 ****
* @param request Request to be processed.
*/
! public void processRequest( ParsedRequest request );
/**
--- 83,87 ----
* @param request Request to be processed.
*/
! public void processRequest(ParsedRequest request);
/**
***************
*** 109,114 ****
public void release();
-
-
}
--- 110,113 ----
Index: UserManager.java
===================================================================
RCS file: /cvsroot/roller/roller/src/org/roller/model/UserManager.java,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** UserManager.java 30 Jul 2003 02:49:27 -0000 1.16
--- UserManager.java 29 Nov 2003 19:11:21 -0000 1.17
***************
*** 8,12 ****
import org.roller.pojos.WebsiteData;
! import java.util.HashMap;
--- 8,13 ----
import org.roller.pojos.WebsiteData;
! import java.util.Map;
! import java.util.List;
***************
*** 24,31 ****
/** Get all enabled users */
! public UserData[] getUsers() throws RollerException;
/** Get all users, optionally include dis-enabled users */
! public UserData[] getUsers(boolean enabledOnly) throws RollerException;
/** Get user object by user name (only enabled users) */
--- 25,32 ----
/** Get all enabled users */
! public List getUsers() throws RollerException;
/** Get all users, optionally include dis-enabled users */
! public List getUsers(boolean enabledOnly) throws RollerException;
/** Get user object by user name (only enabled users) */
***************
*** 48,52 ****
* @param themeDir Directory containing theme for user
*/
! public void addUser( UserData user, String theme, HashMap page )
throws RollerException;
--- 49,53 ----
* @param themeDir Directory containing theme for user
*/
! public void addUser( UserData user, String theme, Map page )
throws RollerException;
***************
*** 66,93 ****
/** Get website object by user name */
! public WebsiteData getWebsite( String userName ) throws RollerException;
! public WebsiteData getWebsite( String userName, boolean enabledOnly )
throws RollerException;
! public WebsiteData retrieveWebsite( String id ) throws RollerException;
! public void storeWebsite( WebsiteData data ) throws RollerException;
! public void removeWebsite( String id ) throws RollerException;
//--------------------------------------------------------------- PageData
/** Get user's page by name */
! public PageData getPageByName( String u, String p) throws RollerException;
/** Get user's page by link */
! public PageData getPageByLink( String u, String p) throws RollerException;
/** Fix page link using page name */
! public String fixPageLink( PageData data ) throws RollerException;
/** Get users pages */
! public PageData[] getPages( String userName ) throws RollerException;
! public PageData retrievePage( String id ) throws RollerException;
! public void storePage( PageData data ) throws RollerException;
! public void removePage( String id ) throws RollerException;
/**
--- 67,94 ----
/** Get website object by user name */
! public WebsiteData getWebsite(String userName) throws RollerException;
! public WebsiteData getWebsite(String userName, boolean enabledOnly)
throws RollerException;
! public WebsiteData retrieveWebsite(String id) throws RollerException;
! public void storeWebsite(WebsiteData data) throws RollerException;
! public void removeWebsite(String id) throws RollerException;
//--------------------------------------------------------------- PageData
/** Get user's page by name */
! public PageData getPageByName(WebsiteData w, String p) throws
RollerException;
/** Get user's page by link */
! public PageData getPageByLink(WebsiteData w, String p) throws
RollerException;
/** Fix page link using page name */
! public String fixPageLink(PageData data) throws RollerException;
/** Get users pages */
! public List getPages(WebsiteData w) throws RollerException;
! public PageData retrievePage(String id) throws RollerException;
! public void storePage(PageData data) throws RollerException;
! public void removePage(String id) throws RollerException;
/**
Index: BookmarkManager.java
===================================================================
RCS file: /cvsroot/roller/roller/src/org/roller/model/BookmarkManager.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -C2 -d -r1.11 -r1.12
*** BookmarkManager.java 24 Nov 2003 03:16:07 -0000 1.11
--- BookmarkManager.java 29 Nov 2003 19:11:21 -0000 1.12
***************
*** 21,25 ****
/** Create new bookmark, NOT a persistent instance. */
! public BookmarkData createBookmark() throws RollerException;
/** Retrieve bookmark by ID, a persistent instance. */
--- 21,36 ----
/** 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;
/** Retrieve bookmark by ID, a persistent instance. */
***************
*** 35,39 ****
/** Create new folder, NOT a persistent instance. */
! public FolderData createFolder() throws RollerException;
/** Retrieve folder by ID, a persistent instance. */
--- 46,57 ----
/** 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;
/** Retrieve folder by ID, a persistent instance. */
***************
*** 103,107 ****
WebsiteData wd, FolderData folder, String string)
throws RollerException;
-
}
--- 121,124 ----
-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive? Does it
help you create better code? SHARE THE LOVE, and help us help
YOU! Click Here: http://sourceforge.net/donate/
|