Decision Center API

ilog.rules.teamserver.model.permissions
Interface IlrPermissionsFacility

All Known Subinterfaces:
IlrSession

public interface IlrPermissionsFacility

A set of methods to query and edit Decision Center permissions.

See Also:
IlrSession

Method Summary
 void checkPermissionCreate(String typeFQN)
          Checks whether the user is allowed to create elements of the given type.
 void checkPermissionDelete(IlrElementDetails elementDetails)
          Checks whether the given element can be deleted or not according to the current user permissions.
 void checkPermissionUpdate(IlrElementDetails elementDetails, String featureName)
          Checks whether the given feature of the element can be changed or not according to the current user permissions.
 void checkPermissionView(String type, IlrElementHandle handle)
          Checks whether the current user is allowed to view elements of the given type (if not null), or the given element details.
 void commitSecurityProfileData(String role, IlrSecurityProfileData profile)
          Commits the security profile for the given role.
 void eraseSecurityProfile(String role)
          Erases the security profile for the given role.
 String[] getAvailableGroups()
          Gets all the groups available in Decision Center, to which you can associate a security profile.
 List getPermissionableClasses()
          Gets the list of EMF classes on which permissions can be applied.
 IlrSecurityProfileData getSecurityProfileData(String group)
          Gets the security profile for the given role.
 boolean isEditable(IlrElementHandle handle, String property)
          Tests whether the given property for a specific element is editable.
 boolean isHidden(IlrElementHandle handle, String property)
          Tests whether the given property for a specific element must be hidden.
 void setAvailableGroups(String[] groups)
          Sets all the groups available in Decision Center, to which you can associate a security profile.
 

Method Detail

commitSecurityProfileData

void commitSecurityProfileData(String role,
                               IlrSecurityProfileData profile)
                               throws IlrRoleRestrictedPermissionException
Commits the security profile for the given role.

A security profile for a role is global to Decision Center and will apply on all projects.

Throws:
IlrRoleRestrictedPermissionException - If the user is not an administrator.
Parameters:
role - A name corresponding to a role defined in the application server.
profile - The security profile to save for the role.

eraseSecurityProfile

void eraseSecurityProfile(String role)
                          throws IlrRoleRestrictedPermissionException
Erases the security profile for the given role.

Throws:
IlrRoleRestrictedPermissionException - If the user is not an administrator.
Parameters:
role - A name corresponding to a role defined in the application server.

getSecurityProfileData

IlrSecurityProfileData getSecurityProfileData(String group)
Gets the security profile for the given role.

Parameters:
group - A name corresponding to a role defined in the application server.
Returns:
The security profile for the given group.

getAvailableGroups

String[] getAvailableGroups()
Gets all the groups available in Decision Center, to which you can associate a security profile.

Returns:
A list of groups, or an empty array if no group is available.

setAvailableGroups

void setAvailableGroups(String[] groups)
Sets all the groups available in Decision Center, to which you can associate a security profile.

Once this list is uploaded, sessions opened before this call will not necessarily see the change, especially in a clustered environment.

Parameters:
groups - An array of groups that must correspond to the roles declared in the application server.

checkPermissionUpdate

void checkPermissionUpdate(IlrElementDetails elementDetails,
                           String featureName)
                           throws IlrPermissionException,
                                  IlrObjectNotFoundException
Checks whether the given feature of the element can be changed or not according to the current user permissions.

Throws:
IlrPermissionException - If the feature cannot be changed for the given element.
IlrObjectNotFoundException - If the given element cannot be found in the database.
Parameters:
elementDetails - The details of the element to test.
featureName - The short name of the feature to test.

checkPermissionDelete

void checkPermissionDelete(IlrElementDetails elementDetails)
                           throws IlrPermissionException,
                                  IlrObjectNotFoundException
Checks whether the given element can be deleted or not according to the current user permissions.

Throws:
IlrPermissionException - If the element cannot be deleted.
IlrObjectNotFoundException - If the given element cannot be found in the database.
Parameters:
elementDetails - The details of the element to test.

checkPermissionCreate

void checkPermissionCreate(String typeFQN)
                           throws IlrPermissionException,
                                  IlrObjectNotFoundException
Checks whether the user is allowed to create elements of the given type.

Throws:
IlrPermissionException - If an element of this type cannot be created.
IlrObjectNotFoundException
Parameters:
typeFQN - The fully qualified name of an EMF type.

checkPermissionView

void checkPermissionView(String type,
                         IlrElementHandle handle)
                         throws IlrPermissionException,
                                IlrObjectNotFoundException
Checks whether the current user is allowed to view elements of the given type (if not null), or the given element details.

Throws:
IlrPermissionException - If the given type or element cannot be viewed.
IlrObjectNotFoundException - If the given element cannot be found in the database.
Parameters:
type - If not null, the permission view is checked for this type.
handle - The element handle.

isHidden

boolean isHidden(IlrElementHandle handle,
                 String property)
                 throws IlrObjectNotFoundException
Tests whether the given property for a specific element must be hidden.

This method is used in the UI to test if the current user has the rights to see the property.

Throws:
IlrObjectNotFoundException - If handle is not found in the database.
Parameters:
handle - The element handle.
property - The feature to test.
Returns:
True if property is hidden.
See Also:
Overview

isEditable

boolean isEditable(IlrElementHandle handle,
                   String property)
                   throws IlrObjectNotFoundException
Tests whether the given property for a specific element is editable.

This method is used in the UI to check if property may be edited by the current user.

Throws:
IlrObjectNotFoundException - If an object is not found in the database.
Parameters:
handle - The element handle.
property - The feature to test.
Returns:
True if property is editable.
See Also:
Overview

getPermissionableClasses

List getPermissionableClasses()
Gets the list of EMF classes on which permissions can be applied.

Returns:
A list of EClass objects.

Decision Center API

© Copyright IBM Corp. 1987, 2013