1 25 26 package org.snipsnap.snip; 27 28 import org.snipsnap.serialization.Appendable; 29 import org.snipsnap.snip.attachment.Attachments; 30 import org.snipsnap.snip.label.Labels; 31 import org.snipsnap.user.Permissions; 32 import org.snipsnap.user.User; 33 import org.snipsnap.render.macro.list.Linkable; 34 import org.snipsnap.render.macro.list.Nameable; 35 36 import javax.servlet.http.HttpServletRequest ; 37 import java.sql.Timestamp ; 38 import java.util.List ; 39 import java.io.IOException ; 40 41 47 48 public interface Snip extends Linkable, Ownable, Nameable, Appendable { 49 public void handle(HttpServletRequest request); 50 51 public String getName(); 53 54 public Access getAccess(); 55 56 public Modified getModified(); 57 58 65 public boolean isWeblog(); 66 67 72 public boolean isNotWeblog(); 73 74 public int getVersion(); 75 76 public void setVersion(int version); 77 78 public void addPermission(String permission, String role); 79 80 public void setPermissions(Permissions permissions); 81 82 public Permissions getPermissions(); 83 84 public void setApplication(String applicationOid); 85 86 public String getApplication(); 87 88 public String getOUser(); 89 90 public void setOUser(User oUser); 91 92 public void setOUser(String oUser); 93 94 public Attachments getAttachments(); 95 96 public void setAttachments(Attachments attachments); 97 98 public Labels getLabels(); 99 100 public void setLabels(Labels labels); 101 102 public Links getBackLinks(); 103 104 public Links getSnipLinks(); 105 106 public void setBackLinks(Links backLinks); 107 108 public void setSnipLinks(Links snipLinks); 109 110 public int getViewCount(); 111 112 public void setViewCount(int count); 113 114 public int incViewCount(); 115 116 public Timestamp getCTime(); 117 118 public void setCTime(Timestamp cTime); 119 120 public Timestamp getMTime(); 121 122 public void setMTime(Timestamp mTime); 123 124 public String getCUser(); 125 126 public void setCUser(User cUser); 127 128 public void setCUser(String cUser); 129 130 public String getMUser(); 131 132 public void setMUser(User mUser); 133 134 public void setMUser(String mUser); 135 136 public List getChildren(); 137 138 public void setCommentedSnip(Snip comment); 139 140 public Snip getCommentedSnip(); 141 142 public boolean isComment(); 143 144 public Comments getComments(); 145 146 public List getChildrenDateOrder(); 147 148 public List getChildrenModifiedOrder(); 149 150 157 public void addSnip(Snip snip); 158 159 164 public void removeSnip(Snip snip); 165 166 public void setParentName(String name); 167 168 public String getParentName(); 169 170 public void setCommentedName(String name); 171 172 public String getCommentedName(); 173 174 public Snip getParent(); 175 176 public void setDirectParent(Snip parentSnip); 177 178 public void setParent(Snip parentSnip); 179 180 188 public String getShortName(); 189 190 196 public String getNameEncoded(); 197 198 public void setName(String name); 199 200 public String getContent(); 201 202 public void setContent(String content); 203 204 public String getAttachmentString(); 205 206 public String toXML(); 207 208 public String getXMLContent(); 209 210 public SnipPath getPath() throws IOException ; 211 212 public String getTitle(); 213 214 public Snip copy(String newName); 215 } 216 | Popular Tags |