/** * Set Environment key to value * * @param key variable name ('#' will be converted to '_') * @param stringValue try to convert to Object */ public void setEnvironment(String key, String stringValue) { if (key == null || key.length() == 0) return; // log.fine( "Scriptlet.setEnvironment " + key, stringValue); if (stringValue == null) { m_ctx.remove(key); return; } // Boolean if (stringValue.equals("Y")) { m_ctx.put(convertKey(key), Boolean.valueOf(true)); return; } if (stringValue.equals("N")) { m_ctx.put(convertKey(key), Boolean.valueOf(false)); return; } // Timestamp Timestamp timeValue = null; try { timeValue = Timestamp.valueOf(stringValue); m_ctx.put(convertKey(key), timeValue); return; } catch (Exception e) { } // Numeric Integer intValue = null; try { intValue = Integer.valueOf(stringValue); } catch (NumberFormatException e) { } Double doubleValue = null; try { doubleValue = Double.valueOf(stringValue); } catch (NumberFormatException e) { } if (doubleValue != null) { if (intValue != null) { double di = Double.parseDouble(intValue.toString()); // the numbers are the same -> integer if (Double.compare(di, doubleValue.doubleValue()) == 0) { m_ctx.put(convertKey(key), intValue); return; } } m_ctx.put(convertKey(key), doubleValue); return; } if (intValue != null) { m_ctx.put(convertKey(key), intValue); return; } m_ctx.put(convertKey(key), stringValue); } // SetEnvironment
/** * Set Read Only. * * @param IsReadOnly Field is read only */ public void setIsReadOnly(boolean IsReadOnly) { set_Value("IsReadOnly", Boolean.valueOf(IsReadOnly)); }
/** * Set Encrypted. * * @param IsEncrypted Display or Storage is encrypted */ public void setIsEncrypted(boolean IsEncrypted) { set_Value("IsEncrypted", Boolean.valueOf(IsEncrypted)); }
/** * Set Exclude. * * @param IsExclude Exclude access to the data - if not selected Include access to the data */ public void setIsExclude(boolean IsExclude) { set_Value("IsExclude", Boolean.valueOf(IsExclude)); }
/** * Set Responses Accepted. * * @param IsRfQResponseAccepted Are Responses to the Request for Quotation accepted */ public void setIsRfQResponseAccepted(boolean IsRfQResponseAccepted) { set_Value("IsRfQResponseAccepted", Boolean.valueOf(IsRfQResponseAccepted)); }
/** * Set Processed. * * @param Processed The document has been processed */ public void setProcessed(boolean Processed) { set_ValueNoCheck("Processed", Boolean.valueOf(Processed)); }
/** * Set RfQ Quantity. * * @param IsRfQQty The quantity is used when generating RfQ Responses */ public void setIsRfQQty(boolean IsRfQQty) { set_Value("IsRfQQty", Boolean.valueOf(IsRfQQty)); }
/** * Set Quote All Quantities. * * @param IsQuoteAllQty Suppliers are requested to provide responses for all quantities */ public void setIsQuoteAllQty(boolean IsQuoteAllQty) { set_Value("IsQuoteAllQty", Boolean.valueOf(IsQuoteAllQty)); }
/** * Set Updateable. * * @param IsUpdateable Determines, if the field can be updated */ public void setIsUpdateable(boolean IsUpdateable) { set_Value("IsUpdateable", Boolean.valueOf(IsUpdateable)); }
/** * Set Purchase Quantity. * * @param IsPurchaseQty This quantity is used in the Purchase Order to the Supplier */ public void setIsPurchaseQty(boolean IsPurchaseQty) { set_Value("IsPurchaseQty", Boolean.valueOf(IsPurchaseQty)); }
/** * Set Same Line. * * @param IsSameLine Displayed on same line as previous field */ public void setIsSameLine(boolean IsSameLine) { set_Value("IsSameLine", Boolean.valueOf(IsSameLine)); }
/** * Set Mandatory. * * @param IsMandatory Data is required in this column */ public void setIsMandatory(boolean IsMandatory) { set_Value("IsMandatory", Boolean.valueOf(IsMandatory)); }
/** * Set Heading only. * * @param IsHeading Field without Column - Only label is displayed */ public void setIsHeading(boolean IsHeading) { set_Value("IsHeading", Boolean.valueOf(IsHeading)); }
/** * Set Import Error Message. * * @param I_ErrorMsg Messages generated from import process */ public void setI_ErrorMsg(boolean I_ErrorMsg) { set_Value("I_ErrorMsg", Boolean.valueOf(I_ErrorMsg)); }
/** * Set Valid. * * @param IsValid Element is valid */ public void setIsValid(boolean IsValid) { set_Value("IsValid", Boolean.valueOf(IsValid)); }
/** * Set Invited Vendors Only. * * @param IsInvitedVendorsOnly Only invited vendors can respond to an RfQ */ public void setIsInvitedVendorsOnly(boolean IsInvitedVendorsOnly) { set_Value("IsInvitedVendorsOnly", Boolean.valueOf(IsInvitedVendorsOnly)); }
/** * Set Default. * * @param IsDefault Default value */ public void setIsDefault(boolean IsDefault) { set_Value("IsDefault", Boolean.valueOf(IsDefault)); }
/** * Set Quote Total Amt. * * @param IsQuoteTotalAmt The response can have just the total amount for the RfQ */ public void setIsQuoteTotalAmt(boolean IsQuoteTotalAmt) { set_Value("IsQuoteTotalAmt", Boolean.valueOf(IsQuoteTotalAmt)); }
/** * Set Error. * * @param IsError An Error that has occurred in the execution */ public void setIsError(boolean IsError) { set_ValueNoCheck("IsError", Boolean.valueOf(IsError)); }
/** * Set Self-Service. * * @param IsSelfService This is a Self-Service entry or this entry can be changed via Self-Service */ public void setIsSelfService(boolean IsSelfService) { set_Value("IsSelfService", Boolean.valueOf(IsSelfService)); }
/** * Set Dependent Entities. * * @param IsDependentEntities Also check access in dependent entities */ public void setIsDependentEntities(boolean IsDependentEntities) { set_Value("IsDependentEntities", Boolean.valueOf(IsDependentEntities)); }
/** * Set Process Now. * * @param Processing Process Now */ public void setProcessing(boolean Processing) { set_Value("Processing", Boolean.valueOf(Processing)); }
/** * Set Fully Qualified. * * @param IsFullyQualified This account is fully qualified */ public void setIsFullyQualified(boolean IsFullyQualified) { set_ValueNoCheck("IsFullyQualified", Boolean.valueOf(IsFullyQualified)); }