Class UserImportService

java.lang.Object
io.meeds.social.core.identity.service.UserImportService

@Service public class UserImportService extends Object
  • Field Details

    • importUsersProcessing

      protected Map<String,io.meeds.social.core.identity.model.UserImportResult> importUsersProcessing
    • importExecutorService

      protected ExecutorService importExecutorService
  • Constructor Details

    • UserImportService

      public UserImportService()
  • Method Details

    • init

      @PostConstruct public void init()
    • stop

      @PreDestroy public void stop()
    • getUsersImportResult

      public io.meeds.social.core.identity.model.UserImportResult getUsersImportResult(String uploadId)
    • cleanUsersImportResult

      public void cleanUsersImportResult(String uploadId)
    • importUsers

      public void importUsers(String uploadId, String modifierUsername, Locale locale, String url, boolean sync)
    • importUsersAsync

      protected void importUsersAsync(String fileLocation, io.meeds.social.core.identity.model.UserImportResult userImportResult, String modifierUsername, Locale locale, String url)
    • importUsersTransactional

      protected void importUsersTransactional(String fileLocation, io.meeds.social.core.identity.model.UserImportResult userImportResult, String modifierUsername, Locale locale, String url)
    • importUsers

      protected void importUsers(String fileLocation, io.meeds.social.core.identity.model.UserImportResult userImportResult, String modifierUsername, Locale locale, String url)
    • importUser

      protected String importUser(io.meeds.social.core.identity.model.UserImportResult userImportResult, String modifierUsername, Locale locale, String url, List<String> fields, List<String> fieldsToRemove, String userCSVLine) throws Exception
      Throws:
      Exception
    • updateUserProfileProperties

      protected void updateUserProfileProperties(io.meeds.social.core.identity.model.UserImportResult userImportResult, String modifierUsername, List<String> fieldsToRemove, org.json.JSONObject userObject, String userName)
    • computeUserProfileProperties

      protected Map<String,Object> computeUserProfileProperties(List<String> fieldsToRemove, org.json.JSONObject userObject)
    • addUserMemberships

      protected void addUserMemberships(org.exoplatform.services.organization.idm.UserImpl user, org.json.JSONObject userObject, io.meeds.social.core.identity.model.UserImportResult userImportResult)
    • linkMembership

      protected void linkMembership(org.exoplatform.services.organization.idm.UserImpl user, org.exoplatform.services.organization.Group groupObject, org.exoplatform.services.organization.MembershipType mType, io.meeds.social.core.identity.model.UserImportResult userImportResult)
    • computeFields

      protected List<String> computeFields(io.meeds.social.core.identity.model.UserImportResult userImportResult, List<String> fields)
    • saveProfile

      protected void saveProfile(String username, Map<String,Object> profileProperties, String modifierUsername) throws org.exoplatform.commons.exception.ObjectNotFoundException, IllegalAccessException, IOException
      Throws:
      org.exoplatform.commons.exception.ObjectNotFoundException
      IllegalAccessException
      IOException
    • updateProfileField

      protected void updateProfileField(org.exoplatform.social.core.identity.model.Profile profile, String name, Object value, boolean save, String modifierUsername) throws IllegalAccessException, IOException
      Throws:
      IllegalAccessException
      IOException
    • validateUser

      protected String validateUser(org.json.JSONObject userObject, Locale locale, List<String> fields)
    • sendOnBoardingEmail

      protected void sendOnBoardingEmail(org.exoplatform.services.organization.idm.UserImpl user, String modifierUsername, String url) throws IllegalAccessException, IOException
      Throws:
      IllegalAccessException
      IOException
    • isEmailAlreadyExists

      protected boolean isEmailAlreadyExists(String username, String email) throws Exception
      Throws:
      Exception