com.crystaldecisions.sdk.occa.infostore
Interface IObjectPrincipal


Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

public interface IObjectPrincipal

This object stores a principal's security information; that is, it gives you access to the roles, rights, and limits for specific users or groups. It also determines whether the principal can inherit rights from a group or parent folder. A principal that has been given explicit rights to an object can be retrieved from the ObjectPrincipals collection; a principal whose rights are inherited or whose rights have not been specified are stored on the system and can be retrieved with the AnyPrincipal property.

Roles

A role or access mode is a predefined set of object rights that allow you to set common object security levels quickly. They are designed to cover the most common cases of security rights sets, and can be applied to the principal with the Role object. It is recommended that you start by using roles, and then apply more granular rights if necessary. The rights that are listed for each role are always granted to the principal, and never denied. When you assign a principal a role, the set of granted rights are automatically added to the principal's SecurityRights collection.

Limits

To set a principal's limits on an object, add the principal to, or retrieve it from, the ObjectPrincipal collection, and then use the Limits Property to specify a value for each limit. Limits that are explicitly specified or that are inherited from a parent folder or user group are stored in the SecurityLimits collection.

Rights

To set a principal's rights on an object, add the principal to, or retrieve it from, the ObjectPrincipal collection, and then use the Rights Property to give the principal specific rights. A right can be explicitly granted, explicitly denied, or not specified. Rights that are not specified are any available rights that have not been added to the principal's SecurityRights collection.

Inheritance of rights

A principal can inherit rights from the groups it belongs to and from the parent folder of the object that it is being granted rights to. When rights are inherited, you can still explicitly set rights on the object.


Field Summary
static int LIMITS
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
static int RIGHTS
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 
Method Summary
 int getAttributesSet()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 int getID()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 ISecurityRights getInheritedRights()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 ISecurityLimits getLimits()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 java.lang.String getName()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 ISecurityRights getRights()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 IRole getRole()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 boolean isAdvancedInheritFolders()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 boolean isAdvancedInheritGroups()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 boolean isInherited()
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 void setAdvancedInheritFolders(boolean inheritFolders)
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 void setAdvancedInheritGroups(boolean inheritGroups)
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 void setInherited(boolean inherited)
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 void setRole(IRole role)
          Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively
 

Field Detail

RIGHTS

static final int RIGHTS
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

This is a flag bit in the return value from getAttributesSet. It indicates that the principal has rights on the object.

See Also:
Constant Field Values

LIMITS

static final int LIMITS
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

This is a flag bit in the return value from getAttributesSet. It indicates that the principal has limits on the object.

See Also:
Constant Field Values
Method Detail

getID

int getID()
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Returns the principal's ID.

Returns:
The int value of the principal's ID.

isInherited

boolean isInherited()
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Returns true if the principal's rights are inherited from a parent folder on which explicit rights have not been set, and false otherwise.

Returns:
true if the principal's rights are inherited from a parent folder or user group on which explicit rights have not been set, and false otherwise.

setInherited

void setInherited(boolean inherited)
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Sets the principal's inheritance state. The value should be true if the principal's rights are inherited from a parent folder on which explicit rights have not been set, and false otherwise.

Parameters:
inherited - true if the principal's rights are inherited from a parent folder or user group on which explicit rights have not been set, and false otherwise.

getName

java.lang.String getName()
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Returns the name of the principal.

Returns:
A String containing the name of the principal.

getRights

ISecurityRights getRights()
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Returns a collection of explicit rights that are set for the principal. This may be different from the effective rights.

Returns:
An ISecurityRights object of specific rights that are explicitly set for the principal.

getRole

IRole getRole()
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Returns principal's role for this object.

Returns:
The Role object that specifies the principal's role for this object.

setRole

void setRole(IRole role)
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Sets the principal's role for this object.

Parameters:
role - The Role object that defines the principal's role for this object.

getInheritedRights

ISecurityRights getInheritedRights()
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Returns the collection of rights that the principal inherits from parent folders or user groups.

Returns:
An ISecurityRights object that contains this objects inherited rights.

isAdvancedInheritGroups

boolean isAdvancedInheritGroups()
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Returns true if rights can be inherited from parent user groups, and false otherwise.

Returns:
A boolean that specifies whether this object can inherit rights from parent user groups. true enables inheritance while false disables it. This flag can only be set for the Advanced role.

setAdvancedInheritGroups

void setAdvancedInheritGroups(boolean inheritGroups)
Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

Sets whether this object can inherit rights from parent user groups. If true, rights can be inherited from parent user groups, otherwise false.

To set the value for this property, the following conditions must apply:

  • The IObjectPrincipal is not inherited.
  • The IObjectPrincipal's role is set to advanced.
  • Parameters:
    inheritGroups - A boolean that specifies whether rights can be inherited from parent user groups. true enables inheritance while false disables it. This flag can only be set for the Advanced role.

    isAdvancedInheritFolders

    boolean isAdvancedInheritFolders()
    Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

    Returns true if rights can be inherited from parent folders, and false otherwise.

    Returns:
    A boolean that specifies whether the rights can be inherited from parent folders. true enables inheritance and false disables it. This flag can only be set for the Advanced role.

    setAdvancedInheritFolders

    void setAdvancedInheritFolders(boolean inheritFolders)
    Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

    Sets whether this object can inherit rights from parent folders. If true, rights can be inherited from parent folders, otherwise false.

    Parameters:
    inheritFolders - A boolean that specifies whether rights can be inherited from parent folders. true enables inheritance while false disables it. This flag can only be set for the Advanced role.

    getAttributesSet

    int getAttributesSet()
    Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

    Indicates whether the principal has explicit rights or limits set on the object.

    To set the value for this property, the following conditions must apply:

  • The IObjectPrincipal is not inherited.
  • The IObjectPrincipal's role is set to advanced.
  • Returns:
    An int specifying whether the principal has explicit rights or limits set on this object.

    getLimits

    ISecurityLimits getLimits()
    Deprecated. Since 12.0, IObjectPrincipal has been replaced by IExplicitPrincipal and IEffectivePrincipal accessible through IExplicitPrincipals and IEffectivePrincipals respectively

    Returns a collection of limits that are set for the principal.

    Returns:
    An ISecurityLimits object that contains the limits set for the principal.