Rev 1315 | Rev 1396 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1315 | Rev 1316 | ||
---|---|---|---|
Line 802... | Line 802... | ||
802 | /*******Logging************************/ |
802 | /*******Logging************************/ |
803 | 803 | ||
804 | } |
804 | } |
805 | else |
805 | else |
806 | { |
806 | { |
- | 807 | //novo para termos sempre o email externo |
|
- | 808 | if(teacher.getOutEmail() == null ||teacher.getOutEmail().indexOf("@") < 0) |
|
- | 809 | teacher.setOutEmail(teacherSiges.getEmail()); |
|
807 | //VAMOS APENAS ADICIONAR CAMPOS QUE AINDA NAO EXISTAM IGUAL AO CLONE MAS NAO MECHE |
810 | //VAMOS APENAS ADICIONAR CAMPOS QUE AINDA NAO EXISTAM IGUAL AO CLONE MAS NAO MECHE |
808 | if(teacher.getName() == null || teacher.getName().length() == 0) |
811 | if(teacher.getName() == null || teacher.getName().length() == 0) |
809 | teacher.setName(teacherSiges.getNomeFuncionarioInt()); |
812 | teacher.setName(teacherSiges.getNomeFuncionarioInt()); |
810 | //Email instituicao |
813 | //Email instituicao |
811 | if(teacher.getEmail() == null || teacher.getEmail().indexOf("@") < 0) |
814 | //if(teacher.getEmail() == null || teacher.getEmail().indexOf("@") < 0) |
812 | teacher.setEmail(teacherSiges.getEmail()); |
815 | // teacher.setEmail(teacherSiges.getEmail()); |
813 | 816 | ||
- | 817 | 1.5.0/docs/api/java/lang/String.html">String suffixReaded = null; |
|
- | 818 | List<String> sufixes = ConfigProperties.getListValues("email.local.suffix."); |
|
- | 819 | for(1.5.0/docs/api/java/lang/String.html">String suffix: sufixes) |
|
- | 820 | { |
|
- | 821 | if(teacherSiges.getEmail()!=null && teacherSiges.getEmail().endsWith("@"+suffix)) |
|
- | 822 | { |
|
- | 823 | suffixReaded = suffix; |
|
- | 824 | break; |
|
- | 825 | } |
|
- | 826 | } |
|
- | 827 | ||
814 | if (teacherSiges.getEmail() != null && (teacher.getUsername() == null || teacher.getUsername().trim().length() == 0) && teacherSiges.getEmail().endsWith(Globals.EMAIL_LOCAL_SUFFIX)) |
828 | if (teacherSiges.getEmail() != null && (teacher.getUsername() == null || teacher.getUsername().trim().length() == 0) |
- | 829 | && suffixReaded != null) |
|
815 | { |
830 | { |
816 | int atIndex = teacherSiges.getEmail().indexOf("@"); |
831 | int atIndex = teacherSiges.getEmail().indexOf("@"); |
817 | if (atIndex > 0) |
832 | if (atIndex > 0) |
818 | { |
833 | { |
819 | teacher.setUsername(teacherSiges.getEmail().substring(0, atIndex)); |
834 | teacher.setUsername(teacherSiges.getEmail().substring(0, atIndex)); |