Custody SuitePurposeTo implement a version control system in Frontier that allows users to be able to check out and check back in objects.Fat PageThis page contains the Custody suite embedded in the page. The current version is 1.0b8.The Custody Suite requires that the People Suite be previously installed. Before using the Custody suite, you must run the script at custody.init. Objects are...Anything that can be named. This includes parts of the Frontier object database, URLs, projects, files, whatever.Who can check out whatThe custody suite is connected to a database of people.This database lists users with their passwords, email addresses, access permissions, and other information. This people database is extendable. It is the new, centralized method of storing and accessing user information in Frontier. (See the People Suite page to learn about the People suite and get the software.) ResourcesResources are things that can be checked in or out.The types of resources are defined in a table of resource definitions, which may be added to and may include scripts. OutboxThe outbox is the table listing checked-out items.Each checked-out item has its own subtable, which contains a user's name and date and time of check-out. This could be expanded to included additional information such as a message or expected check-in date. Methods attached to different resource types will manage any additional fields. Every resource has its own outbox. User InterfaceAny script or suite can use the Custody API, thus any user interface is theoretically possible.Checking out an objectWhen a request to check something out is received, several questions are asked:
If any of the above questions are false, then an error message is returned. ExtendabilityThe custody suite is extendable.New resource types and definitions may be created. These definitions may contain scripts that over-ride or extend the built-in behavior of the Custody suite. Changes 7/14/97New verbs:
APIOther scripts and suites can use the Custody suite. That's the point behind this suite.Here is the API: (Note about terminology: an "available" object is an object that can be checked in or out; an "unlocked" object is an available object that is not currently checked out.) Knowledge and use of all of these scripts is not required. Some are higher-level than others. More extensive documentation is forthcoming. Checking items in and out
checkOut (objName, resourceType, userName, password)
checkIn (objName, resourceType, userName, password)
Managing Resource Definitions
registerResource (resourceName, adrDefinitionTable)
deleteResourceDefinition (resourceName)
areAllObjectsAvailable (resourceType)
setAllObjectsAvailable (resourceType, fl)
getResourceAddress (resourceType)
deleteFromResourceDefinition (resourceType, deleteList)
editResourceDefinition (resourceType, adrEditTable)
Managing Users
addUser (userName, resourceType, permissions, flAnyAvailableObject, extraInfo)
getUserPermissions (userName, resourceType)
setUserPermissions (userName, resourceType, permissions, flOverWrite)
deleteUser (userName)
deleteUserResource (userName, resourceType)
authenticateUser (userName, userPassword)
userHasAllPermission (userName, resourceType)
getUserCustodyAddress (userName)
getUserPermissions (userName, resourceType)
getUserResourceAddress (userName, resourceType)
userCanCheckout (userName, objName, resourceType)
Managing Objects
makeObjectAvailable (objName, resourceType)
makeObjectUnavailable (objName, resourceType)
isObjectAvailable (objName, resourceType)
lockObject (userName, objName, resourceType)
unlockObject (objName, resourceType)
isObjectLocked (nameOfObject, resourceType)
whoHasObject (objName, resourceType)
timeCheckedOut (objName, resourceType)
Miscellaneous writeToLog (objName, resourceType, userName, message) Database StructureIf you go through the Custody API the structure of the database shouldn't matter to you: you won't access it directly. The job of managing the custody and people databases falls to the Custody and People suites.user.custody resources resourceOne outbox objectOne date (date) userName (string) isObjectAvailable (script) (optional) isObjectLocked (script) (optional) lockObject (script) (optional) makeObjectAvailable (script) (optional) makeObjectUnavailable (script) (optional) unlockObject (script) (optional) userCanCheckOut (script) (optional) user.people.users.userone.services custody flenabled urls flenabled (boolean) flAnyAvailableObject (boolean) permissions (outline) odbObjects flenabled (boolean) flAnyAvailableObject (boolean) permissions (outline)
|
||||||||
|