Index - All Packages - All Categories - All Classes

Class FeWork

A persistent identity for a changeable object.

Package: Udanax-Gold
All Superclasses: Object Heaper FeRangeElement
Immediate Subclasses: FeClub
Protocols: Object
Categories: Xanadu-nkernel

Class Methods

bombReleaseWork: CHARGE


infostProtocol



Overrides: FeRangeElement class
Overridden by: FeClub class

make: contents

Essential. Create a new Work whose initial contents are the given Edition. The reader, editor, owner, sponsor, and KeyMaster come from the fluid environment. If the KeyMaster has edit permission, then the Work is initially grabbed by it.
Note: This does not assign it a global ID; that must be done separately (see Server::assignID).

Overridden by: FeClub class

on: be



Overridden by: FeClub class

Instance Methods

addRevisionDetector: detector

Essential. Trigger a Detector whenever there is a revision to the Work which the CurrentKeyMaster can see. If this detector has already been added, then the old KeyMaster associated with it is replaced with the CurrentKeyMaster.
See RevisionDetector::revised (Edition * contents,
ID * author,
IntegerVar sequence,
IntegerVar time).

addSponsors: clubs


addStatusDetector: detector

Essential. Add a detector which will be notified whenever the locking status of this Work object changes.
See FeStatusDetector::grabbed (Work *, ID *) / released (Work *).

again



Overrides: FeRangeElement

canMakeIdentical: newIdentity



Overrides: FeRangeElement

canRead

Return whether you have read permission. If grabbed, returns TRUE (because a grabber can always read); if released, then returns whether the CurrentKeyMaster has sufficient permission to read the work. (Read or Edit permission is required.) Does not check any other KeyMasters you may be holding.
Note: Be careful of synchronization problems, since the permissions may change between when you ask this question and when you try to actually read the Work.

canReadHistory

self canRead or CurrentKeyMaster has authority of the historyClub

canRevise

Return whether the BeWork is grabbed by you through this FeWork.
Note: Be careful of synchronization problems, since the permissions may change before you try to actually revise it, causing you to lose your grab.

create: be



Overridden by: FeClub

currentAuthor


destruct



Overrides: Heaper

editClub

Essential. Return the club which has permission to revise this Work. Blasts if noone can (ie. editor has been removed).

edition

Essential. Return the current Edition. Succeeds if the Work is already grabbed, or if the CurrentKeyMaster has either Read or Edit permission.
Note: If this is an unsponsored Work, the Edition might have been discarded, in which case this operation will blast.

endorse: additionalEndorsements

Essential. Adds to the endorsements on this Work. The set of endorsements must be a finite number of (club ID, token ID) pairs. This requires the signature authority of all of the Clubs used to endorse; will blast and do nothing if any of the required authority is lacking. The token IDs must not be named IDs.

endorsements

Essential. Return all of the endorsements which have been placed on this Work and are not currently retracted.
(Endorsements are used to filter various operations which return sets of Works. See FeEdition::rangeTranscluders() for one way to find this work by filtering for its endorsements.)

fetchAuthor


fetchBe



Overrides: FeRangeElement

getAuthor


getOrMakeBe



Overrides: FeRangeElement

grab

Essential. Grab the Work to prevent other clients from revising it. Requires edit permission. Snapshots the CurrentKeyMaster and CurrentAuthor (to be used to maintain the grab and report what was done with it). Fails if
- someone else has it grabbed
- the CurrentKeyMaster does not have edit permission
- the CurrentKeyMaster does not have signature authority of the CurrentAuthor
If this Work was already grabbed by you, then it updates the KeyMaster and Author it holds. (If the regrab fails, the old grab will remain in effect.)
The grab will be released
- upon a release request
- if the KeyMaster loses authority to edit
- if the KeyMaster loses the signature authority of the Author
- at the end of the session
- when the FeWork object is deallocated (if an FeWork was dropped while grabbed, it will be deallocated 'eventually')

grabber

Essential. If you have edit authority, and someone has the BeWork grabbed, then return the Club ID that was the value of his CurrentAuthor when he grabbed it; otherwise blast.
Requiring edit authority is appropriate here, because it is exactly editors who are affected by competing grabs, and need to know who has the grab. Once the BeWork is revised, anyone who can read the current trail can see the revision, but the grab state doesn't necessarily imply that the BeWork will be revised soon, or ever.

historyClub

Essential. Return the club which will be recorded as the initial club for frozen Works in the history trail. Blasts if there is no trail being generated.

lastRevisionAuthor

The ID of the author of the last revision of this Work to its current Edition, or its creation if it hasn't been revised since. The Work must be grabbed, or the CurrentKeyMaster must be able to exercise the authority of the Read, Edit, or History Club.

lastRevisionNumber

The sequence number of the last revision of this Work to its current Edition, or its creation if it hasn't been revised since. The Work must be grabbed, or the CurrentKeyMaster must be able to exercise the authority of the Read, Edit, or History Club.

lastRevisionTime

The time of the last revision of this Work to its current Edition, or its creation if it hasn't been revised since. The Work must be grabbed, or the CurrentKeyMaster must be able to exercise the authority of the Read, Edit, or History Club.

lock


lockingClub


makeIdentical: newIdentity



Overrides: FeRangeElement

printOn: oo



Overrides: Object

readClub

Essential. Return the club which has permission to read this Work. Blasts if the read Club has been removed (in that case, only those who have edit permission can read the Work).

release

Essential. Release the grab on this Work; if a requestGrab had been pending, remove it. Does nothing if it is already unlocked.

Overrides: Object

removeEditClub

Essential. Irrevocably remove edit permission. Requires ownership authority.

removeLastRevisionDetector

Essential. Inform the work that its last revision detector has gone away.

removeLastStatusDetector

Essential. Last detector has gone away

removeReadClub

Essential. Irrevocably remove read permission (although you should note that editors are still able to read, if there are any). Requires ownership authority.

removeSponsors: clubs


requestGrab

Essential. Registers a request so that the next time this Work would have been released and no other grab requests are outstanding the CurrentKeyMaster (as of making the request) has edit permission, and has signature authority of the CurrentAuthor (as of making the request), it will be grabbed by this FeWork. If this FeWork already has the Work grabbed, then the request has no effect. To find out when the grab succeeds, place Status Detectors on the Work. (If there are competing requestGrabs for a BeWork, the queueing of the requests may not be FIFO, but is starvation-free.) Note that if you have a requestGrab outstanding on a BeWork through one FeWork, and release a grab you have through another, your requestGrab has no special priority over those of other users.

requestLock

Essential. Registers a request so that the next time this Work would have been unlocked and the KeyMaster has edit permission, it will be locked by this client. If this client already has it locked, then it has no effect. To find out when this happens, place Status Detectors on the Work.

retract: removedEndorsements

Essential. Removes endorsements from this Work. This requires the signature authority of all of the Clubs whose endorsements are in the list; will blast and do nothing if any of the required authority is lacking. Ignores all endorsements which you could have removed, but which don't happen to be there right now.

revise: newEdition

Essential. Change the current Edition of this work to newEdition. The Work must be grabbed The grabber is recorded as the author who made the revision.
(This is the fundamental write operation.)

revisionDetector

Essential. Return a detector tht will trigger whenever there is a revision to the Work which the CurrentKeyMaster can see.
See RevisionDetector::revised (Edition * contents,
ID * author,
IntegerVar sequence,
IntegerVar time).

revisions

Return the revision trail of the receiver. The trail will be empty if no revisions have been recorded. The trail is updated immediately when the Work is revised.
In order to get the trail, either the Work must be grabbed, or you must be a member of the Read, Edit, or History Clubs.

setEditClub: club

Essential. Change who has edit permission. Requires ownership authority.
Aborts if the Work doesn't have an edit Club.

setHistoryClub: club

Essential. Change the initial read Club for frozen Works in the trail. Requires ownership authority. Setting it to nil turns off the recording of history.

setKeyMaster: km

Essential. Change the authority through which the Work is being read and revised. Blasts if the Work is locked and the new authority is insufficient to maintain the lock.

setReadClub: club

Essential. Change who has read permission. Requires ownership authority.
Aborts if the works doesn't have a read Club.

sponsor: clubs

Essential. Add to the list of sponsors of this Work. Requires signature authority of all of the Clubs in the set.

sponsors

Essential. All of the Clubs which are sponsoring this Work to keep it from being discarded.
What sort of permissions does this require?

statusDetector

Essential. Return a detector which will be notified whenever the locking status of this Work changes.
See FeStatusDetector::grabbed (Work *, ID *) / released (Work *).

triggerRevisionDetectors: contents with: author with: time with: sequence


unendorse: removedEndorsements


unlock

Essential. Release the lock on this Work. Does nothing if it is already unlocked.

unsponsor: clubs

Essential. End sponsorship of this Work by all of the listed Clubs. Requires signature authority of all of the Clubs in the set, even if they are not currently sponsors.
Should this use the CurrentKeyMaster? Or the internal KeyMaster if it is grabbed?

updateStatus

The authority of my KeyMaster has changed and I need to update my status


Index - All Packages - All Categories - All Classes