|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ISecurityInfo2
The ISecurityInfo2 interface allows you to assign
roles, rights, and limits on objects to users and user groups.
Roles are predefined sets of object rights that are designed to cover the most common cases of security access. It is recommended that you use roles and then apply more granular rights if necessary.
Rights allow a user or group to perform specific actions on an object.
Limits restrict the number of instances for each object, user, or group on the system. Users and groups who have been assigned specific rights and limits on an object are called object principals. An explicit object principal is a user or group that has explicit rights, limits, or roles set on an object; an effective object principal is a user or group whose rights, limits, or roles are the effective results calcuated from some explicit security info set on the folder hierarchy or path of the object.
SAP BusinessObjects Enterprise uses object security, which means that roles,
rights, and limits are set for each InfoObject in the system and not for each
principal. For example, all folders have a set of available rights that the
system makes available to them. You can use a report's SecurityInfo2 object
to determine which of these rights you want to give to a particular user or
group. Specifically, you can use the getKnownRightsByPlugin
method to select the rights that you want to grant or deny to a principal,
and then add these rights to the principal's ExplicitRights collection. You
can then use the effective principal's EffectiveRights collection to check
the net effective rights applicable to the object.
| Method Summary | |
|---|---|
boolean |
checkRight(int rightID,
java.lang.Object rightKind,
boolean useCache)
Deprecated. since 12.0 SP1. Use checkRight(RightDescriptor right, boolean useCache) instead |
boolean |
checkRight(int rightID,
java.lang.Object rightKind,
int principalID,
boolean useCache)
Deprecated. since 12.0 SP1. Use checkRight(RightDescriptor right, int principalID, boolean useCache) instead |
boolean |
checkRight(RightDescriptor right,
boolean useCache)
Returns whether the specified right is defined for the current user. |
boolean |
checkRight(RightDescriptor right,
int principalID,
boolean useCache)
Returns true if the specified right is granted for
the specified user or user group. |
boolean[] |
checkRights(int[] rights,
java.lang.Object[] kinds,
boolean useCache)
Deprecated. since 12.0 SP1. Use checkRights(RightDescriptor[] rights, boolean useCache) instead |
boolean[] |
checkRights(int[] rights,
java.lang.Object[] kinds,
int principalID,
boolean useCache)
Deprecated. since 12.0 SP1. Use checkRights(RightDescriptor[] rights, int principalID, boolean useCache) instead |
boolean[] |
checkRights(RightDescriptor[] rights,
boolean useCache)
Returns rights from the CMS in a single batch. |
boolean[] |
checkRights(RightDescriptor[] rights,
int principalID,
boolean useCache)
Returns rights from the CMS in a single batch. |
IEffectivePrincipal |
getAnyPrincipal(int PrincipalID)
Returns the effective rights, limits, and roles for any principal specified, even if the principal does not have explicit rights to the object. |
IEffectivePrincipals |
getEffectivePrincipals()
Returns the collection of principals that have effective security info (rights, limits, roles) on the object. |
IExplicitPrincipals |
getExplicitPrincipals()
Returns the collection of principals that have explicit rights, limits, or roles on the object. |
IRightID[] |
getKnownLimits()
Deprecated. As of version 12.0. This method returns a set of unique right IDs applicable to the given object, which do not contain plugin info and hide plugin overload of a right description. Use getKnownRightsByPlugin instead. |
IRightID[] |
getKnownRights()
Deprecated. As of version 12.0. This method returns a set of unique right IDs applicable to the given object, which do not contain plugin info and hide plugin overload of a right description. Use getKnownRightsByPlugin instead. |
IPluginBasedRightIDs |
getKnownRightsByPlugin()
Returns a collection of rights and limits that this object supports, grouped by applicable plugin type. |
IRoleID[] |
getKnownRoles()
Returns the collection of roles available in the system. |
IExplicitPrincipals |
newExplicitPrincipals()
Returns an empty collection of explicit principals. |
| Method Detail |
|---|
boolean checkRight(int rightID,
java.lang.Object rightKind,
boolean useCache)
throws SDKException
Returns whether the specified right is defined for the current user.
rightID - The right ID of the right to be checked.rightKind - The kind of the right to be checked. The kind represents the
InfoObject type that can be an Integer representing the
numeric value of the type, a string kind, or a string progid.
If the right is a system right not customly defined by any
plugin type, leave it as null or an empty string.useCache - Boolean indicating whether the cached security info, if any,
should be used. true means using cached info;
false means retrieving from server which is
more accurate but could be relatively slower
boolean indicating whether the specified right
is permitted for this object. If the value is true
the specified right is permitted for this object, otherwise
false.
SDKException - This is thrown if the process is unsuccessful.
boolean checkRight(RightDescriptor right,
boolean useCache)
throws SDKException
Returns whether the specified right is defined for the current user.
right - The description of the id to be checked. Refer to RightDescriptor.useCache - Boolean indicating whether the cached security info, if any,
should be used. true means using cached info;
false means retrieving from server which is
more accurate but could be relatively slower
boolean indicating whether the specified right
is permitted for this object. If the value is true
the specified right is permitted for this object, otherwise
false.
SDKException
boolean[] checkRights(int[] rights,
java.lang.Object[] kinds,
boolean useCache)
throws SDKException
Returns rights from the CMS in a single batch. Using this method is the easiest way to determine the current user's effective right status for the given right collection. This method is particularly useful when you are working with inheritance.
rights - A int[] array specifying right ids.kinds - An Object[] array specifying the InfoObject
types that the corresponding right in rights array is defined
for. A null entry or an empty string in this array indicates
that the corresponding right is not customly defined by any
plugin type. Each kind can be an Integer representing the
numeric value of the type, a string kind, or a string progid.useCache - Boolean indicating whether the cached security info, if any,
should be used. true means using cached info;
false means retrieving from server which is
more accurate but could be relatively slower
boolean array indicating whether specified
system rights are permitted for this object. If the value is
true the specified rights are permitted for this
object, otherwise false.
SDKException
boolean[] checkRights(RightDescriptor[] rights,
boolean useCache)
throws SDKException
Returns rights from the CMS in a single batch. Using this method is the easiest way to determine the current user's effective right status for the given right collection. This method is particularly useful when you are working with inheritance.
rights - A RightDescriptor array specifying right descriptors.useCache - Boolean indicating whether the cached security info, if any,
should be used. true means using cached info;
false means retrieving from server which is
more accurate but could be relatively slower
boolean array indicating whether specified
system rights are permitted for this object. If the value is
true the specified rights are permitted for this
object, otherwise false.
SDKException
boolean checkRight(int rightID,
java.lang.Object rightKind,
int principalID,
boolean useCache)
throws SDKException
Returns true if the specified right is granted for
the specified user or user group
rightID - The right ID of the right to be checked.rightKind - The kind of the right to be checked. The kind represents the
InfoObject type that can be an Integer representing the
numeric value of the type, a string kind, or a string progid.
If the right is a system right not customly defined by any
plugin type, leave it as null or an empty string.principalID - The id of the principal the right checking is performed on.useCache - Boolean indicating whether the cached security info, if any,
should be used. true means using cached info;
false means retrieving from server which is
more accurate but could be relatively slower
boolean indicating whether the specified right
is permitted for this object for the specified user or group. If
the value is true the specified right is permitted
for this object, otherwise false.
SDKException - This is thrown if the process is unsuccessful.
boolean checkRight(RightDescriptor right,
int principalID,
boolean useCache)
throws SDKException
Returns true if the specified right is granted for
the specified user or user group
right - The description of the id to be checked. Refer to RightDescriptor.principalID - The id of the principal the right checking is performed on.useCache - Boolean indicating whether the cached security info, if any,
should be used. true means using cached info;
false means retrieving from server which is
more accurate but could be relatively slower
boolean indicating whether the specified right
is permitted for this object for the specified user or group. If
the value is true the specified right is permitted
for this object, otherwise false.
SDKException - This is thrown if the process is unsuccessful.
boolean[] checkRights(int[] rights,
java.lang.Object[] kinds,
int principalID,
boolean useCache)
throws SDKException
Returns rights from the CMS in a single batch. Using this method is the easiest way to determine the specified user's effective right status for the given right collection. This method is particularly useful when you are working with inheritance.
rights - A int[] array specifying right ids.kinds - An Object[] array specifying the InfoObject
types that the corresponding right in rights array is defined
for. A null entry or an empty string in this array indicates
that the corresponding right is not customly defined by any
plugin type. Each kind can be an Integer representing the
numeric value of the type, a string kind, or a string progid.principalID - The id of the principal the right checking is performed on.useCache - Boolean indicating whether the cached security info, if any,
should be used. true means using cached info;
false means retrieving from server which is
more accurate but could be relatively slower
boolean array indicating whether specified
system rights are permitted for this object. If the value is
true the specified rights are permitted for this
object, otherwise false.
SDKException
boolean[] checkRights(RightDescriptor[] rights,
int principalID,
boolean useCache)
throws SDKException
Returns rights from the CMS in a single batch. Using this method is the easiest way to determine the specified user's effective right status for the given right collection. This method is particularly useful when you are working with inheritance.
rights - A RightDescriptor array specifying right descriptors.principalID - The id of the principal the right checking is performed on.useCache - Boolean indicating whether the cached security info, if any,
should be used. true means using cached info;
false means retrieving from server which is
more accurate but could be relatively slower
boolean array indicating whether specified
system rights are permitted for this object. If the value is
true the specified rights are permitted for this
object, otherwise false.
SDKException
IRightID[] getKnownRights()
throws SDKException
SDKException
IRightID[] getKnownLimits()
throws SDKException
SDKException
IRoleID[] getKnownRoles()
throws SDKException
Returns the collection of roles available in the system.
IRoleID objects specifying the custom role
objects available in the system
SDKException - This is thrown if the process is unsuccessful.
IEffectivePrincipals getEffectivePrincipals()
throws SDKException
Returns the collection of principals that have effective security info (rights, limits, roles) on the object.
IEffectivePrincipals collection that
contains the principals that have effective rights on this
object.
SDKException - This is thrown if the process is unsuccessful.
IEffectivePrincipal getAnyPrincipal(int PrincipalID)
throws SDKException
Returns the effective rights, limits, and roles for any principal specified, even if the principal does not have explicit rights to the object.
PrincipalID - The ID of the principal as an int.
IEffectivePrincipal object
containing the effective security info for the specified
principal.
SDKException - This is thrown if the process is unsuccessful.
IExplicitPrincipals getExplicitPrincipals()
throws SDKException
Returns the collection of principals that have explicit rights, limits, or roles on the object.
IExplicitPrincipals collection that contains
the principals that have explicit rights, limits, or roles on
this object.
SDKException - This is thrown if the process is unsuccessful.
IExplicitPrincipals newExplicitPrincipals()
throws SDKException
Returns an empty collection of explicit principals. Use this method for new objects or in cases when security loading is not desired for performance concerns.
IExplicitPrincipals collection that is used to
add new explicit principals without merging the new ones with the
existing ones from CMS on SDK side.
SDKException - This is thrown if the process is unsuccessful.
IPluginBasedRightIDs getKnownRightsByPlugin()
throws SDKException
Returns a collection of rights and limits that this object supports, grouped by applicable plugin type.
IPluginBasedRightIDs specifying the rights this object
supports grouped by applicable plugin type.
SDKException - This is thrown if the process is unsuccessful.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||