/* * Copyright (C) 2005-2012 BetaCONCEPT Limited * * This file is part of Astroboa. * * Astroboa is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * Astroboa is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with Astroboa. If not, see <http://www.gnu.org/licenses/>. */ package org.betaconceptframework.astroboa.api.model.definition; import java.util.Locale; /** * Definition for a simple property whose type is {@link Double}. * * <p> * Astroboa implementation uses an XML Schema <code>element</code> whose * <code>type</code> is XML schema * <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#double">double</a> or * <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#float">float</a> or * <a href="http://www.w3.org/TR/2001/REC-xmlschema-2-20010502/#decimal">decimal</a> * data type to describe simple property of type {@link Double}. * </p> * * <p> * The following example defines a simple property named <code>price</code> which is * optional, single valued and of type {@link Double} with <code>25.1</code> * as default value. Also its label for {@link Locale#ENGLISH English} * locale is <code>Product price</code>. * * <pre> * <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> * ... * <xs:element {@link CmsDefinition#getName() name}="price" {@link CmsPropertyDefinition#isMandatory() minOccurs}="0" {@link CmsPropertyDefinition#isMultiple() maxOccurs}="1" * {@link CmsDefinition#getValueType() type}="xs:double" {@link SimpleCmsPropertyDefinition#getDefaultValue() default}="25.1"> * <{@link LocalizableCmsDefinition xs:annotation}> * <xs:documentation xml:lang="en">Product price</xs:documentation> * </xs:annotation> * </xs:element> * ... * </xs:schema> * </pre> * * </p> * * @author Gregory Chomatas (gchomatas@betaconcept.com) * @author Savvas Triantafyllou (striantafyllou@betaconcept.com) * */ public interface DoublePropertyDefinition extends SimpleCmsPropertyDefinition<Double> { /** * Get min allowed value * * @return The minimum (inclusive) value or {@link Double#MIN_VALUE} */ Double getMinValue(); /** * Get min allowed value * * @return The minimum (inclusive) value or {@link Double#MAX_VALUE} */ Double getMaxValue(); }