|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IlrPermissionsFacility
A set of methods to query and edit Decision Center permissions.
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 |
---|
void commitSecurityProfileData(String role, IlrSecurityProfileData profile) throws IlrRoleRestrictedPermissionException
A security profile for a role is global to Decision Center and will apply on all projects.
IlrRoleRestrictedPermissionException
- If the user is not an administrator.role
- A name corresponding to a role defined in the application server.profile
- The security profile to save for the role.void eraseSecurityProfile(String role) throws IlrRoleRestrictedPermissionException
IlrRoleRestrictedPermissionException
- If the user is not an administrator.role
- A name corresponding to a role defined in the application server.IlrSecurityProfileData getSecurityProfileData(String group)
group
- A name corresponding to a role defined in the application server.
String[] getAvailableGroups()
void setAvailableGroups(String[] groups)
Once this list is uploaded, sessions opened before this call will not necessarily see the change, especially in a clustered environment.
groups
- An array of groups that must correspond to the roles declared in the application
server.void checkPermissionUpdate(IlrElementDetails elementDetails, String featureName) throws IlrPermissionException, IlrObjectNotFoundException
IlrPermissionException
- If the feature cannot be changed for the given element.
IlrObjectNotFoundException
- If the given element cannot be found in the database.elementDetails
- The details of the element to test.featureName
- The short name of the feature to test.void checkPermissionDelete(IlrElementDetails elementDetails) throws IlrPermissionException, IlrObjectNotFoundException
IlrPermissionException
- If the element cannot be deleted.
IlrObjectNotFoundException
- If the given element cannot be found in the database.elementDetails
- The details of the element to test.void checkPermissionCreate(String typeFQN) throws IlrPermissionException, IlrObjectNotFoundException
IlrPermissionException
- If an element of this type cannot be created.
IlrObjectNotFoundException
typeFQN
- The fully qualified name of an EMF type.void checkPermissionView(String type, IlrElementHandle handle) throws IlrPermissionException, IlrObjectNotFoundException
IlrPermissionException
- If the given type or element cannot be viewed.
IlrObjectNotFoundException
- If the given element cannot be found in the database.type
- If not null, the permission view is checked for this type.handle
- The element handle.boolean isHidden(IlrElementHandle handle, String property) throws IlrObjectNotFoundException
This method is used in the UI to test if the current user has
the rights to see the property
.
IlrObjectNotFoundException
- If handle
is not found in
the database.handle
- The element handle.property
- The feature to test.
True
if property
is hidden.boolean isEditable(IlrElementHandle handle, String property) throws IlrObjectNotFoundException
This method is used in the UI to check if property
may be edited by the current user.
IlrObjectNotFoundException
- If an object is not found in the database.handle
- The element handle.property
- The feature to test.
True
if property
is editable.List getPermissionableClasses()
EClass
objects.
|
Decision Center API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |