All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class icc.db.Access

java.lang.Object
   |
   +----icc.db.Cube
           |
           +----icc.db.Access

public class Access
extends Cube
The Access class represents all access information with respect to a project cube.

Default access rights can be specified for project partners and others. Individual access rights can be specified for each partner.

An access right is specified by a char, which can take any of the values DELETE, WRITE, READ or NONE. A method may also return the value NULL to indicate that no access right is defined.

All changes to an Access object must be submitted to the project database before these will take effect. Note that only the project administrator can submit such changes successfully.

See Also:
Project, Partner, DELETE, WRITE, READ, NONE, NULL

Variable Index

 o others
The default access right for everybody except project partners.
 o partners
The default access right for all project partners.

Constructor Index

 o Access(Integer, String, String, String, char, char)
Allocates an Access object defining default access rights for the specified project cube.

Method Index

 o duplicate()
Duplicates this object.
 o hasPermits()
Returns the number of individual access rights.
 o isSpecified(char)
Checks if an access right value does not equal NULL
 o isSpecified(Integer)
Tests if an individual access right is defined for the specified partner
 o mayDelete(char)
Checks if the specified access right provides delete permission
 o mayDelete(Integer)
Tests if an individual access right is defined for the specified partner and, if so, whether this access right provides delete permission
 o mayRead(char)
Checks if the specified access right provides read permission
 o mayRead(Integer)
Tests if an individual access right is defined for the specified partner and, if so, whether this access right provides read permission
 o mayWrite(char)
Checks if the specified access right provides write permission
 o mayWrite(Integer)
Tests if an individual access right is defined for the specified partner and, if so, whether this access right provides write permission
 o permission(Integer)
Returns the individual access right for the specified partner.
 o permits()
Returns an enumeration of the individual access rights by partner identifier.
 o removePermission(Integer)
Removes the individual access right for a partner.
 o removePermission(String)
Removes the individual access right for a partner.
 o retrieve(Integer)
Creates a data request to retrieve all access information for the specified project.
 o setOthers(String)
Sets the default access right for others than project partners.
 o setPartners(String)
Sets the default access right for project partners.
 o setPermission(Integer, char)
Sets the individual access right for a project partner.
 o setPermission(String, String)
Sets the individual access right for a project partner.
 o update()
Creates a data request to update the access rights according to this object.
 o update(Access[])
Creates a data request to update the access rights according to the specified array of Access objects.

Variables

 o partners
 public char partners
The default access right for all project partners.

 o others
 public char others
The default access right for everybody except project partners.

Constructors

 o Access
 public Access(Integer id,
               String area,
               String time,
               String type,
               char partners,
               char others)
Allocates an Access object defining default access rights for the specified project cube.

Parameters:
id - the project identifier
area - the project area specifier
time - the project time specifier
type - the project type specifier
partners - the access right for all partners
others - the access right for all others

Methods

 o hasPermits
 public int hasPermits()
Returns the number of individual access rights.

Returns:
the number of individual access rights.
 o permits
 public Enumeration permits()
Returns an enumeration of the individual access rights by partner identifier. Use the Enumeration methods on the returned object to fetch the elements sequentially.

Returns:
an enumeration of the individual access rights by partner identifier
 o permission
 public char permission(Integer id)
Returns the individual access right for the specified partner.

Parameters:
id - a partner identifier
Returns:
the individual access right; NULL if no individual access right is defined for this partner
See Also:
NULL
 o mayDelete
 public static boolean mayDelete(char permission)
Checks if the specified access right provides delete permission

Parameters:
permission - an access right
Returns:
true if the access right provides delete permission; false otherwise
 o mayDelete
 public boolean mayDelete(Integer id)
Tests if an individual access right is defined for the specified partner and, if so, whether this access right provides delete permission

Parameters:
id - a partner identifier
Returns:
true if the access right provides delete permission; false otherwise
 o mayWrite
 public static boolean mayWrite(char permission)
Checks if the specified access right provides write permission

Parameters:
permission - an access right
Returns:
true if the access right provides write permission; false otherwise
 o mayWrite
 public boolean mayWrite(Integer id)
Tests if an individual access right is defined for the specified partner and, if so, whether this access right provides write permission

Parameters:
id - a partner identifier
Returns:
true if the access right provides write permission; false otherwise
 o mayRead
 public static boolean mayRead(char permission)
Checks if the specified access right provides read permission

Parameters:
permission - an access right
Returns:
true if the access right provides read permission; false otherwise
 o mayRead
 public boolean mayRead(Integer id)
Tests if an individual access right is defined for the specified partner and, if so, whether this access right provides read permission

Parameters:
id - a partner identifier
Returns:
true if the access right provides read permission; false otherwise
 o isSpecified
 public static boolean isSpecified(char permission)
Checks if an access right value does not equal NULL

Parameters:
permission - an access right
Returns:
true if the access right is not equal to NULL; false otherwise
 o isSpecified
 public boolean isSpecified(Integer id)
Tests if an individual access right is defined for the specified partner

Parameters:
id - a partner identifier
Returns:
true if an access right is defined; false otherwise
 o setPartners
 public void setPartners(String permission)
Sets the default access right for project partners. This method is accessible from JavaScript; otherwise the partners variable can be set directly. Altering the default access right has no actual effect until these access rights are also updated in the database.

Parameters:
permission - a string, the first character of which specifies the access right
See Also:
partners, update
 o setOthers
 public void setOthers(String permission)
Sets the default access right for others than project partners. This method is accessible from JavaScript; otherwise the others variable can be set directly. Altering the default access right has no actual effect until these access rights are also updated in the database.

Parameters:
permission - a string, the first character of which specifies the access right
See Also:
others, update
 o setPermission
 public void setPermission(Integer id,
                           char permission)
Sets the individual access right for a project partner. Individual access rights are reserved for project partners only.

Parameters:
id - a partner identifier Altering individual access rights has no actual effect until these access rights are also updated in the database.
permission - an access right
See Also:
update
 o setPermission
 public void setPermission(String id,
                           String permission)
Sets the individual access right for a project partner. Individual access rights are reserved for project partners only. This method is accessible from JavaScript. Altering individual access rights has no actual effect until these access rights are also updated in the database.

Parameters:
id - a string equivalent of a partner identifier
permission - a string, the first character of which specifies the access right
See Also:
update
 o removePermission
 public void removePermission(Integer id)
Removes the individual access right for a partner. Altering individual access rights has no actual effect until these access rights are also updated in the database.

Parameters:
id - a partner identifier
See Also:
update
 o removePermission
 public void removePermission(String id)
Removes the individual access right for a partner. This method is accessible from JavaScript. Altering individual access rights has no actual effect until these access rights are also updated in the database.

Parameters:
id - a string equivalent of a partner identifier
See Also:
update
 o duplicate
 public Access duplicate()
Duplicates this object.

Returns:
a copy of this object
 o retrieve
 public static DataRequest retrieve(Integer id)
Creates a data request to retrieve all access information for the specified project.

Parameters:
id - a project identifier
Returns:
a data request to retrieve all access information for a project
See Also:
SERVICE
 o update
 public DataRequest update()
Creates a data request to update the access rights according to this object. Only the project administrator can submit this request. If successful, an appropriate event is posted.

Returns:
a data request to update the access rights as provided
See Also:
SERVICE, ProjectEvents
 o update
 public static DataRequest update(Access rights[])
Creates a data request to update the access rights according to the specified array of Access objects. All access rights must concern the same project. Only the project administrator can submit this request. If successful, an appropriate event is posted.

Parameters:
rights - an array of access rights
Returns:
a data request to update the access rights as provided
See Also:
SERVICE, ProjectEvents

All Packages  Class Hierarchy  This Package  Previous  Next  Index

This website has been archived and is no longer maintained.