1 2 package org.roller.model; 3 import org.roller.RollerException; 4 import org.roller.pojos.Assoc; 5 import org.roller.pojos.CommentData; 6 import org.roller.pojos.WeblogCategoryAssoc; 7 import org.roller.pojos.WeblogCategoryData; 8 import org.roller.pojos.WeblogEntryData; 9 import org.roller.pojos.WebsiteData; 10 import org.roller.pojos.UserData; 11 12 import java.io.Serializable ; 13 import java.util.Date ; 14 import java.util.List ; 15 import java.util.Map ; 16 17 18 21 public interface WeblogManager extends Serializable 22 { 23 public static final String CATEGORY_ATT = "category.att"; 24 25 public static final String ALL = "ALL"; 26 public static final String DRAFT_ONLY = "DRAFT_ONLY"; 27 public static final String PUB_ONLY = "PUB_ONLY"; 28 29 32 public void release(); 33 34 36 37 public WeblogCategoryData createWeblogCategory(); 38 39 40 public WeblogCategoryData createWeblogCategory( 41 WebsiteData website, 42 WeblogCategoryData parent, 43 String name, 44 String description, 45 String image) throws RollerException; 46 47 50 public WeblogCategoryData retrieveWeblogCategory(String id) 51 throws RollerException; 52 53 59 public void moveWeblogCategoryContents(String srcId, String destId) 60 throws RollerException; 61 62 64 65 public List getWeblogCategories(WebsiteData website) 66 throws RollerException; 67 68 69 public List getWeblogCategories(WebsiteData website, boolean includeRoot) 70 throws RollerException; 71 72 76 public WeblogCategoryData getRootWeblogCategory(WebsiteData website) 77 throws RollerException; 78 79 84 public String getPath(WeblogCategoryData category) throws RollerException; 85 86 91 public WeblogCategoryData getWeblogCategoryByPath( 92 WebsiteData website, String categoryPath) 93 throws RollerException; 94 95 102 public WeblogCategoryData getWeblogCategoryByPath( 103 WebsiteData wd, WeblogCategoryData category, String string) 104 throws RollerException; 105 106 108 109 public WeblogCategoryAssoc createWeblogCategoryAssoc(); 110 111 112 public WeblogCategoryAssoc createWeblogCategoryAssoc( 113 WeblogCategoryData category, 114 WeblogCategoryData ancestor, 115 String relation) throws RollerException; 116 117 120 public WeblogCategoryAssoc retrieveWeblogCategoryAssoc(String id) 121 throws RollerException; 122 123 125 128 public CommentData retrieveComment(String id) 129 throws RollerException; 130 131 137 public abstract List getComments( String entryId ) 138 throws RollerException; 139 140 147 public abstract List getComments( String entryId, boolean nospam ) 148 throws RollerException; 149 150 153 public void removeComment( String id ) 154 throws RollerException; 155 156 161 public void removeComments( String [] ids ) 162 throws RollerException; 163 164 167 public void removeCommentsForEntry(String entryId) 168 throws RollerException; 169 170 173 public List getRecentComments(WebsiteData website, int maxCount) 174 throws RollerException; 175 176 178 181 public WeblogEntryData retrieveWeblogEntry(String id) 182 throws RollerException; 183 184 187 public void removeWeblogEntry( String id ) 188 throws RollerException; 189 190 192 204 public List getWeblogEntries( 205 WebsiteData website, 206 Date startDate, 207 Date endDate, 208 String catName, 209 String status, 210 Integer maxEntries) 211 throws RollerException; 212 213 227 public List getWeblogEntries( 228 WebsiteData website, 229 Date startDate, 230 Date endDate, 231 String catName, 232 String status, 233 int offset, 234 int length) 235 throws RollerException; 236 237 251 public Map getWeblogEntryObjectMap( 252 WebsiteData website, 253 Date startDate, 254 Date endDate, 255 String catName, 256 String status, 257 Integer maxEntries) 258 throws RollerException; 259 260 274 public Map getWeblogEntryStringMap( 275 WebsiteData website, 276 Date startDate, 277 Date endDate, 278 String catName, 279 String status, 280 Integer maxEntries) 281 throws RollerException; 282 283 290 public List retrieveWeblogEntries(WeblogCategoryData cat, boolean subcats) 291 throws RollerException; 292 293 301 public WeblogEntryData getNextEntry(WeblogEntryData current, String catName) 302 throws RollerException; 303 304 312 public WeblogEntryData getPreviousEntry(WeblogEntryData current, String catName) 313 throws RollerException; 314 315 321 public List getNextEntries( 322 WeblogEntryData entry, String catName, int maxEntries) throws RollerException; 323 324 330 public List getPreviousEntries( 331 WeblogEntryData entry, String catName, int maxEntries) throws RollerException; 332 333 338 public List getWeblogEntriesPinnedToMain(Integer max) 339 throws RollerException; 340 341 342 public WeblogEntryData getWeblogEntryByAnchor( 343 WebsiteData website, String anchor ) throws RollerException; 344 345 346 public Date getWeblogLastPublishTime( String userName ) 347 throws RollerException; 348 349 356 public Date getWeblogLastPublishTime( String userName, String catName ) 357 throws RollerException; 358 359 362 public void removeWeblogEntryContents(WeblogEntryData data) 363 throws RollerException; 364 365 368 public String createAnchor(WeblogEntryData data) 369 throws RollerException; 370 371 374 public boolean isDuplicateWeblogCategoryName(WeblogCategoryData data) 375 throws RollerException; 376 377 380 public boolean isWeblogCategoryInUse(WeblogCategoryData data) 381 throws RollerException; 382 383 386 public boolean isDescendentOf( 387 WeblogCategoryData child, WeblogCategoryData ancestor) throws RollerException; 388 389 391 public Assoc getWeblogCategoryParentAssoc(WeblogCategoryData data) throws RollerException; 392 393 395 public List getWeblogCategoryChildAssocs(WeblogCategoryData data) throws RollerException; 396 397 399 public List getAllWeblogCategoryDecscendentAssocs(WeblogCategoryData data) throws RollerException; 400 401 403 public List getWeblogCategoryAncestorAssocs(WeblogCategoryData data) throws RollerException; 404 405 412 public String getUrl(UserData user, String contextUrl) throws RollerException; 413 } 414 | Popular Tags |