*Index
*News
*Status
*Changelog
*Contributors
Downloads
*Releases
*Nightly
Resources
*Source
*Mailing Lists
*CVS
*Library
User's Guide
*Installation
*Configuration
*FAQ
*Examples
*Tomcat Howto
*Avalon Howto
Programmer's Corner
*Architecture
*Domain
*Namespace
Slide API
*Structure
*Security
*Lock
*Content
*Macro
*Index
*Process
WebDAV
*General Info
*Clients
API Reference
*JavaDoc
*WebDAV Client
     Lock Helper
 Overview
Principles
Behavior
Object Model

Overview

Locking is an integral part of Slide. Its model resembles in many ways the security model. When a subject (ie. a user) wants to lock a subject (ie. a file), it specifies which actions (ie. read) are locked and for how long.

Slide automatically checks if a subject is locked before every action. Alternatively, the client application can directly check for whether a particular subject is locked or whether it can actually lock a given subject.

Principles

Every SubjectNode can potentially be locked. A lock consist of the following information tuple:

(target subject,      owner subject,    locked action,   duration,    inheritance)

Here are examples of locks :

(/foo/document.txt,  /user/dave,        /actions/read,     10m,       no)
(/foo/document.txt,  /user/dave,        /actions/write,    10m,       no)
(/foo,               /user/john,        /actions/read,     5m,        yes)

Same as permissions, locks granted on an object are inherited (unless specified otherwise during locking) by the children of the object. For example, a lock obtained on object whose URI is /foo would also apply to the object /foo/bar.

Behavior

Slide automatically enforces all locks through the use of helper functions used by the client application. If a subject (ie. a file) is accessed and the action is already locked by another subject (ie. another client) an ObjectLockedException is thrown, which is a checked exception, so the client application will know that an underlying lock check failed, and will take appropriate actions.

Object Model



 
Java, JDBC, JNDI, Sun, Sun Microsystems are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and in other countries. All other product names mentioned herein are trademarks of their respective owners.
 

The Apache Software Foundation. (C) 2000. All rights reserved