| | |
| | | * |
| | | * |
| | | * Copyright 2006-2008 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014 ForgeRock AS |
| | | */ |
| | | package org.opends.server.util.args; |
| | | import org.opends.messages.Message; |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | | |
| | | |
| | | |
| | |
| | | import java.util.LinkedHashMap; |
| | | |
| | | import static org.opends.messages.UtilityMessages.*; |
| | | import org.opends.messages.MessageBuilder; |
| | | import org.forgerock.i18n.LocalizableMessageBuilder; |
| | | import static org.opends.server.util.StaticUtils.*; |
| | | |
| | | |
| | |
| | | * be displayed in usage information, or |
| | | * <CODE>null</CODE> if this argument does not |
| | | * require a value. |
| | | * @param description Message for the description of this |
| | | * @param description LocalizableMessage for the description of this |
| | | * argument. |
| | | * |
| | | * @throws ArgumentException If there is a problem with any of the |
| | |
| | | */ |
| | | public FileBasedArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | Message valuePlaceholder, |
| | | Message description) |
| | | LocalizableMessage valuePlaceholder, |
| | | LocalizableMessage description) |
| | | throws ArgumentException |
| | | { |
| | | super(name, shortIdentifier, longIdentifier, isRequired, false, true, |
| | |
| | | * @param propertyName The name of the property in a property file that |
| | | * may be used to override the default value but |
| | | * will be overridden by a command-line argument. |
| | | * @param description Message for the description of this |
| | | * @param description LocalizableMessage for the description of this |
| | | * argument. |
| | | * |
| | | * @throws ArgumentException If there is a problem with any of the |
| | |
| | | */ |
| | | public FileBasedArgument(String name, Character shortIdentifier, |
| | | String longIdentifier, boolean isRequired, |
| | | boolean isMultiValued, Message valuePlaceholder, |
| | | boolean isMultiValued, LocalizableMessage valuePlaceholder, |
| | | String defaultValue, String propertyName, |
| | | Message description) |
| | | LocalizableMessage description) |
| | | throws ArgumentException |
| | | { |
| | | super(name, shortIdentifier, longIdentifier, isRequired, isMultiValued, |
| | |
| | | * <CODE>false</CODE> if it is not. |
| | | */ |
| | | public boolean valueIsAcceptable(String valueString, |
| | | MessageBuilder invalidReason) |
| | | LocalizableMessageBuilder invalidReason) |
| | | { |
| | | // First, make sure that the specified file exists. |
| | | File valueFile; |