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
8cd9d7f8
Commit
8cd9d7f8
authored
Jun 22, 2017
by
chenith
Committed by
Harsh Shah
Sep 06, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Create Job Application in application_outline.
parent
3f9aa707
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
171 additions
and
7 deletions
+171
-7
BaseJobApplication.java
cmsWebApp/src/performa/orm/BaseJobApplication.java
+82
-0
JobApplication.xml
cmsWebApp/src/performa/orm/JobApplication.xml
+5
-0
JobApplicationPersistenceMgr.java
cmsWebApp/src/performa/orm/JobApplicationPersistenceMgr.java
+66
-0
application_outline.jsp
...ebroot/extensions/applicantportal/application_outline.jsp
+13
-2
selection_criteria.jsp
...webroot/extensions/applicantportal/selection_criteria.jsp
+3
-3
sign_in.jsp
cmsWebApp/webroot/extensions/applicantportal/sign_in.jsp
+1
-1
verify_identity.jsp
...pp/webroot/extensions/applicantportal/verify_identity.jsp
+1
-1
No files found.
cmsWebApp/src/performa/orm/BaseJobApplication.java
View file @
8cd9d7f8
...
...
@@ -50,6 +50,7 @@ public abstract class BaseJobApplication extends BaseBusinessClass
// Static constants corresponding to searches
public
static
final
String
SEARCH_All
=
"All"
;
public
static
final
String
SEARCH_CandidateJob
=
"CandidateJob"
;
// Static constants corresponding to attribute helpers
...
...
@@ -1454,6 +1455,87 @@ public abstract class BaseJobApplication extends BaseBusinessClass
.
search
(
transaction
);
}
public
static
SearchCandidateJob
SearchByCandidateJob
()
{
return
new
SearchCandidateJob
();
}
public
static
class
SearchCandidateJob
extends
SearchObject
<
JobApplication
>
{
public
SearchCandidateJob
byCandidate
(
Candidate
Candidate
)
{
by
(
"Candidate"
,
Candidate
);
return
this
;
}
public
SearchCandidateJob
byJob
(
Job
Job
)
{
by
(
"Job"
,
Job
);
return
this
;
}
public
SearchCandidateJob
andObjectID
(
QueryFilter
<
Long
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job_application.object_id"
,
FIELD_ObjectID
);
return
this
;
}
public
SearchCandidateJob
andObjectCreated
(
QueryFilter
<
Date
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job_application.object_created_date"
,
FIELD_ObjectCreated
);
return
this
;
}
public
SearchCandidateJob
andObjectLastModified
(
QueryFilter
<
Date
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job_application.object_last_updated_date"
,
FIELD_ObjectLastModified
);
return
this
;
}
public
SearchCandidateJob
andCV
(
QueryFilter
<
BinaryContent
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job_application.cv"
,
"CV"
);
return
this
;
}
public
SearchCandidateJob
andCandidate
(
QueryFilter
<
Candidate
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job_application.candidate_id"
,
"Candidate"
);
return
this
;
}
public
SearchCandidateJob
andJob
(
QueryFilter
<
Job
>
filter
)
{
filter
.
addFilter
(
context
,
"tl_job_application.job_id"
,
"Job"
);
return
this
;
}
public
JobApplication
search
(
ObjectTransaction
transaction
)
throws
StorageException
{
BaseBusinessClass
[]
results
=
super
.
search
(
transaction
,
REFERENCE_JobApplication
,
SEARCH_CandidateJob
,
criteria
);
Set
<
JobApplication
>
typedResults
=
new
LinkedHashSet
<
JobApplication
>
();
for
(
BaseBusinessClass
bbcResult
:
results
)
{
JobApplication
aResult
=
(
JobApplication
)
bbcResult
;
typedResults
.
add
(
aResult
);
}
return
(
JobApplication
)
singletonResult
(
ObjstoreUtils
.
removeDeleted
(
transaction
,
typedResults
).
toArray
(
new
BaseBusinessClass
[
0
]),
"JobApplication"
,
""
);
}
}
public
static
JobApplication
searchCandidateJob
(
ObjectTransaction
transaction
,
Candidate
Candidate
,
Job
Job
)
throws
StorageException
{
return
SearchByCandidateJob
()
.
byCandidate
(
Candidate
)
.
byJob
(
Job
)
.
search
(
transaction
);
}
public
Object
getAttribute
(
String
attribName
)
...
...
cmsWebApp/src/performa/orm/JobApplication.xml
View file @
8cd9d7f8
...
...
@@ -17,6 +17,11 @@
</TABLE>
<SEARCH
type=
"All"
paramFilter=
"tl_job_application.object_id is not null"
orderBy=
"tl_job_application.object_id"
/>
<SEARCH
type=
"CandidateJob"
paramFilter=
"tl_job_application.object_id is not null"
singleton=
"TRUE"
>
<PARAM
name=
"Candidate"
type=
"Candidate"
transform=
"Candidate.getObjectID()"
paramFilter=
"candidate_id = ${Candidate} "
/>
<PARAM
name=
"Job"
type=
"Job"
transform=
"Job.getObjectID()"
paramFilter=
"job_id = ${Job}"
/>
</SEARCH>
</BUSINESSCLASS>
...
...
cmsWebApp/src/performa/orm/JobApplicationPersistenceMgr.java
View file @
8cd9d7f8
...
...
@@ -275,6 +275,10 @@ public class JobApplicationPersistenceMgr extends ObjectPersistenceMgr
{
throw
new
RuntimeException
(
"NOT implemented: executeSearchQueryAll"
);
}
public
ResultSet
executeSearchQueryCandidateJob
(
SQLManager
sqlMgr
,
Candidate
Candidate
,
Job
Job
)
throws
SQLException
{
throw
new
RuntimeException
(
"NOT implemented: executeSearchQueryCandidateJob"
);
}
...
...
@@ -424,6 +428,68 @@ public class JobApplicationPersistenceMgr extends ObjectPersistenceMgr
return
results
;
}
else
if
(
searchType
.
equals
(
JobApplication
.
SEARCH_CandidateJob
))
{
// Local scope for transformed variables
{
if
(
criteria
.
containsKey
(
"Candidate"
))
{
Candidate
Candidate
=
(
Candidate
)(
criteria
.
get
(
"Candidate"
));
criteria
.
put
(
"Candidate"
,
Candidate
.
getObjectID
());
}
if
(
criteria
.
containsKey
(
"Job"
))
{
Job
Job
=
(
Job
)(
criteria
.
get
(
"Job"
));
criteria
.
put
(
"Job"
,
Job
.
getObjectID
());
}
}
String
orderBy
=
" "
;
String
tables
=
" "
;
Set
<
String
>
joinTableSet
=
new
HashSet
<
String
>();
String
filter
;
Object
[]
searchParams
;
// paramFilter: tl_job_application.object_id is not null
String
preFilter
=
"(tl_job_application.object_id is not null)"
+
" "
;
if
(
criteria
.
containsKey
(
"Candidate"
))
{
preFilter
+=
" AND (candidate_id = ${Candidate} ) "
;
preFilter
+=
""
;
}
if
(
criteria
.
containsKey
(
"Job"
))
{
preFilter
+=
" AND (job_id = ${Job}) "
;
preFilter
+=
""
;
}
preFilter
+=
context
.
getLoadingAttributes
().
getCustomSQL
()
;
SearchParamTransform
tx
=
new
SearchParamTransform
(
criteria
);
filter
=
StringUtils
.
replaceParams
(
preFilter
,
tx
);
searchParams
=
tx
.
getParamsArray
();
Integer
maxRows
=
context
.
getLoadingAttributes
().
getMaxRows
();
boolean
truncateExtra
=
!
context
.
getLoadingAttributes
().
isFailIfMaxExceeded
();
String
query
=
"SELECT "
+
SELECT_COLUMNS
+
"FROM {PREFIX}tl_job_application "
+
tables
+
tableSetToSQL
(
joinTableSet
)
+
"WHERE "
+
SELECT_JOINS
+
" "
+
filter
+
orderBy
;
BaseBusinessClass
[]
results
=
loadQuery
(
allPSets
,
sqlMgr
,
context
,
query
,
searchParams
,
maxRows
,
truncateExtra
);
return
results
;
}
else
{
...
...
cmsWebApp/webroot/extensions/applicantportal/application_outline.jsp
View file @
8cd9d7f8
...
...
@@ -5,10 +5,21 @@
<oneit:dynIncluded>
<%
ObjectTransaction objTran =
(process == null ? ObjectTransaction.getTransaction () : process.getTransaction ()
);
ObjectTransaction objTran =
process.getTransaction (
);
String nextPage = WebUtils.getSamePageInRenderMode(request, "SelectionCriteria");
Job job = (Job) process.getAttribute("Job");
Candidate candidate = (Candidate) process.getAttribute("Candidate");
JobApplication jobApplication = JobApplication.searchCandidateJob(objTran, candidate, job);
if(jobApplication==null)
{
jobApplication = JobApplication.createJobApplication(objTran);
jobApplication.setCandidate(candidate);
jobApplication.setJob(job);
}
process.setAttribute("JobApplication", jobApplication);
%>
<div class="main-application-outline">
<div class="welcome-aust-logo"><img src="images/australia-post.png" /></div>
...
...
@@ -60,7 +71,7 @@
<span>Total time to complete: Approximately 40 minutes</span>
<oneit:button value="Begin the application" name="gotoPage" skin="link" cssClass="box-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("procParams", CollectionUtils.mapEntry("Job
", job
).toMap())
.mapEntry("procParams", CollectionUtils.mapEntry("Job
Application", jobApplication
).toMap())
.toMap() %>"/>
</div>
</oneit:form>
...
...
cmsWebApp/webroot/extensions/applicantportal/selection_criteria.jsp
View file @
8cd9d7f8
...
...
@@ -5,10 +5,10 @@
<oneit:dynIncluded>
<%
ObjectTransaction objTran =
(process == null ? ObjectTransaction.getTransaction () : process.getTransaction ()
);
ObjectTransaction objTran =
process.getTransaction (
);
String nextPage = WebUtils.getSamePageInRenderMode(request, "SelectionCriteria");
Job
job = (Job) process.getAttribute("Job
");
SecUser loggedInUser = SecUser.getTXUser(objTran
);
Job
Application jobApplication = (JobApplication) process.getAttribute("JobApplication
");
Job job = jobApplication.getJob(
);
%>
<script>
...
...
cmsWebApp/webroot/extensions/applicantportal/sign_in.jsp
View file @
8cd9d7f8
...
...
@@ -5,7 +5,7 @@
<oneit:dynIncluded>
<%
ObjectTransaction objTran =
(process == null ? ObjectTransaction.getTransaction () : process.getTransaction ()
);
ObjectTransaction objTran =
process.getTransaction (
);
String nextPage = WebUtils.getSamePageInRenderMode(request, "VerifyIdentity");
Job job = (Job) process.getAttribute("Job");
...
...
cmsWebApp/webroot/extensions/applicantportal/verify_identity.jsp
View file @
8cd9d7f8
...
...
@@ -5,7 +5,7 @@
<oneit:dynIncluded>
<%
ObjectTransaction objTran =
(process == null ? ObjectTransaction.getTransaction () : process.getTransaction ()
);
ObjectTransaction objTran =
process.getTransaction (
);
String nextPage = WebUtils.getSamePageInRenderMode(request, "ApplicationOutline");
Job job = (Job) process.getAttribute("Job");
SecUser secUser = SecUser.searchNAME(objTran, job.getEmail());
...
...
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