1 2 package org.roller.model; 3 import java.io.Serializable; 4 import java.sql.Connection; 5 6 import org.roller.RollerException; 7 import org.roller.business.PersistenceStrategy; 8 import org.roller.pojos.UserData; 9 10 /** The main entry point interface of the Roller business tier. 11 * @author David M Johnson 12 */ 13 public interface Roller extends Serializable 14 { 15 /** Get UserManager associated with this Roller instance. 16 * @return UserManager associated with this Roller instance. 17 * @throws RollerException If unable to create or return UserManager. 18 */ 19 public UserManager getUserManager() throws RollerException; 20 21 /** Get BookmarkManager associated with this Roller instance. 22 * @return BookmarkManager associated with this Roller instance. 23 * @throws RollerException If unable to create or return BookmarkManager. 24 */ 25 public BookmarkManager getBookmarkManager() throws RollerException; 26 27 /** Get WeblogManager associated with this Roller instance. 28 * @return WeblogManager associated with this Roller instance. 29 * @throws RollerException If unable to create or return WeblogManager. 30 */ 31 public WeblogManager getWeblogManager() throws RollerException; 32 33 /** Get RefererManager associated with this Roller instance. 34 * @return RefererManager associated with this Roller instance. 35 * @throws RollerException If unable to create or return RefererManager. 36 */ 37 public RefererManager getRefererManager() throws RollerException; 38 39 /** Get RefererManager associated with this Roller instance. 40 * @return RefererManager associated with this Roller instance. 41 * @throws RollerException If unable to create or return RefererManager. 42 */ 43 public ConfigManager getConfigManager() throws RollerException; 44 45 /** 46 * Get the AutoPingManager associated with this Roller instance. 47 * @return the AutoPingManager associated with this Roller instance. 48 * @throws RollerException 49 */ 50 public AutoPingManager getAutopingManager() throws RollerException; 51 52 /** 53 * Get the PingTargetManager associated with this Roller instance. 54 * @return the PingTargetManager associated with this Roller instance. 55 * @throws RollerException 56 */ 57 public PingTargetManager getPingTargetManager() throws RollerException; 58 59 /** 60 * Get the PingQueueManager associated with this Roller instance. 61 * @return the PingQueueManager associated with this Roller instance. 62 * @throws RollerException 63 */ 64 public PingQueueManager getPingQueueManager() throws RollerException; 65 66 /** Get PropertiesManager associated with this Roller instance. 67 * @return PropertiesManager associated with this Roller instance. 68 * @throws RollerException If unable to create or return PropertiesManager. 69 */ 70 public PropertiesManager getPropertiesManager() throws RollerException; 71 72 /** Get FileManager associated with this Roller instance. 73 * @return FileManager associated with this Roller instance. 74 * @throws RollerException If unable to create or return FileManager. 75 */ 76 public FileManager getFileManager() throws RollerException; 77 78 /** 79 * Get ThreadManager associated with this Roller instance. 80 */ 81 public ThreadManager getThreadManager() throws RollerException; 82 83 /** 84 * Get IndexManager associated with this Roller instance. 85 */ 86 public IndexManager getIndexManager() throws RollerException; 87 88 /** 89 * Get PlanetManager associated with the Roller instance. 90 */ 91 public PlanetManager getPlanetManager() throws RollerException; 92 93 94 /** Begin transaction for a thread. 95 */ 96 public void begin() throws RollerException; 97 /** 98 * Start Roller session on behalf of specified user. 99 */ 100 public void begin(UserData user) throws RollerException; 101 /** 102 * Set user for Roller session. 103 */ 104 public void setUser(UserData user) throws RollerException; 105 /** 106 * Get user associated with Roller session. 107 */ 108 public UserData getUser() throws RollerException; 109 110 /** Commit transaction for a thread. 111 * @throws RollerException If database error is thrown. 112 */ 113 public void commit() throws RollerException; 114 115 /** Rollback uncommitted changes for a thread. 116 */ 117 public void rollback(); 118 119 /** 120 * Release all resources associated with Roller session. 121 */ 122 public void release(); 123 124 /** Get persistence strategy used by managers and POJOs. */ 125 public PersistenceStrategy getPersistenceStrategy(); 126 127 /** Repair websites if needed. */ 128 public void upgradeDatabase(Connection con) throws RollerException; 129 130 /** 131 * Release all resources necessary for this instance 132 * of Roller. 133 */ 134 public void shutdown(); 135 } 136 137