1 25 package org.snipsnap.snip; 26 27 import org.apache.lucene.search.Hits; 28 29 import java.sql.Timestamp ; 30 import java.util.List ; 31 32 39 40 public interface SnipSpace { 41 public String getETag(); 42 43 public void changed(Snip snip); 45 46 public void init(); 47 48 public void setETag(); 49 50 public int getSnipCount(); 51 52 public List getChanged(); 53 54 public List getChanged(int count); 55 56 public List getAll(); 57 58 public List getSince(Timestamp date); 59 60 public List getByDate(String nameSpace, String start, String end); 61 62 69 public List getHot(int count); 70 71 public List getComments(Snip snip); 72 73 public List getByUser(String login); 74 75 public List getChildren(Snip snip); 76 77 public List getChildrenDateOrder(Snip snip, int count); 78 79 public List getChildrenModifiedOrder(Snip snip, int count); 80 81 public void reIndex(); 82 83 public Hits search(String queryString); 84 85 public Blog getBlog(); 86 87 public Blog getBlog(String name); 88 89 public boolean exists(String name); 90 91 public Snip[] match(String pattern); 92 93 public Snip[] match(String start, String end); 94 95 public Snip load(String name); 96 97 public void store(Snip snip); 98 99 106 public void systemStore(Snip snip); 107 108 117 public void delayedStore(Snip snip); 118 119 125 public Snip create(String name, String content); 126 127 public void remove(Snip snip); 128 } | Popular Tags |