예제 #1
0
  /**
   * Returns the String value of the property with passed name
   *
   * @param name
   * @return
   */
  public String getProperty(String name) {
    Set<SycamoreProperty> keys = this.properties.keySet();
    for (SycamoreProperty property : keys) {
      if (property.getDescription().equals(name)) {
        return this.getProperty(property);
      }
    }

    return null;
  }
예제 #2
0
 /**
  * Returns the boolean value of the passed property.
  *
  * @param name
  * @return
  */
 public boolean getBooleanProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     return Boolean.parseBoolean(val);
   } else {
     return Boolean.parseBoolean(property.getDefaultValue());
   }
 }
예제 #3
0
 /**
  * Returns the double value of the passed property.
  *
  * @param name
  * @return
  */
 public double getDoubleProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     return Double.parseDouble(val);
   } else {
     return Double.parseDouble(property.getDefaultValue());
   }
 }
예제 #4
0
 /**
  * Returns the float value of the passed property.
  *
  * @param name
  * @return
  */
 public float getFloatProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     return Float.parseFloat(val);
   } else {
     return Float.parseFloat(property.getDefaultValue());
   }
 }
예제 #5
0
 /**
  * Returns the String value of the passed property
  *
  * @param name
  * @return
  */
 public String getProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     return val;
   } else {
     return property.getDefaultValue();
   }
 }
예제 #6
0
 /**
  * Returns the integer value of the passed property.
  *
  * @param name
  * @return
  */
 public int getIntegerProperty(SycamoreProperty property) {
   String val = this.properties.get(property);
   if (val != null) {
     // look in properties
     return Integer.parseInt(val);
   } else {
     return Integer.parseInt(property.getDefaultValue());
   }
 }