All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class icc.db.WorkFile

java.lang.Object
   |
   +----icc.db.Entity
           |
           +----icc.db.Header
                   |
                   +----icc.db.File
                           |
                           +----icc.db.WorkFile

public class WorkFile
extends File
the WorkFile class represents the information defining a collaborative project document. In addition to the information defined in the File class, readers and writers can be defined.

The specification of project partners as readers and writers invites these to participate in influencing the document's content, and allows to overwrite the general access rights specified for the corresponding project cube. For a collaborative project document, only those partners specified as writers have write (and possibly delete) permission, whereas only partners specified as readers or writers have access to read the content of the document.

A collaborative project document can also be locked, preventing other partners from temporarily editing the document.

See Also:
Partner, Access

Variable Index

 o READER
A convenience constant for defining a partner as reader.
 o WRITER
A convenience constant for defining a partner as writer.

Constructor Index

 o WorkFile(Integer, String, String, String)
 o WorkFile(String, String, String)
Allocates a WorkFile object with the specified type, name and title.

Method Index

 o author(Integer)
Returns a string declaring the specified partner as a reader or writer with respect to this document document.
 o authors()
Returns an enumeration of the readers and writers.
 o clean()
Clears all information in this document.
 o copy(File)
Copies the specified document information into this work document.
 o duplicate()
Duplicates a WorkFile object.
 o hasAuthors()
Returns the number of readers and writers defined for this document.
 o jsauthors()
Returns an enumeration of the readers and writers.
 o lock(Integer)
Locks this document to inhibit anybody from editing this document.
 o locked()
Returns the identifier of the partner who locked this document, if locked.
 o locking()
Creates a data request to update the lock of this document.
 o removeAuthor(Integer)
Removes a reader or writer.
 o removeAuthor(String)
Removes a reader or writer.
 o setAuthor(Integer, String)
Sets a reader or writer.
 o setAuthor(String, String)
Sets a reader or writer.
 o uncollaborate()
Duplicates a WorkFile object as a File object.
 o unlock(Integer)
Unlocks this document if previously locked by the same partner.

Variables

 o READER
 public static final String READER
A convenience constant for defining a partner as reader.

 o WRITER
 public static final String WRITER
A convenience constant for defining a partner as writer.

Constructors

 o WorkFile
 WorkFile(Integer id,
          String type,
          String name,
          String title)
 o WorkFile
 public WorkFile(String type,
                 String name,
                 String title)
Allocates a WorkFile object with the specified type, name and title. The document identifier is set to NEW.

Parameters:
type - a document type
name - a document name
title - a document title
See Also:
NEW

Methods

 o locked
 public Integer locked()
Returns the identifier of the partner who locked this document, if locked.

Returns:
a partner identifier, if locked; nullotherwise
 o author
 public String author(Integer id)
Returns a string declaring the specified partner as a reader or writer with respect to this document document. Use the String.equals method to compare this string to one of the constants READER and WRITER.

Parameters:
id - a partner identifier
Returns:
a string; null if the partner is neither a reader nor a writer
See Also:
READER, WRITER
 o hasAuthors
 public int hasAuthors()
Returns the number of readers and writers defined for this document.

Returns:
the number of readers and writers
 o authors
 public Enumeration authors()
Returns an enumeration of the readers and writers. Use the Enumeration methods on the returned object to fetch the elements sequentially.

Returns:
an enumeration of the readers and writers
 o jsauthors
 public Enumeration jsauthors()
Returns an enumeration of the readers and writers. Use the Enumeration methods on the returned object to fetch the elements sequentially. This method is accessible from JavaScript.

Returns:
an enumeration of the readers and writers
 o setAuthor
 public void setAuthor(String id,
                       String type)
Sets a reader or writer. Any previous setting for this partner is lost. Altering the document's readers and writers has no actual effect until these are also updated in the database. This method is accessible from JavaScript.

Parameters:
id - a partner identifier as a string
type - a specification of reader or writer
See Also:
alter
 o setAuthor
 public void setAuthor(Integer id,
                       String type)
Sets a reader or writer. Any previous setting for this partner is lost. Altering the document's readers and writers has no actual effect until these are also updated in the database.

Parameters:
id - a partner identifier
type - a specification of reader or writer
See Also:
alter
 o removeAuthor
 public void removeAuthor(String id)
Removes a reader or writer. Altering the document's readers and writers has no actual effect until these are also updated in the database. This method is accessible from JavaScript.

Parameters:
id - a partner identifier as a string
See Also:
alter
 o removeAuthor
 public void removeAuthor(Integer id)
Removes a reader or writer. Altering the document's readers and writers has no actual effect until these are also updated in the database.

Parameters:
id - a partner identifier
See Also:
alter
 o lock
 public void lock(Integer id)
Locks this document to inhibit anybody from editing this document. Locking or unlocking a document has no actual effect until this lock is also updated in the database.

Parameters:
id - a partner identifier
See Also:
locking
 o unlock
 public void unlock(Integer id)
Unlocks this document if previously locked by the same partner. Locking or unlocking a document has no actual effect until this lock is also updated in the database.

Parameters:
id - a partner identifier
See Also:
locking
 o duplicate
 public File duplicate()
Duplicates a WorkFile object.

Returns:
the duplicate object
Overrides:
duplicate in class File
 o copy
 public void copy(File from)
Copies the specified document information into this work document. This document cannot be trusted.

Parameters:
from - the work document information to be copied
Overrides:
copy in class File
 o clean
 public void clean()
Clears all information in this document. This document cannot be trusted.

Overrides:
clean in class File
 o uncollaborate
 public File uncollaborate()
Duplicates a WorkFile object as a File object.

Returns:
the duplicate object
 o locking
 public DataRequest locking()
Creates a data request to update the lock of this document. Only partners specified as writers to this document can submit this request successfully.

Returns:
a data request to update the document lock
See Also:
SERVICE

All Packages  Class Hierarchy  This Package  Previous  Next  Index

This website has been archived and is no longer maintained.