com.crystaldecisions.sdk.occa.infostore
Interface ISecurityRights


public interface ISecurityRights

Use this collection to set granular rights on an object for a particular principal (user, group). The BusinessObjects Enterprise system defines a set of base rights that apply to all objects in the system. For example, the "View objects" right is a base right: it applies equally well to folders, to reports, and to other BusinessObjects Enterprise objects. In addition to these base rights, however, each type of object provides an additional set of rights that apply only to that object type. For example, the "Refresh the report's data" right applies only to report objects.

The Central Management Server (CMS) is the component that keeps track of known or available rights. The list of available rights includes the base rights and all other object-specific rights that have been provided by particular object types, such as Crystal report objects.

For the purposes of inheritance, you may want to select a number of available rights and add them to the object's SecurityRights collection, even if they don't apply directly to that object. By doing this, you can set object security at the folder level (rather than repeating the same settings for every object in the folder). Although certain object-specific rights do not strictly apply to the folder object itself, these rights may apply to objects that inherit rights from the folder. In other words, if you add the "Refresh the report's data" right to a folder object's SecurityRights collection, you can grant a principal the right to refresh the data in all reports that are contained in this folder.


Method Summary
 ISecurityRight add(int id)
           Adds a new right to the collection.
 ISecurityRight addCustomRight(int id, java.lang.String kind)
           Adds a new custom right to the collection.
 ISecurityRight addSystemRight(int id)
           Adds a new system right to the collection.
 ISecurityRight get(int id)
           Returns the right with the given ID.
 ISecurityRight get(int id, java.lang.String kind)
           Returns the right with the given ID and kind.
 java.util.Iterator iterator()
           Returns an iterator for all of the rights in the collection.
 void remove(int id)
           Removes a right from the collection.
 int size()
           Returns the size of the rights in this collection.
 

Method Detail

add

public ISecurityRight add(int id)

Adds a new right to the collection.

Parameters:
id - The ID of the new right to be added.
Returns:
The newly created ISecurityRight object.

addSystemRight

public ISecurityRight addSystemRight(int id)
                              throws SDKException

Adds a new system right to the collection.

Parameters:
id - The ID of the new right to be added.
Returns:
The newly created ISecurityRight object.
SDKException

addCustomRight

public ISecurityRight addCustomRight(int id,
                                     java.lang.String kind)
                              throws SDKException

Adds a new custom right to the collection.

Parameters:
id - The ID of the new right to be added.
kind - The InfoObject type that is associated with the right.
Returns:
The newly created ISecurityRight object.
SDKException

get

public ISecurityRight get(int id)

Returns the right with the given ID.

Parameters:
id - The ID of the right to be returned.
Returns:
The right, or null if no such right exists.

get

public ISecurityRight get(int id,
                          java.lang.String kind)
                   throws SDKException

Returns the right with the given ID and kind.

Parameters:
id - The ID of the right to be returned.
kind - The InfoObject type.
Returns:
The right, or null if no such right exists.
SDKException

iterator

public java.util.Iterator iterator()

Returns an iterator for all of the rights in the collection.

Returns:
An iterator for all of the rights in the collection.

remove

public void remove(int id)

Removes a right from the collection.

Parameters:
id - The right to be removed.

size

public int size()

Returns the size of the rights in this collection.

Returns:
the size of the rights((excluding deleted values)