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
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
_checkUserRight
(List<String> rightIds, String context) Check if the user right to access the featurevoid
contextualize
(Context context) Do the import of the filevoid
service
(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:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in 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
-