1 29 30 package javax.jcr; 31 32 import org.xml.sax.ContentHandler ; 33 import org.xml.sax.SAXException ; 34 35 import javax.jcr.lock.LockException; 36 import javax.jcr.nodetype.ConstraintViolationException; 37 import javax.jcr.nodetype.NoSuchNodeTypeException; 38 import javax.jcr.version.VersionException; 39 import java.io.IOException ; 40 import java.io.InputStream ; 41 import java.io.OutputStream ; 42 43 46 public interface Session { 47 50 public Repository getRepository(); 51 52 55 public String getUserID(); 56 57 62 public Object getAttribute(String name); 63 64 67 public String [] getAttributeNames(); 68 69 72 public Workspace getWorkspace(); 73 74 79 public Session impersonate(Credentials credentials) 80 throws LoginException, RepositoryException; 81 82 85 public Node getRootNode() 86 throws RepositoryException; 87 88 93 public Node getNodeByUUID(String uuid) 94 throws ItemNotFoundException, 95 RepositoryException; 96 97 104 public Item getItem(String absPath) 105 throws PathNotFoundException, 106 RepositoryException; 107 108 113 public boolean itemExists(String absPath) 114 throws RepositoryException; 115 116 122 public void move(String srcAbsPath, String destAbsPath) 123 throws ItemExistsException, 124 PathNotFoundException, 125 VersionException, 126 ConstraintViolationException, 127 LockException, 128 RepositoryException; 129 130 133 public void save() 134 throws AccessDeniedException, 135 ItemExistsException, 136 ConstraintViolationException, 137 InvalidItemStateException, 138 VersionException, LockException, 139 NoSuchNodeTypeException, 140 RepositoryException; 141 142 145 public void refresh(boolean keepChanges) 146 throws RepositoryException; 147 148 151 public boolean hasPendingChanges() 152 throws RepositoryException; 153 154 157 public ValueFactory getValueFactory() 158 throws UnsupportedRepositoryOperationException, 159 RepositoryException; 160 161 167 public void checkPermission(String absPath, String actions) 168 throws java.security.AccessControlException , 169 RepositoryException; 170 171 176 public ContentHandler getImportContentHandler(String parentAbsPath, 177 int uuidBehavior) 178 throws PathNotFoundException, 179 ConstraintViolationException, 180 VersionException, 181 LockException, 182 RepositoryException; 183 184 190 public void importXML(String parentAbsPath, 191 InputStream in, 192 int uuidBehavior) 193 throws IOException , 194 PathNotFoundException, 195 ItemExistsException, 196 ConstraintViolationException, 197 VersionException, 198 InvalidSerializedDataException, 199 LockException, 200 RepositoryException; 201 202 208 public void exportSystemView(String absPath, 209 ContentHandler contentHandler, 210 boolean skipBinary, 211 boolean noRecurse) 212 throws PathNotFoundException, 213 SAXException , 214 RepositoryException; 215 216 222 public void exportSystemView(String absPath, 223 OutputStream out, 224 boolean skipBinary, 225 boolean noRecurse) 226 throws IOException , 227 PathNotFoundException, 228 RepositoryException; 229 230 236 public void exportDocumentView(String absPath, 237 ContentHandler contentHandler, 238 boolean skipBinary, 239 boolean noRecurse) 240 throws PathNotFoundException, 241 SAXException , 242 RepositoryException; 243 244 250 public void exportDocumentView(String absPath, 251 OutputStream out, 252 boolean skipBinary, 253 boolean noRecurse) 254 throws IOException , 255 PathNotFoundException, 256 RepositoryException; 257 258 264 public void setNamespacePrefix(String newPrefix, 265 String existingUri) 266 throws NamespaceException, 267 RepositoryException; 268 269 272 public String [] getNamespacePrefixes() 273 throws RepositoryException; 274 275 278 public String getNamespaceURI(String prefix) 279 throws NamespaceException, 280 RepositoryException; 281 282 285 public String getNamespacePrefix(String uri) 286 throws NamespaceException, 287 RepositoryException; 288 289 292 public void logout(); 293 294 297 public boolean isLive(); 298 299 302 public void addLockToken(String lt) 303 throws LockException, 304 RepositoryException; 305 306 309 public String [] getLockTokens(); 310 311 314 public void removeLockToken(String lt); 315 } 316 | Popular Tags |