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