1 23 24 package org.apache.slide.lock; 25 26 import java.util.Date ; 27 import java.util.Enumeration ; 28 29 import org.apache.slide.common.ServiceAccessException; 30 import org.apache.slide.common.SlideException; 31 import org.apache.slide.common.SlideToken; 32 import org.apache.slide.security.AccessDeniedException; 33 import org.apache.slide.structure.ActionNode; 34 import org.apache.slide.structure.ObjectNode; 35 import org.apache.slide.structure.ObjectNotFoundException; 36 import org.apache.slide.structure.SubjectNode; 37 import org.apache.slide.event.VetoException; 38 39 44 public interface Lock { 45 46 47 49 50 63 void lock(SlideToken slideToken, NodeLock lockToken) 64 throws ServiceAccessException, ObjectIsAlreadyLockedException, 65 AccessDeniedException, ObjectNotFoundException, VetoException; 66 67 68 80 boolean unlock(SlideToken slideToken, NodeLock lockToken) 81 throws ServiceAccessException, LockTokenNotFoundException, VetoException; 82 83 95 void unlock(SlideToken slideToken, String objectUri, 96 String lockId) 97 throws ServiceAccessException, LockTokenNotFoundException, 98 ObjectNotFoundException, VetoException; 99 100 101 111 void renew(SlideToken slideToken, NodeLock lockToken, 112 Date newExpirationDate) 113 throws ServiceAccessException, LockTokenNotFoundException, VetoException; 114 115 116 129 void renew(SlideToken slideToken, String objectUri, 130 String lockId, Date newExpirationDate) 131 throws ServiceAccessException, LockTokenNotFoundException, 132 ObjectNotFoundException, VetoException; 133 134 135 148 void kill(SlideToken slideToken, SubjectNode subject) 149 throws ServiceAccessException, AccessDeniedException, 150 LockTokenNotFoundException, ObjectNotFoundException, VetoException; 151 152 153 167 Enumeration enumerateLocks(SlideToken slideToken, 168 String objectUri) 169 throws ServiceAccessException, ObjectNotFoundException, 170 LockTokenNotFoundException; 171 172 173 192 Enumeration enumerateLocks(SlideToken slideToken, String objectUri, 193 boolean inherited) 194 throws ServiceAccessException, ObjectNotFoundException, 195 LockTokenNotFoundException; 196 197 198 210 void checkLock(SlideToken slideToken, ObjectNode object, 211 ActionNode action) 212 throws ServiceAccessException, ObjectNotFoundException, 213 ObjectLockedException; 214 215 216 229 void checkLock(SlideToken slideToken, ObjectNode subject, 230 SubjectNode user, ActionNode action) 231 throws ServiceAccessException, ObjectNotFoundException, 232 ObjectLockedException; 233 234 235 247 boolean isLocked(SlideToken slideToken, ObjectNode subject, 248 SubjectNode user, ActionNode action, boolean tryToLock) 249 throws ServiceAccessException, ObjectNotFoundException; 250 251 252 269 boolean isLocked(SlideToken slideToken, ObjectNode subject, 270 SubjectNode user, ActionNode action, boolean inheritance, 271 boolean tryToLock) 272 throws ServiceAccessException, ObjectNotFoundException; 273 274 275 284 boolean isLocked(SlideToken slideToken, NodeLock token, 285 boolean tryToLock) 286 throws ServiceAccessException, ObjectNotFoundException; 287 288 296 public void clearExpiredLocks( SlideToken slideToken, String objectUri, UnlockListener listener ) throws SlideException; 297 298 305 public boolean checkLockToken(SlideToken slideToken, NodeLock token); 306 307 318 public boolean checkLockOwner(SlideToken slideToken, NodeLock token) throws ObjectNotFoundException, ServiceAccessException; 319 } 320 | Popular Tags |