com.sas.prompts.definitions
Class BaseFileDefinition

com.sas.prompts.definitions.BaseFileDefinition
All Implemented Interfaces:
com.sas.models.VersionInterface, FileSelectionInterface, com.sas.prompts.definitions.HintableDefinitionInterface, com.sas.prompts.definitions.HintableDefinitionV2Interface, MutableFileSelectionInterface, com.sas.prompts.definitions.MutableHintableDefinitionInterface, com.sas.prompts.definitions.MutableHintableDefinitionV2Interface, com.sas.prompts.definitions.MutablePromptDefinitionInterface, com.sas.prompts.definitions.MutablePromptDefinitionV2Interface, com.sas.prompts.definitions.MutablePromptDefinitionV3Interface, PromptDefinitionInterface, com.sas.prompts.definitions.PromptDefinitionV2Interface, com.sas.prompts.definitions.PromptDefinitionV3Interface, com.sas.prompts.IdentifiablePromptInterface, com.sas.prompts.MutableIdentifiablePromptInterface, com.sas.prompts.MutablePromptHelpInterface, com.sas.prompts.PromptHelpInterface, com.sas.PublicClonable, com.sas.storage.editableproperties.LocalizableProperties, com.sas.storage.editableproperties.MultiLocaleProperties, com.sas.storage.editableproperties.SubstitutionProperties, com.sas.uiconfig.ContextEnabledObject, com.sas.util.AttributeConfigurationInterface, com.sas.util.AttributeDescription, com.sas.util.log.ComponentLogFactoryInterface, com.sas.util.macrovar.MacroVariableOptionInterface, com.sas.util.macrovar.MutableMacroVariableOptionInterface, com.sas.util.ResourceReferencesInterface, com.sas.util.xmlpersist.PersistenceInterface, java.io.Externalizable, java.io.Serializable, java.lang.Cloneable
Direct Known Subclasses:
InputFileDefinition, OutputFileDefinition

public abstract class BaseFileDefinition
implements MutableFileSelectionInterface, com.sas.storage.editableproperties.SubstitutionProperties

Base class for prompts which allow the user to specify a file location.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface com.sas.prompts.definitions.FileSelectionInterface
DIRECTORIES_ONLY, FILES_AND_DIRECTORIES, FILES_ONLY
 
Fields inherited from interface com.sas.prompts.definitions.PromptDefinitionInterface
PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM, PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM_DECIMAL_PLACES, PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM_LINES, PROMPT_VALIDATION_ERROR_ABOVE_MAXIMUM_VALUE_COUNT, PROMPT_VALIDATION_ERROR_BELOW_MINIMUM, PROMPT_VALIDATION_ERROR_BELOW_MINIMUM_LENGTH, PROMPT_VALIDATION_ERROR_BELOW_MINIMUM_VALUE_COUNT, PROMPT_VALIDATION_ERROR_DATA_SOURCE_COLUMN_TYPE_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_DATA_SOURCE_CONTAINS_NO_DATA_ITEMS, PROMPT_VALIDATION_ERROR_DATA_SOURCE_NOT_AVAILABLE, PROMPT_VALIDATION_ERROR_DATA_SOURCE_TYPE_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_EMPTY_STATIC_LIST_AND_REQUIRED_WITH_NO_ADDITIONAL_VALUES_ALLOWED, PROMPT_VALIDATION_ERROR_ERROR_LOADING_SHARED_PROMPT, PROMPT_VALIDATION_ERROR_FILE_TYPE_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_FROM_SCRIPT, PROMPT_VALIDATION_ERROR_INCORRECT_RELATIVE_DATE_VALUE, PROMPT_VALIDATION_ERROR_INPUT_DOES_NOT_MATCH_PATTERN, PROMPT_VALIDATION_ERROR_INVALID_INPUT_PATTERN, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_ABOVE_MAXIMUM, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_ABOVE_UPPER_RANGE_VALUE, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_BELOW_MINIMUM, PROMPT_VALIDATION_ERROR_LOWER_RANGE_VALUE_BELOW_MINIMUM_LENGTH, PROMPT_VALIDATION_ERROR_MASKED_HIDDEN_REQUIRED, PROMPT_VALIDATION_ERROR_MAX_DECIMAL_PLACES_ABOVE_MAX_PERCISION, PROMPT_VALIDATION_ERROR_MAXIMUM_LENGTH_BELOW_ZERO, PROMPT_VALIDATION_ERROR_MIN_DECIMAL_PLACES_ABOVE_MAX_PERCISION, PROMPT_VALIDATION_ERROR_MINIMUM_ABOVE_MAXIMUM, PROMPT_VALIDATION_ERROR_MINIMUM_ABOVE_MAXIMUM_DECIMAL_PLACES, PROMPT_VALIDATION_ERROR_MINIMUM_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_MINIMUM_ABOVE_MAXIMUM_VALUE_COUNT, PROMPT_VALIDATION_ERROR_MINIMUM_LENGTH_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_MINIMUM_LENGTH_BELOW_ZERO, PROMPT_VALIDATION_ERROR_MORE_THAN_ONE_SPECIAL_VALUE_SPECIFIED, PROMPT_VALIDATION_ERROR_MULTIPLE_DATA_SOURCES_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_NO_DATA_SOURCE, PROMPT_VALIDATION_ERROR_NON_EDITABLE_REQUIRED_WITH_NO_DEFAULT_NOT_ALLOWED, PROMPT_VALIDATION_ERROR_NOT_VALID_OBJECT, PROMPT_VALIDATION_ERROR_ONLY_DIRECTORIES_ALLOWED, PROMPT_VALIDATION_ERROR_ONLY_FILES_ALLOWED, PROMPT_VALIDATION_ERROR_PERIOD_ENDS_200_YEARS_AHEAD, PROMPT_VALIDATION_ERROR_PERIOD_STARTS_200_YEARS_AGO, PROMPT_VALIDATION_ERROR_SPECIAL_VALUE_MIXED_WITH_OTHER_VALUES, PROMPT_VALIDATION_ERROR_STATIC_VALUE_INVALID, PROMPT_VALIDATION_ERROR_UPPER_RANGE_VALUE_ABOVE_MAXIMUM, PROMPT_VALIDATION_ERROR_UPPER_RANGE_VALUE_ABOVE_MAXIMUM_LENGTH, PROMPT_VALIDATION_ERROR_UPPER_RANGE_VALUE_BELOW_MINIMUM, PROMPT_VALIDATION_ERROR_UPPER_RANGE_VALUE_BELOW_MINIMUM_LENGTH, PROMPT_VALIDATION_NO_ERRORS
 
Constructor Summary
BaseFileDefinition()
          Constructor
BaseFileDefinition(java.lang.String promptName)
          Constructor
 
Method Summary
 void configureAttributes(java.util.Map<java.lang.String,?> options, java.util.Map<java.lang.String,?> context)
           
 java.util.List getAttributeDescriptors(java.util.Locale locale)
           
 int getFileSelectionMode()
          Returns the selection mode of the prompt.
 java.util.List<java.lang.String> getFileTypes()
          Returns the list of file types to allow the user to select from.
 java.lang.String getLogicalServerName()
          Returns the logical name of the server that files can be specified from.
 java.util.Collection<ValidationEntry> getPromptValueValidationErrors(java.lang.Object value, java.util.Locale locale)
          Returns a Collection containing the set of ValidationEntry objects or an empty collection if no errors were found.
 boolean isPromptValueValid(java.lang.Object value, java.util.Locale locale)
          Returns whether the specified value is valid for the configuration of the prompt.
 boolean isRequired()
          Returns whether the user will be required to enter a value for this prompt before continuing in the application
 void setFileSelectionMode(int fileSelectionMode)
          Sets the selection mode of the prompt.
 void setFileTypes(java.util.List<java.lang.String> fileTypes)
          Sets the list of file types to allow the user to select from.
 void setLogicalServerName(java.lang.String logicalServerName)
          Sets the logical name of the server that files can be specified from.
 void setRequired(boolean required)
          Sets whether the user will be required to enter a value for this prompt before continuing in the application
 
Methods inherited from class com.sas.prompts.definitions.PromptDefinition
addUserInfo, clearDefaultValue, getApplicationContext, getConstraints, getCustomErrorMessage, getCustomErrorMessages, getDefaultValue, getDependentPromptsForAttributes, getHint, getHintPlacement, getHints, getInlineHint, getInlineHints, getLabelPlacement, getLocalizableProperties, getMutableUserInfo, getPromptDataType, getPromptDescription, getPromptDescriptions, getPromptHelp, getPromptID, getPromptLabel, getPromptLabels, getPromptName, getScript, getScripts, getUIConfiguration, getUserInfo, getUserInfoAsText, getVersion, isDefaultValueSet, isDisplayDefaultValueAsBlank, isFixed, isHidden, isPromptValueValid, isValueClearedForNonSelectedModalChoiceGroup, removeScript, removeUserInfo, setAdditionalCascadeDependencies, setApplicationContext, setCustomErrorMessage, setCustomErrorMessages, setDefaultValue, setDependentPromptsForAttributes, setDisplayDefaultValueAsBlank, setFixed, setHidden, setHint, setHintPlacement, setHints, setInlineHint, setInlineHints, setLabelPlacement, setLocalizableProperties, setPromptDescription, setPromptDescriptions, setPromptHelp, setPromptLabel, setPromptLabels, setPromptName, setScript, setUIConfiguration, setUserInfo, setValueClearedForNonSelectedModalChoiceGroup, toString, validateDefinition
 

Constructor Detail

BaseFileDefinition

public BaseFileDefinition()
Constructor


BaseFileDefinition

public BaseFileDefinition(java.lang.String promptName)
Constructor

Parameters:
promptName - The name of the prompt
Method Detail

isRequired

public boolean isRequired()
Returns whether the user will be required to enter a value for this prompt before continuing in the application

Specified by:
isRequired in interface PromptDefinitionInterface
Specified by:
isRequired in class PromptDefinition
Returns:
whether the user will be required to enter a value for this prompt before continuing in the application
See Also:
PromptDefinitionInterface.isRequired()

setRequired

public void setRequired(boolean required)
Sets whether the user will be required to enter a value for this prompt before continuing in the application

Parameters:
required - whether the user will be required to enter a value for this prompt before continuing in the application

isPromptValueValid

public boolean isPromptValueValid(java.lang.Object value,
                                  java.util.Locale locale)
Returns whether the specified value is valid for the configuration of the prompt. To be valid, the value must either be null or a valid FileLocationInterface.

Specified by:
isPromptValueValid in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
Overrides:
isPromptValueValid in class PromptDefinition
Parameters:
value - The value to check for validity
Returns:
whether the specified value is valid for the configuration of the prompt.
See Also:
PromptDefinitionInterface.isPromptValueValid(Object)

getPromptValueValidationErrors

public java.util.Collection<ValidationEntry> getPromptValueValidationErrors(java.lang.Object value,
                                                                            java.util.Locale locale)
Returns a Collection containing the set of ValidationEntry objects or an empty collection if no errors were found.

Specified by:
getPromptValueValidationErrors in interface PromptDefinitionInterface
Overrides:
getPromptValueValidationErrors in class PromptDefinition
Parameters:
value - The value to check for errors
locale - The locale to return the error messages in
Returns:
A Collection containing the set of ValidationEntry objects or an empty collection if no errors were found.
See Also:
PromptDefinitionInterface.getPromptValueValidationErrors(Object, Locale)

getLogicalServerName

public java.lang.String getLogicalServerName()
Returns the logical name of the server that files can be specified from.

Specified by:
getLogicalServerName in interface FileSelectionInterface
Returns:
the logical name of the server that files can be specified from.
See Also:
FileSelectionInterface.getLogicalServerName()

setLogicalServerName

public void setLogicalServerName(java.lang.String logicalServerName)
Sets the logical name of the server that files can be specified from. param logicalServerName the logical name of the server that files can be specified from.

Specified by:
setLogicalServerName in interface MutableFileSelectionInterface
Parameters:
logicalServerName - the name of the logical server
See Also:
MutableFileSelectionInterface.setLogicalServerName(String)

getFileTypes

public java.util.List<java.lang.String> getFileTypes()
Returns the list of file types to allow the user to select from.

Specified by:
getFileTypes in interface FileSelectionInterface
Returns:
the list of file types to allow the user to select from.
See Also:
FileSelectionInterface.getFileTypes()

setFileTypes

public void setFileTypes(java.util.List<java.lang.String> fileTypes)
Sets the list of file types to allow the user to select from.

Specified by:
setFileTypes in interface MutableFileSelectionInterface
Parameters:
fileTypes - the list of file types to allow the user to select from.
See Also:
MutableFileSelectionInterface.setFileTypes(List)

getFileSelectionMode

public int getFileSelectionMode()
Returns the selection mode of the prompt. It will be one of FILES_AND_DIRECTORIES, FILES_ONLY, DIRECTORIES_ONLY from com.sas.prompts.definitions.FileSelectionInterface

Specified by:
getFileSelectionMode in interface FileSelectionInterface
Returns:
the selection mode of the prompt
See Also:
FileSelectionInterface.getFileSelectionMode()

setFileSelectionMode

public void setFileSelectionMode(int fileSelectionMode)
Sets the selection mode of the prompt. It should be one of FILES_AND_DIRECTORIES, FILES_ONLY, DIRECTORIES_ONLY from com.sas.prompts.definitions.FileSelectionInterface

Specified by:
setFileSelectionMode in interface MutableFileSelectionInterface
Parameters:
fileSelectionMode - the new selection mode of the prompt
See Also:
MutableFileSelectionInterface.setFileSelectionMode(int)

configureAttributes

public void configureAttributes(java.util.Map<java.lang.String,?> options,
                                java.util.Map<java.lang.String,?> context)
Specified by:
configureAttributes in interface com.sas.util.AttributeConfigurationInterface
Overrides:
configureAttributes in class PromptDefinition

getAttributeDescriptors

public java.util.List getAttributeDescriptors(java.util.Locale locale)
Specified by:
getAttributeDescriptors in interface com.sas.util.AttributeDescription
Overrides:
getAttributeDescriptors in class PromptDefinition



Copyright © 2009 SAS Institute Inc. All Rights Reserved.