Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PERFORMA_REPLICA
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Muhammad Usman
PERFORMA_REPLICA
Commits
0cc24e7c
Commit
0cc24e7c
authored
Jul 03, 2019
by
nilu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
S40358962 # Client - Incoming Issues (raised by Client) #Delay/problem with email ingest
parent
104315d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
28 additions
and
8 deletions
+28
-8
JobApplication.java
cmsWebApp/src/performa/orm/JobApplication.java
+2
-4
PerformaEmailFetcher.java
cmsWebApp/src/performa/utils/PerformaEmailFetcher.java
+19
-4
Utils.java
cmsWebApp/src/performa/utils/Utils.java
+7
-0
No files found.
cmsWebApp/src/performa/orm/JobApplication.java
View file @
0cc24e7c
...
...
@@ -109,15 +109,13 @@ public class JobApplication extends BaseJobApplication
if
(
getCV
()
!=
null
)
{
String
contentType
=
getCV
().
getContentType
();
context
.
check
(
contentType
.
contains
(
"msword"
)
||
contentType
.
contains
(
"doc"
)
||
contentType
.
contains
(
"docx"
)
||
contentType
.
contains
(
"opendocument.text"
)
||
contentType
.
contains
(
"pdf"
)
||
contentType
.
contains
(
"vnd.openxmlformats-officedocument.wordprocessingml.document"
)
,
this
,
FIELD_CV
,
"invalid"
);
context
.
check
(
Utils
.
isValidContentType
(
contentType
),
this
,
FIELD_CV
,
"invalid"
);
}
if
(
getCoverLetter
()
!=
null
)
{
String
contentType
=
getCoverLetter
().
getContentType
();
context
.
check
(
contentType
.
contains
(
"msword"
)
||
contentType
.
contains
(
"doc"
)
||
contentType
.
contains
(
"docx"
)
||
contentType
.
contains
(
"opendocument.text"
)
||
contentType
.
contains
(
"pdf"
)
||
contentType
.
contains
(
"vnd.openxmlformats-officedocument.wordprocessingml.document"
)
,
this
,
FIELD_CoverLetter
,
"invalid"
);
context
.
check
(
Utils
.
isValidContentType
(
contentType
)
,
this
,
FIELD_CoverLetter
,
"invalid"
);
}
}
catch
(
RuntimeException
ex
)
...
...
cmsWebApp/src/performa/utils/PerformaEmailFetcher.java
View file @
0cc24e7c
...
...
@@ -388,12 +388,22 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
if
(
contents
.
size
()
>
0
)
{
jobApplication
.
setCV
(
contents
.
get
(
0
));
FileBinaryContent
cv
=
contents
.
get
(
0
);
if
(
Utils
.
isValidContentType
(
cv
.
getContentType
()))
{
jobApplication
.
setCV
(
cv
);
}
}
if
(
contents
.
size
()
>
1
)
{
jobApplication
.
setCoverLetter
(
contents
.
get
(
1
));
FileBinaryContent
coverLetter
=
contents
.
get
(
0
);
if
(
Utils
.
isValidContentType
(
coverLetter
.
getContentType
()))
{
jobApplication
.
setCoverLetter
(
contents
.
get
(
1
));
}
}
}
...
...
@@ -438,9 +448,14 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
jobApplication
.
setApplicationStatus
(
ApplicationStatus
.
POST_INGEST
);
jobApplication
.
setIsEmailIngest
(
true
);
if
(
contents
.
size
()
>
0
)
if
(
contents
.
size
()
>
0
)
{
jobApplication
.
setCV
(
contents
.
get
(
0
));
FileBinaryContent
cv
=
contents
.
get
(
0
);
if
(
Utils
.
isValidContentType
(
cv
.
getContentType
()))
{
jobApplication
.
setCV
(
cv
);
}
}
Document
document
=
Jsoup
.
parse
(
messageBody
);
...
...
cmsWebApp/src/performa/utils/Utils.java
View file @
0cc24e7c
...
...
@@ -716,4 +716,10 @@ public class Utils
{
return
request
.
getSession
().
getAttribute
(
oneit
.
security
.
jsp
.
AssumeUserFP
.
UNASSUME_SEC_USER_ID
)
!=
null
;
}
public
static
boolean
isValidContentType
(
String
contentType
)
{
return
contentType
.
contains
(
"msword"
)
||
contentType
.
contains
(
"doc"
)
||
contentType
.
contains
(
"docx"
)
||
contentType
.
contains
(
"opendocument.text"
)
||
contentType
.
contains
(
"pdf"
)
||
contentType
.
contains
(
"vnd.openxmlformats-officedocument.wordprocessingml.document"
);
}
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment