Exemplo n.º 1
0
  /**
   * 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
Exemplo n.º 2
0
 /**
  * Set Read Only.
  *
  * @param IsReadOnly Field is read only
  */
 public void setIsReadOnly(boolean IsReadOnly) {
   set_Value("IsReadOnly", Boolean.valueOf(IsReadOnly));
 }
Exemplo n.º 3
0
 /**
  * Set Encrypted.
  *
  * @param IsEncrypted Display or Storage is encrypted
  */
 public void setIsEncrypted(boolean IsEncrypted) {
   set_Value("IsEncrypted", Boolean.valueOf(IsEncrypted));
 }
Exemplo n.º 4
0
 /**
  * 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));
 }
Exemplo n.º 5
0
 /**
  * Set Responses Accepted.
  *
  * @param IsRfQResponseAccepted Are Responses to the Request for Quotation accepted
  */
 public void setIsRfQResponseAccepted(boolean IsRfQResponseAccepted) {
   set_Value("IsRfQResponseAccepted", Boolean.valueOf(IsRfQResponseAccepted));
 }
Exemplo n.º 6
0
 /**
  * Set Processed.
  *
  * @param Processed The document has been processed
  */
 public void setProcessed(boolean Processed) {
   set_ValueNoCheck("Processed", Boolean.valueOf(Processed));
 }
Exemplo n.º 7
0
 /**
  * Set RfQ Quantity.
  *
  * @param IsRfQQty The quantity is used when generating RfQ Responses
  */
 public void setIsRfQQty(boolean IsRfQQty) {
   set_Value("IsRfQQty", Boolean.valueOf(IsRfQQty));
 }
Exemplo n.º 8
0
 /**
  * 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));
 }
Exemplo n.º 9
0
 /**
  * Set Updateable.
  *
  * @param IsUpdateable Determines, if the field can be updated
  */
 public void setIsUpdateable(boolean IsUpdateable) {
   set_Value("IsUpdateable", Boolean.valueOf(IsUpdateable));
 }
Exemplo n.º 10
0
 /**
  * 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));
 }
Exemplo n.º 11
0
 /**
  * Set Same Line.
  *
  * @param IsSameLine Displayed on same line as previous field
  */
 public void setIsSameLine(boolean IsSameLine) {
   set_Value("IsSameLine", Boolean.valueOf(IsSameLine));
 }
Exemplo n.º 12
0
 /**
  * Set Mandatory.
  *
  * @param IsMandatory Data is required in this column
  */
 public void setIsMandatory(boolean IsMandatory) {
   set_Value("IsMandatory", Boolean.valueOf(IsMandatory));
 }
Exemplo n.º 13
0
 /**
  * Set Heading only.
  *
  * @param IsHeading Field without Column - Only label is displayed
  */
 public void setIsHeading(boolean IsHeading) {
   set_Value("IsHeading", Boolean.valueOf(IsHeading));
 }
Exemplo n.º 14
0
 /**
  * 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));
 }
Exemplo n.º 15
0
 /**
  * Set Valid.
  *
  * @param IsValid Element is valid
  */
 public void setIsValid(boolean IsValid) {
   set_Value("IsValid", Boolean.valueOf(IsValid));
 }
Exemplo n.º 16
0
 /**
  * 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));
 }
Exemplo n.º 17
0
 /**
  * Set Default.
  *
  * @param IsDefault Default value
  */
 public void setIsDefault(boolean IsDefault) {
   set_Value("IsDefault", Boolean.valueOf(IsDefault));
 }
Exemplo n.º 18
0
 /**
  * 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));
 }
Exemplo n.º 19
0
 /**
  * Set Error.
  *
  * @param IsError An Error that has occurred in the execution
  */
 public void setIsError(boolean IsError) {
   set_ValueNoCheck("IsError", Boolean.valueOf(IsError));
 }
Exemplo n.º 20
0
 /**
  * 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));
 }
Exemplo n.º 21
0
 /**
  * Set Dependent Entities.
  *
  * @param IsDependentEntities Also check access in dependent entities
  */
 public void setIsDependentEntities(boolean IsDependentEntities) {
   set_Value("IsDependentEntities", Boolean.valueOf(IsDependentEntities));
 }
Exemplo n.º 22
0
 /**
  * Set Process Now.
  *
  * @param Processing Process Now
  */
 public void setProcessing(boolean Processing) {
   set_Value("Processing", Boolean.valueOf(Processing));
 }
Exemplo n.º 23
0
 /**
  * Set Fully Qualified.
  *
  * @param IsFullyQualified This account is fully qualified
  */
 public void setIsFullyQualified(boolean IsFullyQualified) {
   set_ValueNoCheck("IsFullyQualified", Boolean.valueOf(IsFullyQualified));
 }