1 23 24 package org.apache.slide.store.impl.rdbms; 25 26 import java.sql.Connection ; 27 import java.util.Enumeration ; 28 import java.util.Hashtable ; 29 30 import org.apache.slide.common.ServiceAccessException; 31 import org.apache.slide.common.ServiceParameterErrorException; 32 import org.apache.slide.common.ServiceParameterMissingException; 33 import org.apache.slide.common.Uri; 34 import org.apache.slide.content.NodeRevisionContent; 35 import org.apache.slide.content.NodeRevisionDescriptor; 36 import org.apache.slide.content.NodeRevisionDescriptors; 37 import org.apache.slide.content.NodeRevisionNumber; 38 import org.apache.slide.content.RevisionAlreadyExistException; 39 import org.apache.slide.content.RevisionDescriptorNotFoundException; 40 import org.apache.slide.content.RevisionNotFoundException; 41 import org.apache.slide.lock.LockTokenNotFoundException; 42 import org.apache.slide.lock.NodeLock; 43 import org.apache.slide.security.NodePermission; 44 import org.apache.slide.structure.ObjectAlreadyExistsException; 45 import org.apache.slide.structure.ObjectNode; 46 import org.apache.slide.structure.ObjectNotFoundException; 47 import org.apache.slide.util.logger.Logger; 48 49 54 public interface RDBMSAdapter { 55 56 57 59 public void setParameters(Hashtable parameters) 60 throws ServiceParameterErrorException, 61 ServiceParameterMissingException; 62 63 public Logger getLogger(); 64 65 68 public ObjectNode retrieveObject(Connection conn, Uri uri) 69 throws ServiceAccessException, ObjectNotFoundException; 70 71 72 75 public void storeObject(Connection conn, Uri uri, ObjectNode object) 76 throws ServiceAccessException, ObjectNotFoundException; 77 78 79 82 public void createObject(Connection conn, Uri uri, ObjectNode object) 83 throws ServiceAccessException, ObjectAlreadyExistsException; 84 85 86 89 public void removeObject(Connection conn, Uri uri, ObjectNode object) 90 throws ServiceAccessException, ObjectNotFoundException; 91 92 93 96 public void grantPermission 97 (Connection conn, Uri uri, NodePermission permission) 98 throws ServiceAccessException; 99 100 101 104 public void revokePermission 105 (Connection conn, Uri uri, NodePermission permission) 106 throws ServiceAccessException; 107 108 109 112 public void revokePermissions(Connection conn, Uri uri) 113 throws ServiceAccessException; 114 115 116 119 public Enumeration enumeratePermissions(Connection conn, Uri uri) 120 throws ServiceAccessException; 121 122 123 126 public void putLock(Connection conn, Uri uri, NodeLock lock) 127 throws ServiceAccessException; 128 129 130 133 public void renewLock(Connection conn, Uri uri, NodeLock lock) 134 throws ServiceAccessException, LockTokenNotFoundException; 135 136 137 140 public void removeLock(Connection conn, Uri uri, NodeLock lock) 141 throws ServiceAccessException, LockTokenNotFoundException; 142 143 144 147 public void killLock(Connection conn, Uri uri, NodeLock lock) 148 throws ServiceAccessException, LockTokenNotFoundException; 149 150 151 154 public Enumeration enumerateLocks(Connection conn, Uri uri) 155 throws ServiceAccessException; 156 157 158 161 public NodeRevisionDescriptors retrieveRevisionDescriptors 162 (Connection conn, Uri uri) 163 throws ServiceAccessException, RevisionDescriptorNotFoundException; 164 165 166 169 public void createRevisionDescriptors 170 (Connection conn, Uri uri, NodeRevisionDescriptors revisionDescriptors) 171 throws ServiceAccessException; 172 173 174 177 public void storeRevisionDescriptors 178 (Connection conn, Uri uri, NodeRevisionDescriptors revisionDescriptors) 179 throws ServiceAccessException, RevisionDescriptorNotFoundException; 180 181 182 185 public void removeRevisionDescriptors(Connection conn, Uri uri) 186 throws ServiceAccessException; 187 188 189 192 public NodeRevisionDescriptor retrieveRevisionDescriptor 193 (Connection conn, Uri uri, NodeRevisionNumber nrn) 194 throws ServiceAccessException, RevisionDescriptorNotFoundException; 195 196 197 200 public void createRevisionDescriptor 201 (Connection conn, Uri uri, NodeRevisionDescriptor revisionDescriptor) 202 throws ServiceAccessException; 203 204 205 208 public void storeRevisionDescriptor 209 (Connection conn, Uri uri, NodeRevisionDescriptor revisionDescriptor) 210 throws ServiceAccessException, RevisionDescriptorNotFoundException; 211 212 213 216 public void removeRevisionDescriptor 217 (Connection conn, Uri uri, NodeRevisionNumber nrn) 218 throws ServiceAccessException; 219 220 221 224 public NodeRevisionContent retrieveRevisionContent 225 (Connection conn, Uri uri, NodeRevisionDescriptor revisionDescriptor, boolean temporaryConnection) 226 throws ServiceAccessException, RevisionNotFoundException; 227 228 229 232 public void createRevisionContent 233 (Connection conn, Uri uri, NodeRevisionDescriptor revisionDescriptor, 234 NodeRevisionContent revisionContent) 235 throws ServiceAccessException, RevisionAlreadyExistException; 236 237 238 241 public void storeRevisionContent 242 (Connection conn, Uri uri, NodeRevisionDescriptor revisionDescriptor, 243 NodeRevisionContent revisionContent) 244 throws ServiceAccessException, RevisionNotFoundException; 245 246 247 250 public void removeRevisionContent 251 (Connection conn, Uri uri, NodeRevisionDescriptor revisionDescriptor) 252 throws ServiceAccessException; 253 254 255 } 256 257 | Popular Tags |