public class ProfileAssignmentsToolClientSideElement extends StaticClientSideElement
ClientSideElement
for the tool displaying the profile assignmentsModifier and Type | Class and Description |
---|---|
static class |
ProfileAssignmentsToolClientSideElement.AccessType
Enumeration of all possible access types
|
static class |
ProfileAssignmentsToolClientSideElement.TargetType
Enumeration of all possible target types
|
ClientSideElement.Script, ClientSideElement.ScriptFile
Modifier and Type | Field and Description |
---|---|
protected GroupDirectoryDAO |
_groupDirectoryDAO
The DAO for group directories
|
protected GroupManager |
_groupManager
The group manager
|
protected ObservationManager |
_observationManager
The observation manager
|
protected ProfileAssignmentStorageExtensionPoint |
_profileAssignmentStorageEP
The profile assignment storage component
|
protected RightAssignmentContextExtensionPoint |
_rightAssignmentContextEP
The extension point for right assignment contexts
|
_currentUserProvider, _dependencies, _featureName, _id, _pluginName, _rightManager, _rights, _rightsMode, _script
Constructor and Description |
---|
ProfileAssignmentsToolClientSideElement() |
Modifier and Type | Method and Description |
---|---|
private String |
_getInheritedAssignmentForAnonymous(RightAssignmentContext extension,
Object context,
String profileId) |
private String |
_getInheritedAssignmentForAnyconnected(RightAssignmentContext extension,
Object context,
String profileId) |
private String |
_getInheritedAssignmentForGroup(RightAssignmentContext extension,
Object context,
String profileId,
GroupIdentity group) |
private String |
_getInheritedAssignmentForUser(RightAssignmentContext extension,
Object context,
String profileId,
UserIdentity user) |
private Map<String,Object> |
_groupToJson(GroupIdentity groupIdentity) |
private void |
_notifyObservers(Object context,
String contextIdentifier,
Set<String> profileIds) |
private void |
_saveChange(Object context,
String profileId,
String assignment,
String targetType,
Map<String,String> identity) |
String |
getInheritedAssignment(String rightAssignmentCtxId,
Object jsContext,
String profileId,
String targetType,
Map<String,String> identity)
Get the first permission given by inheritance for a object context and a specific profile
|
Map<String,String> |
getInheritedAssignments(String rightAssignmentCtxId,
Object jsContext,
List<String> profileIds,
String targetType,
Map<String,String> identity)
Get the first permission given by inheritance for a object context and profiles
|
List<ClientSideElement.Script> |
getScripts(boolean ignoreRights,
Map<String,Object> contextParameters)
This method return the scripts that will be used on client side.
|
List<Map<String,Object>> |
getUserGroups(String login,
String populationId)
Gets the groups of a user as JSON
|
void |
saveChanges(String rightAssignmentCtxId,
Object jsContext,
List<Map<String,Object>> assignmentsInfo)
Save some changes made client-side.
|
void |
service(ServiceManager smanager) |
_configureClass, _configureParameters, _configureScript, configureInitialParameters
_configureDependencies, _configureImports, _configureRights, _configureRightsMode, configure, getDependencies, getId, getPluginName, getRights, getScripts, hasRight, setPluginInfo, toString
getLogger, setLogger
protected ProfileAssignmentStorageExtensionPoint _profileAssignmentStorageEP
protected RightAssignmentContextExtensionPoint _rightAssignmentContextEP
protected GroupDirectoryDAO _groupDirectoryDAO
protected GroupManager _groupManager
protected ObservationManager _observationManager
public ProfileAssignmentsToolClientSideElement()
public void service(ServiceManager smanager) throws ServiceException
service
in interface Serviceable
service
in class StaticFileImportsClientSideElement
ServiceException
public List<ClientSideElement.Script> getScripts(boolean ignoreRights, Map<String,Object> contextParameters)
ClientSideElement
getScripts
in interface ClientSideElement
getScripts
in class StaticFileImportsClientSideElement
ignoreRights
- True to ignore the rights verification.contextParameters
- Contextuals parameters transmitted by the environment.public List<Map<String,Object>> getUserGroups(String login, String populationId)
login
- The login of the userpopulationId
- The population of the userprivate Map<String,Object> _groupToJson(GroupIdentity groupIdentity)
public void saveChanges(String rightAssignmentCtxId, Object jsContext, List<Map<String,Object>> assignmentsInfo)
rightAssignmentCtxId
- The id of the right assignment contextjsContext
- The JS object contextassignmentsInfo
- The list of all the changes to make. Each map in the list must contain the following keys:
private void _notifyObservers(Object context, String contextIdentifier, Set<String> profileIds)
public Map<String,String> getInheritedAssignments(String rightAssignmentCtxId, Object jsContext, List<String> profileIds, String targetType, Map<String,String> identity)
rightAssignmentCtxId
- The id of the right assignment contextjsContext
- The JS object contextprofileIds
- The list of profilestargetType
- The type of target : anonymous, any connected users, a user or a groupidentity
- The identity of the target. Can be null if the target is anonymous or any connected userspublic String getInheritedAssignment(String rightAssignmentCtxId, Object jsContext, String profileId, String targetType, Map<String,String> identity)
rightAssignmentCtxId
- The id of the right assignment contextjsContext
- The JS object contextprofileId
- The id of profiletargetType
- The type of target : anonymous, any connected users, a user or a groupidentity
- The identity of the target. Can be null if the target is anonymous or any connected usersprivate String _getInheritedAssignmentForAnonymous(RightAssignmentContext extension, Object context, String profileId)
private String _getInheritedAssignmentForAnyconnected(RightAssignmentContext extension, Object context, String profileId)
private String _getInheritedAssignmentForUser(RightAssignmentContext extension, Object context, String profileId, UserIdentity user)
private String _getInheritedAssignmentForGroup(RightAssignmentContext extension, Object context, String profileId, GroupIdentity group)