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
Methods Modifier and Type Method and Description void
checkPermissionCreate(IlrBaseline baseline, java.lang.String typeFQN)
Checks whether the user is allowed to create elements of the given type within the given branch.void
checkPermissionDelete(IlrBranch branch, IlrElementDetails elementDetails)
Checks whether the given element can be deleted or not in the given branch according to the current user permissions.void
checkPermissionDelete(IlrElementDetails elementDetails)
Checks whether the given element can be deleted or not in the working branch according to the current user permissions.void
checkPermissionUpdate(IlrBranch branch, IlrElementDetails elementDetails, java.lang.String featureName)
Checks whether the given feature of the element can be changed or not according to the current user permissions in the given branch.void
checkPermissionUpdate(IlrElementDetails elementDetails, java.lang.String featureName)
Checks whether the given feature of the element can be changed or not according to the current user permissions.void
checkPermissionView(IlrBranch branch, java.lang.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 within the given branch.void
checkPermissionView(java.lang.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(java.lang.String role, IlrSecurityProfileData profile)
Commits the security profile for the given role.void
eraseSecurityProfile(java.lang.String role)
Erases the security profile for the given role.java.lang.String[]
getAvailableGroups()
Gets all the groups available in Decision Center, to which you can associate a security profile.java.util.List
getPermissionableClasses()
Gets the list of EMF classes on which permissions can be applied.IlrSecurityProfileData
getSecurityProfileData(java.lang.String group)
Gets the security profile for the given role.boolean
isEditable(IlrElementHandle handle, java.lang.String property)
Tests whether the given property for a specific element is editable.boolean
isHidden(IlrElementHandle handle, java.lang.String property)
Tests whether the given property for a specific element must be hidden.void
setAvailableGroups(java.lang.String[] groups)
Sets all the groups available in Decision Center, to which you can associate a security profile.
-
-
-
Method Detail
-
commitSecurityProfileData
void commitSecurityProfileData(java.lang.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(java.lang.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(java.lang.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
java.lang.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(java.lang.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, java.lang.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.
-
checkPermissionUpdate
void checkPermissionUpdate(IlrBranch branch, IlrElementDetails elementDetails, java.lang.String featureName) throws IlrPermissionException, IlrObjectNotFoundException
Checks whether the given feature of the element can be changed or not according to the current user permissions in the given branch.- Throws:
IlrPermissionException
- If the feature cannot be changed for the given element.IlrObjectNotFoundException
- If the given element cannot be found in the database.- Parameters:
branch
- The branch in which the permission should be checked.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 in the working branch 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.
-
checkPermissionDelete
void checkPermissionDelete(IlrBranch branch, IlrElementDetails elementDetails) throws IlrPermissionException, IlrObjectNotFoundException
Checks whether the given element can be deleted or not in the given branch 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:
branch
- The branch in which the permission should be checked.elementDetails
- The details of the element to test.
-
checkPermissionCreate
void checkPermissionCreate(IlrBaseline baseline, java.lang.String typeFQN) throws IlrPermissionException, IlrObjectNotFoundException
Checks whether the user is allowed to create elements of the given type within the given branch.- Throws:
IlrPermissionException
- If an element of this type cannot be created.IlrObjectNotFoundException
- Parameters:
baseline
- The branch on which the check is made. If this argument is null, the check is done on the working baseline.typeFQN
- The fully qualified name of an EMF type.
-
checkPermissionView
void checkPermissionView(java.lang.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.
-
checkPermissionView
void checkPermissionView(IlrBranch branch, java.lang.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 within the given branch.- Throws:
IlrPermissionException
- If the given type or element cannot be viewed.IlrObjectNotFoundException
- If the given element cannot be found in the database.- Parameters:
branch
- The branch in which the permission should be checked.type
- If not null, the permission view is checked for this type.handle
- The element handle.
-
isHidden
boolean isHidden(IlrElementHandle handle, java.lang.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
- Ifhandle
is not found in the database.- Parameters:
handle
- The element handle.property
- The feature to test.- Returns:
True
ifproperty
is hidden.- See Also:
- Overview
-
isEditable
boolean isEditable(IlrElementHandle handle, java.lang.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
ifproperty
is editable.- See Also:
- Overview
-
getPermissionableClasses
java.util.List getPermissionableClasses()
Gets the list of EMF classes on which permissions can be applied.- Returns:
- A list of
EClass
objects.
-
-