Commit 8175e87c by nilu

removing usage of application status

parent 44928130
package performa.form;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.objstore.StorageException;
import oneit.servlets.forms.RedisplayResult;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException;
import performa.orm.JobApplication;
public class ChangeApplicationStatusFP extends SaveFP
{
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
HttpServletRequest request = submission.getRequest();
JobApplication jobApplication = (JobApplication) request.getAttribute("JobApplication");
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1,"In ChangeApplicationStatusFP changing status of Job Application : ", jobApplication );
if(jobApplication.getWorkFlow() == null)
{
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1,"In ChangeApplicationStatusFP , no workflow set : ", jobApplication.getWorkFlow() );
return RedisplayResult.getInstance();
}
jobApplication.setApplicationStatus(jobApplication.getWorkFlow().getApplicationStatus());
LogMgr.log(JobApplication.LOG, LogLevel.PROCESSING1,"In ChangeApplicationStatusFP Job Application Status successfully changed : ", jobApplication );
return super.processForm(process, submission, params);
}
}
\ No newline at end of file
...@@ -51,7 +51,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -51,7 +51,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
public static final String FIELD_CultureFit = "CultureFit"; public static final String FIELD_CultureFit = "CultureFit";
public static final String FIELD_FactorScoreDetails = "FactorScoreDetails"; public static final String FIELD_FactorScoreDetails = "FactorScoreDetails";
public static final String FIELD_Note = "Note"; public static final String FIELD_Note = "Note";
public static final String SINGLEREFERENCE_WorkFlow = "WorkFlow";
public static final String SINGLEREFERENCE_Candidate = "Candidate"; public static final String SINGLEREFERENCE_Candidate = "Candidate";
public static final String BACKREF_Candidate = ""; public static final String BACKREF_Candidate = "";
public static final String SINGLEREFERENCE_Job = "Job"; public static final String SINGLEREFERENCE_Job = "Job";
...@@ -112,7 +111,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -112,7 +111,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
// Private attributes corresponding to single references // Private attributes corresponding to single references
private SingleAssociation<JobApplication, WorkFlow> _WorkFlow;
private SingleAssociation<JobApplication, Candidate> _Candidate; private SingleAssociation<JobApplication, Candidate> _Candidate;
private SingleAssociation<JobApplication, Job> _Job; private SingleAssociation<JobApplication, Job> _Job;
private SingleAssociation<JobApplication, WorkFlowStage> _WorkFlowStage; private SingleAssociation<JobApplication, WorkFlowStage> _WorkFlowStage;
...@@ -166,7 +164,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -166,7 +164,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
// Arrays of SingleAssocDecorators for each attribute // Arrays of SingleAssocDecorators for each attribute
private static final SingleAssocDecorator<JobApplication, WorkFlow>[] SINGLEREFERENCE_WorkFlow_Decorators;
private static final SingleAssocDecorator<JobApplication, Candidate>[] SINGLEREFERENCE_Candidate_Decorators; private static final SingleAssocDecorator<JobApplication, Candidate>[] SINGLEREFERENCE_Candidate_Decorators;
private static final SingleAssocDecorator<JobApplication, Job>[] SINGLEREFERENCE_Job_Decorators; private static final SingleAssocDecorator<JobApplication, Job>[] SINGLEREFERENCE_Job_Decorators;
private static final SingleAssocDecorator<JobApplication, WorkFlowStage>[] SINGLEREFERENCE_WorkFlowStage_Decorators; private static final SingleAssocDecorator<JobApplication, WorkFlowStage>[] SINGLEREFERENCE_WorkFlowStage_Decorators;
...@@ -203,7 +200,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -203,7 +200,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
setupAssocMetaData_ScheduledEmails(); setupAssocMetaData_ScheduledEmails();
setupAssocMetaData_SentEmails(); setupAssocMetaData_SentEmails();
setupAssocMetaData_Messages(); setupAssocMetaData_Messages();
setupAssocMetaData_WorkFlow();
setupAssocMetaData_Candidate(); setupAssocMetaData_Candidate();
setupAssocMetaData_Job(); setupAssocMetaData_Job();
setupAssocMetaData_WorkFlowStage(); setupAssocMetaData_WorkFlowStage();
...@@ -237,7 +233,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -237,7 +233,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
FIELD_PreferRemote_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_JobApplication, FIELD_PreferRemote).toArray (new AttributeDecorator[0]); FIELD_PreferRemote_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_JobApplication, FIELD_PreferRemote).toArray (new AttributeDecorator[0]);
FIELD_HappyToRelocate_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_JobApplication, FIELD_HappyToRelocate).toArray (new AttributeDecorator[0]); FIELD_HappyToRelocate_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_JobApplication, FIELD_HappyToRelocate).toArray (new AttributeDecorator[0]);
FIELD_IsEmailIngest_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_JobApplication, FIELD_IsEmailIngest).toArray (new AttributeDecorator[0]); FIELD_IsEmailIngest_Decorators = (AttributeDecorator[])AttributeDecoratorUtils.getAttributeDecorators(REFERENCE_JobApplication, FIELD_IsEmailIngest).toArray (new AttributeDecorator[0]);
SINGLEREFERENCE_WorkFlow_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_JobApplication, SINGLEREFERENCE_WorkFlow).toArray (new SingleAssocDecorator[0]);
SINGLEREFERENCE_Candidate_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_JobApplication, SINGLEREFERENCE_Candidate).toArray (new SingleAssocDecorator[0]); SINGLEREFERENCE_Candidate_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_JobApplication, SINGLEREFERENCE_Candidate).toArray (new SingleAssocDecorator[0]);
SINGLEREFERENCE_Job_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_JobApplication, SINGLEREFERENCE_Job).toArray (new SingleAssocDecorator[0]); SINGLEREFERENCE_Job_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_JobApplication, SINGLEREFERENCE_Job).toArray (new SingleAssocDecorator[0]);
SINGLEREFERENCE_WorkFlowStage_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_JobApplication, SINGLEREFERENCE_WorkFlowStage).toArray (new SingleAssocDecorator[0]); SINGLEREFERENCE_WorkFlowStage_Decorators = (SingleAssocDecorator[])AttributeDecoratorUtils.getSingleAssocDecorators(REFERENCE_JobApplication, SINGLEREFERENCE_WorkFlowStage).toArray (new SingleAssocDecorator[0]);
...@@ -325,18 +320,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -325,18 +320,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
} }
private static void setupAssocMetaData_WorkFlow()
{
Map metaInfo = new HashMap ();
metaInfo.put ("name", "WorkFlow");
metaInfo.put ("type", "WorkFlow");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for JobApplication.WorkFlow:", metaInfo);
ATTRIBUTES_METADATA_JobApplication.put (SINGLEREFERENCE_WorkFlow, Collections.unmodifiableMap (metaInfo));
}
private static void setupAssocMetaData_Candidate() private static void setupAssocMetaData_Candidate()
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -697,7 +680,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -697,7 +680,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
super._initialiseAssociations (); super._initialiseAssociations ();
_WorkFlow = new SingleAssociation<JobApplication, WorkFlow> (this, SINGLEREFERENCE_WorkFlow, null, WorkFlow.REFERENCE_WorkFlow, "");
_Candidate = new SingleAssociation<JobApplication, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_JobApplications, Candidate.REFERENCE_Candidate, "tl_job_application"); _Candidate = new SingleAssociation<JobApplication, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_JobApplications, Candidate.REFERENCE_Candidate, "tl_job_application");
_Job = new SingleAssociation<JobApplication, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_JobApplications, Job.REFERENCE_Job, "tl_job_application"); _Job = new SingleAssociation<JobApplication, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_JobApplications, Job.REFERENCE_Job, "tl_job_application");
_WorkFlowStage = new SingleAssociation<JobApplication, WorkFlowStage> (this, SINGLEREFERENCE_WorkFlowStage, null, WorkFlowStage.REFERENCE_WorkFlowStage, "tl_job_application"); _WorkFlowStage = new SingleAssociation<JobApplication, WorkFlowStage> (this, SINGLEREFERENCE_WorkFlowStage, null, WorkFlowStage.REFERENCE_WorkFlowStage, "tl_job_application");
...@@ -709,7 +691,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -709,7 +691,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
super.initialiseReference (); super.initialiseReference ();
_WorkFlow = new SingleAssociation<JobApplication, WorkFlow> (this, SINGLEREFERENCE_WorkFlow, null, WorkFlow.REFERENCE_WorkFlow, "");
_Candidate = new SingleAssociation<JobApplication, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_JobApplications, Candidate.REFERENCE_Candidate, "tl_job_application"); _Candidate = new SingleAssociation<JobApplication, Candidate> (this, SINGLEREFERENCE_Candidate, Candidate.MULTIPLEREFERENCE_JobApplications, Candidate.REFERENCE_Candidate, "tl_job_application");
_Job = new SingleAssociation<JobApplication, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_JobApplications, Job.REFERENCE_Job, "tl_job_application"); _Job = new SingleAssociation<JobApplication, Job> (this, SINGLEREFERENCE_Job, Job.MULTIPLEREFERENCE_JobApplications, Job.REFERENCE_Job, "tl_job_application");
_WorkFlowStage = new SingleAssociation<JobApplication, WorkFlowStage> (this, SINGLEREFERENCE_WorkFlowStage, null, WorkFlowStage.REFERENCE_WorkFlowStage, "tl_job_application"); _WorkFlowStage = new SingleAssociation<JobApplication, WorkFlowStage> (this, SINGLEREFERENCE_WorkFlowStage, null, WorkFlowStage.REFERENCE_WorkFlowStage, "tl_job_application");
...@@ -2229,7 +2210,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2229,7 +2210,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
List result = super.getSingleAssocs (); List result = super.getSingleAssocs ();
result.add("WorkFlow");
result.add("Candidate"); result.add("Candidate");
result.add("Job"); result.add("Job");
result.add("WorkFlowStage"); result.add("WorkFlowStage");
...@@ -2244,10 +2224,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2244,10 +2224,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_WorkFlow))
{
return _WorkFlow.getReferencedType ();
}
else if (assocName.equals (SINGLEREFERENCE_Candidate)) else if (assocName.equals (SINGLEREFERENCE_Candidate))
{ {
return _Candidate.getReferencedType (); return _Candidate.getReferencedType ();
...@@ -2298,10 +2274,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2298,10 +2274,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_WorkFlow))
{
return getWorkFlow ();
}
else if (assocName.equals (SINGLEREFERENCE_Candidate)) else if (assocName.equals (SINGLEREFERENCE_Candidate))
{ {
return getCandidate (); return getCandidate ();
...@@ -2327,10 +2299,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2327,10 +2299,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_WorkFlow))
{
return getWorkFlow (getType);
}
else if (assocName.equals (SINGLEREFERENCE_Candidate)) else if (assocName.equals (SINGLEREFERENCE_Candidate))
{ {
return getCandidate (getType); return getCandidate (getType);
...@@ -2356,10 +2324,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2356,10 +2324,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_WorkFlow))
{
return getWorkFlowID ();
}
else if (assocName.equals (SINGLEREFERENCE_Candidate)) else if (assocName.equals (SINGLEREFERENCE_Candidate))
{ {
return getCandidateID (); return getCandidateID ();
...@@ -2385,10 +2349,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2385,10 +2349,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
throw new RuntimeException ("Game over == null!"); throw new RuntimeException ("Game over == null!");
} }
else if (assocName.equals (SINGLEREFERENCE_WorkFlow))
{
setWorkFlow ((WorkFlow)(newValue));
}
else if (assocName.equals (SINGLEREFERENCE_Candidate)) else if (assocName.equals (SINGLEREFERENCE_Candidate))
{ {
setCandidate ((Candidate)(newValue)); setCandidate ((Candidate)(newValue));
...@@ -2410,97 +2370,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -2410,97 +2370,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
/** /**
* Get the reference WorkFlow
*/
public WorkFlow getWorkFlow () throws StorageException
{
assertValid();
try
{
return (WorkFlow)(_WorkFlow.get ());
}
catch (ClassCastException e)
{
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Cache collision in JobApplication:", this.getObjectID (), ", was trying to get WorkFlow:", getWorkFlowID ());
LogMgr.log (BUSINESS_OBJECTS, LogLevel.SYSTEMERROR2, "Instead I got:", _WorkFlow.get ().getClass ());
throw e;
}
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public WorkFlow getWorkFlow (Get getType) throws StorageException
{
assertValid();
return _WorkFlow.get(getType);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getWorkFlowID ()
{
assertValid();
if (_WorkFlow == null)
{
return null;
}
else
{
return _WorkFlow.getID ();
}
}
/**
* Called prior to the assoc changing. Subclasses need not call super. If a field exception
* is thrown, the attribute change will fail. The new value is different to the old value.
*/
protected void preWorkFlowChange (WorkFlow newWorkFlow) throws FieldException
{
}
/**
* Called after the assoc changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postWorkFlowChange () throws FieldException
{
}
public FieldWriteability getWriteability_WorkFlow ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the reference WorkFlow. Checks to ensure a new value
* has been supplied. If so, marks the reference as altered and sets it.
*/
public void setWorkFlow (WorkFlow newWorkFlow) throws StorageException, FieldException
{
if (_WorkFlow.wouldReferencedChange (newWorkFlow))
{
assertValid();
Debug.assertion (AttributeDecoratorUtils.getWriteability (SINGLEREFERENCE_WorkFlow_Decorators, (JobApplication)this, SINGLEREFERENCE_WorkFlow ,getWriteability_WorkFlow ()) != FieldWriteability.FALSE, "Assoc WorkFlow is not writeable");
preWorkFlowChange (newWorkFlow);
_WorkFlow.set (newWorkFlow);
postWorkFlowChange ();
}
}
/**
* Get the reference Candidate * Get the reference Candidate
*/ */
public Candidate getCandidate () throws StorageException public Candidate getCandidate () throws StorageException
...@@ -3696,7 +3565,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3696,7 +3565,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
BaseJobApplication sourceJobApplication = (BaseJobApplication)(source); BaseJobApplication sourceJobApplication = (BaseJobApplication)(source);
_WorkFlow.copyFrom (sourceJobApplication._WorkFlow, linkToGhosts);
_Candidate.copyFrom (sourceJobApplication._Candidate, linkToGhosts); _Candidate.copyFrom (sourceJobApplication._Candidate, linkToGhosts);
_Job.copyFrom (sourceJobApplication._Job, linkToGhosts); _Job.copyFrom (sourceJobApplication._Job, linkToGhosts);
_WorkFlowStage.copyFrom (sourceJobApplication._WorkFlowStage, linkToGhosts); _WorkFlowStage.copyFrom (sourceJobApplication._WorkFlowStage, linkToGhosts);
...@@ -3760,7 +3628,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3760,7 +3628,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
_CultureFit = (Map)(HELPER_CultureFit.readExternal (_CultureFit, vals.get(FIELD_CultureFit))); // _CultureFit = (Map)(HELPER_CultureFit.readExternal (_CultureFit, vals.get(FIELD_CultureFit))); //
_FactorScoreDetails = (Map)(HELPER_FactorScoreDetails.readExternal (_FactorScoreDetails, vals.get(FIELD_FactorScoreDetails))); // _FactorScoreDetails = (Map)(HELPER_FactorScoreDetails.readExternal (_FactorScoreDetails, vals.get(FIELD_FactorScoreDetails))); //
_Note = (String)(HELPER_Note.readExternal (_Note, vals.get(FIELD_Note))); // _Note = (String)(HELPER_Note.readExternal (_Note, vals.get(FIELD_Note))); //
_WorkFlow.readExternalData(vals.get(SINGLEREFERENCE_WorkFlow));
_Candidate.readExternalData(vals.get(SINGLEREFERENCE_Candidate)); _Candidate.readExternalData(vals.get(SINGLEREFERENCE_Candidate));
_Job.readExternalData(vals.get(SINGLEREFERENCE_Job)); _Job.readExternalData(vals.get(SINGLEREFERENCE_Job));
_WorkFlowStage.readExternalData(vals.get(SINGLEREFERENCE_WorkFlowStage)); _WorkFlowStage.readExternalData(vals.get(SINGLEREFERENCE_WorkFlowStage));
...@@ -3795,7 +3662,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3795,7 +3662,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
vals.put (FIELD_CultureFit, HELPER_CultureFit.writeExternal (_CultureFit)); vals.put (FIELD_CultureFit, HELPER_CultureFit.writeExternal (_CultureFit));
vals.put (FIELD_FactorScoreDetails, HELPER_FactorScoreDetails.writeExternal (_FactorScoreDetails)); vals.put (FIELD_FactorScoreDetails, HELPER_FactorScoreDetails.writeExternal (_FactorScoreDetails));
vals.put (FIELD_Note, HELPER_Note.writeExternal (_Note)); vals.put (FIELD_Note, HELPER_Note.writeExternal (_Note));
vals.put (SINGLEREFERENCE_WorkFlow, _WorkFlow.writeExternalData());
vals.put (SINGLEREFERENCE_Candidate, _Candidate.writeExternalData()); vals.put (SINGLEREFERENCE_Candidate, _Candidate.writeExternalData());
vals.put (SINGLEREFERENCE_Job, _Job.writeExternalData()); vals.put (SINGLEREFERENCE_Job, _Job.writeExternalData());
vals.put (SINGLEREFERENCE_WorkFlowStage, _WorkFlowStage.writeExternalData()); vals.put (SINGLEREFERENCE_WorkFlowStage, _WorkFlowStage.writeExternalData());
...@@ -3851,7 +3717,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3851,7 +3717,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
} }
// Compare single assocs // Compare single assocs
_WorkFlow.compare (otherJobApplication._WorkFlow, listener);
_Candidate.compare (otherJobApplication._Candidate, listener); _Candidate.compare (otherJobApplication._Candidate, listener);
_Job.compare (otherJobApplication._Job, listener); _Job.compare (otherJobApplication._Job, listener);
_WorkFlowStage.compare (otherJobApplication._WorkFlowStage, listener); _WorkFlowStage.compare (otherJobApplication._WorkFlowStage, listener);
...@@ -3895,7 +3760,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3895,7 +3760,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
visitor.visitField(this, FIELD_PreferRemote, HELPER_PreferRemote.toObject(getPreferRemote())); visitor.visitField(this, FIELD_PreferRemote, HELPER_PreferRemote.toObject(getPreferRemote()));
visitor.visitField(this, FIELD_HappyToRelocate, HELPER_HappyToRelocate.toObject(getHappyToRelocate())); visitor.visitField(this, FIELD_HappyToRelocate, HELPER_HappyToRelocate.toObject(getHappyToRelocate()));
visitor.visitField(this, FIELD_IsEmailIngest, HELPER_IsEmailIngest.toObject(getIsEmailIngest())); visitor.visitField(this, FIELD_IsEmailIngest, HELPER_IsEmailIngest.toObject(getIsEmailIngest()));
visitor.visitAssociation (_WorkFlow);
visitor.visitAssociation (_Candidate); visitor.visitAssociation (_Candidate);
visitor.visitAssociation (_Job); visitor.visitAssociation (_Job);
visitor.visitAssociation (_WorkFlowStage); visitor.visitAssociation (_WorkFlowStage);
...@@ -3912,10 +3776,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -3912,10 +3776,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
super.visitAssociations (visitor, scope); super.visitAssociations (visitor, scope);
if (scope.includes (_WorkFlow))
{
visitor.visit (_WorkFlow);
}
if (scope.includes (_Candidate)) if (scope.includes (_Candidate))
{ {
visitor.visit (_Candidate); visitor.visit (_Candidate);
...@@ -4868,10 +4728,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -4868,10 +4728,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
return getWriteability_Note (); return getWriteability_Note ();
} }
else if (fieldName.equals (SINGLEREFERENCE_WorkFlow))
{
return getWriteability_WorkFlow ();
}
else else
{ {
return super.getWriteable (fieldName); return super.getWriteable (fieldName);
...@@ -5460,10 +5316,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -5460,10 +5316,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
{ {
return toNote (); return toNote ();
} }
if (name.equals ("WorkFlow"))
{
return toWorkFlow ();
}
if (name.equals ("CV")) if (name.equals ("CV"))
{ {
return toCV (); return toCV ();
...@@ -5550,13 +5402,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -5550,13 +5402,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
public PipeLine<From, Boolean> toIsEmailIngest () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsEmailIngest)); } public PipeLine<From, Boolean> toIsEmailIngest () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsEmailIngest)); }
public WorkFlow.WorkFlowPipeLineFactory<From, WorkFlow> toWorkFlow () { return toWorkFlow (Filter.ALL); }
public WorkFlow.WorkFlowPipeLineFactory<From, WorkFlow> toWorkFlow (Filter<WorkFlow> filter)
{
return WorkFlow.REFERENCE_WorkFlow.new WorkFlowPipeLineFactory<From, WorkFlow> (this, new ORMSingleAssocPipe<Me, WorkFlow>(SINGLEREFERENCE_WorkFlow, filter));
}
public Candidate.CandidatePipeLineFactory<From, Candidate> toCandidate () { return toCandidate (Filter.ALL); } public Candidate.CandidatePipeLineFactory<From, Candidate> toCandidate () { return toCandidate (Filter.ALL); }
public Candidate.CandidatePipeLineFactory<From, Candidate> toCandidate (Filter<Candidate> filter) public Candidate.CandidatePipeLineFactory<From, Candidate> toCandidate (Filter<Candidate> filter)
...@@ -5659,11 +5504,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass ...@@ -5659,11 +5504,6 @@ public abstract class BaseJobApplication extends BaseBusinessClass
public boolean isTransientSingleReference(String assocName) public boolean isTransientSingleReference(String assocName)
{ {
if(CollectionUtils.equals(assocName, "WorkFlow"))
{
return true;
}
return super.isTransientSingleReference(assocName); return super.isTransientSingleReference(assocName);
} }
...@@ -5682,20 +5522,6 @@ class DummyJobApplication extends JobApplication ...@@ -5682,20 +5522,6 @@ class DummyJobApplication extends JobApplication
} }
public WorkFlow getWorkFlow () throws StorageException
{
return (WorkFlow)(WorkFlow.DUMMY_WorkFlow);
}
/**
* Get the object id for the referenced object. Does not force a DB access.
*/
public Long getWorkFlowID ()
{
return WorkFlow.DUMMY_WorkFlow.getObjectID();
}
public Candidate getCandidate () throws StorageException public Candidate getCandidate () throws StorageException
{ {
return (Candidate)(Candidate.DUMMY_Candidate); return (Candidate)(Candidate.DUMMY_Candidate);
......
...@@ -676,14 +676,7 @@ public class Job extends BaseJob ...@@ -676,14 +676,7 @@ public class Job extends BaseJob
Filter<WorkFlow> filter = WorkFlow.SearchByAll().andSortOrder(new EqualsFilter<>(sortOrder)); Filter<WorkFlow> filter = WorkFlow.SearchByAll().andSortOrder(new EqualsFilter<>(sortOrder));
return pipelineJob().toWorkFlows(filter).val(); return pipelineJob().toWorkFlows(filter).val();
} }
public WorkFlow getWorkFlowByStatus(ApplicationStatus appStatus)
{
Filter<WorkFlow> filter = WorkFlow.SearchByAll().andApplicationStatus(new EqualsFilter<>(appStatus));
return pipelineJob().toWorkFlows(filter).val();
}
public WorkFlowStage getWorkFlowByStageType(StageType stageType) public WorkFlowStage getWorkFlowByStageType(StageType stageType)
{ {
......
...@@ -547,14 +547,6 @@ public class JobApplication extends BaseJobApplication ...@@ -547,14 +547,6 @@ public class JobApplication extends BaseJobApplication
} }
public String getApplicantStatusStr()
{
WorkFlow workflow = getJob().getWorkFlowByStatus(getApplicationStatus());
return workflow != null ? workflow.getName() : "";
}
public List<ApplicationStatus> getAvailableStatuses() public List<ApplicationStatus> getAvailableStatuses()
{ {
List<ApplicationStatus> statuses = new ArrayList<>(); List<ApplicationStatus> statuses = new ArrayList<>();
......
...@@ -19,9 +19,7 @@ ...@@ -19,9 +19,7 @@
<TRANSIENT name="CultureFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/> <TRANSIENT name="CultureFit" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="FactorScoreDetails" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/> <TRANSIENT name="FactorScoreDetails" type="Map" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE"/>
<TRANSIENT name="Note" type="String" /> <TRANSIENT name="Note" type="String" />
<TRANSIENTSINGLE name="WorkFlow" type="WorkFlow" />
<TABLE name="tl_job_application" tablePrefix="object" polymorphic="FALSE"> <TABLE name="tl_job_application" tablePrefix="object" polymorphic="FALSE">
<ATTRIB name="CV" type="BinaryContent" dbcol="cv" binaryHandler="loggedin" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE" mandatory="false"/> <ATTRIB name="CV" type="BinaryContent" dbcol="cv" binaryHandler="loggedin" attribHelper="BLOBAttributeHelper" attribHelperInstance="BLOBAttributeHelper.INSTANCE" mandatory="false"/>
......
...@@ -35,7 +35,6 @@ ...@@ -35,7 +35,6 @@
<FORM name="*.loadJobFromTemplate" factory="Participant" class="performa.form.LoadJobFromTemplateFP"/> <FORM name="*.loadJobFromTemplate" factory="Participant" class="performa.form.LoadJobFromTemplateFP"/>
<FORM name="*.loadRequirementsFromTemplate" factory="Participant" class="performa.form.LoadRequirementsFromTemplateFP"/> <FORM name="*.loadRequirementsFromTemplate" factory="Participant" class="performa.form.LoadRequirementsFromTemplateFP"/>
<FORM name="*.loadCultureFromTemplate" factory="Participant" class="performa.form.LoadCultureFromTemplateFP"/> <FORM name="*.loadCultureFromTemplate" factory="Participant" class="performa.form.LoadCultureFromTemplateFP"/>
<FORM name="*.changeApplicationStatus" factory="Participant" class="performa.form.ChangeApplicationStatusFP"/>
<FORM name="*.addNote" factory="Participant" class="performa.form.AddNoteFP"/> <FORM name="*.addNote" factory="Participant" class="performa.form.AddNoteFP"/>
<FORM name="*.extendJob" factory="Participant" class="performa.form.ExtendJobFP"/> <FORM name="*.extendJob" factory="Participant" class="performa.form.ExtendJobFP"/>
<FORM name="*.bulkupdate" factory="Participant" class="performa.form.BulkUpdateFP"/> <FORM name="*.bulkupdate" factory="Participant" class="performa.form.BulkUpdateFP"/>
......
...@@ -95,7 +95,7 @@ ...@@ -95,7 +95,7 @@
<div class="appli-list-name appli-l"> <div class="appli-list-name appli-l">
<oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" /> <oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" />
<div class="appli-status"> <div class="appli-status">
<oneit:toString value="<%= jobApplication.getApplicantStatusStr() %>" mode="EscapeHTML" /> <oneit:toString value="<%= jobApplication.getWorkFlowStage() %>" mode="EscapeHTML" />
</div> </div>
</div> </div>
<div class="appli-overall appli-l"> <div class="appli-overall appli-l">
......
...@@ -65,10 +65,7 @@ ...@@ -65,10 +65,7 @@
String appID = "app-id-" + jobApplication.getID().toString(); String appID = "app-id-" + jobApplication.getID().toString();
Integer overallRank = jobApplication.getOverallRank(); Integer overallRank = jobApplication.getOverallRank();
Boolean isTopRank = CollectionUtils.equals(overallRank, 1); Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
WorkFlow workflow = job.getWorkFlowByStatus(jobApplication.getApplicationStatus());
boolean missingReq = jobApplication.hasFailedEssentialRequirements(); boolean missingReq = jobApplication.hasFailedEssentialRequirements();
jobApplication.setWorkFlow(workflow);
%> %>
<div class="appli-row" id="<%= jobApplication.getID() %>"> <div class="appli-row" id="<%= jobApplication.getID() %>">
<div class="appli-checkbox appli-l eq-second-height"> <div class="appli-checkbox appli-l eq-second-height">
...@@ -225,19 +222,18 @@ ...@@ -225,19 +222,18 @@
{ {
%> %>
<div class="appli-list-drop"> <div class="appli-list-drop">
<tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process" <tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlowStage" cssClass="form-control app-process"
options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/> options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/>
</div> </div>
<% <%
} }
%> %>
</div> </div>
<oneit:button name="changeApplicationStatus" value=" " cssClass="<%= "save-application" + jobApplication.getID().toString() + " hidden"%>" <oneit:button name="save" value=" " cssClass="<%= "save-application" + jobApplication.getID().toString() + " hidden"%>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry ("restartProcess", Boolean.TRUE) .mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry("procParams", CollectionUtils.mapEntry("StageType", stageType).mapEntry("Job", job).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("StageType", stageType).mapEntry("Job", job).toMap())
.mapEntry ("attribNamesToRestore", new HashSet<String> (Arrays.asList(new String[] {"Job", "StageType"}))) .mapEntry ("attribNamesToRestore", new HashSet<String> (Arrays.asList(new String[] {"Job", "StageType"})))
.mapEntry("JobApplication", jobApplication)
.toMap() %>" /> .toMap() %>" />
</div> </div>
<% <%
......
...@@ -45,10 +45,7 @@ ...@@ -45,10 +45,7 @@
Boolean isTopRank = CollectionUtils.equals(overallRank, 1); Boolean isTopRank = CollectionUtils.equals(overallRank, 1);
Boolean isVisible = CollectionUtils.equals(overallRank, 2) || isTopRank; Boolean isVisible = CollectionUtils.equals(overallRank, 2) || isTopRank;
Boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial()); Boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
WorkFlow workflow = job.getWorkFlowByStatus(jobApplication.getApplicationStatus());
boolean missingReq = jobApplication.hasFailedEssentialRequirements(); boolean missingReq = jobApplication.hasFailedEssentialRequirements();
jobApplication.setWorkFlow(workflow);
%> %>
<div class="appli-row" id="<%= jobApplication.getID() %>"> <div class="appli-row" id="<%= jobApplication.getID() %>">
...@@ -147,12 +144,11 @@ ...@@ -147,12 +144,11 @@
options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/> options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/>
</div> </div>
</div> </div>
<oneit:button name="changeApplicationStatus" value=" " cssClass="<%= "save-application" + jobApplication.getID().toString() + " hidden"%>" <oneit:button name="save" value=" " cssClass="<%= "save-application" + jobApplication.getID().toString() + " hidden"%>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry ("restartProcess", Boolean.TRUE) .mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry("procParams", CollectionUtils.mapEntry("StageType", stageType).mapEntry("Job", job).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("StageType", stageType).mapEntry("Job", job).toMap())
.mapEntry ("attribNamesToRestore", new HashSet<String> (Arrays.asList(new String[] {"Job", "StageType"}))) .mapEntry ("attribNamesToRestore", new HashSet<String> (Arrays.asList(new String[] {"Job", "StageType"})))
.mapEntry("JobApplication", jobApplication)
.toMap() %>" /> .toMap() %>" />
</div> </div>
<% <%
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
String currentPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION); String currentPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICATION);
boolean missingReq = jobApplication.hasFailedEssentialRequirements(); boolean missingReq = jobApplication.hasFailedEssentialRequirements();
boolean hasAllReq = jobApplication.hasAllEssentialRequirements(); boolean hasAllReq = jobApplication.hasAllEssentialRequirements();
WorkFlow workflow = job.getWorkFlowByStatus(jobApplication.getApplicationStatus());
List<WorkFlowStage> sortedWorkFlows = ObjstoreUtils.sort(jobApplication.getWorkFlowStage().getStageType() == StageType.INCOMPLETE || List<WorkFlowStage> sortedWorkFlows = ObjstoreUtils.sort(jobApplication.getWorkFlowStage().getStageType() == StageType.INCOMPLETE ||
jobApplication.getWorkFlowStage().getStageType() == StageType.POST_INGEST ? job.getIncompleteApplicantStages() : job.getApplicantStages(), jobApplication.getWorkFlowStage().getStageType() == StageType.POST_INGEST ? job.getIncompleteApplicantStages() : job.getApplicantStages(),
new ObjectTransform[]{WorkFlowStage.pipesWorkFlowStage().toSortOrder()}, new ObjectTransform[]{WorkFlowStage.pipesWorkFlowStage().toSortOrder()},
...@@ -28,8 +27,6 @@ ...@@ -28,8 +27,6 @@
boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial()); boolean onTrial = hiringTeam.isTrue(hiringTeam.getOnTrial());
boolean isVisible = CollectionUtils.equals(overallRank, 2) || CollectionUtils.equals(overallRank, 1); boolean isVisible = CollectionUtils.equals(overallRank, 2) || CollectionUtils.equals(overallRank, 1);
jobApplication.setWorkFlow(workflow);
Map<FactorClass, Tuple.T3<Double, ColorCode, Double>> roleScoreMap = (Map<FactorClass, Tuple.T3<Double, ColorCode, Double>>)jobApplication.getRoleFit(); Map<FactorClass, Tuple.T3<Double, ColorCode, Double>> roleScoreMap = (Map<FactorClass, Tuple.T3<Double, ColorCode, Double>>)jobApplication.getRoleFit();
%> %>
<script> <script>
...@@ -90,7 +87,7 @@ ...@@ -90,7 +87,7 @@
tabToggle("#tab1", ".role-fit"); tabToggle("#tab1", ".role-fit");
$("[name$='WorkFlow']").change(function() $("[name$='WorkFlowStage']").change(function()
{ {
$('.save-application').click(); $('.save-application').click();
}); });
...@@ -151,14 +148,13 @@ ...@@ -151,14 +148,13 @@
%> %>
<span class="appli-status-short"> <span class="appli-status-short">
<tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process" <tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlowStage" cssClass="form-control app-process"
options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/> options="<%= sortedWorkFlows.toArray(new WorkFlowStage[0]) %>"/>
<oneit:button name="changeApplicationStatus" value=" " cssClass="save-application hidden" <oneit:button name="save" value=" " cssClass="save-application hidden"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
.mapEntry ("restartProcess", Boolean.TRUE) .mapEntry ("restartProcess", Boolean.TRUE)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).mapEntry("Job", job).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).mapEntry("Job", job).toMap())
.mapEntry ("attribNamesToRestore", new HashSet<String> (Arrays.asList(new String[] {"Job", "JobApplication", "Applications"}))) .mapEntry ("attribNamesToRestore", new HashSet<String> (Arrays.asList(new String[] {"Job", "JobApplication", "Applications"})))
.mapEntry("JobApplication", jobApplication)
.toMap() %>" /> .toMap() %>" />
</span> </span>
</div> </div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment