Commit 0dfbe6bd by Nilu

S28236507 # Matchd / Talentology - No Plan [Enhancement] #Workflow refinements…

S28236507 # Matchd / Talentology - No Plan [Enhancement] #Workflow refinements of Email ingest / Messaging
parent 46853397
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
<column name="verification_mail_send_date" type="Date" nullable="true"/> <column name="verification_mail_send_date" type="Date" nullable="true"/>
<column name="verification_key" type="String" nullable="true" length="10"/> <column name="verification_key" type="String" nullable="true" length="10"/>
<column name="is_account_verified" type="Boolean" nullable="true"/> <column name="is_account_verified" type="Boolean" nullable="true"/>
<column name="is_password_changed" type="Boolean" nullable="true"/>
<column name="google_address_text" type="String" nullable="true" length="300"/> <column name="google_address_text" type="String" nullable="true" length="300"/>
<column name="is_email_ingest" type="Boolean" nullable="true"/> <column name="is_email_ingest" type="Boolean" nullable="true"/>
<column name="is_masked_email" type="Boolean" nullable="true"/> <column name="is_masked_email" type="Boolean" nullable="true"/>
......
...@@ -14,6 +14,7 @@ CREATE TABLE oneit_sec_user_extension ( ...@@ -14,6 +14,7 @@ CREATE TABLE oneit_sec_user_extension (
verification_mail_send_date datetime NULL, verification_mail_send_date datetime NULL,
verification_key varchar(10) NULL, verification_key varchar(10) NULL,
is_account_verified char(1) NULL, is_account_verified char(1) NULL,
is_password_changed char(1) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NULL,
is_email_ingest char(1) NULL, is_email_ingest char(1) NULL,
is_masked_email char(1) NULL, is_masked_email char(1) NULL,
......
...@@ -15,6 +15,7 @@ CREATE TABLE oneit_sec_user_extension ( ...@@ -15,6 +15,7 @@ CREATE TABLE oneit_sec_user_extension (
verification_mail_send_date date NULL, verification_mail_send_date date NULL,
verification_key varchar2(10) NULL, verification_key varchar2(10) NULL,
is_account_verified char(1) NULL, is_account_verified char(1) NULL,
is_password_changed char(1) NULL,
google_address_text varchar2(300) NULL, google_address_text varchar2(300) NULL,
is_email_ingest char(1) NULL, is_email_ingest char(1) NULL,
is_masked_email char(1) NULL, is_masked_email char(1) NULL,
......
...@@ -15,6 +15,7 @@ CREATE TABLE oneit_sec_user_extension ( ...@@ -15,6 +15,7 @@ CREATE TABLE oneit_sec_user_extension (
verification_mail_send_date timestamp NULL, verification_mail_send_date timestamp NULL,
verification_key varchar(10) NULL, verification_key varchar(10) NULL,
is_account_verified char(1) NULL, is_account_verified char(1) NULL,
is_password_changed char(1) NULL,
google_address_text varchar(300) NULL, google_address_text varchar(300) NULL,
is_email_ingest char(1) NULL, is_email_ingest char(1) NULL,
is_masked_email char(1) NULL, is_masked_email char(1) NULL,
......
...@@ -48,26 +48,14 @@ public class MessagingEngineBatch extends ORMBatch implements InitialisationPart ...@@ -48,26 +48,14 @@ public class MessagingEngineBatch extends ORMBatch implements InitialisationPart
Job job = jobApplication.getJob(); Job job = jobApplication.getJob();
Candidate candidate = jobApplication.getCandidate(); Candidate candidate = jobApplication.getCandidate();
String jobLink = LoopbackHTTP.getRemoteAccessURL() // for existing users without a verification code
+Utils.APPLICANT_SIGN_IN if( candidate.getVerificationKey() == null)
+ "&JobID=" + jobApplication.getJob().getID()
+ "&UserName=" + candidate.getUser().getUserName();
//set invitation key and send mail time
if(scheduledEmail.getMessageContent().contains(PlaceholderOptions.VERIFY_LINK.getPlaceholder()))
{ {
if( candidate.getVerificationKey() == null) candidate.setVerificationKey(new RandomStringGen().generateAlphaNum(6));
{
RandomStringGen random = new RandomStringGen();
candidate.setVerificationKey(random.generateAlphaNum(6));
}
candidate.setVerificationMailSendDate(new Date());
} }
String verifyLink = LoopbackHTTP.getRemoteAccessURL() String jobLink = LoopbackHTTP.getRemoteAccessURL()
+ Utils.APPLICANT_VERIFY_LINK + Utils.APPLICANT_LINK
+ "?id=" + job.getID() + "?id=" + job.getID()
+ "&key=" + job.getRandomKey() + "&key=" + job.getRandomKey()
+ "&aid=" + candidate.getID() + "&aid=" + candidate.getID()
...@@ -82,7 +70,6 @@ public class MessagingEngineBatch extends ORMBatch implements InitialisationPart ...@@ -82,7 +70,6 @@ public class MessagingEngineBatch extends ORMBatch implements InitialisationPart
PlaceholderOptions.JOB_TITLE.getPlaceholder(), PlaceholderOptions.JOB_TITLE.getPlaceholder(),
PlaceholderOptions.JOB_REFERENCE.getPlaceholder(), PlaceholderOptions.JOB_REFERENCE.getPlaceholder(),
PlaceholderOptions.HIRING_TEAM.getPlaceholder(), PlaceholderOptions.HIRING_TEAM.getPlaceholder(),
PlaceholderOptions.VERIFY_LINK.getPlaceholder(),
PlaceholderOptions.JOB_LINK.getPlaceholder()}, PlaceholderOptions.JOB_LINK.getPlaceholder()},
new String[] {candidate.getFirstName(), new String[] {candidate.getFirstName(),
candidate.getUser().getLastName(), candidate.getUser().getLastName(),
...@@ -91,7 +78,6 @@ public class MessagingEngineBatch extends ORMBatch implements InitialisationPart ...@@ -91,7 +78,6 @@ public class MessagingEngineBatch extends ORMBatch implements InitialisationPart
job.getJobTitle(), job.getJobTitle(),
StringUtils.subNulls(job.getReferenceNumber(), ""), StringUtils.subNulls(job.getReferenceNumber(), ""),
job.getHiringTeam().getHiringTeamName(), job.getHiringTeam().getHiringTeamName(),
verifyLink,
jobLink}); jobLink});
LogMgr.log (MESSAGING_ENGINE_BATCH, LogLevel.PROCESSING1, "Replaced tags of message content : " , messageContent); LogMgr.log (MESSAGING_ENGINE_BATCH, LogLevel.PROCESSING1, "Replaced tags of message content : " , messageContent);
...@@ -128,4 +114,4 @@ public class MessagingEngineBatch extends ORMBatch implements InitialisationPart ...@@ -128,4 +114,4 @@ public class MessagingEngineBatch extends ORMBatch implements InitialisationPart
emailEngine = (Emailer) context.getSingleChild("EmailEngine"); emailEngine = (Emailer) context.getSingleChild("EmailEngine");
} }
} }
\ No newline at end of file
package performa.form; package performa.form;
import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import oneit.logging.*; import oneit.logging.*;
import oneit.objstore.ObjectTransaction; import oneit.objstore.ObjectTransaction;
...@@ -10,6 +8,7 @@ import oneit.objstore.StorageException; ...@@ -10,6 +8,7 @@ import oneit.objstore.StorageException;
import oneit.security.SecUser; import oneit.security.SecUser;
import oneit.servlets.forms.*; import oneit.servlets.forms.*;
import oneit.servlets.process.*; import oneit.servlets.process.*;
import oneit.servlets.security.SessionSecUserDecorator;
import oneit.utils.*; import oneit.utils.*;
import performa.orm.*; import performa.orm.*;
import performa.utils.Utils; import performa.utils.Utils;
...@@ -47,14 +46,10 @@ public class ConfirmDetailsFP extends SaveFP ...@@ -47,14 +46,10 @@ public class ConfirmDetailsFP extends SaveFP
Candidate candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate); Candidate candidate = secUser.getExtensionOrCreate(Candidate.REFERENCE_Candidate);
LogMgr.log(LOG, LogLevel.PROCESSING1, "New user created :: ", secUser); LogMgr.log(LOG, LogLevel.PROCESSING1, "New user created :: ", secUser, " Candidate: " , candidate);
Set<String> attribsToRestore = new HashSet<>(); request.getSession().setAttribute (SecUser.SEC_USER_ID, secUser);
request.getSession().setAttribute (SessionSecUserDecorator.REFRESH_SECURITY, Boolean.TRUE);
attribsToRestore.add("Job");
attribsToRestore.add("NewCandidate");
request.setAttribute("attribNamesToRestore", attribsToRestore);
process.setAttribute("NewCandidate",candidate);
return super.processForm(process, submission, params); return super.processForm(process, submission, params);
} }
......
...@@ -13,7 +13,7 @@ import oneit.servlets.forms.*; ...@@ -13,7 +13,7 @@ import oneit.servlets.forms.*;
import oneit.servlets.process.*; import oneit.servlets.process.*;
import oneit.utils.*; import oneit.utils.*;
import performa.orm.*; import performa.orm.*;
import performa.orm.types.RoleType; import performa.orm.types.*;
import performa.utils.Utils; import performa.utils.Utils;
...@@ -21,7 +21,6 @@ public class SendVerificationMailFP extends SaveFP ...@@ -21,7 +21,6 @@ public class SendVerificationMailFP extends SaveFP
{ {
private static final LoggingArea LOG = LoggingArea.createLoggingArea("SendVerificationLink"); private static final LoggingArea LOG = LoggingArea.createLoggingArea("SendVerificationLink");
protected ConfigurableArticleTemplateEmailer emailer; protected ConfigurableArticleTemplateEmailer emailer;
protected ConfigurableArticleTemplateEmailer emailChangedMailer;
@Override @Override
...@@ -58,8 +57,6 @@ public class SendVerificationMailFP extends SaveFP ...@@ -58,8 +57,6 @@ public class SendVerificationMailFP extends SaveFP
BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getPrivacyPolicyAgreed()), candidate, Candidate.FIELD_PrivacyPolicyAgreed, "agreePrivacy", exceptions, true, request); BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getPrivacyPolicyAgreed()), candidate, Candidate.FIELD_PrivacyPolicyAgreed, "agreePrivacy", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getConditionsAgreed()), candidate, Candidate.FIELD_ConditionsAgreed, "agreeTerms", exceptions, true, request); BusinessObjectParser.assertFieldCondition(candidate.isTrue(candidate.getConditionsAgreed()), candidate, Candidate.FIELD_ConditionsAgreed, "agreeTerms", exceptions, true, request);
// BusinessObjectParser.assertFieldCondition(secUser.checkPassword(job.getPassword()), job, Job.FIELD_Password, "invalid", exceptions, true, request);
if(job.getRequireCV()) if(job.getRequireCV())
{ {
BusinessObjectParser.assertFieldCondition(jobApplication.getCV() != null , jobApplication, JobApplication.FIELD_CV, "uploadCV", exceptions, true, request); BusinessObjectParser.assertFieldCondition(jobApplication.getCV() != null , jobApplication, JobApplication.FIELD_CV, "uploadCV", exceptions, true, request);
...@@ -74,12 +71,13 @@ public class SendVerificationMailFP extends SaveFP ...@@ -74,12 +71,13 @@ public class SendVerificationMailFP extends SaveFP
@Override @Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{ {
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
ObjectTransaction objTran = process.getTransaction(); ObjectTransaction objTran = process.getTransaction();
Job job = (Job) request.getAttribute("Job"); Job job = (Job) request.getAttribute("Job");
Candidate candidate = (Candidate) request.getAttribute("Candidate"); Candidate candidate = (Candidate) request.getAttribute("Candidate");
Company company = (Company) request.getAttribute("Company"); Company company = (Company) request.getAttribute("Company");
JobApplication jobApplication = (JobApplication) request.getAttribute("JobApplication");
if(company != null) if(company != null)
{ {
CompanyUser companyUser = company.getAddedByUser(); CompanyUser companyUser = company.getAddedByUser();
...@@ -140,8 +138,8 @@ public class SendVerificationMailFP extends SaveFP ...@@ -140,8 +138,8 @@ public class SendVerificationMailFP extends SaveFP
throw new BusinessException("Please enter a valid email address"); throw new BusinessException("Please enter a valid email address");
} }
// send email changed mail //set new verification key as email changed
Utils.sendMaskedEmailChangedMail(candidate, job, emailChangedMailer); candidate.setVerificationKey(new RandomStringGen().generateAlphaNum(6));
candidate.getUser().setUserName(candidate.getUser().getEmail()); candidate.getUser().setUserName(candidate.getUser().getEmail());
candidate.setIsMaskedEmail(false); candidate.setIsMaskedEmail(false);
...@@ -151,19 +149,29 @@ public class SendVerificationMailFP extends SaveFP ...@@ -151,19 +149,29 @@ public class SendVerificationMailFP extends SaveFP
{ {
candidate.setIsAccountVerified(true); candidate.setIsAccountVerified(true);
} }
jobApplication.setApplicationStatus(ApplicationStatus.DRAFT);
} }
if(!candidate.isTrue(candidate.getIsPasswordChanged()))
{
candidate.setIsPasswordChanged(true);
}
// storing candidate location in application for distance calculation to be accurate even if user edits
// location in the next application
jobApplication.setGoogleAddressText(candidate.getGoogleAddressText());
} }
return super.processForm(process, submission, params); return super.processForm(process, submission, params);
} }
@Override @Override
public void init(ParticipantInitialisationContext context) throws InitialisationException public void init(ParticipantInitialisationContext context) throws InitialisationException
{ {
super.init(context); super.init(context);
emailer = (ConfigurableArticleTemplateEmailer) (context.getSingleChild("AccountVerificationEmailer")); emailer = (ConfigurableArticleTemplateEmailer) (context.getSingleChild("AccountVerificationEmailer"));
emailChangedMailer = (ConfigurableArticleTemplateEmailer) (context.getSingleChild("EmailChangedEmailer"));
} }
} }
\ No newline at end of file
...@@ -2,120 +2,38 @@ package performa.form; ...@@ -2,120 +2,38 @@ package performa.form;
import java.util.Map; import java.util.Map;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import oneit.business.content.Article;
import oneit.components.ParticipantInitialisationContext;
import oneit.email.ConfigurableArticleTemplateEmailer;
import oneit.email.ConfigurableEmailerException;
import oneit.logging.*; import oneit.logging.*;
import oneit.net.LoopbackHTTP;
import oneit.objstore.StorageException; import oneit.objstore.StorageException;
import oneit.objstore.parser.BusinessObjectParser;
import oneit.security.SecUser; import oneit.security.SecUser;
import oneit.servlets.forms.*; import oneit.servlets.forms.*;
import oneit.servlets.process.*; import oneit.servlets.process.*;
import oneit.servlets.security.SessionSecUserDecorator; import oneit.servlets.security.SessionSecUserDecorator;
import oneit.utils.*; import oneit.utils.*;
import performa.orm.*; import performa.orm.*;
import performa.utils.Utils;
import performa.utils.WebUtils;
public class VerifyIdentityFP extends SaveFP public class VerifyIdentityFP extends SaveFP
{ {
private static LoggingArea LOG = LoggingArea.createLoggingArea("VerifyIdentity"); private static LoggingArea LOG = LoggingArea.createLoggingArea("VerifyIdentity");
protected ConfigurableArticleTemplateEmailer emailer;
@Override
protected Map validate(SubmissionDetails submission, MultiException exceptions)
{
HttpServletRequest request = submission.getRequest();
JobApplication jobApplication = (JobApplication)request.getAttribute("JobApplication");
Candidate candidate = (Candidate) request.getAttribute("Candidate");
SecUser secUser = candidate.getUser();
Boolean isVerify = CollectionUtils.equals(request.getAttribute("isVerify"), Boolean.TRUE);
boolean fromCoverLetter = request.getAttribute("fromCoverLetter") != null ? (boolean) request.getAttribute("fromCoverLetter"): false;
Job job = (Job) request.getAttribute("Job");
if(isVerify)
{
BusinessObjectParser.assertFieldCondition(secUser.checkPassword(job.getPassword()) , job, Job.FIELD_Password, "invalid", exceptions, true, request);
}
if(fromCoverLetter && job.getRequireCV())
{
BusinessObjectParser.assertFieldCondition(jobApplication.getCV() != null , jobApplication, JobApplication.FIELD_CV, "uploadCV", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(jobApplication.getCoverLetter() != null , jobApplication, JobApplication.FIELD_CoverLetter, "uploadCover", exceptions, true, request);
}
return super.validate(submission, exceptions);
}
@Override @Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{ {
HttpServletRequest request = submission.getRequest(); HttpServletRequest request = submission.getRequest();
Boolean isVerify = CollectionUtils.equals(request.getAttribute("isVerify"), Boolean.TRUE);
Job job = (Job) request.getAttribute("Job");
JobApplication jobApplication = (JobApplication) request.getAttribute("JobApplication");
Candidate candidate = (Candidate) request.getAttribute("Candidate"); Candidate candidate = (Candidate) request.getAttribute("Candidate");
if(isVerify) if(candidate.isTrue(candidate.getIsEmailIngest()) && candidate.getKnownAsAlias() == null && !candidate.isTrue(candidate.getIsPasswordChanged()))
{ {
SecUser secUser = candidate.getUser(); request.getSession().setAttribute (SecUser.SEC_USER_ID, candidate.getUser());
LogMgr.log(LOG, LogLevel.PROCESSING1, "Verifing User ", job, secUser);
candidate.setIsAccountVerified(Boolean.TRUE);
sendMail(candidate, job, request);
request.getSession().setAttribute (SecUser.SEC_USER_ID, secUser);
request.getSession().setAttribute (SessionSecUserDecorator.REFRESH_SECURITY, Boolean.TRUE); request.getSession().setAttribute (SessionSecUserDecorator.REFRESH_SECURITY, Boolean.TRUE);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Verified User ", job, secUser);
} }
// storing candidate location in application for distance calculation to be accurate even if user edits if(candidate.isFalse(candidate.getIsMaskedEmail()) && candidate.isFalse(candidate.getIsAccountVerified()))
// location in the next application
jobApplication.setGoogleAddressText(candidate.getGoogleAddressText());
return super.processForm(process, submission, params);
}
@Override
public void init(ParticipantInitialisationContext context) throws InitialisationException
{
super.init(context);
emailer = (ConfigurableArticleTemplateEmailer) (context.getSingleChild("ApplicantAccountCreatedEmailer"));
}
protected void sendMail(Candidate candidate, Job job, HttpServletRequest request) throws BusinessException
{
try
{ {
LogMgr.log(LOG, LogLevel.PROCESSING1, "Sending Account Created mail from VerifyIdentityFP to :: ", candidate); candidate.setIsAccountVerified(true);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Verifing User ", candidate);
Article applyJobArticle = WebUtils.getArticleByShortCut(candidate.getTransaction(), WebUtils.APPLY_JOB);
String link = LoopbackHTTP.getRemoteAccessURL(request)
+ applyJobArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", WebUtils.FORGOT_PASSWORD).toMap(), "/")
+ "&id=" + job.getID()
+ "&key=" + job.getRandomKey();
Map defaultParams = CollectionUtils.mapEntry("link", link).toMap();
ObjectTransform transform = Utils.createCompoundTransform(defaultParams, candidate.getUser());
Utils.sendMail(emailer, transform, new String[]{candidate.getUser().getUserName()}, null, candidate);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Sent Account Created mail successfully from " + VerifyIdentityFP.class + " to :: ", candidate);
}
catch (ConfigurableEmailerException ex)
{
LogMgr.log(LOG, LogLevel.SYSTEMERROR1, ex, "Error occured while sending mail for Candidate :: " + candidate);
throw new BusinessException("We are unable to send mail. Please try again or contact Matchd for more details.");
} }
return super.processForm(process, submission, params);
} }
} }
\ No newline at end of file
...@@ -46,6 +46,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -46,6 +46,7 @@ public abstract class BaseCandidate extends SecUserExtension
public static final String FIELD_VerificationMailSendDate = "VerificationMailSendDate"; public static final String FIELD_VerificationMailSendDate = "VerificationMailSendDate";
public static final String FIELD_VerificationKey = "VerificationKey"; public static final String FIELD_VerificationKey = "VerificationKey";
public static final String FIELD_IsAccountVerified = "IsAccountVerified"; public static final String FIELD_IsAccountVerified = "IsAccountVerified";
public static final String FIELD_IsPasswordChanged = "IsPasswordChanged";
public static final String FIELD_GoogleAddressText = "GoogleAddressText"; public static final String FIELD_GoogleAddressText = "GoogleAddressText";
public static final String FIELD_IsEmailIngest = "IsEmailIngest"; public static final String FIELD_IsEmailIngest = "IsEmailIngest";
public static final String FIELD_IsMaskedEmail = "IsMaskedEmail"; public static final String FIELD_IsMaskedEmail = "IsMaskedEmail";
...@@ -76,6 +77,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -76,6 +77,7 @@ public abstract class BaseCandidate extends SecUserExtension
private static final DefaultAttributeHelper<Candidate> HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Candidate> HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Candidate> HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Candidate> HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Candidate> HELPER_IsAccountVerified = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Candidate> HELPER_IsAccountVerified = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Candidate> HELPER_IsPasswordChanged = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Candidate> HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Candidate> HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Candidate> HELPER_IsEmailIngest = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Candidate> HELPER_IsEmailIngest = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<Candidate> HELPER_IsMaskedEmail = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<Candidate> HELPER_IsMaskedEmail = DefaultAttributeHelper.INSTANCE;
...@@ -91,6 +93,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -91,6 +93,7 @@ public abstract class BaseCandidate extends SecUserExtension
private Date _VerificationMailSendDate; private Date _VerificationMailSendDate;
private String _VerificationKey; private String _VerificationKey;
private Boolean _IsAccountVerified; private Boolean _IsAccountVerified;
private Boolean _IsPasswordChanged;
private String _GoogleAddressText; private String _GoogleAddressText;
private Boolean _IsEmailIngest; private Boolean _IsEmailIngest;
private Boolean _IsMaskedEmail; private Boolean _IsMaskedEmail;
...@@ -122,6 +125,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -122,6 +125,7 @@ public abstract class BaseCandidate extends SecUserExtension
private static final AttributeValidator[] FIELD_VerificationMailSendDate_Validators; private static final AttributeValidator[] FIELD_VerificationMailSendDate_Validators;
private static final AttributeValidator[] FIELD_VerificationKey_Validators; private static final AttributeValidator[] FIELD_VerificationKey_Validators;
private static final AttributeValidator[] FIELD_IsAccountVerified_Validators; private static final AttributeValidator[] FIELD_IsAccountVerified_Validators;
private static final AttributeValidator[] FIELD_IsPasswordChanged_Validators;
private static final AttributeValidator[] FIELD_GoogleAddressText_Validators; private static final AttributeValidator[] FIELD_GoogleAddressText_Validators;
private static final AttributeValidator[] FIELD_IsEmailIngest_Validators; private static final AttributeValidator[] FIELD_IsEmailIngest_Validators;
private static final AttributeValidator[] FIELD_IsMaskedEmail_Validators; private static final AttributeValidator[] FIELD_IsMaskedEmail_Validators;
...@@ -157,6 +161,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -157,6 +161,7 @@ public abstract class BaseCandidate extends SecUserExtension
FIELD_VerificationMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_VerificationMailSendDate(validatorMapping).toArray (new AttributeValidator[0]); FIELD_VerificationMailSendDate_Validators = (AttributeValidator[])setupAttribMetaData_VerificationMailSendDate(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_VerificationKey_Validators = (AttributeValidator[])setupAttribMetaData_VerificationKey(validatorMapping).toArray (new AttributeValidator[0]); FIELD_VerificationKey_Validators = (AttributeValidator[])setupAttribMetaData_VerificationKey(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsAccountVerified_Validators = (AttributeValidator[])setupAttribMetaData_IsAccountVerified(validatorMapping).toArray (new AttributeValidator[0]); FIELD_IsAccountVerified_Validators = (AttributeValidator[])setupAttribMetaData_IsAccountVerified(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsPasswordChanged_Validators = (AttributeValidator[])setupAttribMetaData_IsPasswordChanged(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_GoogleAddressText_Validators = (AttributeValidator[])setupAttribMetaData_GoogleAddressText(validatorMapping).toArray (new AttributeValidator[0]); FIELD_GoogleAddressText_Validators = (AttributeValidator[])setupAttribMetaData_GoogleAddressText(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsEmailIngest_Validators = (AttributeValidator[])setupAttribMetaData_IsEmailIngest(validatorMapping).toArray (new AttributeValidator[0]); FIELD_IsEmailIngest_Validators = (AttributeValidator[])setupAttribMetaData_IsEmailIngest(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsMaskedEmail_Validators = (AttributeValidator[])setupAttribMetaData_IsMaskedEmail(validatorMapping).toArray (new AttributeValidator[0]); FIELD_IsMaskedEmail_Validators = (AttributeValidator[])setupAttribMetaData_IsMaskedEmail(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -395,6 +400,25 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -395,6 +400,25 @@ public abstract class BaseCandidate extends SecUserExtension
} }
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_IsPasswordChanged(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("dbcol", "is_password_changed");
metaInfo.put ("defaultValue", "Boolean.FALSE");
metaInfo.put ("name", "IsPasswordChanged");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for Candidate.IsPasswordChanged:", metaInfo);
ATTRIBUTES_METADATA_Candidate.put (FIELD_IsPasswordChanged, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(Candidate.class, "IsPasswordChanged", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for Candidate.IsPasswordChanged:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_GoogleAddressText(Map validatorMapping) private static List setupAttribMetaData_GoogleAddressText(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -503,6 +527,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -503,6 +527,7 @@ public abstract class BaseCandidate extends SecUserExtension
_VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (_VerificationMailSendDate)); _VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (_VerificationMailSendDate));
_VerificationKey = (String)(HELPER_VerificationKey.initialise (_VerificationKey)); _VerificationKey = (String)(HELPER_VerificationKey.initialise (_VerificationKey));
_IsAccountVerified = (Boolean)(Boolean.FALSE); _IsAccountVerified = (Boolean)(Boolean.FALSE);
_IsPasswordChanged = (Boolean)(Boolean.FALSE);
_GoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (_GoogleAddressText)); _GoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (_GoogleAddressText));
_IsEmailIngest = (Boolean)(Boolean.FALSE); _IsEmailIngest = (Boolean)(Boolean.FALSE);
_IsMaskedEmail = (Boolean)(Boolean.FALSE); _IsMaskedEmail = (Boolean)(Boolean.FALSE);
...@@ -1132,6 +1157,104 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -1132,6 +1157,104 @@ public abstract class BaseCandidate extends SecUserExtension
} }
/** /**
* Get the attribute IsPasswordChanged
*/
public Boolean getIsPasswordChanged ()
{
assertValid();
Boolean valToReturn = _IsPasswordChanged;
for (CandidateBehaviourDecorator bhd : Candidate_BehaviourDecorators)
{
valToReturn = bhd.getIsPasswordChanged ((Candidate)this, valToReturn);
}
return valToReturn;
}
/**
* Called prior to the attribute 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 preIsPasswordChangedChange (Boolean newIsPasswordChanged) throws FieldException
{
}
/**
* Called after the attribute changes.
* If a field exception is thrown, the value is still changed, however it
* may lead to the TX being rolled back
*/
protected void postIsPasswordChangedChange () throws FieldException
{
}
public FieldWriteability getWriteability_IsPasswordChanged ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute IsPasswordChanged. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setIsPasswordChanged (Boolean newIsPasswordChanged) throws FieldException
{
boolean oldAndNewIdentical = HELPER_IsPasswordChanged.compare (_IsPasswordChanged, newIsPasswordChanged);
try
{
for (CandidateBehaviourDecorator bhd : Candidate_BehaviourDecorators)
{
newIsPasswordChanged = bhd.setIsPasswordChanged ((Candidate)this, newIsPasswordChanged);
oldAndNewIdentical = HELPER_IsPasswordChanged.compare (_IsPasswordChanged, newIsPasswordChanged);
}
if (FIELD_IsPasswordChanged_Validators.length > 0)
{
Object newIsPasswordChangedObj = HELPER_IsPasswordChanged.toObject (newIsPasswordChanged);
if (newIsPasswordChangedObj != null)
{
int loopMax = FIELD_IsPasswordChanged_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_Candidate.get (FIELD_IsPasswordChanged);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_IsPasswordChanged_Validators[v].checkAttribute (this, FIELD_IsPasswordChanged, metadata, newIsPasswordChangedObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_IsPasswordChanged () != FieldWriteability.FALSE, "Field IsPasswordChanged is not writeable");
preIsPasswordChangedChange (newIsPasswordChanged);
markFieldChange (FIELD_IsPasswordChanged);
_IsPasswordChanged = newIsPasswordChanged;
postFieldChange (FIELD_IsPasswordChanged);
postIsPasswordChangedChange ();
}
}
/**
* Get the attribute GoogleAddressText * Get the attribute GoogleAddressText
*/ */
public String getGoogleAddressText () public String getGoogleAddressText ()
...@@ -2612,6 +2735,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2612,6 +2735,7 @@ public abstract class BaseCandidate extends SecUserExtension
oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject (_VerificationMailSendDate)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject (_VerificationMailSendDate)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationKey, HELPER_VerificationKey.toObject (_VerificationKey)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_VerificationKey, HELPER_VerificationKey.toObject (_VerificationKey)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_IsAccountVerified, HELPER_IsAccountVerified.toObject (_IsAccountVerified)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_IsAccountVerified, HELPER_IsAccountVerified.toObject (_IsAccountVerified)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_IsPasswordChanged, HELPER_IsPasswordChanged.toObject (_IsPasswordChanged)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject (_GoogleAddressText)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject (_GoogleAddressText)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_IsEmailIngest, HELPER_IsEmailIngest.toObject (_IsEmailIngest)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_IsEmailIngest, HELPER_IsEmailIngest.toObject (_IsEmailIngest)); //
oneit_sec_user_extensionPSet.setAttrib (FIELD_IsMaskedEmail, HELPER_IsMaskedEmail.toObject (_IsMaskedEmail)); // oneit_sec_user_extensionPSet.setAttrib (FIELD_IsMaskedEmail, HELPER_IsMaskedEmail.toObject (_IsMaskedEmail)); //
...@@ -2637,6 +2761,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2637,6 +2761,7 @@ public abstract class BaseCandidate extends SecUserExtension
_VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.fromObject (_VerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationMailSendDate))); // _VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.fromObject (_VerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationMailSendDate))); //
_VerificationKey = (String)(HELPER_VerificationKey.fromObject (_VerificationKey, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationKey))); // _VerificationKey = (String)(HELPER_VerificationKey.fromObject (_VerificationKey, oneit_sec_user_extensionPSet.getAttrib (FIELD_VerificationKey))); //
_IsAccountVerified = (Boolean)(HELPER_IsAccountVerified.fromObject (_IsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (FIELD_IsAccountVerified))); // _IsAccountVerified = (Boolean)(HELPER_IsAccountVerified.fromObject (_IsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (FIELD_IsAccountVerified))); //
_IsPasswordChanged = (Boolean)(HELPER_IsPasswordChanged.fromObject (_IsPasswordChanged, oneit_sec_user_extensionPSet.getAttrib (FIELD_IsPasswordChanged))); //
_GoogleAddressText = (String)(HELPER_GoogleAddressText.fromObject (_GoogleAddressText, oneit_sec_user_extensionPSet.getAttrib (FIELD_GoogleAddressText))); // _GoogleAddressText = (String)(HELPER_GoogleAddressText.fromObject (_GoogleAddressText, oneit_sec_user_extensionPSet.getAttrib (FIELD_GoogleAddressText))); //
_IsEmailIngest = (Boolean)(HELPER_IsEmailIngest.fromObject (_IsEmailIngest, oneit_sec_user_extensionPSet.getAttrib (FIELD_IsEmailIngest))); // _IsEmailIngest = (Boolean)(HELPER_IsEmailIngest.fromObject (_IsEmailIngest, oneit_sec_user_extensionPSet.getAttrib (FIELD_IsEmailIngest))); //
_IsMaskedEmail = (Boolean)(HELPER_IsMaskedEmail.fromObject (_IsMaskedEmail, oneit_sec_user_extensionPSet.getAttrib (FIELD_IsMaskedEmail))); // _IsMaskedEmail = (Boolean)(HELPER_IsMaskedEmail.fromObject (_IsMaskedEmail, oneit_sec_user_extensionPSet.getAttrib (FIELD_IsMaskedEmail))); //
...@@ -2713,6 +2838,15 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2713,6 +2838,15 @@ public abstract class BaseCandidate extends SecUserExtension
try try
{ {
setIsPasswordChanged (otherCandidate.getIsPasswordChanged ());
}
catch (FieldException ex)
{
e.addException (ex);
}
try
{
setGoogleAddressText (otherCandidate.getGoogleAddressText ()); setGoogleAddressText (otherCandidate.getGoogleAddressText ());
} }
catch (FieldException ex) catch (FieldException ex)
...@@ -2768,6 +2902,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2768,6 +2902,7 @@ public abstract class BaseCandidate extends SecUserExtension
_VerificationMailSendDate = sourceCandidate._VerificationMailSendDate; _VerificationMailSendDate = sourceCandidate._VerificationMailSendDate;
_VerificationKey = sourceCandidate._VerificationKey; _VerificationKey = sourceCandidate._VerificationKey;
_IsAccountVerified = sourceCandidate._IsAccountVerified; _IsAccountVerified = sourceCandidate._IsAccountVerified;
_IsPasswordChanged = sourceCandidate._IsPasswordChanged;
_GoogleAddressText = sourceCandidate._GoogleAddressText; _GoogleAddressText = sourceCandidate._GoogleAddressText;
_IsEmailIngest = sourceCandidate._IsEmailIngest; _IsEmailIngest = sourceCandidate._IsEmailIngest;
_IsMaskedEmail = sourceCandidate._IsMaskedEmail; _IsMaskedEmail = sourceCandidate._IsMaskedEmail;
...@@ -2837,6 +2972,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2837,6 +2972,7 @@ public abstract class BaseCandidate extends SecUserExtension
_VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.readExternal (_VerificationMailSendDate, vals.get(FIELD_VerificationMailSendDate))); // _VerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.readExternal (_VerificationMailSendDate, vals.get(FIELD_VerificationMailSendDate))); //
_VerificationKey = (String)(HELPER_VerificationKey.readExternal (_VerificationKey, vals.get(FIELD_VerificationKey))); // _VerificationKey = (String)(HELPER_VerificationKey.readExternal (_VerificationKey, vals.get(FIELD_VerificationKey))); //
_IsAccountVerified = (Boolean)(HELPER_IsAccountVerified.readExternal (_IsAccountVerified, vals.get(FIELD_IsAccountVerified))); // _IsAccountVerified = (Boolean)(HELPER_IsAccountVerified.readExternal (_IsAccountVerified, vals.get(FIELD_IsAccountVerified))); //
_IsPasswordChanged = (Boolean)(HELPER_IsPasswordChanged.readExternal (_IsPasswordChanged, vals.get(FIELD_IsPasswordChanged))); //
_GoogleAddressText = (String)(HELPER_GoogleAddressText.readExternal (_GoogleAddressText, vals.get(FIELD_GoogleAddressText))); // _GoogleAddressText = (String)(HELPER_GoogleAddressText.readExternal (_GoogleAddressText, vals.get(FIELD_GoogleAddressText))); //
_IsEmailIngest = (Boolean)(HELPER_IsEmailIngest.readExternal (_IsEmailIngest, vals.get(FIELD_IsEmailIngest))); // _IsEmailIngest = (Boolean)(HELPER_IsEmailIngest.readExternal (_IsEmailIngest, vals.get(FIELD_IsEmailIngest))); //
_IsMaskedEmail = (Boolean)(HELPER_IsMaskedEmail.readExternal (_IsMaskedEmail, vals.get(FIELD_IsMaskedEmail))); // _IsMaskedEmail = (Boolean)(HELPER_IsMaskedEmail.readExternal (_IsMaskedEmail, vals.get(FIELD_IsMaskedEmail))); //
...@@ -2865,6 +3001,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2865,6 +3001,7 @@ public abstract class BaseCandidate extends SecUserExtension
vals.put (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.writeExternal (_VerificationMailSendDate)); vals.put (FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.writeExternal (_VerificationMailSendDate));
vals.put (FIELD_VerificationKey, HELPER_VerificationKey.writeExternal (_VerificationKey)); vals.put (FIELD_VerificationKey, HELPER_VerificationKey.writeExternal (_VerificationKey));
vals.put (FIELD_IsAccountVerified, HELPER_IsAccountVerified.writeExternal (_IsAccountVerified)); vals.put (FIELD_IsAccountVerified, HELPER_IsAccountVerified.writeExternal (_IsAccountVerified));
vals.put (FIELD_IsPasswordChanged, HELPER_IsPasswordChanged.writeExternal (_IsPasswordChanged));
vals.put (FIELD_GoogleAddressText, HELPER_GoogleAddressText.writeExternal (_GoogleAddressText)); vals.put (FIELD_GoogleAddressText, HELPER_GoogleAddressText.writeExternal (_GoogleAddressText));
vals.put (FIELD_IsEmailIngest, HELPER_IsEmailIngest.writeExternal (_IsEmailIngest)); vals.put (FIELD_IsEmailIngest, HELPER_IsEmailIngest.writeExternal (_IsEmailIngest));
vals.put (FIELD_IsMaskedEmail, HELPER_IsMaskedEmail.writeExternal (_IsMaskedEmail)); vals.put (FIELD_IsMaskedEmail, HELPER_IsMaskedEmail.writeExternal (_IsMaskedEmail));
...@@ -2913,6 +3050,10 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2913,6 +3050,10 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
listener.notifyFieldChange(this, other, FIELD_IsAccountVerified, HELPER_IsAccountVerified.toObject(this._IsAccountVerified), HELPER_IsAccountVerified.toObject(otherCandidate._IsAccountVerified)); listener.notifyFieldChange(this, other, FIELD_IsAccountVerified, HELPER_IsAccountVerified.toObject(this._IsAccountVerified), HELPER_IsAccountVerified.toObject(otherCandidate._IsAccountVerified));
} }
if (!HELPER_IsPasswordChanged.compare(this._IsPasswordChanged, otherCandidate._IsPasswordChanged))
{
listener.notifyFieldChange(this, other, FIELD_IsPasswordChanged, HELPER_IsPasswordChanged.toObject(this._IsPasswordChanged), HELPER_IsPasswordChanged.toObject(otherCandidate._IsPasswordChanged));
}
if (!HELPER_GoogleAddressText.compare(this._GoogleAddressText, otherCandidate._GoogleAddressText)) if (!HELPER_GoogleAddressText.compare(this._GoogleAddressText, otherCandidate._GoogleAddressText))
{ {
listener.notifyFieldChange(this, other, FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject(this._GoogleAddressText), HELPER_GoogleAddressText.toObject(otherCandidate._GoogleAddressText)); listener.notifyFieldChange(this, other, FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject(this._GoogleAddressText), HELPER_GoogleAddressText.toObject(otherCandidate._GoogleAddressText));
...@@ -2964,6 +3105,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -2964,6 +3105,7 @@ public abstract class BaseCandidate extends SecUserExtension
visitor.visitField(this, FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject(getVerificationMailSendDate())); visitor.visitField(this, FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.toObject(getVerificationMailSendDate()));
visitor.visitField(this, FIELD_VerificationKey, HELPER_VerificationKey.toObject(getVerificationKey())); visitor.visitField(this, FIELD_VerificationKey, HELPER_VerificationKey.toObject(getVerificationKey()));
visitor.visitField(this, FIELD_IsAccountVerified, HELPER_IsAccountVerified.toObject(getIsAccountVerified())); visitor.visitField(this, FIELD_IsAccountVerified, HELPER_IsAccountVerified.toObject(getIsAccountVerified()));
visitor.visitField(this, FIELD_IsPasswordChanged, HELPER_IsPasswordChanged.toObject(getIsPasswordChanged()));
visitor.visitField(this, FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject(getGoogleAddressText())); visitor.visitField(this, FIELD_GoogleAddressText, HELPER_GoogleAddressText.toObject(getGoogleAddressText()));
visitor.visitField(this, FIELD_IsEmailIngest, HELPER_IsEmailIngest.toObject(getIsEmailIngest())); visitor.visitField(this, FIELD_IsEmailIngest, HELPER_IsEmailIngest.toObject(getIsEmailIngest()));
visitor.visitField(this, FIELD_IsMaskedEmail, HELPER_IsMaskedEmail.toObject(getIsMaskedEmail())); visitor.visitField(this, FIELD_IsMaskedEmail, HELPER_IsMaskedEmail.toObject(getIsMaskedEmail()));
...@@ -3050,6 +3192,10 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3050,6 +3192,10 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
return filter.matches (getIsAccountVerified ()); return filter.matches (getIsAccountVerified ());
} }
else if (attribName.equals (FIELD_IsPasswordChanged))
{
return filter.matches (getIsPasswordChanged ());
}
else if (attribName.equals (FIELD_GoogleAddressText)) else if (attribName.equals (FIELD_GoogleAddressText))
{ {
return filter.matches (getGoogleAddressText ()); return filter.matches (getGoogleAddressText ());
...@@ -3137,6 +3283,12 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3137,6 +3283,12 @@ public abstract class BaseCandidate extends SecUserExtension
return this; return this;
} }
public SearchAll andIsPasswordChanged (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.is_password_changed", "IsPasswordChanged");
return this;
}
public SearchAll andGoogleAddressText (QueryFilter<String> filter) public SearchAll andGoogleAddressText (QueryFilter<String> filter)
{ {
filter.addFilter (context, "oneit_sec_user_extension.google_address_text", "GoogleAddressText"); filter.addFilter (context, "oneit_sec_user_extension.google_address_text", "GoogleAddressText");
...@@ -3309,6 +3461,12 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3309,6 +3461,12 @@ public abstract class BaseCandidate extends SecUserExtension
return this; return this;
} }
public SearchIdPin andIsPasswordChanged (QueryFilter<Boolean> filter)
{
filter.addFilter (context, "oneit_sec_user_extension.is_password_changed", "IsPasswordChanged");
return this;
}
public SearchIdPin andGoogleAddressText (QueryFilter<String> filter) public SearchIdPin andGoogleAddressText (QueryFilter<String> filter)
{ {
filter.addFilter (context, "oneit_sec_user_extension.google_address_text", "GoogleAddressText"); filter.addFilter (context, "oneit_sec_user_extension.google_address_text", "GoogleAddressText");
...@@ -3404,6 +3562,10 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3404,6 +3562,10 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
return HELPER_IsAccountVerified.toObject (getIsAccountVerified ()); return HELPER_IsAccountVerified.toObject (getIsAccountVerified ());
} }
else if (attribName.equals (FIELD_IsPasswordChanged))
{
return HELPER_IsPasswordChanged.toObject (getIsPasswordChanged ());
}
else if (attribName.equals (FIELD_GoogleAddressText)) else if (attribName.equals (FIELD_GoogleAddressText))
{ {
return HELPER_GoogleAddressText.toObject (getGoogleAddressText ()); return HELPER_GoogleAddressText.toObject (getGoogleAddressText ());
...@@ -3465,6 +3627,10 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3465,6 +3627,10 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
return HELPER_IsAccountVerified; return HELPER_IsAccountVerified;
} }
else if (attribName.equals (FIELD_IsPasswordChanged))
{
return HELPER_IsPasswordChanged;
}
else if (attribName.equals (FIELD_GoogleAddressText)) else if (attribName.equals (FIELD_GoogleAddressText))
{ {
return HELPER_GoogleAddressText; return HELPER_GoogleAddressText;
...@@ -3526,6 +3692,10 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3526,6 +3692,10 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
setIsAccountVerified ((Boolean)(HELPER_IsAccountVerified.fromObject (_IsAccountVerified, attribValue))); setIsAccountVerified ((Boolean)(HELPER_IsAccountVerified.fromObject (_IsAccountVerified, attribValue)));
} }
else if (attribName.equals (FIELD_IsPasswordChanged))
{
setIsPasswordChanged ((Boolean)(HELPER_IsPasswordChanged.fromObject (_IsPasswordChanged, attribValue)));
}
else if (attribName.equals (FIELD_GoogleAddressText)) else if (attribName.equals (FIELD_GoogleAddressText))
{ {
setGoogleAddressText ((String)(HELPER_GoogleAddressText.fromObject (_GoogleAddressText, attribValue))); setGoogleAddressText ((String)(HELPER_GoogleAddressText.fromObject (_GoogleAddressText, attribValue)));
...@@ -3594,6 +3764,10 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3594,6 +3764,10 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
return getWriteability_IsAccountVerified (); return getWriteability_IsAccountVerified ();
} }
else if (fieldName.equals (FIELD_IsPasswordChanged))
{
return getWriteability_IsPasswordChanged ();
}
else if (fieldName.equals (FIELD_GoogleAddressText)) else if (fieldName.equals (FIELD_GoogleAddressText))
{ {
return getWriteability_GoogleAddressText (); return getWriteability_GoogleAddressText ();
...@@ -3678,6 +3852,11 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3678,6 +3852,11 @@ public abstract class BaseCandidate extends SecUserExtension
fields.add (FIELD_IsAccountVerified); fields.add (FIELD_IsAccountVerified);
} }
if (getWriteability_IsPasswordChanged () != FieldWriteability.TRUE)
{
fields.add (FIELD_IsPasswordChanged);
}
if (getWriteability_GoogleAddressText () != FieldWriteability.TRUE) if (getWriteability_GoogleAddressText () != FieldWriteability.TRUE)
{ {
fields.add (FIELD_GoogleAddressText); fields.add (FIELD_GoogleAddressText);
...@@ -3723,6 +3902,7 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3723,6 +3902,7 @@ public abstract class BaseCandidate extends SecUserExtension
result.add(HELPER_VerificationMailSendDate.getAttribObject (getClass (), _VerificationMailSendDate, false, FIELD_VerificationMailSendDate)); result.add(HELPER_VerificationMailSendDate.getAttribObject (getClass (), _VerificationMailSendDate, false, FIELD_VerificationMailSendDate));
result.add(HELPER_VerificationKey.getAttribObject (getClass (), _VerificationKey, false, FIELD_VerificationKey)); result.add(HELPER_VerificationKey.getAttribObject (getClass (), _VerificationKey, false, FIELD_VerificationKey));
result.add(HELPER_IsAccountVerified.getAttribObject (getClass (), _IsAccountVerified, false, FIELD_IsAccountVerified)); result.add(HELPER_IsAccountVerified.getAttribObject (getClass (), _IsAccountVerified, false, FIELD_IsAccountVerified));
result.add(HELPER_IsPasswordChanged.getAttribObject (getClass (), _IsPasswordChanged, false, FIELD_IsPasswordChanged));
result.add(HELPER_GoogleAddressText.getAttribObject (getClass (), _GoogleAddressText, false, FIELD_GoogleAddressText)); result.add(HELPER_GoogleAddressText.getAttribObject (getClass (), _GoogleAddressText, false, FIELD_GoogleAddressText));
result.add(HELPER_IsEmailIngest.getAttribObject (getClass (), _IsEmailIngest, false, FIELD_IsEmailIngest)); result.add(HELPER_IsEmailIngest.getAttribObject (getClass (), _IsEmailIngest, false, FIELD_IsEmailIngest));
result.add(HELPER_IsMaskedEmail.getAttribObject (getClass (), _IsMaskedEmail, false, FIELD_IsMaskedEmail)); result.add(HELPER_IsMaskedEmail.getAttribObject (getClass (), _IsMaskedEmail, false, FIELD_IsMaskedEmail));
...@@ -3888,6 +4068,24 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -3888,6 +4068,24 @@ public abstract class BaseCandidate extends SecUserExtension
} }
/** /**
* Get the attribute IsPasswordChanged
*/
public Boolean getIsPasswordChanged (Candidate obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute IsPasswordChanged.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setIsPasswordChanged (Candidate obj, Boolean newIsPasswordChanged) throws FieldException
{
return newIsPasswordChanged;
}
/**
* Get the attribute GoogleAddressText * Get the attribute GoogleAddressText
*/ */
public String getGoogleAddressText (Candidate obj, String original) public String getGoogleAddressText (Candidate obj, String original)
...@@ -4095,6 +4293,10 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -4095,6 +4293,10 @@ public abstract class BaseCandidate extends SecUserExtension
{ {
return toIsAccountVerified (); return toIsAccountVerified ();
} }
if (name.equals ("IsPasswordChanged"))
{
return toIsPasswordChanged ();
}
if (name.equals ("GoogleAddressText")) if (name.equals ("GoogleAddressText"))
{ {
return toGoogleAddressText (); return toGoogleAddressText ();
...@@ -4137,6 +4339,8 @@ public abstract class BaseCandidate extends SecUserExtension ...@@ -4137,6 +4339,8 @@ public abstract class BaseCandidate extends SecUserExtension
public PipeLine<From, Boolean> toIsAccountVerified () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsAccountVerified)); } public PipeLine<From, Boolean> toIsAccountVerified () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsAccountVerified)); }
public PipeLine<From, Boolean> toIsPasswordChanged () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsPasswordChanged)); }
public PipeLine<From, String> toGoogleAddressText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_GoogleAddressText)); } public PipeLine<From, String> toGoogleAddressText () { return pipe(new ORMAttributePipe<Me, String>(FIELD_GoogleAddressText)); }
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)); }
......
...@@ -15,9 +15,11 @@ import oneit.objstore.rdbms.filters.IsNotNullFilter; ...@@ -15,9 +15,11 @@ import oneit.objstore.rdbms.filters.IsNotNullFilter;
import oneit.objstore.utils.ObjstoreUtils; import oneit.objstore.utils.ObjstoreUtils;
import oneit.servlets.objstore.MessageSourceDecorator; import oneit.servlets.objstore.MessageSourceDecorator;
import oneit.servlets.process.ORMProcessState; import oneit.servlets.process.ORMProcessState;
import oneit.utils.BusinessException;
import oneit.utils.CollectionUtils; import oneit.utils.CollectionUtils;
import oneit.utils.DateDiff; import oneit.utils.DateDiff;
import oneit.utils.ObjectTransform; import oneit.utils.ObjectTransform;
import oneit.utils.RandomStringGen;
import oneit.utils.StringUtils; import oneit.utils.StringUtils;
import oneit.utils.filter.*; import oneit.utils.filter.*;
import performa.utils.DistanceUtils; import performa.utils.DistanceUtils;
...@@ -34,6 +36,16 @@ public class Candidate extends BaseCandidate ...@@ -34,6 +36,16 @@ public class Candidate extends BaseCandidate
{ {
// Do not add any code to this, always put it in initialiseNewObject // Do not add any code to this, always put it in initialiseNewObject
} }
@Override
protected void postInitNewObj() throws BusinessException
{
RandomStringGen random = new RandomStringGen();
setVerificationKey(random.generateAlphaNum(6));
super.postInitNewObj();
}
public String getFirstName() public String getFirstName()
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
<ATTRIB name="VerificationMailSendDate" type="Date" dbcol="verification_mail_send_date" /> <ATTRIB name="VerificationMailSendDate" type="Date" dbcol="verification_mail_send_date" />
<ATTRIB name="VerificationKey" type="String" dbcol="verification_key" length="10"/> <ATTRIB name="VerificationKey" type="String" dbcol="verification_key" length="10"/>
<ATTRIB name="IsAccountVerified" type="Boolean" dbcol="is_account_verified" defaultValue="Boolean.FALSE"/> <ATTRIB name="IsAccountVerified" type="Boolean" dbcol="is_account_verified" defaultValue="Boolean.FALSE"/>
<ATTRIB name="IsPasswordChanged" type="Boolean" dbcol="is_password_changed" defaultValue="Boolean.FALSE"/>
<ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300"/> <ATTRIB name="GoogleAddressText" type="String" dbcol="google_address_text" length="300"/>
<ATTRIB name="IsEmailIngest" type="Boolean" dbcol="is_email_ingest" defaultValue="Boolean.FALSE"/> <ATTRIB name="IsEmailIngest" type="Boolean" dbcol="is_email_ingest" defaultValue="Boolean.FALSE"/>
<ATTRIB name="IsMaskedEmail" type="Boolean" dbcol="is_masked_email" defaultValue="Boolean.FALSE"/> <ATTRIB name="IsMaskedEmail" type="Boolean" dbcol="is_masked_email" defaultValue="Boolean.FALSE"/>
......
...@@ -33,6 +33,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -33,6 +33,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr
private Date dummyVerificationMailSendDate; private Date dummyVerificationMailSendDate;
private String dummyVerificationKey; private String dummyVerificationKey;
private Boolean dummyIsAccountVerified; private Boolean dummyIsAccountVerified;
private Boolean dummyIsPasswordChanged;
private String dummyGoogleAddressText; private String dummyGoogleAddressText;
private Boolean dummyIsEmailIngest; private Boolean dummyIsEmailIngest;
private Boolean dummyIsMaskedEmail; private Boolean dummyIsMaskedEmail;
...@@ -46,6 +47,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -46,6 +47,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr
private static final DefaultAttributeHelper HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_VerificationMailSendDate = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_VerificationKey = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_IsAccountVerified = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_IsAccountVerified = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_IsPasswordChanged = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_GoogleAddressText = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_IsEmailIngest = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_IsEmailIngest = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper HELPER_IsMaskedEmail = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper HELPER_IsMaskedEmail = DefaultAttributeHelper.INSTANCE;
...@@ -62,6 +64,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -62,6 +64,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr
dummyVerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (dummyVerificationMailSendDate)); dummyVerificationMailSendDate = (Date)(HELPER_VerificationMailSendDate.initialise (dummyVerificationMailSendDate));
dummyVerificationKey = (String)(HELPER_VerificationKey.initialise (dummyVerificationKey)); dummyVerificationKey = (String)(HELPER_VerificationKey.initialise (dummyVerificationKey));
dummyIsAccountVerified = (Boolean)(HELPER_IsAccountVerified.initialise (dummyIsAccountVerified)); dummyIsAccountVerified = (Boolean)(HELPER_IsAccountVerified.initialise (dummyIsAccountVerified));
dummyIsPasswordChanged = (Boolean)(HELPER_IsPasswordChanged.initialise (dummyIsPasswordChanged));
dummyGoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (dummyGoogleAddressText)); dummyGoogleAddressText = (String)(HELPER_GoogleAddressText.initialise (dummyGoogleAddressText));
dummyIsEmailIngest = (Boolean)(HELPER_IsEmailIngest.initialise (dummyIsEmailIngest)); dummyIsEmailIngest = (Boolean)(HELPER_IsEmailIngest.initialise (dummyIsEmailIngest));
dummyIsMaskedEmail = (Boolean)(HELPER_IsMaskedEmail.initialise (dummyIsMaskedEmail)); dummyIsMaskedEmail = (Boolean)(HELPER_IsMaskedEmail.initialise (dummyIsMaskedEmail));
...@@ -69,7 +72,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -69,7 +72,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr
} }
private String SELECT_COLUMNS = "{PREFIX}oneit_sec_user_extension.object_id as id, {PREFIX}oneit_sec_user_extension.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}oneit_sec_user_extension.object_CREATED_DATE as CREATED_DATE, {PREFIX}oneit_sec_user_extension.object_TYPE as OBJECT_TYPE, {PREFIX}oneit_sec_user_extension.phone, {PREFIX}oneit_sec_user_extension.forgot_password_mail_send_date, {PREFIX}oneit_sec_user_extension.forgot_password_key, {PREFIX}oneit_sec_user_extension.verification_mail_send_date, {PREFIX}oneit_sec_user_extension.verification_key, {PREFIX}oneit_sec_user_extension.is_account_verified, {PREFIX}oneit_sec_user_extension.google_address_text, {PREFIX}oneit_sec_user_extension.is_email_ingest, {PREFIX}oneit_sec_user_extension.is_masked_email, {PREFIX}oneit_sec_user_extension.known_as_alias, {PREFIX}oneit_sec_user_extension.test_input_id, {PREFIX}oneit_sec_user_extension.user_id, 1 AS commasafe "; private String SELECT_COLUMNS = "{PREFIX}oneit_sec_user_extension.object_id as id, {PREFIX}oneit_sec_user_extension.object_LAST_UPDATED_DATE as LAST_UPDATED_DATE, {PREFIX}oneit_sec_user_extension.object_CREATED_DATE as CREATED_DATE, {PREFIX}oneit_sec_user_extension.object_TYPE as OBJECT_TYPE, {PREFIX}oneit_sec_user_extension.phone, {PREFIX}oneit_sec_user_extension.forgot_password_mail_send_date, {PREFIX}oneit_sec_user_extension.forgot_password_key, {PREFIX}oneit_sec_user_extension.verification_mail_send_date, {PREFIX}oneit_sec_user_extension.verification_key, {PREFIX}oneit_sec_user_extension.is_account_verified, {PREFIX}oneit_sec_user_extension.is_password_changed, {PREFIX}oneit_sec_user_extension.google_address_text, {PREFIX}oneit_sec_user_extension.is_email_ingest, {PREFIX}oneit_sec_user_extension.is_masked_email, {PREFIX}oneit_sec_user_extension.known_as_alias, {PREFIX}oneit_sec_user_extension.test_input_id, {PREFIX}oneit_sec_user_extension.user_id, 1 AS commasafe ";
private String SELECT_JOINS = ""; private String SELECT_JOINS = "";
public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException public BaseBusinessClass fetchByID(ObjectID id, PersistentSetCollection allPSets, RDBMSPersistenceContext context, SQLManager sqlMgr) throws SQLException, StorageException
...@@ -127,6 +130,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -127,6 +130,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr
!oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_VerificationMailSendDate)|| !oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_VerificationMailSendDate)||
!oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_VerificationKey)|| !oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_VerificationKey)||
!oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_IsAccountVerified)|| !oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_IsAccountVerified)||
!oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_IsPasswordChanged)||
!oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_GoogleAddressText)|| !oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_GoogleAddressText)||
!oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_IsEmailIngest)|| !oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_IsEmailIngest)||
!oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_IsMaskedEmail)|| !oneit_sec_user_extensionPSet.containsAttrib(Candidate.FIELD_IsMaskedEmail)||
...@@ -231,10 +235,10 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -231,10 +235,10 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr
{ {
int rowsUpdated = executeStatement (sqlMgr, int rowsUpdated = executeStatement (sqlMgr,
"UPDATE {PREFIX}oneit_sec_user_extension " + "UPDATE {PREFIX}oneit_sec_user_extension " +
"SET phone = ?, forgot_password_mail_send_date = ?, forgot_password_key = ?, verification_mail_send_date = ?, verification_key = ?, is_account_verified = ?, google_address_text = ?, is_email_ingest = ?, is_masked_email = ?, known_as_alias = ?, test_input_id = ? , user_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " + "SET phone = ?, forgot_password_mail_send_date = ?, forgot_password_key = ?, verification_mail_send_date = ?, verification_key = ?, is_account_verified = ?, is_password_changed = ?, google_address_text = ?, is_email_ingest = ?, is_masked_email = ?, known_as_alias = ?, test_input_id = ? , user_id = ? , object_LAST_UPDATED_DATE = " + sqlMgr.getPortabilityServices ().getTimestampExpression () + " " +
"WHERE oneit_sec_user_extension.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ", "WHERE oneit_sec_user_extension.object_id = ? AND " + getConcurrencyCheck (sqlMgr, "object_LAST_UPDATED_DATE", obj.getObjectLastModified ()) + " ",
CollectionUtils.listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_Phone))).listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_ForgotPasswordKey))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsAccountVerified))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_GoogleAddressText))).listEntry (HELPER_IsEmailIngest.getForSQL(dummyIsEmailIngest, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsEmailIngest))).listEntry (HELPER_IsMaskedEmail.getForSQL(dummyIsMaskedEmail, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsMaskedEmail))).listEntry (HELPER_KnownAsAlias.getForSQL(dummyKnownAsAlias, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_KnownAsAlias))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (Candidate.SINGLEREFERENCE_TestInput)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (Candidate.SINGLEREFERENCE_User)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray()); CollectionUtils.listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_Phone))).listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_ForgotPasswordKey))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsAccountVerified))).listEntry (HELPER_IsPasswordChanged.getForSQL(dummyIsPasswordChanged, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsPasswordChanged))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_GoogleAddressText))).listEntry (HELPER_IsEmailIngest.getForSQL(dummyIsEmailIngest, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsEmailIngest))).listEntry (HELPER_IsMaskedEmail.getForSQL(dummyIsMaskedEmail, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsMaskedEmail))).listEntry (HELPER_KnownAsAlias.getForSQL(dummyKnownAsAlias, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_KnownAsAlias))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (Candidate.SINGLEREFERENCE_TestInput)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (Candidate.SINGLEREFERENCE_User)))).listEntry (objectID.longID ()).listEntry (obj.getObjectLastModified ()).toList().toArray());
if (rowsUpdated != 1) if (rowsUpdated != 1)
{ {
...@@ -638,6 +642,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -638,6 +642,7 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr
oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.getFromRS(dummyVerificationMailSendDate, r, "verification_mail_send_date")); oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_VerificationMailSendDate, HELPER_VerificationMailSendDate.getFromRS(dummyVerificationMailSendDate, r, "verification_mail_send_date"));
oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_VerificationKey, HELPER_VerificationKey.getFromRS(dummyVerificationKey, r, "verification_key")); oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_VerificationKey, HELPER_VerificationKey.getFromRS(dummyVerificationKey, r, "verification_key"));
oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_IsAccountVerified, HELPER_IsAccountVerified.getFromRS(dummyIsAccountVerified, r, "is_account_verified")); oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_IsAccountVerified, HELPER_IsAccountVerified.getFromRS(dummyIsAccountVerified, r, "is_account_verified"));
oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_IsPasswordChanged, HELPER_IsPasswordChanged.getFromRS(dummyIsPasswordChanged, r, "is_password_changed"));
oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_GoogleAddressText, HELPER_GoogleAddressText.getFromRS(dummyGoogleAddressText, r, "google_address_text")); oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_GoogleAddressText, HELPER_GoogleAddressText.getFromRS(dummyGoogleAddressText, r, "google_address_text"));
oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_IsEmailIngest, HELPER_IsEmailIngest.getFromRS(dummyIsEmailIngest, r, "is_email_ingest")); oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_IsEmailIngest, HELPER_IsEmailIngest.getFromRS(dummyIsEmailIngest, r, "is_email_ingest"));
oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_IsMaskedEmail, HELPER_IsMaskedEmail.getFromRS(dummyIsMaskedEmail, r, "is_masked_email")); oneit_sec_user_extensionPSet.setAttrib(Candidate.FIELD_IsMaskedEmail, HELPER_IsMaskedEmail.getFromRS(dummyIsMaskedEmail, r, "is_masked_email"));
...@@ -661,10 +666,10 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr ...@@ -661,10 +666,10 @@ public class CandidatePersistenceMgr extends SecUserExtensionPersistenceMgr
{ {
executeStatement (sqlMgr, executeStatement (sqlMgr,
"INSERT INTO {PREFIX}oneit_sec_user_extension " + "INSERT INTO {PREFIX}oneit_sec_user_extension " +
" (phone, forgot_password_mail_send_date, forgot_password_key, verification_mail_send_date, verification_key, is_account_verified, google_address_text, is_email_ingest, is_masked_email, known_as_alias, test_input_id, user_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE, object_TYPE) " + " (phone, forgot_password_mail_send_date, forgot_password_key, verification_mail_send_date, verification_key, is_account_verified, is_password_changed, google_address_text, is_email_ingest, is_masked_email, known_as_alias, test_input_id, user_id, object_id, object_LAST_UPDATED_DATE, object_CREATED_DATE, object_TYPE) " +
"VALUES " + "VALUES " +
" (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", ?)", " (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", " + sqlMgr.getPortabilityServices ().getTimestampExpression () + ", ?)",
CollectionUtils.listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_Phone))).listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_ForgotPasswordKey))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsAccountVerified))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_GoogleAddressText))).listEntry (HELPER_IsEmailIngest.getForSQL(dummyIsEmailIngest, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsEmailIngest))).listEntry (HELPER_IsMaskedEmail.getForSQL(dummyIsMaskedEmail, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsMaskedEmail))).listEntry (HELPER_KnownAsAlias.getForSQL(dummyKnownAsAlias, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_KnownAsAlias))) .listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (Candidate.SINGLEREFERENCE_TestInput)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (Candidate.SINGLEREFERENCE_User)))) .listEntry (objectID.longID ()).listEntry (context.getTag (obj)).toList().toArray()); CollectionUtils.listEntry (HELPER_Phone.getForSQL(dummyPhone, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_Phone))).listEntry (HELPER_ForgotPasswordMailSendDate.getForSQL(dummyForgotPasswordMailSendDate, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_ForgotPasswordMailSendDate))).listEntry (HELPER_ForgotPasswordKey.getForSQL(dummyForgotPasswordKey, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_ForgotPasswordKey))).listEntry (HELPER_VerificationMailSendDate.getForSQL(dummyVerificationMailSendDate, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_VerificationMailSendDate))).listEntry (HELPER_VerificationKey.getForSQL(dummyVerificationKey, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_VerificationKey))).listEntry (HELPER_IsAccountVerified.getForSQL(dummyIsAccountVerified, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsAccountVerified))).listEntry (HELPER_IsPasswordChanged.getForSQL(dummyIsPasswordChanged, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsPasswordChanged))).listEntry (HELPER_GoogleAddressText.getForSQL(dummyGoogleAddressText, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_GoogleAddressText))).listEntry (HELPER_IsEmailIngest.getForSQL(dummyIsEmailIngest, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsEmailIngest))).listEntry (HELPER_IsMaskedEmail.getForSQL(dummyIsMaskedEmail, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_IsMaskedEmail))).listEntry (HELPER_KnownAsAlias.getForSQL(dummyKnownAsAlias, oneit_sec_user_extensionPSet.getAttrib (Candidate.FIELD_KnownAsAlias))) .listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (Candidate.SINGLEREFERENCE_TestInput)))).listEntry (SQLManager.CheckNull((Long)(oneit_sec_user_extensionPSet.getAttrib (Candidate.SINGLEREFERENCE_User)))) .listEntry (objectID.longID ()).listEntry (context.getTag (obj)).toList().toArray());
oneit_sec_user_extensionPSet.setStatus (PersistentSetStatus.PROCESSED); oneit_sec_user_extensionPSet.setStatus (PersistentSetStatus.PROCESSED);
} }
......
...@@ -227,7 +227,7 @@ public class Job extends BaseJob ...@@ -227,7 +227,7 @@ public class Job extends BaseJob
public int getNoOfCandidatesApplied() public int getNoOfCandidatesApplied()
{ {
Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new NotInFilter<>(ApplicationStatus.DRAFT)); Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new NotInFilter<>(ApplicationStatus.DRAFT, ApplicationStatus.POST_INGEST));
return pipelineJob().toJobApplications(filter).toCandidate().vals().size(); return pipelineJob().toJobApplications(filter).toCandidate().vals().size();
} }
......
...@@ -15,4 +15,22 @@ public class MessageTemplate extends BaseMessageTemplate ...@@ -15,4 +15,22 @@ public class MessageTemplate extends BaseMessageTemplate
{ {
return (getDelayHrs() * 60) + getDelayMin(); return (getDelayHrs() * 60) + getDelayMin();
} }
@Override
public Integer getVariance()
{
return super.getVariance() != null ? super.getVariance() : 0;
}
@Override
public Integer getDelayHrs()
{
return super.getDelayHrs() != null ? super.getDelayHrs() : 0;
}
@Override
public Integer getDelayMin()
{
return super.getDelayMin() != null ? super.getDelayMin(): 0;
}
} }
\ No newline at end of file
...@@ -20,6 +20,8 @@ public class ApplicationStatus extends AbstractEnumerated ...@@ -20,6 +20,8 @@ public class ApplicationStatus extends AbstractEnumerated
public static final EnumeratedFactory FACTORY_ApplicationStatus = new ApplicationStatusFactory(); public static final EnumeratedFactory FACTORY_ApplicationStatus = new ApplicationStatusFactory();
public static final ApplicationStatus POST_INGEST = new ApplicationStatus ("POST_INGEST", "POST_INGEST", "Post Ingest", false);
public static final ApplicationStatus DRAFT = new ApplicationStatus ("DRAFT", "DRAFT", "Incomplete", false); public static final ApplicationStatus DRAFT = new ApplicationStatus ("DRAFT", "DRAFT", "Incomplete", false);
public static final ApplicationStatus SUBMITTED = new ApplicationStatus ("SUBMITTED", "SUBMITTED", "Applicant", false); public static final ApplicationStatus SUBMITTED = new ApplicationStatus ("SUBMITTED", "SUBMITTED", "Applicant", false);
...@@ -39,7 +41,7 @@ public class ApplicationStatus extends AbstractEnumerated ...@@ -39,7 +41,7 @@ public class ApplicationStatus extends AbstractEnumerated
public static final ApplicationStatus UNSUITABLE = new ApplicationStatus ("UNSUITABLE", "UNSUITABLE", "Unsuitable", false); public static final ApplicationStatus UNSUITABLE = new ApplicationStatus ("UNSUITABLE", "UNSUITABLE", "Unsuitable", false);
private static final ApplicationStatus[] allApplicationStatuss = private static final ApplicationStatus[] allApplicationStatuss =
new ApplicationStatus[] { DRAFT,SUBMITTED,SHORTLISTED,STATUS_4,STATUS_5,STATUS_6,STATUS_7,STATUS_8,UNSUITABLE}; new ApplicationStatus[] { POST_INGEST,DRAFT,SUBMITTED,SHORTLISTED,STATUS_4,STATUS_5,STATUS_6,STATUS_7,STATUS_8,UNSUITABLE};
private static ApplicationStatus[] getAllApplicationStatuss () private static ApplicationStatus[] getAllApplicationStatuss ()
...@@ -126,6 +128,7 @@ public class ApplicationStatus extends AbstractEnumerated ...@@ -126,6 +128,7 @@ public class ApplicationStatus extends AbstractEnumerated
public static void defineAdditionalData () public static void defineAdditionalData ()
{ {
POST_INGEST.SortOrder = 0;
DRAFT.SortOrder = 1; DRAFT.SortOrder = 1;
SUBMITTED.SortOrder = 2; SUBMITTED.SortOrder = 2;
SHORTLISTED.SortOrder = 3; SHORTLISTED.SortOrder = 3;
......
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<DATA name="SortOrder" type="Integer"/> <DATA name="SortOrder" type="Integer"/>
<VALUE name="POST_INGEST" value="POST_INGEST" description="Post Ingest" SortOrder="0"/>
<VALUE name="DRAFT" value="DRAFT" description="Incomplete" SortOrder="1"/> <VALUE name="DRAFT" value="DRAFT" description="Incomplete" SortOrder="1"/>
<VALUE name="SUBMITTED" value="SUBMITTED" description="Applicant" SortOrder="2"/> <VALUE name="SUBMITTED" value="SUBMITTED" description="Applicant" SortOrder="2"/>
<VALUE name="SHORTLISTED" value="SHORTLISTED" description="Shortlisted" SortOrder="3"/> <VALUE name="SHORTLISTED" value="SHORTLISTED" description="Shortlisted" SortOrder="3"/>
......
...@@ -35,11 +35,9 @@ public class PlaceholderOptions extends AbstractEnumerated ...@@ -35,11 +35,9 @@ public class PlaceholderOptions extends AbstractEnumerated
public static final PlaceholderOptions JOB_REFERENCE = new PlaceholderOptions ("JOB_REFERENCE", "JOB_REFERENCE", "Job Reference", false); public static final PlaceholderOptions JOB_REFERENCE = new PlaceholderOptions ("JOB_REFERENCE", "JOB_REFERENCE", "Job Reference", false);
public static final PlaceholderOptions JOB_LINK = new PlaceholderOptions ("JOB_LINK", "JOB_LINK", "Job Link", false); public static final PlaceholderOptions JOB_LINK = new PlaceholderOptions ("JOB_LINK", "JOB_LINK", "Job Link", false);
public static final PlaceholderOptions VERIFY_LINK = new PlaceholderOptions ("VERIFY_LINK", "VERIFY_LINK", "Verify Link", false);
private static final PlaceholderOptions[] allPlaceholderOptionss = private static final PlaceholderOptions[] allPlaceholderOptionss =
new PlaceholderOptions[] { FIRST_NAME,SURNAME,EMAIL_ADDRESS,LOCATION,HIRING_TEAM,JOB_TITLE,JOB_REFERENCE,JOB_LINK,VERIFY_LINK}; new PlaceholderOptions[] { FIRST_NAME,SURNAME,EMAIL_ADDRESS,LOCATION,HIRING_TEAM,JOB_TITLE,JOB_REFERENCE,JOB_LINK};
private static PlaceholderOptions[] getAllPlaceholderOptionss () private static PlaceholderOptions[] getAllPlaceholderOptionss ()
...@@ -134,7 +132,6 @@ public class PlaceholderOptions extends AbstractEnumerated ...@@ -134,7 +132,6 @@ public class PlaceholderOptions extends AbstractEnumerated
JOB_TITLE.Placeholder = "$jobTitle"; JOB_TITLE.Placeholder = "$jobTitle";
JOB_REFERENCE.Placeholder = "$jobReference"; JOB_REFERENCE.Placeholder = "$jobReference";
JOB_LINK.Placeholder = "$jobLink"; JOB_LINK.Placeholder = "$jobLink";
VERIFY_LINK.Placeholder = "$verifyLink";
} }
......
...@@ -13,7 +13,6 @@ ...@@ -13,7 +13,6 @@
<VALUE name="JOB_TITLE" value="JOB_TITLE" description="Job Title" Placeholder='"$jobTitle"' /> <VALUE name="JOB_TITLE" value="JOB_TITLE" description="Job Title" Placeholder='"$jobTitle"' />
<VALUE name="JOB_REFERENCE" value="JOB_REFERENCE" description="Job Reference" Placeholder='"$jobReference"' /> <VALUE name="JOB_REFERENCE" value="JOB_REFERENCE" description="Job Reference" Placeholder='"$jobReference"' />
<VALUE name="JOB_LINK" value="JOB_LINK" description="Job Link" Placeholder='"$jobLink"' /> <VALUE name="JOB_LINK" value="JOB_LINK" description="Job Link" Placeholder='"$jobLink"' />
<VALUE name="VERIFY_LINK" value="VERIFY_LINK" description="Verify Link" Placeholder='"$verifyLink"' />
</CONSTANT> </CONSTANT>
</ROOT> </ROOT>
\ No newline at end of file
...@@ -15,6 +15,7 @@ import oneit.security.SecUser; ...@@ -15,6 +15,7 @@ import oneit.security.SecUser;
import oneit.utils.*; import oneit.utils.*;
import oneit.utils.parsers.FieldException; import oneit.utils.parsers.FieldException;
import performa.orm.*; import performa.orm.*;
import performa.orm.types.ApplicationStatus;
public class PerformaEmailFetcher implements Runnable, InitialisationParticipant public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
...@@ -366,6 +367,8 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant ...@@ -366,6 +367,8 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
JobApplication jobApplication = JobApplication.createNewApplication(candidate, job); JobApplication jobApplication = JobApplication.createNewApplication(candidate, job);
jobApplication.setApplicationStatus(ApplicationStatus.POST_INGEST);
if(contents.size() > 0) if(contents.size() > 0)
{ {
jobApplication.setCV(contents.get(0)); jobApplication.setCV(contents.get(0));
...@@ -415,6 +418,8 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant ...@@ -415,6 +418,8 @@ public class PerformaEmailFetcher implements Runnable, InitialisationParticipant
JobApplication jobApplication = JobApplication.createNewApplication(candidate, job); JobApplication jobApplication = JobApplication.createNewApplication(candidate, job);
jobApplication.setApplicationStatus(ApplicationStatus.POST_INGEST);
if(contents.size() > 0) if(contents.size() > 0)
{ {
jobApplication.setCV(contents.get(0)); jobApplication.setCV(contents.get(0));
......
...@@ -45,7 +45,7 @@ public class Utils ...@@ -45,7 +45,7 @@ public class Utils
public static final String PRIV_ACCESS_COMPANY = "TL_AccessCompany"; public static final String PRIV_ACCESS_COMPANY = "TL_AccessCompany";
public static final String ADVT_CONFIG_EMAIL_EXTENSION = ConfigMgr.getKeyfileString ("advt.config.email.extension", "matchdmail.com"); public static final String ADVT_CONFIG_EMAIL_EXTENSION = ConfigMgr.getKeyfileString ("advt.config.email.extension", "matchdmail.com");
public static final String APPLICANT_VERIFY_LINK = "/ApplicantPortal-Applicant_Account_Verification.htm"; public static final String APPLICANT_VERIFY_LINK = "/ApplicantPortal-Applicant_Account_Verification.htm";
public static final String APPLICANT_SIGN_IN = "/ApplicantPortal-ApplyJob.htm?cms.rm=SignIn"; public static final String APPLICANT_LINK = "/ApplicantPortal-ApplyJob.htm";
public static Role getRole(String role, ObjectTransaction transaction) public static Role getRole(String role, ObjectTransaction transaction)
{ {
...@@ -469,40 +469,6 @@ public class Utils ...@@ -469,40 +469,6 @@ public class Utils
} }
public static void sendMaskedEmailChangedMail(Candidate candidate, Job job, ConfigurableArticleTemplateEmailer emailer) throws BusinessException
{
try
{
LogMgr.log(Candidate.LOG, LogLevel.PROCESSING1, "Sending masked email changed mail to :: ", candidate);
RandomStringGen random = new RandomStringGen();
//set verification key and send mail time
candidate.setVerificationKey(random.generateAlphaNum(6));
candidate.setVerificationMailSendDate(new Date());
String link = LoopbackHTTP.getRemoteAccessURL()
+ APPLICANT_VERIFY_LINK
+ "?id=" + job.getID()
+ "&key=" + job.getRandomKey()
+ "&aid=" + candidate.getID()
+ "&pin=" + candidate.getVerificationKey();
Map defaultParams = CollectionUtils.mapEntry("link", link).toMap();
ObjectTransform transform = Utils.createCompoundTransform(defaultParams, candidate.getUser(), job);
Utils.sendMail(emailer, transform, new String[]{candidate.getUser().getEmail()}, null, candidate);
LogMgr.log(CompanyUser.LOG, LogLevel.PROCESSING1, "Sent masked email changed mail successfully to :: ", candidate);
}
catch (ConfigurableEmailerException ex)
{
LogMgr.log(CompanyUser.LOG, LogLevel.SYSTEMERROR1, ex, "Error occured while sending mail for user :: " + candidate);
throw new BusinessException("We are unable to send mail. Please try again or contact Matchd for more details.");
}
}
public static void sendEmailChangedMail(CompanyUser companyUser, HttpServletRequest request, ConfigurableArticleTemplateEmailer emailer, String callingClass) throws BusinessException public static void sendEmailChangedMail(CompanyUser companyUser, HttpServletRequest request, ConfigurableArticleTemplateEmailer emailer, String callingClass) throws BusinessException
{ {
if(companyUser.getIsEmailChanged()==Boolean.TRUE) if(companyUser.getIsEmailChanged()==Boolean.TRUE)
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</MAP> </MAP>
<!-- AAdded only for legacy data and should never be used --> <!-- Added only for legacy data and should never be used -->
<MAP value="CREATE_JOB" description="Create Job" TemplatePage="dynamic_content_form_client.jsp"> <MAP value="CREATE_JOB" description="Create Job" TemplatePage="dynamic_content_form_client.jsp">
<NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration"> <NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration">
<INHERITS nodename="StandardJSP"/> <INHERITS nodename="StandardJSP"/>
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
String applicantsPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICANTS); String applicantsPage = WebUtils.getSamePageInRenderMode(request, WebUtils.VIEW_APPLICANTS);
List<JobApplication> applications = (List<JobApplication>) getData(request, "applications"); List<JobApplication> applications = (List<JobApplication>) getData(request, "applications");
int noOfIncomplete = job.getNoOfCandidatesFor(ApplicationStatus.DRAFT); int noOfIncomplete = job.getNoOfCandidatesFor(ApplicationStatus.DRAFT, ApplicationStatus.POST_INGEST);
int noOfUnsuitable = job.getNoOfCandidatesFor(ApplicationStatus.UNSUITABLE); int noOfUnsuitable = job.getNoOfCandidatesFor(ApplicationStatus.UNSUITABLE);
%> %>
<oneit:dynIncluded> <oneit:dynIncluded>
......
...@@ -57,41 +57,48 @@ ...@@ -57,41 +57,48 @@
<div class="appli-list-name appli-l eq-second-height wider-box"> <div class="appli-list-name appli-l eq-second-height wider-box">
<oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link" <oneit:button value=" " name="gotoPage" cssClass="<%= jobApplication.getID() + ""%>" skin="link"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applicationPage)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).mapEntry("Applications", applications).toMap())
.toMap() %>"> .toMap() %>">
<%
if(jobApplication.isTrue(jobApplication.getCandidate().getIsEmailIngest()))
{
%>
<span style="padding-right: 5px;"><img src="images/email-ingest-icon.jpg"></span>
<%
}
%>
<oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" /> <oneit:toString value="<%= jobApplication.getCandidate() %>" mode="EscapeHTML" />
</oneit:button> </oneit:button>
<div class="appli-int-status"> <div class="appli-int-status">
<span> <span>
<a href="<%= "mailto:" + jobApplication.getCandidate().getUser().getEmail() %>">Email</a> <a href="<%= "mailto:" + jobApplication.getCandidate().getUser().getEmail() %>">Email</a>
</span> </span>
<oneit:toString value="<%= jobApplication.getCandidate().getPhone() %>" mode="EscapeHTML" /> <oneit:toString value="<%= jobApplication.getCandidate().getPhone() %>" mode="EscapeHTML" />
<span><img src="images/clip_icon.png"></span> <span><img src="images/clip_icon.png"></span>
<% <%
if(jobApplication.getCV() != null) if(jobApplication.getCV() != null)
{ {
%> %>
<span> <span>
<a target='blank' href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CV", jobApplication.getCV(), true) %>'> <a target='blank' href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CV", jobApplication.getCV(), true) %>'>
CV CV
</a> </a>
</span> </span>
<% <%
} }
if(jobApplication.getCoverLetter() != null) if(jobApplication.getCoverLetter() != null)
{ {
%> %>
<span> <span>
<a target='blank' href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CoverLetter", jobApplication.getCoverLetter(), true) %>'> <a target='blank' href='<%= request.getContextPath() + "/" + BinaryContentHandler.getRelativeURL(request, jobApplication, "CoverLetter", jobApplication.getCoverLetter(), true) %>'>
Cover Letter Cover Letter
</a> </a>
</span> </span>
<% <%
} }
%> %>
</div> </div>
</div> </div>
<% <%
String widthClass = "appli-jcs2"; String widthClass = "appli-jcs2";
...@@ -147,10 +154,17 @@ ...@@ -147,10 +154,17 @@
role fit role fit
</div> </div>
<div class="appli-status appli-l eq-second-height"> <div class="appli-status appli-l eq-second-height">
<div class="appli-list-drop"> <%
<tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process" if(jobApplication.getApplicationStatus() == ApplicationStatus.DRAFT)
options="<%= sortedWorkFlows.toArray(new WorkFlow[0]) %>"/> {
</div> %>
<div class="appli-list-drop">
<tagfile:ormsingleasso_select obj="<%= jobApplication %>" assocName="WorkFlow" cssClass="form-control app-process"
options="<%= sortedWorkFlows.toArray(new WorkFlow[0]) %>"/>
</div>
<%
}
%>
</div> </div>
<oneit:button name="changeApplicationStatus" value=" " cssClass="<%= "save-application" + jobApplication.getID().toString() + " hidden"%>" <oneit:button name="changeApplicationStatus" value=" " cssClass="<%= "save-application" + jobApplication.getID().toString() + " hidden"%>"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage)
......
...@@ -81,6 +81,7 @@ ...@@ -81,6 +81,7 @@
} }
boolean isApplicantPage = workflowStatus == ApplicationStatus.SUBMITTED; boolean isApplicantPage = workflowStatus == ApplicationStatus.SUBMITTED;
boolean isDraftPage = workflowStatus == ApplicationStatus.DRAFT;
// handle application filter (showing dropdown) // handle application filter (showing dropdown)
if(parameterMap.containsKey("ApplicationFilter") && !request.getParameter("ApplicationFilter").isEmpty()) if(parameterMap.containsKey("ApplicationFilter") && !request.getParameter("ApplicationFilter").isEmpty())
...@@ -101,10 +102,11 @@ ...@@ -101,10 +102,11 @@
// filter applicants by status // filter applicants by status
oneit.utils.filter.Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new EqualsFilter<>(workflowStatus)); oneit.utils.filter.Filter<JobApplication> filter = JobApplication.SearchByAll().andApplicationStatus(new EqualsFilter<>(workflowStatus));
oneit.utils.filter.Filter<JobApplication> applicantFilter = JobApplication.SearchByAll().andApplicationStatus(new NotEqualsFilter<>(ApplicationStatus.DRAFT)); oneit.utils.filter.Filter<JobApplication> applicantFilter = JobApplication.SearchByAll().andApplicationStatus(new NotInFilter<>(ApplicationStatus.DRAFT, ApplicationStatus.POST_INGEST));
oneit.utils.filter.Filter<JobApplication> draftFilter = JobApplication.SearchByAll().andApplicationStatus(new InFilter<>(ApplicationStatus.DRAFT, ApplicationStatus.POST_INGEST));
// if Applicant Status, then show all application completed applicants // if Applicant Status, then show all application completed applicants
applicantList = new ArrayList<>(CollectionFilter.filter(applicantList, isApplicantPage ? applicantFilter : filter)); applicantList = new ArrayList<>(CollectionFilter.filter(applicantList, isDraftPage ? draftFilter : (isApplicantPage ? applicantFilter : filter)));
if(appFilter != ApplicationFilter.ALL_APPLICATIONS) if(appFilter != ApplicationFilter.ALL_APPLICATIONS)
{ {
......
...@@ -3,9 +3,7 @@ ...@@ -3,9 +3,7 @@
<NODE name="dynamic_content_form::APPLICANT_PORTAL" factory="Participant"> <NODE name="dynamic_content_form::APPLICANT_PORTAL" factory="Participant">
<FORM name="*.signIn" factory="Participant" class="performa.form.SignInCandidateFP"/> <FORM name="*.signIn" factory="Participant" class="performa.form.SignInCandidateFP"/>
<FORM name="*.verifyIdentity" factory="Participant" class="performa.form.VerifyIdentityFP"> <FORM name="*.verifyIdentity" factory="Participant" class="performa.form.VerifyIdentityFP"/>
<ApplicantAccountCreatedEmailer factory="Participant" class="oneit.email.ConfigurableArticleTemplateEmailer" templateShortcut="ApplicantAccountCreatedMail"/>
</FORM>
<FORM name="*.completeApplication" factory="Participant" class="performa.form.CompleteApplicationFP"/> <FORM name="*.completeApplication" factory="Participant" class="performa.form.CompleteApplicationFP"/>
<FORM name="*.validateApplication" factory="Participant" class="performa.form.ValidateApplicationFP"/> <FORM name="*.validateApplication" factory="Participant" class="performa.form.ValidateApplicationFP"/>
<FORM name="*.saveAndExitExperienece" factory="Participant" class="performa.form.SaveAndExitExperienceFP"/> <FORM name="*.saveAndExitExperienece" factory="Participant" class="performa.form.SaveAndExitExperienceFP"/>
...@@ -13,7 +11,6 @@ ...@@ -13,7 +11,6 @@
<FORM name="*.saveAndExitWorkStyle" factory="Participant" class="performa.form.SaveAndExitWorkStypeFP"/> <FORM name="*.saveAndExitWorkStyle" factory="Participant" class="performa.form.SaveAndExitWorkStypeFP"/>
<FORM name="*.sendVerificationMail" factory="Participant" class="performa.form.SendVerificationMailFP"> <FORM name="*.sendVerificationMail" factory="Participant" class="performa.form.SendVerificationMailFP">
<AccountVerificationEmailer factory="Participant" class="oneit.email.ConfigurableArticleTemplateEmailer" templateShortcut="AccountVerificationMail"/> <AccountVerificationEmailer factory="Participant" class="oneit.email.ConfigurableArticleTemplateEmailer" templateShortcut="AccountVerificationMail"/>
<EmailChangedEmailer factory="Participant" class="oneit.email.ConfigurableArticleTemplateEmailer" templateShortcut="EmailChangedMail"/>
</FORM> </FORM>
<FORM name="*.facebookOAuthLogin" factory="Participant" class="oneit.security.oauth.form.FacebookOAuthLoginFP"/> <FORM name="*.facebookOAuthLogin" factory="Participant" class="oneit.security.oauth.form.FacebookOAuthLoginFP"/>
<FORM name="*.googleOAuthLogin" factory="Participant" class="oneit.security.oauth.form.GoogleOAuthLoginFP"/> <FORM name="*.googleOAuthLogin" factory="Participant" class="oneit.security.oauth.form.GoogleOAuthLoginFP"/>
......
...@@ -25,8 +25,6 @@ ...@@ -25,8 +25,6 @@
<RenderMode name="Page" preIncludeJSP="extensions/applicantportal/job_overview.jsp"/> <RenderMode name="Page" preIncludeJSP="extensions/applicantportal/job_overview.jsp"/>
<RenderMode name="SignIn" preIncludeJSP="extensions/applicantportal/sign_in.jsp"/> <RenderMode name="SignIn" preIncludeJSP="extensions/applicantportal/sign_in.jsp"/>
<RenderMode name="VerifyIdentity" preIncludeJSP="extensions/applicantportal/verify_identity.jsp"/> <RenderMode name="VerifyIdentity" preIncludeJSP="extensions/applicantportal/verify_identity.jsp"/>
<RenderMode name="PasswordPage" preIncludeJSP="extensions/applicantportal/password_page.jsp"/>
<RenderMode name="ConfirmDetails" preIncludeJSP="extensions/applicantportal/confirm_details.jsp"/>
<RenderMode name="VerificationSent" preIncludeJSP="extensions/applicantportal/verification_sent.jsp"/> <RenderMode name="VerificationSent" preIncludeJSP="extensions/applicantportal/verification_sent.jsp"/>
<RenderMode name="ForgotPassword" preIncludeJSP="extensions/applicantportal/forgot_password.jsp"/> <RenderMode name="ForgotPassword" preIncludeJSP="extensions/applicantportal/forgot_password.jsp"/>
<RenderMode name="ResetPassword" preIncludeJSP="extensions/applicantportal/reset_password.jsp"/> <RenderMode name="ResetPassword" preIncludeJSP="extensions/applicantportal/reset_password.jsp"/>
...@@ -36,19 +34,15 @@ ...@@ -36,19 +34,15 @@
</MAP> </MAP>
<!-- Added only for legacy data and should never be used -->
<MAP value="APPLICANT_ACCOUNT_VERIFICATION" description="Applicant Account Verification" TemplatePage="dynamic_content_form.jsp"> <MAP value="APPLICANT_ACCOUNT_VERIFICATION" description="Applicant Account Verification" TemplatePage="dynamic_content_form.jsp">
<NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration"> <NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration">
<INHERITS nodename="StandardJSP"/> <INHERITS nodename="StandardJSP"/>
<RenderMode name="Page" preIncludeJSP="extensions/applicantportal/password_page.jsp"/>
<!--<RenderMode name="PasswordPage" preIncludeJSP="extensions/applicantportal/password_page.jsp"/>-->
<RenderMode name="AuthError" preIncludeJSP="extensions/applicantportal/auth_error.jsp"/>
</NODE> </NODE>
</MAP> </MAP>
<MAP value="JOB_APLICATION" description="Job Application" TemplatePage="dynamic_content_form_applicant.jsp"> <MAP value="JOB_APLICATION" description="Job Application" TemplatePage="dynamic_content_form_applicant.jsp">
<NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration"> <NODE name="Config" factory="Participant" class="oneit.business.content.ArticleConfiguration">
...@@ -56,8 +50,6 @@ ...@@ -56,8 +50,6 @@
<INHERITS nodename="StandardJSP"/> <INHERITS nodename="StandardJSP"/>
<RenderMode name="Page" preIncludeJSP="extensions/applicantportal/application_outline.jsp"/> <RenderMode name="Page" preIncludeJSP="extensions/applicantportal/application_outline.jsp"/>
<RenderMode name="ConfirmDetails" preIncludeJSP="extensions/applicantportal/confirm_details.jsp"/>
<RenderMode name="CoverLetter" preIncludeJSP="extensions/applicantportal/cv_cover_letter.jsp"/>
<RenderMode name="SelectionCriteria" preIncludeJSP="extensions/applicantportal/selection_criteria.jsp"/> <RenderMode name="SelectionCriteria" preIncludeJSP="extensions/applicantportal/selection_criteria.jsp"/>
<RenderMode name="WorkplaceCulture" preIncludeJSP="extensions/applicantportal/workplace_culture.jsp"/> <RenderMode name="WorkplaceCulture" preIncludeJSP="extensions/applicantportal/workplace_culture.jsp"/>
<RenderMode name="JobMatchAssessment" preIncludeJSP="extensions/applicantportal/job_match_assessment.jsp"/> <RenderMode name="JobMatchAssessment" preIncludeJSP="extensions/applicantportal/job_match_assessment.jsp"/>
......
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<oneit:dynIncluded>
<div style="width: 50%; margin: 0px auto 0px auto; text-align: center">
<h3>Authentication Error</h3>
<p><span>Access expired.</span></p>
</div>
</oneit:dynIncluded>
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<oneit:dynIncluded>
<%
ObjectTransaction objTran = process.getTransaction ();
boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Job", Job.REFERENCE_Job);
Job job = (Job) process.getAttribute("Job");
Debug.assertion(job != null && !toRedirect, "Invalid job in applicant portal");
SecUser secUser = SecUser.getTXUser(transaction);
Candidate candidate = secUser.getExtension(Candidate.REFERENCE_Candidate);
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page") + "&JobID=" + job.getID().toString();
Debug.assertion(candidate != null, "Invalid candidate in applicant portal");
JobApplication jobApplication = JobApplication.searchCandidateJob(objTran, candidate, job);
boolean redirectUser = jobApplication != null;
if(jobApplication == null)
{
jobApplication = JobApplication.createNewApplication(candidate, job);
}
process.setAttribute("JobApplication", jobApplication);
Boolean isSelectionComplete = jobApplication.selectionCompleted();
Boolean isCultureComplete = jobApplication.cultureCompleted();
Boolean isAssesmentComplete = jobApplication.assessmentCompleted();
if(!isSelectionComplete)
{
nextPage = WebUtils.getSamePageInRenderMode(request, "SelectionCriteria");
}
else if(!isCultureComplete)
{
nextPage = WebUtils.getSamePageInRenderMode(request, "WorkplaceCulture");
}
else if(!isAssesmentComplete)
{
nextPage = WebUtils.getSamePageInRenderMode(request, "JobMatchAssessment");
}
nextPage = nextPage +"&JobApplicationID="+ jobApplication.getID().toString();
if(redirectUser)
{
response.sendRedirect(nextPage);
}
BinaryContent logo = job.getLogo();
%>
<oneit:form name="confirmDetails" method="post" enctype="multipart/form-data">
<script type="text/javascript">
$(document.body).addClass('bg-color');
$(document).ready(function() {
recalcFunction = setupRecalc ($("form#confirmDetails"), {'recalcOnError':true});
});
</script>
<script type="text/javascript">
$(document.body).addClass('bg-color');
$(document).ready(function(){
$('.attach-icon-btn').click(function(){
$(this).parent().find("input").click();
});
$("input:file").change(function (){
var fullPath = $(this).val();
var filename = fullPath.replace(/^.*[\\\/]/, '');
$(this).parents(".form-control").append(filename);
});
});
</script>
<script src="https://maps.googleapis.com/maps/api/js?v=3.exp&libraries=places&key=AIzaSyCaBh-MsMb8BBYJD_NcFzoCmygQbt5-QSw"></script>
<oneit:script>
<oneit:script src="/scripts/google_address.js"/>
</oneit:script>
<oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/>
<div class="apply-job-logo-header signinpage">
<div>
<div class="logo-img">
<%
if(logo != null)
{
int logoHeight = 45;
%>
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
<%
}
%>
</div>
<div class="header-title">
<%= job.getTeamName() %>
</div>
</div>
</div>
<div class="main-verify-identity">
<div class="pl-confirm text-center">Please confirm your details to continue</div>
<div class="main-box-layout main-verify-step-2">
<div class="form-group text-left">
<label>Email Address</label>
<%
if(secUser.getEmail() == null)
{
%>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control" style="text-transform: lowercase" required="true"/>
<%
}
else
{
%>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control" disabled="true" readonly="true" style="text-transform: lowercase" required="true"/>
<%
}
%>
</div>
<div class="row">
<div class="form-group text-left col-sm-6 col-xs-12">
<label><oneit:ormlabel obj="<%= secUser %>" field="FirstName" /></label>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="FirstName" cssClass="form-control second-style" required="true"/>
</div>
<div class="form-group text-left col-sm-6 col-xs-12">
<label><oneit:ormlabel obj="<%= secUser %>" field="LastName" /></label>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="LastName" cssClass="form-control second-style" required="true"/>
</div>
</div>
<div class="form-group text-left">
<label><oneit:ormlabel obj="<%= candidate %>" field="Phone" /></label>
<oneit:ormInput obj="<%= candidate %>" type="text" attributeName="Phone" cssClass="form-control second-style" required="true"/>
</div>
<%
if(job.getRequireCV() == Boolean.TRUE)
{
%>
<div class="form-group text-left relative-parent ">
<label>Upload your CV</label>
<div class="form-control second-style">
<oneit:ormInput obj="<%= jobApplication %>" type="file" attributeName="CV" cssClass="hide"/>
<div class="attach-icon-btn"></div>
</div>
</div>
<div class="form-group text-left relative-parent">
<label>Upload your Cover Letter</label>
<div class="form-control second-style">
<oneit:ormInput obj="<%= jobApplication %>" type="file" attributeName="CoverLetter" cssClass="hide"/>
<div class="attach-icon-btn"></div>
</div>
</div>
<% } %>
<hr class="seperate-line">
<div class="form-group text-left">
<label>Location</label>
<oneit:ormInput obj="<%= candidate %>" type="text" attributeName="GoogleAddressText" class="autoAddress" id="<%= "gAddress_"+candidate.getObjectID() %>" placeholder="Enter your address" cssClass="form-control" />
</div>
<%
if(job.getRemote())
{
%>
<div class="form-group text-left" style="margin-top: 30px;">
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= jobApplication %>" id="prefer-remote" attributeName="PreferRemote" type="checkbox"/>
<oneit:recalcClass htmlTag="span" classScript="jobApplication.getPreferRemote() ? 'checked': 'unchecked'" jobApplication="<%= jobApplication %>">
<label for="prefer-remote">
<oneit:label GUIName="I would prefer to work remotely" />
</label>
</oneit:recalcClass>
</div>
</div>
</div>
<%
}
%>
<oneit:recalcClass htmlTag="div" classScript="jobApplication.isFarFromJob() ? 'show': 'hide'" jobApplication="<%= jobApplication %>">
<div class="relocate-warning-box">
<p>
We noticed that your location is different to the location of the job (<%= job.getGoogleAddressText() %>).
</p>
<p>
Are you prepared to relocate for this position?
</p>
<div class="styled_checkboxes">
<div class="checkbox checkbox-primary">
<oneit:ormInput obj="<%= jobApplication %>" id="happy-to-relocate" attributeName="HappyToRelocate" type="checkbox" />
<oneit:recalcClass htmlTag="span" classScript="jobApplication.getHappyToRelocate() ? 'checked': 'unchecked'" jobApplication="<%= jobApplication %>">
<label for="happy-to-relocate">
<oneit:label GUIName="Yes, I am happy to relocate"/>
</label>
</oneit:recalcClass>
</div>
</div>
<span class="warning-icon"></span>
</div>
</oneit:recalcClass>
<div class="text-center">
<oneit:button value="Verify and proceed" name="verifyIdentity" cssClass="box-btn verify-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("Job",job)
.mapEntry("Candidate",candidate)
.mapEntry("fromCoverLetter", true)
.mapEntry("JobApplication",jobApplication)
.mapEntry("restartProcess", Boolean.TRUE)
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.toMap() %>"/>
</div>
</div>
</div>
<script>
addGoogleAddressListener('#<%= "gAddress_"+ candidate.getObjectID() %>');
</script>
</oneit:form>
</oneit:dynIncluded>
\ No newline at end of file
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<oneit:dynIncluded>
<%
String currentPage = WebUtils.getSamePageInRenderMode(request, "CoverLetter");
String nextPage = WebUtils.getSamePageInRenderMode(request, "Page");
ObjectTransaction objTran = process.getTransaction ();
boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Job", Job.REFERENCE_Job);
Job job = (Job) process.getAttribute("Job");
Debug.assertion(job != null && !toRedirect, "Invalid job in applicant portal");
SecUser secUser = SecUser.getTXUser(transaction);
Candidate candidate = secUser.getExtension(Candidate.REFERENCE_Candidate);
Debug.assertion(candidate != null, "Invalid candidate in applicant portal");
JobApplication jobApplication = JobApplication.searchCandidateJob(objTran, candidate, job);
Debug.assertion(jobApplication != null, "Invalid Job Application in applicant portal");
if(process.getAttribute("JobApplicationID") == null)
{
process.setAttribute("JobApplicationID" , jobApplication.getID().longValue());
}
process.setAttribute("JobApplication" , jobApplication);
%>
<script type="text/javascript">
$(document.body).addClass('bg-color');
$(document).ready(function(){
$('.attach-icon-btn').click(function(){
$(this).parent().find("input").click();
});
$("input:file").change(function (){
var fullPath = $(this).val();
var filename = fullPath.replace(/^.*[\\\/]/, '');
$(this).parents(".form-control").append(filename);
});
});
</script>
<style>
.main-verify-identity .second-style {
font-size: 14px;
line-height: 40px;
}
</style>
<div class="apply-job-logo-header signinpage">
<div>
<div class="logo-img">
<%
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoHeight = 45;
%>
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
<%
}
%>
</div>
<div class="header-title">
<%= job.getTeamName() %>
</div>
</div>
</div>
<oneit:form name="editApplication" method="post" enctype="multipart/form-data">
<oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/>
<div class="main-verify-identity">
<div class="pl-confirm text-center">
Great! Now let's attach your CV and Cover Letter<br/><br/>
Uploading your files in PDF format is strongly recommended</div>
<div class="main-box-layout main-verify-step-2">
<div class="form-group text-left relative-parent ">
<label>Upload your CV</label>
<div class="form-control second-style">
<oneit:ormInput obj="<%= jobApplication %>" type="file" attributeName="CV" cssClass="hide"/>
<div class="attach-icon-btn"></div>
</div>
</div>
<div class="form-group text-left relative-parent">
<label>Upload your Cover Letter</label>
<div class="form-control second-style">
<oneit:ormInput obj="<%= jobApplication %>" type="file" attributeName="CoverLetter" cssClass="hide"/>
<div class="attach-icon-btn"></div>
</div>
</div>
<div class="text-center">
<oneit:button value="Attach and proceed" name="validateApplication" cssClass="box-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("fromCoverLetter", true)
.mapEntry("procParams", CollectionUtils.mapEntry("JobApplication", jobApplication).toMap())
.toMap() %>"/>
</div>
</div>
</div>
</oneit:form>
</oneit:dynIncluded>
\ No newline at end of file
...@@ -5,14 +5,46 @@ ...@@ -5,14 +5,46 @@
<oneit:dynIncluded> <oneit:dynIncluded>
<% <%
String nextPage = WebUtils.getSamePageInRenderMode(request, "SignIn"); String nextPage = WebUtils.getSamePageInRenderMode(request, "SignIn");
Job job = (Job) process.getAttribute("Job"); Job job = (Job) process.getAttribute("Job");
String id = request.getParameter("id"); String id = request.getParameter("id");
String key = request.getParameter("key"); String key = request.getParameter("key");
String candidateId = request.getParameter("aid");
String pin = request.getParameter("pin");
SecUser secUser = null;
Candidate candidate = null;
SecUser loggedInUser = SecUser.getTXUser(transaction);
if(id != null && key != null) if(id != null && key != null)
{ {
job = Job.searchJobKey(transaction, Long.parseLong(id), key); job = Job.searchJobKey(transaction, Long.parseLong(id), key);
process.setAttribute("Job", job);
}
if(job != null && candidateId != null && pin != null)
{
candidate = Candidate.searchIdPin(transaction, Long.parseLong(candidateId), pin);
if(candidate != null)
{
secUser = candidate.getUser();
String navigateTo = WebUtils.getSamePageInRenderMode(request,((loggedInUser != null && loggedInUser == secUser) || candidate.isUnverifiedEmailIngestUser() || !candidate.isTrue(candidate.getIsPasswordChanged())) ? "VerifyIdentity" : "SignIn") + "&JobID=" + job.getID().toString();
%>
<oneit:form name="navigateJob" method="post" enctype="multipart/form-data">
<oneit:button value=" " name="verifyIdentity" cssClass="verifyIdentity" style="display:none;"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", navigateTo)
.mapEntry("Candidate", candidate)
.mapEntry("Job", job)
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.toMap() %>"/>
</oneit:form>
<script type="text/javascript">
$(".verifyIdentity").click();
</script>
<%
}
} }
if(job != null) if(job != null)
......
<%@ page extends="oneit.servlets.jsp.JSPInclude" %>
<%@ include file="/inc/stdimports50.jsp" %><%-- This is in cougar --%>
<%@ include file="/inc/stdcms.jsp" %><%-- This is in cougar --%>
<%@ include file="/extensions/performa/inc/stdimports.jsp" %>
<oneit:dynIncluded>
<%
ObjectTransaction objTran = process.getTransaction ();
Job job = (Job) process.getAttribute("Job");
Candidate candidate = (Candidate) process.getAttribute("NewCandidate");
SecUser secUser = null;
boolean toRedirect = false;
String id = request.getParameter("id");
String key = request.getParameter("key");
String candidateId = request.getParameter("aid");
String pin = request.getParameter("pin");
Boolean isVerify = Boolean.FALSE;
if(id != null || key != null || candidateId != null || pin != null)
{
isVerify = Boolean.TRUE;
if(candidateId != null && pin != null)
{
candidate = Candidate.searchIdPin(transaction, Long.parseLong(candidateId), pin);
if(candidate != null)
{
secUser = candidate.getUser();
if(candidate.getIsAccountVerified() != Boolean.TRUE)
{
process.setAttribute("NewCandidate", candidate);
}
}
}
if(id != null && key != null)
{
job = Job.searchJobKey(transaction, Long.parseLong(id), key);
process.setAttribute("Job", job);
}
}
else
{
toRedirect = GenericObjDF.getOrCreateObject (request, "Job", Job.REFERENCE_Job);
}
//INVALID REQUEST FOR VERIFY CANDIDATE
if(isVerify && (job == null || secUser == null))
{
response.sendRedirect(WebUtils.getSamePageInRenderMode(request, "AuthError"));
return; //Else it will continue execution and throws NPE.
}
Debug.assertion(job != null && !toRedirect, "Invalid job in applicant portal");
Debug.assertion(candidate != null, "Invalid candidate in applicant portal");
Article applyJobArticle = WebUtils.getArticleByShortCut(objTran, WebUtils.APPLY_JOB);
String confirmDetailsPage = LoopbackHTTP.getRemoteAccessURL(request)
+ applyJobArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "VerifyIdentity").toMap(), "/");
String signinPage = LoopbackHTTP.getRemoteAccessURL(request)
+ applyJobArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "SignIn").toMap(), "/");
if(candidate.getIsAccountVerified())
{
response.sendRedirect(signinPage + "&JobID=" + job.getID().toString());
}
if(candidate.isUnverifiedEmailIngestUser() && candidate.getKnownAsAlias() == null)
{
request.getSession().setAttribute (SecUser.SEC_USER_ID, secUser);
request.getSession().setAttribute (SessionSecUserDecorator.REFRESH_SECURITY, Boolean.TRUE);
response.sendRedirect(confirmDetailsPage + "&JobID=" + job.getID().toString());
}
JobApplication jobApplication = JobApplication.searchCandidateJob(transaction, candidate, job);
Article jobApplicationArticle = WebUtils.getArticleByShortCut(objTran, WebUtils.JOB_APPLICATION);
String nextPage = jobApplicationArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", job.getIncludeAssessmentCriteria() ? "SelectionCriteria" : "WorkplaceCulture").toMap());
process.setAttribute("JobApplication", jobApplication);
%>
<style>
.pwd-verify-identity .second-style {
font-size: 14px;
/*line-height: 40px;*/
}
.pl-verify {margin: 8.3% auto 9px !important}
body {background-color: #e9ecef !important}
.email input[name$="Email"] {
opacity: 0;
position: absolute;
}
</style>
<div class="apply-job-logo-header signinpage">
<div>
<div class="logo-img">
<%
BinaryContent logo = job.getLogo();
if(logo != null)
{
int logoHeight = 45;
%>
<tagfile:img src="<%= ThumbnailUtils.filterImage(DiskFileBinaryContent.getRelativeURL(logo), "KEEP", new ScaleWithin (0, logoHeight)) %>" />
<%
}
%>
</div>
<div class="header-title">
<%= job.getTeamName() %>
</div>
</div>
</div>
<oneit:form name="editApplication" method="post" enctype="multipart/form-data">
<oneit:dynInclude page="/extensions/applicantportal/inc/multifieldtext.jsp" data="<%= CollectionUtils.EMPTY_MAP%>"/>
<div class="pwd-verify-identity">
<div class="pl-verify">Please enter your password to continue your application</div>
<div id="overlay">
<div class="modal-dialog">
<div class="modal-body main-password-popup">
<div class="form-group text-left email">
<label style="display: none;"><oneit:ormlabel obj="<%= secUser %>" field="Email" /></label>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control"/>
</div>
<div class="form-group text-left pwd-box">
<label class="pwd-label">Password</label>
<oneit:ormInput obj="<%= job %>" type="password" attributeName="Password" cssClass="form-control second-style pwd-input-box" autofocus="true"/>
</div>
<div class="create-y-f-job">
<oneit:button value="Verify and proceed" name="verifyIdentity" cssClass="box-btn verify-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage)
.mapEntry("Job",job)
.mapEntry("Candidate",candidate)
.mapEntry("JobApplication",jobApplication)
.mapEntry("isVerify",Boolean.TRUE)
.mapEntry("restartProcess", Boolean.TRUE)
.mapEntry("attribNamesToRestore", Collections.singleton("JobApplication"))
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.toMap() %>"/>
</div>
</div>
</div>
</div>
</div>
</oneit:form>
</oneit:dynIncluded>
\ No newline at end of file
...@@ -49,7 +49,6 @@ ...@@ -49,7 +49,6 @@
{criteriaID : criteriaID, answerOption: answerOption, note: note}, {criteriaID : criteriaID, answerOption: answerOption, note: note},
function () {}, function () {},
function (jqXHR, textStatus, errorThrown) { function (jqXHR, textStatus, errorThrown) {
console.log("entered");
if (jqXHR.status == 0) { if (jqXHR.status == 0) {
log("Empty Response. Status : " + jqXHR.status); log("Empty Response. Status : " + jqXHR.status);
} else { } else {
......
...@@ -109,7 +109,7 @@ ...@@ -109,7 +109,7 @@
} }
</style> </style>
<div class="apply-job-logo-header signinpage"> <div class="apply-job-logo-header signinpage">
<div class="box-sizing-border-box"> <div class="box-sizing-border-box">
<div class="logo-img"> <div class="logo-img">
<% <%
BinaryContent logo = job.getLogo(); BinaryContent logo = job.getLogo();
...@@ -193,7 +193,7 @@ ...@@ -193,7 +193,7 @@
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.toMap() %>"/> .toMap() %>"/>
<oneit:button value="Sign in" name="signIn" cssClass="box-btn sign-in-btn" <oneit:button value="Sign in" name="signIn" cssClass="box-btn sign-in-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", nextPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", confirmPage)
.mapEntry("Job",job) .mapEntry("Job",job)
.mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap()) .mapEntry("procParams", CollectionUtils.mapEntry("Job", job).toMap())
.toMap() %>"/> .toMap() %>"/>
...@@ -208,6 +208,7 @@ ...@@ -208,6 +208,7 @@
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", confirmPage) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", confirmPage)
.mapEntry("Job",job) .mapEntry("Job",job)
.mapEntry("restartProcess", Boolean.TRUE) .mapEntry("restartProcess", Boolean.TRUE)
.mapEntry ("attribNamesToRestore", Collections.singleton("Job"))
.mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false) .mapEntry(NotificationUtils.DISPLAY_NOTIFICATION_PARAM, false)
.toMap() %>"/> .toMap() %>"/>
</div> </div>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- @AutoRun -->
<OBJECTS name="" xmlns:oneit="http://www.1iT.com.au">
<NODE name="Script" factory="Vector">
<NODE name="DDL" factory="Participant" class="oneit.sql.transfer.RedefineTableOperation">
<tableName factory="String">oneit_sec_user_extension</tableName>
<column name="is_password_changed" type="Boolean" nullable="true"/>
</NODE>
</NODE>
</OBJECTS>
\ No newline at end of file
...@@ -6,11 +6,7 @@ ...@@ -6,11 +6,7 @@
<oneit:dynIncluded> <oneit:dynIncluded>
<% <%
ObjectTransaction objTran = process.getTransaction (); Job job = (Job) process.getAttribute("Job");
String currentPage = WebUtils.getSamePageInRenderMode(request, "SignIn");
String nextPage = WebUtils.getArticleLink(request, objTran, WebUtils.JOB_APPLICATION, "Page");
Job job = (Job) process.getAttribute("Job");
Candidate candidate = (Candidate) process.getAttribute("NewCandidate");
if(request.getParameter("JobID")!=null) if(request.getParameter("JobID")!=null)
{ {
...@@ -50,7 +46,7 @@ ...@@ -50,7 +46,7 @@
<oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/> <oneit:toString value="<%= job.getJobTitle() %>" mode="EscapeHTML"/>
</div> </div>
<div class="main-box-layout verify-i-setpone"> <div class="main-box-layout verify-i-setpone">
<div class="box-label">Please check your email for further details.</div> <div class="box-label">We will get in touch with you soon</div>
</div> </div>
</div> </div>
</oneit:dynIncluded> </oneit:dynIncluded>
\ No newline at end of file
...@@ -5,38 +5,57 @@ ...@@ -5,38 +5,57 @@
<oneit:dynIncluded> <oneit:dynIncluded>
<% <%
ObjectTransaction objTran = process.getTransaction (); boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Job", Job.REFERENCE_Job);
boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Job", Job.REFERENCE_Job); Job job = (Job) process.getAttribute("Job");
Job job = (Job) process.getAttribute("Job");
Debug.assertion(job != null && !toRedirect, "Invalid job in applicant portal"); Debug.assertion(job != null && !toRedirect, "Invalid job in applicant portal");
Candidate candidate = (Candidate) process.getAttribute("NewCandidate"); SecUser secUser = SecUser.getTXUser(transaction);
SecUser secUser = null;
Debug.assertion(secUser != null, "Invalid candidate in applicant portal");
if(candidate == null)
{ Candidate candidate = secUser.getExtension(Candidate.REFERENCE_Candidate);
secUser = SecUser.getTXUser(transaction);
candidate = secUser.getExtension(Candidate.REFERENCE_Candidate);
}
else
{
secUser = candidate.getUser();
}
Debug.assertion(candidate != null, "Invalid candidate in applicant portal"); Debug.assertion(candidate != null, "Invalid candidate in applicant portal");
String successPage = WebUtils.getSamePageInRenderMode(request, "VerificationSent") + "&JobID=" + job.getID(); String successPage = WebUtils.getSamePageInRenderMode(request, "VerificationSent") + "&JobID=" + job.getID();
String applyJobPage = WebUtils.getArticleByShortCut(transaction, WebUtils.JOB_APPLICATION).getLink(request) + "?JobID=" + job.getID();
JobApplication jobApplication = JobApplication.searchCandidateJob(transaction, candidate, job); JobApplication jobApplication = JobApplication.searchCandidateJob(transaction, candidate, job);
boolean redirectUser = jobApplication != null && jobApplication.getApplicationStatus() == ApplicationStatus.DRAFT;
if(jobApplication == null) if(jobApplication == null)
{ {
jobApplication = JobApplication.createNewApplication(candidate, job); jobApplication = JobApplication.createNewApplication(candidate, job);
} }
Boolean isSelectionComplete = jobApplication.selectionCompleted();
Boolean isCultureComplete = jobApplication.cultureCompleted();
Boolean isAssesmentComplete = jobApplication.assessmentCompleted();
Article jobApplicationArticle = WebUtils.getArticleByShortCut(transaction, WebUtils.JOB_APPLICATION);
String nextPage = jobApplicationArticle.getLink(request);
if(!isSelectionComplete)
{
nextPage = LoopbackHTTP.getRemoteAccessURL(request)
+ jobApplicationArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "SelectionCriteria").toMap(), "/");
}
else if(!isCultureComplete)
{
nextPage = LoopbackHTTP.getRemoteAccessURL(request)
+ jobApplicationArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "WorkplaceCulture").toMap(), "/");
}
else if(!isAssesmentComplete)
{
nextPage = LoopbackHTTP.getRemoteAccessURL(request)
+ jobApplicationArticle.getLink(request, CollectionUtils.mapEntry("cms.rm", "JobMatchAssessment").toMap(), "/");
}
if(redirectUser)
{
response.sendRedirect(candidate.isFalse(candidate.getIsAccountVerified()) ? successPage : nextPage +"&JobApplicationID="+ jobApplication.getID().toString());
}
process.setAttribute("JobApplication", jobApplication); process.setAttribute("JobApplication", jobApplication);
process.setAttribute("JobApplicationID", jobApplication.getID().longID());
%> %>
<oneit:script> <oneit:script>
<oneit:script src="/scripts/password_strength_lightweight.js"/> <oneit:script src="/scripts/password_strength_lightweight.js"/>
...@@ -54,9 +73,6 @@ ...@@ -54,9 +73,6 @@
</style> </style>
<oneit:form name="signIn" method="post" enctype="multipart/form-data"> <oneit:form name="signIn" method="post" enctype="multipart/form-data">
<%
String passkey = Utils.getPwdKeyOfSecUser(request, secUser, true);
%>
<script type="text/javascript"> <script type="text/javascript">
$(document.body).addClass('bg-color'); $(document.body).addClass('bg-color');
var interval ; var interval ;
...@@ -68,10 +84,6 @@ ...@@ -68,10 +84,6 @@
interval = setInterval(function() { validate(); }, 500); interval = setInterval(function() { validate(); }, 500);
validate(); validate();
$('input').on('change keyup', function() { validate(); }); $('input').on('change keyup', function() { validate(); });
$('#myPassword').strength_meter({
"inputName" : "<%= passkey %>"
});
}); });
function validate() { function validate() {
...@@ -145,7 +157,7 @@ ...@@ -145,7 +157,7 @@
<div class="form-group text-left"> <div class="form-group text-left">
<label>Email Address</label> <label>Email Address</label>
<% <%
if(candidate.isUnverifiedEmailIngestUser() && candidate.isTrue(candidate.getIsMaskedEmail())) if(secUser.getEmail() == null || (candidate.isUnverifiedEmailIngestUser() && candidate.isTrue(candidate.getIsMaskedEmail())))
{ {
%> %>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control" style="text-transform: lowercase" required="true"/> <oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control" style="text-transform: lowercase" required="true"/>
...@@ -159,19 +171,34 @@ ...@@ -159,19 +171,34 @@
} }
%> %>
</div> </div>
<%
if(!candidate.isTrue(candidate.getIsPasswordChanged()))
{
String passkey = Utils.getPwdKeyOfSecUser(request, secUser, true);
%>
<script type="text/javascript">
$(document).ready(function() {
$('#myPassword').strength_meter({
"inputName" : "<%= passkey %>"
});
});
</script>
<div class="form-group text-left email">
<label style="display: none;"><oneit:ormlabel obj="<%= secUser %>" field="Email" /></label>
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control"/>
</div>
<div class="form-group text-left" id="myPassword">
<label>Password</label>
</div>
<div class="form-group text-left">
<label>Confirm password</label>
<oneit:input type="password" name="<%= passkey + 2 %>" class="form-control second-style reset-pw"/>
</div>
<div class="form-group text-left email"> <%
<label style="display: none;"><oneit:ormlabel obj="<%= secUser %>" field="Email" /></label> }
<oneit:ormInput obj="<%= secUser %>" type="text" attributeName="Email" cssClass="form-control"/> %>
</div>
<div class="form-group text-left" id="myPassword">
<label>Password</label>
</div>
<div class="form-group text-left">
<label>Confirm password</label>
<oneit:input type="password" name="<%= passkey + 2 %>" class="form-control second-style reset-pw"/>
</div>
<div class="row"> <div class="row">
<div class="form-group text-left col-sm-6 col-xs-12"> <div class="form-group text-left col-sm-6 col-xs-12">
<label><oneit:ormlabel obj="<%= secUser %>" field="FirstName" /></label> <label><oneit:ormlabel obj="<%= secUser %>" field="FirstName" /></label>
...@@ -279,31 +306,13 @@ ...@@ -279,31 +306,13 @@
</div> </div>
</div> </div>
<div class="text-center"> <div class="text-center">
<% <oneit:button value="Submit" name="sendVerificationMail" cssClass="box-btn send-link-btn"
if(candidate.isUnverifiedEmailIngestUser() && !candidate.isTrue(candidate.getIsMaskedEmail())) requestAttribs="<%= CollectionUtils.mapEntry("nextPage", successPage)
{ .mapEntry("Job",job)
%> .mapEntry("Candidate",candidate)
<oneit:button value="Verify and proceed" name="sendVerificationMail" cssClass="box-btn send-link-btn" .mapEntry("JobApplication",jobApplication)
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", applyJobPage) .mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
.mapEntry("Job",job) .toMap() %>"/>
.mapEntry("Candidate",candidate)
.mapEntry("JobApplication",jobApplication)
.toMap() %>"/>
<%
}
else
{
%>
<oneit:button value="Submit" name="sendVerificationMail" cssClass="box-btn send-link-btn"
requestAttribs="<%= CollectionUtils.mapEntry("nextPage", successPage)
.mapEntry("Job",job)
.mapEntry("Candidate",candidate)
.mapEntry("JobApplication",jobApplication)
.mapEntry(NotificationUtils.NOTIFICATION_MSG_PARAM, "emailSent")
.toMap() %>"/>
<%
}
%>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -75,7 +75,7 @@ ...@@ -75,7 +75,7 @@
</oneit:layout_label> </oneit:layout_label>
<oneit:layout_field width="1"> <oneit:layout_field width="1">
<oneit:ormEnum obj="<%= messageTemplate %>" attributeName="ApplicationStatus" <oneit:ormEnum obj="<%= messageTemplate %>" attributeName="ApplicationStatus"
enums="<%= Arrays.asList(new ApplicationStatus[]{ApplicationStatus.DRAFT, ApplicationStatus.SUBMITTED, ApplicationStatus.SHORTLISTED, ApplicationStatus.UNSUITABLE}) %>"/> enums="<%= Arrays.asList(new ApplicationStatus[]{ApplicationStatus.POST_INGEST, ApplicationStatus.DRAFT, ApplicationStatus.SUBMITTED, ApplicationStatus.SHORTLISTED, ApplicationStatus.UNSUITABLE}) %>"/>
</oneit:layout_field> </oneit:layout_field>
</oneit:skin> </oneit:skin>
......
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