Package org.ametys.web.usermanagement
Class ImportInvitations
java.lang.Object
org.ametys.runtime.plugin.component.AbstractLogEnabled
org.ametys.web.usermanagement.ImportInvitations
- All Implemented Interfaces:
LogEnabled,Component,Contextualizable,Serviceable
public class ImportInvitations
extends AbstractLogEnabled
implements Serviceable, Component, Contextualizable
Import user to invit from a CSV or text file.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void_checkUserRight(List<String> rightIds, String context) Check if the user right to access the featurevoidcontextualize(Context context) Do the import of the filevoidservice(ServiceManager smanager) Methods inherited from class org.ametys.runtime.plugin.component.AbstractLogEnabled
getLogger, setLogger
-
Field Details
-
ROLE
Avalon Role
-
-
Constructor Details
-
ImportInvitations
public ImportInvitations()
-
-
Method Details
-
service
- Specified by:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
doImport
public Map doImport(String populationAndUserDirectory, boolean resendInvitation, Part part) throws Exception Do the import of the file- Parameters:
populationAndUserDirectory- The population and user directoryresendInvitation- booloean to know if we resend invitationpart- The file- Returns:
- The result of the import
- Throws:
Exception- If an error occurs
-
_checkUserRight
Check if the user right to access the feature- Parameters:
rightIds- The rights idscontext- The rights context- Throws:
IllegalStateException- if the user has no right
-