1 18 19 package org.apache.roller.model; 20 21 import java.util.Date ; 22 import java.util.List ; 23 import java.util.Map ; 24 import org.apache.roller.RollerException; 25 import org.apache.roller.pojos.Assoc; 26 import org.apache.roller.pojos.CommentData; 27 import org.apache.roller.pojos.UserData; 28 import org.apache.roller.pojos.WeblogCategoryData; 29 import org.apache.roller.pojos.WeblogEntryData; 30 import org.apache.roller.pojos.WebsiteData; 31 32 33 36 public interface WeblogManager { 37 38 public static final String CATEGORY_ATT = "category.att"; 39 40 43 public void saveWeblogEntry(WeblogEntryData entry) throws RollerException; 44 45 48 public void removeWeblogEntry(WeblogEntryData entry) throws RollerException; 49 50 53 public WeblogEntryData getWeblogEntry(String id) throws RollerException; 54 55 58 public WeblogEntryData getWeblogEntryByAnchor(WebsiteData website, String anchor) 59 throws RollerException; 60 61 76 public List getWeblogEntries( 77 WebsiteData website, 78 UserData user, 79 Date startDate, 80 Date endDate, 81 String catName, 82 String status, 83 String sortBy, 84 String locale, 85 int offset, 86 int range) 87 throws RollerException; 88 89 103 public Map getWeblogEntryObjectMap( 104 WebsiteData website, 105 Date startDate, 106 Date endDate, 107 String catName, 108 String status, 109 String locale, 110 int offset, 111 int range) 112 throws RollerException; 113 114 128 public Map getWeblogEntryStringMap( 129 WebsiteData website, 130 Date startDate, 131 Date endDate, 132 String catName, 133 String status, 134 String locale, 135 int offset, 136 int range) 137 throws RollerException; 138 139 146 public List getWeblogEntries(WeblogCategoryData cat, boolean subcats) 147 throws RollerException; 148 149 158 public List getMostCommentedWeblogEntries( 159 WebsiteData website, 160 Date startDate, 161 Date endDate, 162 int offset, 163 int length) 164 throws RollerException; 165 166 172 public WeblogEntryData getNextEntry(WeblogEntryData current, 173 String catName, String locale) throws RollerException; 174 175 181 public WeblogEntryData getPreviousEntry(WeblogEntryData current, 182 String catName, String locale) throws RollerException; 183 184 190 public List getNextEntries(WeblogEntryData entry, 191 String catName, String locale, int maxEntries) throws RollerException; 192 193 199 public List getPreviousEntries(WeblogEntryData entry, 200 String catName, String locale, int maxEntries) throws RollerException; 201 202 207 public List getWeblogEntriesPinnedToMain(Integer max) throws RollerException; 208 209 210 public Date getWeblogLastPublishTime(WebsiteData website) throws RollerException; 211 212 218 public Date getWeblogLastPublishTime(WebsiteData website, String catName ) 219 throws RollerException; 220 221 224 public void saveWeblogCategory(WeblogCategoryData cat) throws RollerException; 225 226 229 public void removeWeblogCategory(WeblogCategoryData cat) throws RollerException; 230 231 234 public WeblogCategoryData getWeblogCategory(String id) throws RollerException; 235 236 239 public void moveWeblogCategoryContents(WeblogCategoryData srcCat, WeblogCategoryData destCat) 240 throws RollerException; 241 242 246 public WeblogCategoryData getRootWeblogCategory(WebsiteData website) throws RollerException; 247 248 249 254 public WeblogCategoryData getWeblogCategoryByPath(WebsiteData website, 255 String categoryPath) throws RollerException; 256 257 264 public WeblogCategoryData getWeblogCategoryByPath(WebsiteData wd, 265 WeblogCategoryData category, String string) throws RollerException; 266 267 270 public List getWeblogCategories(WebsiteData website) throws RollerException; 271 272 275 public List getWeblogCategories(WebsiteData website, boolean includeRoot) 276 throws RollerException; 277 278 283 public String getPath(WeblogCategoryData category) throws RollerException; 284 285 288 public Assoc getWeblogCategoryParentAssoc(WeblogCategoryData data) throws RollerException; 289 290 293 public List getWeblogCategoryChildAssocs(WeblogCategoryData data) throws RollerException; 294 295 298 public List getAllWeblogCategoryDecscendentAssocs(WeblogCategoryData data) throws RollerException; 299 300 303 public List getWeblogCategoryAncestorAssocs(WeblogCategoryData data) throws RollerException; 304 305 308 public void saveComment(CommentData comment) throws RollerException; 309 310 313 public void removeComment(CommentData comment) throws RollerException; 314 315 318 public CommentData getComment(String id) throws RollerException; 319 320 333 public List getComments( 334 WebsiteData website, 335 WeblogEntryData entry, 336 String searchString, 337 Date startDate, 338 Date endDate, 339 Boolean pending, 340 Boolean approved, 341 Boolean spam, 342 boolean reverseChrono, 343 int offset, 344 int length 345 ) throws RollerException; 346 347 350 public String createAnchor(WeblogEntryData data) throws RollerException; 351 352 355 public boolean isDuplicateWeblogCategoryName(WeblogCategoryData data) 356 throws RollerException; 357 358 361 public boolean isWeblogCategoryInUse(WeblogCategoryData data) 362 throws RollerException; 363 364 367 public boolean isDescendentOf(WeblogCategoryData child, 368 WeblogCategoryData ancestor) throws RollerException; 369 370 373 public void applyCommentDefaultsToEntries(WebsiteData website) 374 throws RollerException; 375 376 379 public void release(); 380 } 381 | Popular Tags |