Commit 140a8678 by nilu

S42972327 # Matchd / Talentology - No Plan [Enhancement] #Allow Backend User to…

S42972327 # Matchd / Talentology - No Plan [Enhancement] #Allow Backend User to Move Hiring Teams between Customers
parent f04825cc
package performa.form;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import oneit.logging.LogLevel;
import oneit.logging.LogMgr;
import oneit.logging.LoggingArea;
import oneit.objstore.ObjectTransaction;
import oneit.objstore.StorageException;
import oneit.objstore.parser.BusinessObjectParser;
import oneit.servlets.forms.SubmissionDetails;
import oneit.servlets.forms.SuccessfulResult;
import oneit.servlets.process.ORMProcessState;
import oneit.servlets.process.SaveFP;
import oneit.utils.BusinessException;
import oneit.utils.MultiException;
import performa.orm.Company;
import performa.orm.HiringTeam;
public class ChangeCompanyFP extends SaveFP
{
private static final LoggingArea LOG = LoggingArea.createLoggingArea("ChangeCompanyFP");
@Override
public void validate(ORMProcessState process, SubmissionDetails submission, MultiException exceptions, Map params) throws StorageException
{
HttpServletRequest request = submission.getRequest();
HiringTeam hiringTeam = (HiringTeam) request.getAttribute("HiringTeam");
if(hiringTeam.isFalse(hiringTeam.getExistingCustomer()))
{
BusinessObjectParser.assertFieldCondition(hiringTeam.getCompanyName() != null, hiringTeam, HiringTeam.FIELD_CompanyName, "mandatory", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(hiringTeam.getCompanyTimeZone() != null, hiringTeam, HiringTeam.FIELD_CompanyTimeZone, "mandatory", exceptions, true, request);
BusinessObjectParser.assertFieldCondition(hiringTeam.getCompanyType() != null, hiringTeam, HiringTeam.FIELD_CompanyType, "mandatory", exceptions, true, request);
}
super.validate(process, submission, exceptions, params);
}
@Override
public SuccessfulResult processForm(ORMProcessState process, SubmissionDetails submission, Map params) throws BusinessException, StorageException
{
ObjectTransaction objTran = process.getTransaction();
HttpServletRequest request = submission.getRequest();
HiringTeam hiringTeam = (HiringTeam) request.getAttribute("HiringTeam");
LogMgr.log(LOG, LogLevel.PROCESSING1, "Changing company of hiring team : ", hiringTeam);
if(hiringTeam.isFalse(hiringTeam.getExistingCustomer()))
{
Company company = Company.createCompany(objTran);
company.setCompanyName(hiringTeam.getCompanyName());
company.setHiringTeamType(hiringTeam.getCompanyType());
company.setTimeZone(hiringTeam.getCompanyTimeZone());
company.setAddedByUser(hiringTeam.getAddedByUser());
hiringTeam.setCompany(company);
LogMgr.log(LOG, LogLevel.PROCESSING1, "Added new company : ", company);
}
return super.processForm(process, submission, params);
}
}
\ No newline at end of file
...@@ -75,10 +75,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -75,10 +75,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public static final String FIELD_OnTrial = "OnTrial"; public static final String FIELD_OnTrial = "OnTrial";
public static final String FIELD_TrialJobCount = "TrialJobCount"; public static final String FIELD_TrialJobCount = "TrialJobCount";
public static final String FIELD_MessageID = "MessageID"; public static final String FIELD_MessageID = "MessageID";
public static final String FIELD_ExistingCustomer = "ExistingCustomer";
public static final String FIELD_IsLogoDeleted = "IsLogoDeleted"; public static final String FIELD_IsLogoDeleted = "IsLogoDeleted";
public static final String FIELD_CouponCode = "CouponCode"; public static final String FIELD_CouponCode = "CouponCode";
public static final String FIELD_StripeBrand = "StripeBrand"; public static final String FIELD_StripeBrand = "StripeBrand";
public static final String FIELD_StripeLast4 = "StripeLast4"; public static final String FIELD_StripeLast4 = "StripeLast4";
public static final String FIELD_CompanyName = "CompanyName";
public static final String FIELD_CompanyType = "CompanyType";
public static final String FIELD_CompanyTimeZone = "CompanyTimeZone";
public static final String SINGLEREFERENCE_Company = "Company"; public static final String SINGLEREFERENCE_Company = "Company";
public static final String BACKREF_Company = ""; public static final String BACKREF_Company = "";
public static final String SINGLEREFERENCE_BilledByTeam = "BilledByTeam"; public static final String SINGLEREFERENCE_BilledByTeam = "BilledByTeam";
...@@ -134,10 +138,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -134,10 +138,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final DefaultAttributeHelper<HiringTeam> HELPER_OnTrial = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_OnTrial = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_TrialJobCount = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_TrialJobCount = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_MessageID = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_MessageID = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_ExistingCustomer = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_IsLogoDeleted = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_IsLogoDeleted = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_CouponCode = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_CouponCode = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_StripeBrand = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_StripeBrand = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_StripeLast4 = DefaultAttributeHelper.INSTANCE; private static final DefaultAttributeHelper<HiringTeam> HELPER_StripeLast4 = DefaultAttributeHelper.INSTANCE;
private static final DefaultAttributeHelper<HiringTeam> HELPER_CompanyName = DefaultAttributeHelper.INSTANCE;
private static final EnumeratedAttributeHelper<HiringTeam, HiringTeamType> HELPER_CompanyType = new EnumeratedAttributeHelper<HiringTeam, HiringTeamType> (HiringTeamType.FACTORY_HiringTeamType);
private static final EnumeratedAttributeHelper<HiringTeam, TimeZone> HELPER_CompanyTimeZone = new EnumeratedAttributeHelper<HiringTeam, TimeZone> (TimeZone.FACTORY_TimeZone);
// Private attributes corresponding to business object data // Private attributes corresponding to business object data
...@@ -174,10 +182,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -174,10 +182,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private Boolean _OnTrial; private Boolean _OnTrial;
private Integer _TrialJobCount; private Integer _TrialJobCount;
private Integer _MessageID; private Integer _MessageID;
private Boolean _ExistingCustomer;
private Boolean _IsLogoDeleted; private Boolean _IsLogoDeleted;
private String _CouponCode; private String _CouponCode;
private String _StripeBrand; private String _StripeBrand;
private String _StripeLast4; private String _StripeLast4;
private String _CompanyName;
private HiringTeamType _CompanyType;
private TimeZone _CompanyTimeZone;
// Private attributes corresponding to single references // Private attributes corresponding to single references
...@@ -199,10 +211,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -199,10 +211,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
private static final Map ATTRIBUTES_METADATA_HiringTeam = new HashMap (); private static final Map ATTRIBUTES_METADATA_HiringTeam = new HashMap ();
// Arrays of validators for each attribute // Arrays of validators for each attribute
private static final AttributeValidator[] FIELD_ExistingCustomer_Validators;
private static final AttributeValidator[] FIELD_IsLogoDeleted_Validators; private static final AttributeValidator[] FIELD_IsLogoDeleted_Validators;
private static final AttributeValidator[] FIELD_CouponCode_Validators; private static final AttributeValidator[] FIELD_CouponCode_Validators;
private static final AttributeValidator[] FIELD_StripeBrand_Validators; private static final AttributeValidator[] FIELD_StripeBrand_Validators;
private static final AttributeValidator[] FIELD_StripeLast4_Validators; private static final AttributeValidator[] FIELD_StripeLast4_Validators;
private static final AttributeValidator[] FIELD_CompanyName_Validators;
private static final AttributeValidator[] FIELD_CompanyType_Validators;
private static final AttributeValidator[] FIELD_CompanyTimeZone_Validators;
private static final AttributeValidator[] FIELD_HiringTeamName_Validators; private static final AttributeValidator[] FIELD_HiringTeamName_Validators;
private static final AttributeValidator[] FIELD_HiringTeamLogo_Validators; private static final AttributeValidator[] FIELD_HiringTeamLogo_Validators;
private static final AttributeValidator[] FIELD_HiringTeamType_Validators; private static final AttributeValidator[] FIELD_HiringTeamType_Validators;
...@@ -264,10 +280,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -264,10 +280,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
setupAssocMetaData_AddedByUser(); setupAssocMetaData_AddedByUser();
setupAssocMetaData_PaymentPlan(); setupAssocMetaData_PaymentPlan();
setupAssocMetaData_Coupon(); setupAssocMetaData_Coupon();
FIELD_ExistingCustomer_Validators = (AttributeValidator[])setupAttribMetaData_ExistingCustomer(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_IsLogoDeleted_Validators = (AttributeValidator[])setupAttribMetaData_IsLogoDeleted(validatorMapping).toArray (new AttributeValidator[0]); FIELD_IsLogoDeleted_Validators = (AttributeValidator[])setupAttribMetaData_IsLogoDeleted(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CouponCode_Validators = (AttributeValidator[])setupAttribMetaData_CouponCode(validatorMapping).toArray (new AttributeValidator[0]); FIELD_CouponCode_Validators = (AttributeValidator[])setupAttribMetaData_CouponCode(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_StripeBrand_Validators = (AttributeValidator[])setupAttribMetaData_StripeBrand(validatorMapping).toArray (new AttributeValidator[0]); FIELD_StripeBrand_Validators = (AttributeValidator[])setupAttribMetaData_StripeBrand(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_StripeLast4_Validators = (AttributeValidator[])setupAttribMetaData_StripeLast4(validatorMapping).toArray (new AttributeValidator[0]); FIELD_StripeLast4_Validators = (AttributeValidator[])setupAttribMetaData_StripeLast4(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CompanyName_Validators = (AttributeValidator[])setupAttribMetaData_CompanyName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CompanyType_Validators = (AttributeValidator[])setupAttribMetaData_CompanyType(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_CompanyTimeZone_Validators = (AttributeValidator[])setupAttribMetaData_CompanyTimeZone(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_HiringTeamName_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamName(validatorMapping).toArray (new AttributeValidator[0]); FIELD_HiringTeamName_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamName(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_HiringTeamLogo_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamLogo(validatorMapping).toArray (new AttributeValidator[0]); FIELD_HiringTeamLogo_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamLogo(validatorMapping).toArray (new AttributeValidator[0]);
FIELD_HiringTeamType_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamType(validatorMapping).toArray (new AttributeValidator[0]); FIELD_HiringTeamType_Validators = (AttributeValidator[])setupAttribMetaData_HiringTeamType(validatorMapping).toArray (new AttributeValidator[0]);
...@@ -449,6 +469,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -449,6 +469,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_ExistingCustomer(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("defaultValue", "Boolean.TRUE");
metaInfo.put ("name", "ExistingCustomer");
metaInfo.put ("type", "Boolean");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.ExistingCustomer:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_ExistingCustomer, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "ExistingCustomer", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.ExistingCustomer:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_IsLogoDeleted(Map validatorMapping) private static List setupAttribMetaData_IsLogoDeleted(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -519,6 +557,59 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -519,6 +557,59 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
// Meta Info setup // Meta Info setup
private static List setupAttribMetaData_CompanyName(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("name", "CompanyName");
metaInfo.put ("type", "String");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.CompanyName:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_CompanyName, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "CompanyName", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.CompanyName:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_CompanyType(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("name", "CompanyType");
metaInfo.put ("type", "HiringTeamType");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.CompanyType:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_CompanyType, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "CompanyType", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.CompanyType:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_CompanyTimeZone(Map validatorMapping)
{
Map metaInfo = new HashMap ();
metaInfo.put ("attribHelper", "EnumeratedAttributeHelper");
metaInfo.put ("name", "CompanyTimeZone");
metaInfo.put ("type", "TimeZone");
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG2, "Metadata for HiringTeam.CompanyTimeZone:", metaInfo);
ATTRIBUTES_METADATA_HiringTeam.put (FIELD_CompanyTimeZone, Collections.unmodifiableMap (metaInfo));
List validators = BaseBusinessClass.getAttribValidators(HiringTeam.class, "CompanyTimeZone", metaInfo, validatorMapping);
LogMgr.log (BUSINESS_OBJECTS, LogLevel.DEBUG1, "Validators for HiringTeam.CompanyTimeZone:", validators);
return validators;
}
// Meta Info setup
private static List setupAttribMetaData_HiringTeamName(Map validatorMapping) private static List setupAttribMetaData_HiringTeamName(Map validatorMapping)
{ {
Map metaInfo = new HashMap (); Map metaInfo = new HashMap ();
...@@ -1212,10 +1303,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -1212,10 +1303,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_OnTrial = (Boolean)(Boolean.FALSE); _OnTrial = (Boolean)(Boolean.FALSE);
_TrialJobCount = (Integer)(0); _TrialJobCount = (Integer)(0);
_MessageID = (Integer)(HELPER_MessageID.initialise (_MessageID)); _MessageID = (Integer)(HELPER_MessageID.initialise (_MessageID));
_ExistingCustomer = (Boolean)(Boolean.TRUE);
_IsLogoDeleted = (Boolean)(Boolean.FALSE); _IsLogoDeleted = (Boolean)(Boolean.FALSE);
_CouponCode = (String)(HELPER_CouponCode.initialise (_CouponCode)); _CouponCode = (String)(HELPER_CouponCode.initialise (_CouponCode));
_StripeBrand = (String)(HELPER_StripeBrand.initialise (_StripeBrand)); _StripeBrand = (String)(HELPER_StripeBrand.initialise (_StripeBrand));
_StripeLast4 = (String)(HELPER_StripeLast4.initialise (_StripeLast4)); _StripeLast4 = (String)(HELPER_StripeLast4.initialise (_StripeLast4));
_CompanyName = (String)(HELPER_CompanyName.initialise (_CompanyName));
_CompanyType = (HiringTeamType)(HELPER_CompanyType.initialise (_CompanyType));
_CompanyTimeZone = (TimeZone)(HELPER_CompanyTimeZone.initialise (_CompanyTimeZone));
} }
...@@ -4494,6 +4589,104 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4494,6 +4589,104 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
/** /**
* Get the attribute ExistingCustomer
*/
public Boolean getExistingCustomer ()
{
assertValid();
Boolean valToReturn = _ExistingCustomer;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getExistingCustomer ((HiringTeam)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 preExistingCustomerChange (Boolean newExistingCustomer) 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 postExistingCustomerChange () throws FieldException
{
}
public FieldWriteability getWriteability_ExistingCustomer ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute ExistingCustomer. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setExistingCustomer (Boolean newExistingCustomer) throws FieldException
{
boolean oldAndNewIdentical = HELPER_ExistingCustomer.compare (_ExistingCustomer, newExistingCustomer);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newExistingCustomer = bhd.setExistingCustomer ((HiringTeam)this, newExistingCustomer);
oldAndNewIdentical = HELPER_ExistingCustomer.compare (_ExistingCustomer, newExistingCustomer);
}
if (FIELD_ExistingCustomer_Validators.length > 0)
{
Object newExistingCustomerObj = HELPER_ExistingCustomer.toObject (newExistingCustomer);
if (newExistingCustomerObj != null)
{
int loopMax = FIELD_ExistingCustomer_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_ExistingCustomer);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_ExistingCustomer_Validators[v].checkAttribute (this, FIELD_ExistingCustomer, metadata, newExistingCustomerObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_ExistingCustomer () != FieldWriteability.FALSE, "Field ExistingCustomer is not writeable");
preExistingCustomerChange (newExistingCustomer);
markFieldChange (FIELD_ExistingCustomer);
_ExistingCustomer = newExistingCustomer;
postFieldChange (FIELD_ExistingCustomer);
postExistingCustomerChange ();
}
}
/**
* Get the attribute IsLogoDeleted * Get the attribute IsLogoDeleted
*/ */
public Boolean getIsLogoDeleted () public Boolean getIsLogoDeleted ()
...@@ -4885,6 +5078,300 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -4885,6 +5078,300 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
} }
/**
* Get the attribute CompanyName
*/
public String getCompanyName ()
{
assertValid();
String valToReturn = _CompanyName;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getCompanyName ((HiringTeam)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 preCompanyNameChange (String newCompanyName) 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 postCompanyNameChange () throws FieldException
{
}
public FieldWriteability getWriteability_CompanyName ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute CompanyName. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setCompanyName (String newCompanyName) throws FieldException
{
boolean oldAndNewIdentical = HELPER_CompanyName.compare (_CompanyName, newCompanyName);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newCompanyName = bhd.setCompanyName ((HiringTeam)this, newCompanyName);
oldAndNewIdentical = HELPER_CompanyName.compare (_CompanyName, newCompanyName);
}
if (FIELD_CompanyName_Validators.length > 0)
{
Object newCompanyNameObj = HELPER_CompanyName.toObject (newCompanyName);
if (newCompanyNameObj != null)
{
int loopMax = FIELD_CompanyName_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_CompanyName);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_CompanyName_Validators[v].checkAttribute (this, FIELD_CompanyName, metadata, newCompanyNameObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_CompanyName () != FieldWriteability.FALSE, "Field CompanyName is not writeable");
preCompanyNameChange (newCompanyName);
markFieldChange (FIELD_CompanyName);
_CompanyName = newCompanyName;
postFieldChange (FIELD_CompanyName);
postCompanyNameChange ();
}
}
/**
* Get the attribute CompanyType
*/
public HiringTeamType getCompanyType ()
{
assertValid();
HiringTeamType valToReturn = _CompanyType;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getCompanyType ((HiringTeam)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 preCompanyTypeChange (HiringTeamType newCompanyType) 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 postCompanyTypeChange () throws FieldException
{
}
public FieldWriteability getWriteability_CompanyType ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute CompanyType. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setCompanyType (HiringTeamType newCompanyType) throws FieldException
{
boolean oldAndNewIdentical = HELPER_CompanyType.compare (_CompanyType, newCompanyType);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newCompanyType = bhd.setCompanyType ((HiringTeam)this, newCompanyType);
oldAndNewIdentical = HELPER_CompanyType.compare (_CompanyType, newCompanyType);
}
if (FIELD_CompanyType_Validators.length > 0)
{
Object newCompanyTypeObj = HELPER_CompanyType.toObject (newCompanyType);
if (newCompanyTypeObj != null)
{
int loopMax = FIELD_CompanyType_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_CompanyType);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_CompanyType_Validators[v].checkAttribute (this, FIELD_CompanyType, metadata, newCompanyTypeObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_CompanyType () != FieldWriteability.FALSE, "Field CompanyType is not writeable");
preCompanyTypeChange (newCompanyType);
markFieldChange (FIELD_CompanyType);
_CompanyType = newCompanyType;
postFieldChange (FIELD_CompanyType);
postCompanyTypeChange ();
}
}
/**
* Get the attribute CompanyTimeZone
*/
public TimeZone getCompanyTimeZone ()
{
assertValid();
TimeZone valToReturn = _CompanyTimeZone;
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
valToReturn = bhd.getCompanyTimeZone ((HiringTeam)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 preCompanyTimeZoneChange (TimeZone newCompanyTimeZone) 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 postCompanyTimeZoneChange () throws FieldException
{
}
public FieldWriteability getWriteability_CompanyTimeZone ()
{
return getFieldWritabilityUtil (FieldWriteability.TRUE);
}
/**
* Set the attribute CompanyTimeZone. Checks to ensure a new value
* has been supplied. If so, marks the field as altered and sets the attribute.
*/
public void setCompanyTimeZone (TimeZone newCompanyTimeZone) throws FieldException
{
boolean oldAndNewIdentical = HELPER_CompanyTimeZone.compare (_CompanyTimeZone, newCompanyTimeZone);
try
{
for (HiringTeamBehaviourDecorator bhd : HiringTeam_BehaviourDecorators)
{
newCompanyTimeZone = bhd.setCompanyTimeZone ((HiringTeam)this, newCompanyTimeZone);
oldAndNewIdentical = HELPER_CompanyTimeZone.compare (_CompanyTimeZone, newCompanyTimeZone);
}
if (FIELD_CompanyTimeZone_Validators.length > 0)
{
Object newCompanyTimeZoneObj = HELPER_CompanyTimeZone.toObject (newCompanyTimeZone);
if (newCompanyTimeZoneObj != null)
{
int loopMax = FIELD_CompanyTimeZone_Validators.length;
Map metadata = (Map)ATTRIBUTES_METADATA_HiringTeam.get (FIELD_CompanyTimeZone);
for (int v = 0 ; v < loopMax ; ++v)
{
FIELD_CompanyTimeZone_Validators[v].checkAttribute (this, FIELD_CompanyTimeZone, metadata, newCompanyTimeZoneObj);
}
}
}
}
catch (FieldException e)
{
if (!oldAndNewIdentical)
{
e.setWouldModify ();
}
throw e;
}
if (!oldAndNewIdentical)
{
assertValid();
Debug.assertion (getWriteability_CompanyTimeZone () != FieldWriteability.FALSE, "Field CompanyTimeZone is not writeable");
preCompanyTimeZoneChange (newCompanyTimeZone);
markFieldChange (FIELD_CompanyTimeZone);
_CompanyTimeZone = newCompanyTimeZone;
postFieldChange (FIELD_CompanyTimeZone);
postCompanyTimeZoneChange ();
}
}
/** /**
...@@ -6707,10 +7194,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -6707,10 +7194,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_OnTrial = sourceHiringTeam._OnTrial; _OnTrial = sourceHiringTeam._OnTrial;
_TrialJobCount = sourceHiringTeam._TrialJobCount; _TrialJobCount = sourceHiringTeam._TrialJobCount;
_MessageID = sourceHiringTeam._MessageID; _MessageID = sourceHiringTeam._MessageID;
_ExistingCustomer = sourceHiringTeam._ExistingCustomer;
_IsLogoDeleted = sourceHiringTeam._IsLogoDeleted; _IsLogoDeleted = sourceHiringTeam._IsLogoDeleted;
_CouponCode = sourceHiringTeam._CouponCode; _CouponCode = sourceHiringTeam._CouponCode;
_StripeBrand = sourceHiringTeam._StripeBrand; _StripeBrand = sourceHiringTeam._StripeBrand;
_StripeLast4 = sourceHiringTeam._StripeLast4; _StripeLast4 = sourceHiringTeam._StripeLast4;
_CompanyName = sourceHiringTeam._CompanyName;
_CompanyType = sourceHiringTeam._CompanyType;
_CompanyTimeZone = sourceHiringTeam._CompanyTimeZone;
} }
} }
...@@ -6809,10 +7300,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -6809,10 +7300,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
_OnTrial = (Boolean)(HELPER_OnTrial.readExternal (_OnTrial, vals.get(FIELD_OnTrial))); // _OnTrial = (Boolean)(HELPER_OnTrial.readExternal (_OnTrial, vals.get(FIELD_OnTrial))); //
_TrialJobCount = (Integer)(HELPER_TrialJobCount.readExternal (_TrialJobCount, vals.get(FIELD_TrialJobCount))); // _TrialJobCount = (Integer)(HELPER_TrialJobCount.readExternal (_TrialJobCount, vals.get(FIELD_TrialJobCount))); //
_MessageID = (Integer)(HELPER_MessageID.readExternal (_MessageID, vals.get(FIELD_MessageID))); // _MessageID = (Integer)(HELPER_MessageID.readExternal (_MessageID, vals.get(FIELD_MessageID))); //
_ExistingCustomer = (Boolean)(HELPER_ExistingCustomer.readExternal (_ExistingCustomer, vals.get(FIELD_ExistingCustomer))); //
_IsLogoDeleted = (Boolean)(HELPER_IsLogoDeleted.readExternal (_IsLogoDeleted, vals.get(FIELD_IsLogoDeleted))); // _IsLogoDeleted = (Boolean)(HELPER_IsLogoDeleted.readExternal (_IsLogoDeleted, vals.get(FIELD_IsLogoDeleted))); //
_CouponCode = (String)(HELPER_CouponCode.readExternal (_CouponCode, vals.get(FIELD_CouponCode))); // _CouponCode = (String)(HELPER_CouponCode.readExternal (_CouponCode, vals.get(FIELD_CouponCode))); //
_StripeBrand = (String)(HELPER_StripeBrand.readExternal (_StripeBrand, vals.get(FIELD_StripeBrand))); // _StripeBrand = (String)(HELPER_StripeBrand.readExternal (_StripeBrand, vals.get(FIELD_StripeBrand))); //
_StripeLast4 = (String)(HELPER_StripeLast4.readExternal (_StripeLast4, vals.get(FIELD_StripeLast4))); // _StripeLast4 = (String)(HELPER_StripeLast4.readExternal (_StripeLast4, vals.get(FIELD_StripeLast4))); //
_CompanyName = (String)(HELPER_CompanyName.readExternal (_CompanyName, vals.get(FIELD_CompanyName))); //
_CompanyType = (HiringTeamType)(HELPER_CompanyType.readExternal (_CompanyType, vals.get(FIELD_CompanyType))); //
_CompanyTimeZone = (TimeZone)(HELPER_CompanyTimeZone.readExternal (_CompanyTimeZone, vals.get(FIELD_CompanyTimeZone))); //
_Company.readExternalData(vals.get(SINGLEREFERENCE_Company)); _Company.readExternalData(vals.get(SINGLEREFERENCE_Company));
_BilledByTeam.readExternalData(vals.get(SINGLEREFERENCE_BilledByTeam)); _BilledByTeam.readExternalData(vals.get(SINGLEREFERENCE_BilledByTeam));
_AddedByUser.readExternalData(vals.get(SINGLEREFERENCE_AddedByUser)); _AddedByUser.readExternalData(vals.get(SINGLEREFERENCE_AddedByUser));
...@@ -6866,10 +7361,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -6866,10 +7361,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
vals.put (FIELD_OnTrial, HELPER_OnTrial.writeExternal (_OnTrial)); vals.put (FIELD_OnTrial, HELPER_OnTrial.writeExternal (_OnTrial));
vals.put (FIELD_TrialJobCount, HELPER_TrialJobCount.writeExternal (_TrialJobCount)); vals.put (FIELD_TrialJobCount, HELPER_TrialJobCount.writeExternal (_TrialJobCount));
vals.put (FIELD_MessageID, HELPER_MessageID.writeExternal (_MessageID)); vals.put (FIELD_MessageID, HELPER_MessageID.writeExternal (_MessageID));
vals.put (FIELD_ExistingCustomer, HELPER_ExistingCustomer.writeExternal (_ExistingCustomer));
vals.put (FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.writeExternal (_IsLogoDeleted)); vals.put (FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.writeExternal (_IsLogoDeleted));
vals.put (FIELD_CouponCode, HELPER_CouponCode.writeExternal (_CouponCode)); vals.put (FIELD_CouponCode, HELPER_CouponCode.writeExternal (_CouponCode));
vals.put (FIELD_StripeBrand, HELPER_StripeBrand.writeExternal (_StripeBrand)); vals.put (FIELD_StripeBrand, HELPER_StripeBrand.writeExternal (_StripeBrand));
vals.put (FIELD_StripeLast4, HELPER_StripeLast4.writeExternal (_StripeLast4)); vals.put (FIELD_StripeLast4, HELPER_StripeLast4.writeExternal (_StripeLast4));
vals.put (FIELD_CompanyName, HELPER_CompanyName.writeExternal (_CompanyName));
vals.put (FIELD_CompanyType, HELPER_CompanyType.writeExternal (_CompanyType));
vals.put (FIELD_CompanyTimeZone, HELPER_CompanyTimeZone.writeExternal (_CompanyTimeZone));
vals.put (SINGLEREFERENCE_Company, _Company.writeExternalData()); vals.put (SINGLEREFERENCE_Company, _Company.writeExternalData());
vals.put (SINGLEREFERENCE_BilledByTeam, _BilledByTeam.writeExternalData()); vals.put (SINGLEREFERENCE_BilledByTeam, _BilledByTeam.writeExternalData());
vals.put (SINGLEREFERENCE_AddedByUser, _AddedByUser.writeExternalData()); vals.put (SINGLEREFERENCE_AddedByUser, _AddedByUser.writeExternalData());
...@@ -7047,10 +7546,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -7047,10 +7546,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
super.visitAttributes (visitor); super.visitAttributes (visitor);
visitor.visitField(this, FIELD_ExistingCustomer, HELPER_ExistingCustomer.toObject(getExistingCustomer()));
visitor.visitField(this, FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.toObject(getIsLogoDeleted())); visitor.visitField(this, FIELD_IsLogoDeleted, HELPER_IsLogoDeleted.toObject(getIsLogoDeleted()));
visitor.visitField(this, FIELD_CouponCode, HELPER_CouponCode.toObject(getCouponCode())); visitor.visitField(this, FIELD_CouponCode, HELPER_CouponCode.toObject(getCouponCode()));
visitor.visitField(this, FIELD_StripeBrand, HELPER_StripeBrand.toObject(getStripeBrand())); visitor.visitField(this, FIELD_StripeBrand, HELPER_StripeBrand.toObject(getStripeBrand()));
visitor.visitField(this, FIELD_StripeLast4, HELPER_StripeLast4.toObject(getStripeLast4())); visitor.visitField(this, FIELD_StripeLast4, HELPER_StripeLast4.toObject(getStripeLast4()));
visitor.visitField(this, FIELD_CompanyName, HELPER_CompanyName.toObject(getCompanyName()));
visitor.visitField(this, FIELD_CompanyType, HELPER_CompanyType.toObject(getCompanyType()));
visitor.visitField(this, FIELD_CompanyTimeZone, HELPER_CompanyTimeZone.toObject(getCompanyTimeZone()));
} }
...@@ -8027,6 +8530,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8027,6 +8530,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return HELPER_MessageID.toObject (getMessageID ()); return HELPER_MessageID.toObject (getMessageID ());
} }
else if (attribName.equals (FIELD_ExistingCustomer))
{
return HELPER_ExistingCustomer.toObject (getExistingCustomer ());
}
else if (attribName.equals (FIELD_IsLogoDeleted)) else if (attribName.equals (FIELD_IsLogoDeleted))
{ {
return HELPER_IsLogoDeleted.toObject (getIsLogoDeleted ()); return HELPER_IsLogoDeleted.toObject (getIsLogoDeleted ());
...@@ -8043,6 +8550,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8043,6 +8550,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return HELPER_StripeLast4.toObject (getStripeLast4 ()); return HELPER_StripeLast4.toObject (getStripeLast4 ());
} }
else if (attribName.equals (FIELD_CompanyName))
{
return HELPER_CompanyName.toObject (getCompanyName ());
}
else if (attribName.equals (FIELD_CompanyType))
{
return HELPER_CompanyType.toObject (getCompanyType ());
}
else if (attribName.equals (FIELD_CompanyTimeZone))
{
return HELPER_CompanyTimeZone.toObject (getCompanyTimeZone ());
}
else else
{ {
return super.getAttribute (attribName); return super.getAttribute (attribName);
...@@ -8188,6 +8707,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8188,6 +8707,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return HELPER_MessageID; return HELPER_MessageID;
} }
else if (attribName.equals (FIELD_ExistingCustomer))
{
return HELPER_ExistingCustomer;
}
else if (attribName.equals (FIELD_IsLogoDeleted)) else if (attribName.equals (FIELD_IsLogoDeleted))
{ {
return HELPER_IsLogoDeleted; return HELPER_IsLogoDeleted;
...@@ -8204,6 +8727,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8204,6 +8727,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return HELPER_StripeLast4; return HELPER_StripeLast4;
} }
else if (attribName.equals (FIELD_CompanyName))
{
return HELPER_CompanyName;
}
else if (attribName.equals (FIELD_CompanyType))
{
return HELPER_CompanyType;
}
else if (attribName.equals (FIELD_CompanyTimeZone))
{
return HELPER_CompanyTimeZone;
}
else else
{ {
return super.getAttributeHelper (attribName); return super.getAttributeHelper (attribName);
...@@ -8349,6 +8884,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8349,6 +8884,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
setMessageID ((Integer)(HELPER_MessageID.fromObject (_MessageID, attribValue))); setMessageID ((Integer)(HELPER_MessageID.fromObject (_MessageID, attribValue)));
} }
else if (attribName.equals (FIELD_ExistingCustomer))
{
setExistingCustomer ((Boolean)(HELPER_ExistingCustomer.fromObject (_ExistingCustomer, attribValue)));
}
else if (attribName.equals (FIELD_IsLogoDeleted)) else if (attribName.equals (FIELD_IsLogoDeleted))
{ {
setIsLogoDeleted ((Boolean)(HELPER_IsLogoDeleted.fromObject (_IsLogoDeleted, attribValue))); setIsLogoDeleted ((Boolean)(HELPER_IsLogoDeleted.fromObject (_IsLogoDeleted, attribValue)));
...@@ -8365,6 +8904,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8365,6 +8904,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
setStripeLast4 ((String)(HELPER_StripeLast4.fromObject (_StripeLast4, attribValue))); setStripeLast4 ((String)(HELPER_StripeLast4.fromObject (_StripeLast4, attribValue)));
} }
else if (attribName.equals (FIELD_CompanyName))
{
setCompanyName ((String)(HELPER_CompanyName.fromObject (_CompanyName, attribValue)));
}
else if (attribName.equals (FIELD_CompanyType))
{
setCompanyType ((HiringTeamType)(HELPER_CompanyType.fromObject (_CompanyType, attribValue)));
}
else if (attribName.equals (FIELD_CompanyTimeZone))
{
setCompanyTimeZone ((TimeZone)(HELPER_CompanyTimeZone.fromObject (_CompanyTimeZone, attribValue)));
}
else else
{ {
super.setAttribute (attribName, attribValue); super.setAttribute (attribName, attribValue);
...@@ -8553,6 +9104,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8553,6 +9104,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return getWriteability_Coupon (); return getWriteability_Coupon ();
} }
else if (fieldName.equals (FIELD_ExistingCustomer))
{
return getWriteability_ExistingCustomer ();
}
else if (fieldName.equals (FIELD_IsLogoDeleted)) else if (fieldName.equals (FIELD_IsLogoDeleted))
{ {
return getWriteability_IsLogoDeleted (); return getWriteability_IsLogoDeleted ();
...@@ -8569,6 +9124,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8569,6 +9124,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return getWriteability_StripeLast4 (); return getWriteability_StripeLast4 ();
} }
else if (fieldName.equals (FIELD_CompanyName))
{
return getWriteability_CompanyName ();
}
else if (fieldName.equals (FIELD_CompanyType))
{
return getWriteability_CompanyType ();
}
else if (fieldName.equals (FIELD_CompanyTimeZone))
{
return getWriteability_CompanyTimeZone ();
}
else else
{ {
return super.getWriteable (fieldName); return super.getWriteable (fieldName);
...@@ -8744,6 +9311,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8744,6 +9311,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
fields.add (FIELD_MessageID); fields.add (FIELD_MessageID);
} }
if (getWriteability_ExistingCustomer () != FieldWriteability.TRUE)
{
fields.add (FIELD_ExistingCustomer);
}
if (getWriteability_IsLogoDeleted () != FieldWriteability.TRUE) if (getWriteability_IsLogoDeleted () != FieldWriteability.TRUE)
{ {
fields.add (FIELD_IsLogoDeleted); fields.add (FIELD_IsLogoDeleted);
...@@ -8764,6 +9336,21 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8764,6 +9336,21 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
fields.add (FIELD_StripeLast4); fields.add (FIELD_StripeLast4);
} }
if (getWriteability_CompanyName () != FieldWriteability.TRUE)
{
fields.add (FIELD_CompanyName);
}
if (getWriteability_CompanyType () != FieldWriteability.TRUE)
{
fields.add (FIELD_CompanyType);
}
if (getWriteability_CompanyTimeZone () != FieldWriteability.TRUE)
{
fields.add (FIELD_CompanyTimeZone);
}
super.putUnwriteable (fields); super.putUnwriteable (fields);
} }
...@@ -8806,10 +9393,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -8806,10 +9393,14 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
result.add(HELPER_OnTrial.getAttribObject (getClass (), _OnTrial, false, FIELD_OnTrial)); result.add(HELPER_OnTrial.getAttribObject (getClass (), _OnTrial, false, FIELD_OnTrial));
result.add(HELPER_TrialJobCount.getAttribObject (getClass (), _TrialJobCount, false, FIELD_TrialJobCount)); result.add(HELPER_TrialJobCount.getAttribObject (getClass (), _TrialJobCount, false, FIELD_TrialJobCount));
result.add(HELPER_MessageID.getAttribObject (getClass (), _MessageID, false, FIELD_MessageID)); result.add(HELPER_MessageID.getAttribObject (getClass (), _MessageID, false, FIELD_MessageID));
result.add(HELPER_ExistingCustomer.getAttribObject (getClass (), _ExistingCustomer, false, FIELD_ExistingCustomer));
result.add(HELPER_IsLogoDeleted.getAttribObject (getClass (), _IsLogoDeleted, false, FIELD_IsLogoDeleted)); result.add(HELPER_IsLogoDeleted.getAttribObject (getClass (), _IsLogoDeleted, false, FIELD_IsLogoDeleted));
result.add(HELPER_CouponCode.getAttribObject (getClass (), _CouponCode, false, FIELD_CouponCode)); result.add(HELPER_CouponCode.getAttribObject (getClass (), _CouponCode, false, FIELD_CouponCode));
result.add(HELPER_StripeBrand.getAttribObject (getClass (), _StripeBrand, false, FIELD_StripeBrand)); result.add(HELPER_StripeBrand.getAttribObject (getClass (), _StripeBrand, false, FIELD_StripeBrand));
result.add(HELPER_StripeLast4.getAttribObject (getClass (), _StripeLast4, false, FIELD_StripeLast4)); result.add(HELPER_StripeLast4.getAttribObject (getClass (), _StripeLast4, false, FIELD_StripeLast4));
result.add(HELPER_CompanyName.getAttribObject (getClass (), _CompanyName, false, FIELD_CompanyName));
result.add(HELPER_CompanyType.getAttribObject (getClass (), _CompanyType, false, FIELD_CompanyType));
result.add(HELPER_CompanyTimeZone.getAttribObject (getClass (), _CompanyTimeZone, false, FIELD_CompanyTimeZone));
return result; return result;
} }
...@@ -9473,6 +10064,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -9473,6 +10064,24 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
/** /**
* Get the attribute ExistingCustomer
*/
public Boolean getExistingCustomer (HiringTeam obj, Boolean original)
{
return original;
}
/**
* Change the value set for attribute ExistingCustomer.
* May modify the field beforehand
* Occurs before validation.
*/
public Boolean setExistingCustomer (HiringTeam obj, Boolean newExistingCustomer) throws FieldException
{
return newExistingCustomer;
}
/**
* Get the attribute IsLogoDeleted * Get the attribute IsLogoDeleted
*/ */
public Boolean getIsLogoDeleted (HiringTeam obj, Boolean original) public Boolean getIsLogoDeleted (HiringTeam obj, Boolean original)
...@@ -9544,6 +10153,60 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -9544,6 +10153,60 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return newStripeLast4; return newStripeLast4;
} }
/**
* Get the attribute CompanyName
*/
public String getCompanyName (HiringTeam obj, String original)
{
return original;
}
/**
* Change the value set for attribute CompanyName.
* May modify the field beforehand
* Occurs before validation.
*/
public String setCompanyName (HiringTeam obj, String newCompanyName) throws FieldException
{
return newCompanyName;
}
/**
* Get the attribute CompanyType
*/
public HiringTeamType getCompanyType (HiringTeam obj, HiringTeamType original)
{
return original;
}
/**
* Change the value set for attribute CompanyType.
* May modify the field beforehand
* Occurs before validation.
*/
public HiringTeamType setCompanyType (HiringTeam obj, HiringTeamType newCompanyType) throws FieldException
{
return newCompanyType;
}
/**
* Get the attribute CompanyTimeZone
*/
public TimeZone getCompanyTimeZone (HiringTeam obj, TimeZone original)
{
return original;
}
/**
* Change the value set for attribute CompanyTimeZone.
* May modify the field beforehand
* Occurs before validation.
*/
public TimeZone setCompanyTimeZone (HiringTeam obj, TimeZone newCompanyTimeZone) throws FieldException
{
return newCompanyTimeZone;
}
} }
...@@ -9612,6 +10275,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -9612,6 +10275,10 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return toDiversityQuestions (); return toDiversityQuestions ();
} }
if (name.equals ("ExistingCustomer"))
{
return toExistingCustomer ();
}
if (name.equals ("IsLogoDeleted")) if (name.equals ("IsLogoDeleted"))
{ {
return toIsLogoDeleted (); return toIsLogoDeleted ();
...@@ -9628,6 +10295,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -9628,6 +10295,18 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
{ {
return toStripeLast4 (); return toStripeLast4 ();
} }
if (name.equals ("CompanyName"))
{
return toCompanyName ();
}
if (name.equals ("CompanyType"))
{
return toCompanyType ();
}
if (name.equals ("CompanyTimeZone"))
{
return toCompanyTimeZone ();
}
if (name.equals ("HiringTeamName")) if (name.equals ("HiringTeamName"))
{ {
return toHiringTeamName (); return toHiringTeamName ();
...@@ -9786,6 +10465,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -9786,6 +10465,8 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
} }
public PipeLine<From, Boolean> toExistingCustomer () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_ExistingCustomer)); }
public PipeLine<From, Boolean> toIsLogoDeleted () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsLogoDeleted)); } public PipeLine<From, Boolean> toIsLogoDeleted () { return pipe(new ORMAttributePipe<Me, Boolean>(FIELD_IsLogoDeleted)); }
public PipeLine<From, String> toCouponCode () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CouponCode)); } public PipeLine<From, String> toCouponCode () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CouponCode)); }
...@@ -9794,6 +10475,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -9794,6 +10475,12 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public PipeLine<From, String> toStripeLast4 () { return pipe(new ORMAttributePipe<Me, String>(FIELD_StripeLast4)); } public PipeLine<From, String> toStripeLast4 () { return pipe(new ORMAttributePipe<Me, String>(FIELD_StripeLast4)); }
public PipeLine<From, String> toCompanyName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_CompanyName)); }
public PipeLine<From, HiringTeamType> toCompanyType () { return pipe(new ORMAttributePipe<Me, HiringTeamType>(FIELD_CompanyType)); }
public PipeLine<From, TimeZone> toCompanyTimeZone () { return pipe(new ORMAttributePipe<Me, TimeZone>(FIELD_CompanyTimeZone)); }
public PipeLine<From, String> toHiringTeamName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_HiringTeamName)); } public PipeLine<From, String> toHiringTeamName () { return pipe(new ORMAttributePipe<Me, String>(FIELD_HiringTeamName)); }
public PipeLine<From, BinaryContent> toHiringTeamLogo () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_HiringTeamLogo)); } public PipeLine<From, BinaryContent> toHiringTeamLogo () { return pipe(new ORMAttributePipe<Me, BinaryContent>(FIELD_HiringTeamLogo)); }
...@@ -9919,6 +10606,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -9919,6 +10606,11 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
public boolean isTransientAttrib(String attribName) public boolean isTransientAttrib(String attribName)
{ {
if(CollectionUtils.equals(attribName, "ExistingCustomer"))
{
return true;
}
if(CollectionUtils.equals(attribName, "IsLogoDeleted")) if(CollectionUtils.equals(attribName, "IsLogoDeleted"))
{ {
return true; return true;
...@@ -9939,6 +10631,21 @@ public abstract class BaseHiringTeam extends BaseBusinessClass ...@@ -9939,6 +10631,21 @@ public abstract class BaseHiringTeam extends BaseBusinessClass
return true; return true;
} }
if(CollectionUtils.equals(attribName, "CompanyName"))
{
return true;
}
if(CollectionUtils.equals(attribName, "CompanyType"))
{
return true;
}
if(CollectionUtils.equals(attribName, "CompanyTimeZone"))
{
return true;
}
return super.isTransientAttrib(attribName); return super.isTransientAttrib(attribName);
} }
......
...@@ -32,8 +32,6 @@ public class Company extends BaseCompany ...@@ -32,8 +32,6 @@ public class Company extends BaseCompany
@Override @Override
protected void postInitNewObj() throws BusinessException protected void postInitNewObj() throws BusinessException
{ {
addToHiringTeams(HiringTeam.createHiringTeam(getTransaction()));
super.postInitNewObj(); super.postInitNewObj();
} }
......
...@@ -12,10 +12,14 @@ ...@@ -12,10 +12,14 @@
<MULTIPLEREFERENCE name="BillingTeams" type="HiringTeam" backreferenceName="BilledByTeam" /> <MULTIPLEREFERENCE name="BillingTeams" type="HiringTeam" backreferenceName="BilledByTeam" />
<MULTIPLEREFERENCE name="DiversityQuestions" type="HTDiversityQuestion" backreferenceName="HiringTeam" /> <MULTIPLEREFERENCE name="DiversityQuestions" type="HTDiversityQuestion" backreferenceName="HiringTeam" />
<TRANSIENT name="ExistingCustomer" type="Boolean" defaultValue="Boolean.TRUE"/>
<TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/> <TRANSIENT name="IsLogoDeleted" type="Boolean" defaultValue="Boolean.FALSE"/>
<TRANSIENT name="CouponCode" type="String" length="20"/> <TRANSIENT name="CouponCode" type="String" length="20"/>
<TRANSIENT name="StripeBrand" type="String" /> <TRANSIENT name="StripeBrand" type="String" />
<TRANSIENT name="StripeLast4" type="String" /> <TRANSIENT name="StripeLast4" type="String" />
<TRANSIENT name="CompanyName" type="String" />
<TRANSIENT name="CompanyType" type="HiringTeamType" attribHelper="EnumeratedAttributeHelper"/>
<TRANSIENT name="CompanyTimeZone" type="TimeZone" attribHelper="EnumeratedAttributeHelper"/>
<TABLE name="tl_hiring_team" tablePrefix="object"> <TABLE name="tl_hiring_team" tablePrefix="object">
......
package performa.search;
import oneit.objstore.BaseBusinessClass;
import oneit.objstore.ObjectTransaction;
import oneit.objstore.rdbms.filters.ILikeFilter;
import oneit.servlets.jsp.ORMTextSearcher;
import performa.orm.Company;
public class CompanySearcher implements ORMTextSearcher
{
public static CompanySearcher INSTANCE = new CompanySearcher();
@Override
public BaseBusinessClass[] search(ObjectTransaction ot, String searchTerm)
{
return Company.SearchByAll().andCompanyName(new ILikeFilter(searchTerm, "%", "%")).search(ot);
}
}
\ No newline at end of file
...@@ -104,9 +104,11 @@ public class PerformaOAuthCallbackDecorator implements ServletDecorator, Initial ...@@ -104,9 +104,11 @@ public class PerformaOAuthCallbackDecorator implements ServletDecorator, Initial
company.setAddedByUser(companyUser); company.setAddedByUser(companyUser);
companyUser.setCompany(company); companyUser.setCompany(company);
HiringTeam hiringTeam = company.getHiringTeamsAt(0); HiringTeam hiringTeam = HiringTeam.createHiringTeam(transaction);
hiringTeam.setAddedByUser(companyUser); hiringTeam.setAddedByUser(companyUser);
hiringTeam.setHiringTeamName(""); hiringTeam.setHiringTeamName("");
company.addToHiringTeams(hiringTeam);
companyUser.setDefaultHiringTeam(hiringTeam); companyUser.setDefaultHiringTeam(hiringTeam);
CompanyUserHiringTeamLink link = CompanyUserHiringTeamLink.createCompanyUserHiringTeamLink(transaction); CompanyUserHiringTeamLink link = CompanyUserHiringTeamLink.createCompanyUserHiringTeamLink(transaction);
......
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
Boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Company", Company.REFERENCE_Company); Boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Company", Company.REFERENCE_Company);
Company company = (Company) process.getAttribute("Company"); Company company = (Company) process.getAttribute("Company");
if(toRedirect)
{
company.addToHiringTeams(HiringTeam.createHiringTeam(objTran));
}
SecUser secUser = null; SecUser secUser = null;
CompanyUser companyUser = company.getAddedByUser(); CompanyUser companyUser = company.getAddedByUser();
......
...@@ -14,6 +14,11 @@ ...@@ -14,6 +14,11 @@
Boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Company", Company.REFERENCE_Company); Boolean toRedirect = GenericObjDF.getOrCreateObject (request, "Company", Company.REFERENCE_Company);
Company company = (Company) process.getAttribute("Company"); Company company = (Company) process.getAttribute("Company");
if(toRedirect)
{
company.addToHiringTeams(HiringTeam.createHiringTeam(objTran));
}
SecUser secUser = null; SecUser secUser = null;
CompanyUser companyUser = company.getAddedByUser(); CompanyUser companyUser = company.getAddedByUser();
......
...@@ -12,12 +12,16 @@ ...@@ -12,12 +12,16 @@
<FORM name="*.createPlan" factory="Participant" class="performa.form.CreatePlanFP"/> <FORM name="*.createPlan" factory="Participant" class="performa.form.CreatePlanFP"/>
</NODE> </NODE>
<NODE name="createArticle_jsp::TL" factory="Participant"> <NODE name="customers_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdmin"/>
<FORM name="*.assume" factory="Participant" class="performa.form.AssumeHTAdminFP"> <FORM name="*.assume" factory="Participant" class="performa.form.AssumeHTAdminFP">
<NODE name="loginFP" factory="Named" nodename="CMSLoginFP"/> <NODE name="loginFP" factory="Named" nodename="CMSLoginFP"/>
</FORM> </FORM>
<FORM name="*.search" factory="Participant" class="oneit.servlets.orm.RunSearchExecutorFP"/> </NODE>
<DATA class="oneit.servlets.orm.RunSearchExecutorDF"/>
<NODE name="changeCompanyPopup_jsp" factory="Participant">
<INHERITS factory="Named" nodename="CoreORMAdmin"/>
<FORM name="*.changeCompany" factory="Participant" class="performa.form.ChangeCompanyFP"/>
</NODE> </NODE>
<NODE name="editMessageTemplate_jsp" factory="Participant"> <NODE name="editMessageTemplate_jsp" factory="Participant">
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
<!-- <TOPMENU name="MENU.TEST_ANALYSIS" desc="Test Analysis" sortOrder="100" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" <!-- <TOPMENU name="MENU.TEST_ANALYSIS" desc="Test Analysis" sortOrder="100" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element"
link="/extensions/performa/testAnalysis.jsp"/> --> link="/extensions/performa/testAnalysis.jsp"/> -->
<CHILD name="Performa.Customers" desc="Customers" sortOrder="10" toplevel="ADMIN" priv="admin" link="/extensions/performa/customers.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
<CHILD name="Performa.SetupPlans" desc="Setup Plans" sortOrder="10" toplevel="ADMIN" priv="admin" link="/extensions/performa/setupPlans.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" /> <CHILD name="Performa.SetupPlans" desc="Setup Plans" sortOrder="10" toplevel="ADMIN" priv="admin" link="/extensions/performa/setupPlans.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
<CHILD name="Performa.MessageTemplate" desc="Message Template" sortOrder="20" toplevel="ADMIN" priv="admin" link="/extensions/performa/listMessageTemplate.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" /> <CHILD name="Performa.MessageTemplate" desc="Message Template" sortOrder="20" toplevel="ADMIN" priv="admin" link="/extensions/performa/listMessageTemplate.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
<CHILD name="Performa.NotificationTemplate" desc="Notification Template" sortOrder="30" toplevel="ADMIN" priv="admin" link="/extensions/performa/listNotificationTemplates.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" /> <CHILD name="Performa.NotificationTemplate" desc="Notification Template" sortOrder="30" toplevel="ADMIN" priv="admin" link="/extensions/performa/listNotificationTemplates.jsp" factory="Participant" class="oneit.servlets.jsp.ui.DefaultUICustomiser$Element" />
......
<%@ page extends="oneit.servlets.jsp.JSPInclude"%> <%@ page extends="oneit.servlets.jsp.FormJSP"%>
<%@ include file="/setuprequest.jsp"%> <%@ include file="/setuprequest.jsp"%>
<%@ include file="inc/stdimports.jsp"%> <%@ include file="inc/stdimports.jsp"%>
<%@ include file="/editor/stdimports.jsp"%> <%@ include file="/editor/stdimports.jsp"%>
<%@ page import="oneit.security.jsp.*" %> <%@ page import="oneit.servlets.jsp.ormtable.*" %>
<oneit:dynIncluded> <%! protected String getName (ServletConfig config) { return "customers_jsp"; } %>
<% <%
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request); ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction (); ObjectTransaction objTran = process.getTransaction ();
String currentPage = request.getContextPath() + "/editor/home.jsp"; String currentPage = request.getContextPath() + "/extensions/performa/customers.jsp";
SecUser secUser = SecUser.getTXUser(objTran); SecUser secUser = SecUser.getTXUser(objTran);
UserSortOption userSortOpt = (UserSortOption) process.getAttribute("UserSortOption"); UserSortOption userSortOpt = (UserSortOption) process.getAttribute("UserSortOption");
SearchHiringTeam searchHT = (SearchHiringTeam) RunSearchExecutorFP.setupExecutor(request, SearchHiringTeam.REFERENCE_SearchHiringTeam, true); SearchHiringTeam searchHT = (SearchHiringTeam) RunSearchExecutorFP.setupExecutor(request, SearchHiringTeam.REFERENCE_SearchHiringTeam, true);
...@@ -45,22 +45,42 @@ ...@@ -45,22 +45,42 @@
request.setAttribute("oneit.pageFormDetails", CollectionUtils.mapEntry("name", "Customers").mapEntry("enctype", "multipart/form-data").toMap()); request.setAttribute("oneit.pageFormDetails", CollectionUtils.mapEntry("name", "Customers").mapEntry("enctype", "multipart/form-data").toMap());
request.setAttribute("oneit.pageHeaderTitle", "Customers"); request.setAttribute("oneit.pageHeaderTitle", "Customers");
%> %>
<%@include file="/editor/header.jsp"%>
<oneit:css> <oneit:css>
<oneit:css href="/css/common.css" /> <oneit:css href="/css/common.css" />
<oneit:css href="/css/jBox.css" />
</oneit:css> </oneit:css>
<oneit:script>
<oneit:script src="/scripts/jBox.js"/>
</oneit:script>
<style> <style>
.dashboard-content-area { .dashboard-content-area {
margin-top: 0px ; margin-top: 0px ;
width: 100%; width: 100%;
} }
.change-company-btn{
border: none;
background: none;
color: #4e5258;
}
</style> </style>
<script type="text/javascript"> <script type="text/javascript">
var Popup = null;
$(document).ready(function(){
setupRecalc ($("form"), {'recalcOnError':true});
$(".change-company-btn").prop('title', 'Change Customer');
});
$(function(){ $(function(){
$('.search-icon-btn').click(function () { $('.search-icon-btn').click(function () {
$('.search-real-btn').click(); $('.search-real-btn').click();
}); });
}); });
</script> </script>
<div class="dashboard-content-area second-part"> <div class="dashboard-content-area second-part">
<div class="jobs-list-shorting"> <div class="jobs-list-shorting">
...@@ -71,6 +91,7 @@ ...@@ -71,6 +91,7 @@
<span class="search-icon-btn"></span> <span class="search-icon-btn"></span>
</div> </div>
<oneit:button value="Search" name="search" cssClass="btn btn-primary search-real-btn hidden" /> <oneit:button value="Search" name="search" cssClass="btn btn-primary search-real-btn hidden" />
<oneit:button value=" " name="save" cssClass="btn" requestAttribs="<%= CollectionUtils.mapEntry("nextPage", currentPage).toMap() %>" id="save"/>
<div class="shorting-dropdown"> <div class="shorting-dropdown">
<span class="order-label">order by</span> <span class="order-label">order by</span>
<select class="form-control" onChange="location=this.value"> <select class="form-control" onChange="location=this.value">
...@@ -104,14 +125,24 @@ ...@@ -104,14 +125,24 @@
int openCount = openJobs != null ? openJobs.length : 0; int openCount = openJobs != null ? openJobs.length : 0;
int clientCount = hiringTeam.pipelineHiringTeam().toClients().uniqueVals().size(); int clientCount = hiringTeam.pipelineHiringTeam().toClients().uniqueVals().size();
%> %>
<div class="client-list" id="<%= hiringTeam.getID() %>"> <div class="client-list">
<div class="client-row" > <div class="client-row" >
<div class="client-name-cell jl-c" style="width:50%;"> <div class="client-name-cell jl-c" style="width:30%;">
<div class="client-name"> <div class="client-name">
<oneit:toString value="<%= hiringTeam.getHiringTeamName() %>" mode="EscapeHTML" /> <oneit:toString value="<%= hiringTeam.getHiringTeamName() %>" mode="EscapeHTML" />
</div> </div>
</div> </div>
</div> </div>
<div class="client-row company-details" >
<div class="client-name-cell jl-c" style="width:20%;">
<div class="client-name">
<%= hiringTeam.getCompany().getCompanyName() %>
<tagfile:popup actualJSP="<%= contextPath + "/extensions/performa/inc/changeCompanyPopup.jsp" %>" id="<%= hiringTeam.getID().toString() %>"
displayValue="..." cssClass="change-company-btn" bypassValidate="false"
procVars="<%= CollectionUtils.mapEntry("HiringTeam", hiringTeam).toMap() %>" width="800" height="450" popupAction="#save"/>
</div>
</div>
</div>
<div class="<%= "application-count jl-c " + (clientCount == 0 ? "opaque-jobcount" : "")%>"> <div class="<%= "application-count jl-c " + (clientCount == 0 ? "opaque-jobcount" : "")%>">
<oneit:toString value="<%= clientCount %>" mode="EscapeHTML" nullValue="0"/> <oneit:toString value="<%= clientCount %>" mode="EscapeHTML" nullValue="0"/>
<span class="grey-span">Clients</span> <span class="grey-span">Clients</span>
...@@ -130,11 +161,9 @@ ...@@ -130,11 +161,9 @@
.toMap()%>"/> .toMap()%>"/>
</div> </div>
</div> </div>
<% <%
} }
%> %>
</div> </div>
</div> </div>
</oneit:dynIncluded> <%@include file="/editor/footer.jsp"%>
\ No newline at end of file \ No newline at end of file
...@@ -6,7 +6,8 @@ ...@@ -6,7 +6,8 @@
<oneit:dynIncluded> <oneit:dynIncluded>
<oneit:dynInclude page="/extensions/performa/customers.jsp" data="<%= CollectionUtils.EMPTY_MAP %>"/> <%
response.sendRedirect(request.getContextPath() + "/extensions/performa/customers.jsp");
%>
</oneit:dynIncluded> </oneit:dynIncluded>
\ No newline at end of file
<%@ page extends="oneit.servlets.jsp.FormJSP" %>
<%@ include file="/setuprequest.jsp" %>
<%@ include file="stdimports.jsp" %>
<%@ include file="/editor/stdimports.jsp" %>
<%! protected String getName (ServletConfig config) { return "changeCompanyPopup_jsp"; } %>
<%
ORMProcessState process = (ORMProcessState) ProcessDecorator.getDefaultProcess(request);
ObjectTransaction objTran = process.getTransaction ();
HiringTeam hiringTeam = (HiringTeam) process.getAttribute("HiringTeam");
request.setAttribute("oneit.pageFormDetails", CollectionUtils.mapEntry("name", "changeCompanyPopup").mapEntry("enctype", "multipart/form-data").toMap());
request.setAttribute("oneit.pageHeaderTitle", "Change Customer Popup");
%>
<%@include file="/editor/header.jsp" %>
<script type="text/javascript">
$(document).ready(function(){
setupRecalc ($("form"), {'recalcOnError':true});
});
</script>
<oneit:layout_total widths="<%= new double[] {4, 8} %>" skin="bootstrap">
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1"><oneit:label GUIName="Hiring Team" /></oneit:layout_label>
<oneit:layout_field width="1"><oneit:toString value="<%= hiringTeam.getHiringTeamName() %>" mode="EscapeHTML"/></oneit:layout_field>
</oneit:skin>
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1">
<oneit:ormInput obj="<%= hiringTeam %>" type="radio" attributeName="ExistingCustomer" value="true"/> Existing Customer
</oneit:layout_label>
</oneit:skin>
<oneit:skin tagName="layout_row">
<oneit:recalcClass htmlTag="span" classScript="hiringTeam.isTrue(hiringTeam.getExistingCustomer()) ? 'show col-xs-offset-1' : 'hide'" hiringTeam="<%= hiringTeam %>">
<oneit:layout_label width="1"><oneit:label GUIName="Customer" /></oneit:layout_label>
<oneit:layout_field width="1">
<tagfile:ormsingleasso_autocomplete obj="<%= hiringTeam %>" assocName="Company" cssClass="form-control" searcher="<%= CompanySearcher.INSTANCE %>" />
</oneit:layout_field>
</oneit:recalcClass>
</oneit:skin>
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1">
<oneit:ormInput obj="<%= hiringTeam %>" type="radio" attributeName="ExistingCustomer" value="false"/> New Customer
</oneit:layout_label>
</oneit:skin>
<oneit:recalcClass htmlTag="span" classScript="hiringTeam.isFalse(hiringTeam.getExistingCustomer()) ? 'show col-xs-offset-1' : 'hide'" hiringTeam="<%= hiringTeam %>">
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1"><oneit:label GUIName="Customer Name" /></oneit:layout_label>
<oneit:layout_field width="1">
<oneit:ormInput obj="<%= hiringTeam %>" type="text" attributeName="CompanyName" cssClass="form-control" />
</oneit:layout_field>
</oneit:skin>
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1"><oneit:label GUIName="Time Zone" /></oneit:layout_label>
<oneit:layout_field width="1">
<oneit:ormEnum obj="<%= hiringTeam %>" attributeName="CompanyTimeZone" cssClass="form-control"/>
</oneit:layout_field>
</oneit:skin>
<oneit:skin tagName="layout_row">
<oneit:layout_label width="1"><oneit:label GUIName="What type of hiring team are you?" /></oneit:layout_label>
</oneit:skin>
<%
FormTag jobForm = FormTag.getActiveFormTag(request);
FormBuilder formBuilder = jobForm.getFormBuilder();
String optionKey = WebUtils.getInputKey(request, hiringTeam, HiringTeam.FIELD_CompanyType);
String formValue = formBuilder.fieldValue (optionKey, hiringTeam.getCompanyType() == null ? "" : hiringTeam.getCompanyType().getName());
for(HiringTeamType hiringTeamType : HiringTeamType.getHiringTeamTypeArray())
{
boolean isSelected = CollectionUtils.equals(formValue, hiringTeamType.getName());
String hiringTeamTypeId = String.valueOf(hiringTeam.getID().longID()) + "_hiringteamtype_" + hiringTeamType.getName();
String selected = isSelected ? "checked" : "";
String activeClass = isSelected ? "active" : "";
%>
<oneit:skin tagName="layout_row">
<oneit:layout_field width="2">
<input type="radio" name="<%= optionKey %>" id="<%= hiringTeamTypeId %>" class="element_rating_radio" value="<%= hiringTeamType.getName() %>" <%= selected%>>
<label for="<%= hiringTeamTypeId %>">
<oneit:toString value="<%= hiringTeamType %>" mode="EscapeHTML"/>
</label>
</oneit:layout_field>
</oneit:skin>
<%
}
%>
</oneit:recalcClass>
<oneit:skin tagName="layout_row">
<oneit:layout_field width="2">
<oneit:button value="Save" cssClass="btn btn-primary pull-right" name="changeCompany"
requestAttribs="<%= CollectionUtils.mapEntry("HiringTeam", hiringTeam)
.toMap() %>"/>
</oneit:layout_field>
</oneit:skin>
</oneit:layout_total>
<%@include file="/editor/footer.jsp" %>
\ No newline at end of file
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