|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
com.sas.prompts.definitions.DataSourceColumnDefinition
public class DataSourceColumnDefinition
DataSourceColumnDefinition is a prompt type which allows the specification of one or more columns from a physical table or DataItems from an InformationMap registered in metadata.
Field Summary | |
---|---|
static java.lang.String |
RB_KEY
|
Fields inherited from interface com.sas.prompts.definitions.SelectableDefinitionInterface |
---|
MULTIPLE_SELECTION, ORDERED_MULTIPLE_SELECTION, SINGLE_SELECTION |
Constructor Summary | |
---|---|
DataSourceColumnDefinition()
Constructor |
|
DataSourceColumnDefinition(java.lang.String promptName)
Constructor |
Method Summary | |
---|---|
void |
configureAttributes(java.util.Map<java.lang.String,?> options,
java.util.Map<java.lang.String,?> context)
|
long |
getAllowedColumnTypes()
Returns a long with bit flags set to indicate what types of columns or DataItems are allowed. |
long |
getAllowedDataSourceTypes()
Returns either a long containing bit flags representing the allowed data source types or null. |
java.util.List |
getAttributeDescriptors(java.util.Locale locale)
|
protected java.util.Map<java.lang.String,java.lang.String> |
getConstraints(java.util.Locale locale)
|
java.util.List |
getDataSources()
Returns a List of data sources to allow the selection of columns or DataItems from. |
int |
getMaximumValueCount()
Returns the maximum number of values the user is allowed to select. |
int |
getMinimumValueCount()
Returns the minimum number of values the user is allowed to select. |
com.sas.datatypes.DataTypeInterface |
getPromptDataType()
Returns an instance of com.sas.datatypes.DataSourceColumnType or com.sas.datatypes.CollectionType that can be used to process values for this prompt. |
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. |
int |
getSelectionType()
Returns the type of selection that the prompt supports. |
boolean |
isAllowMultipleDataSources()
Returns whether items can be specified from multiple data sources at the same time or if all items must be from the same data source. |
boolean |
isDataSourceTypeAllowed(long dataSourceType)
Returns true if the specified data source type is allowed |
boolean |
isPromptValueValid(java.lang.Object value,
java.util.Locale locale)
Returns whether the value passed in meets the constraints of the prompt definition. |
boolean |
isRequired()
Returns whether the user will be required to enter a value for this prompt before continuing in the application |
boolean |
isSelectionOrdered()
Returns whether the values the user selects should be ordered. |
void |
setAllowedColumnTypes(long allowedColumnTypes)
Sets a long with bit flags set to indicate what types of columns or DataItems are allowed. |
void |
setAllowedDataSourceTypes(long allowedDataSourceTypes)
Sets a long containing bit flags representing the allowed data source types or null. |
void |
setAllowMultipleDataSources(boolean allowMultipleDataSources)
Sets whether items can be specified from multiple data sources at the same time or if all items must be from the same data source. |
void |
setDataSources(java.util.List dataSources)
Sets a List of data sources to allow the selection of columns or DataItems from. |
void |
setMaximumValueCount(int maximumValueCount)
Sets the maximum number of valid values for a prompt. |
void |
setMinimumValueCount(int minimumValueCount)
Sets the minimum number of valid values for a prompt. |
void |
setSelectionOrdered(boolean selectionOrdered)
Sets whether the order in which values are selected should be retained. |
java.util.Collection<ValidationEntry> |
validateDefinition(java.util.Locale locale)
This method is used to validate that the various attributes of the definition all contain valid values. |
boolean |
validIndividualValue(java.lang.Object value)
Return whether the value passed in is valid according to the current constraints. |
boolean |
validIndividualValue(java.lang.Object value,
java.util.Locale locale)
|
Methods inherited from interface com.sas.prompts.definitions.PromptDefinitionInterface |
---|
clearDefaultValue, getDefaultValue, getPromptDescription, getPromptDescriptions, getPromptLabel, getPromptLabels, getPromptName, getUserInfo, isDefaultValueSet, isFixed, isHidden, isPromptValueValid |
Field Detail |
---|
public static final java.lang.String RB_KEY
Constructor Detail |
---|
public DataSourceColumnDefinition()
public DataSourceColumnDefinition(java.lang.String promptName)
promptName
- The name of the prompt.Method Detail |
---|
public boolean isRequired()
isRequired
in interface PromptDefinitionInterface
isRequired
in class PromptDefinition
PromptDefinitionInterface.isRequired()
public boolean validIndividualValue(java.lang.Object value)
validIndividualValue
in interface SelectableDefinitionInterface
value
- The value to validate
public boolean isPromptValueValid(java.lang.Object value, java.util.Locale locale)
isPromptValueValid
in interface com.sas.prompts.definitions.PromptDefinitionV2Interface
isPromptValueValid
in class PromptDefinition
PromptDefinitionV2Interface.isPromptValueValid(java.lang.Object, java.util.Locale)
public java.util.Collection<ValidationEntry> getPromptValueValidationErrors(java.lang.Object value, java.util.Locale locale)
ValidationEntry
objects or an empty
collection if no errors were found.
getPromptValueValidationErrors
in interface PromptDefinitionInterface
getPromptValueValidationErrors
in class PromptDefinition
value
- The value to check for errorslocale
- The locale to return the error messages in
ValidationEntry
objects or an empty
collection if no errors were found.PromptDefinitionInterface.getPromptValueValidationErrors(Object, Locale)
public java.util.Collection<ValidationEntry> validateDefinition(java.util.Locale locale)
ValidationEntry
objects
for each error. This method should be called before the definition is to be used.
Subclasses should override this method to return the appropriate validation errors.
validateDefinition
in interface PromptDefinitionInterface
validateDefinition
in class PromptDefinition
locale
- Locale
ValidationEntry
objects or an empty
collection if no errors were found.PromptDefinitionInterface.validateDefinition(Locale)
public com.sas.datatypes.DataTypeInterface getPromptDataType()
getPromptDataType
in interface PromptDefinitionInterface
getPromptDataType
in class PromptDefinition
PromptDefinitionInterface.getPromptDataType()
public long getAllowedDataSourceTypes()
getAllowedDataSourceTypes
in interface com.sas.prompts.definitions.DataSourceColumnDefinitionInterface
public void setAllowedDataSourceTypes(long allowedDataSourceTypes)
setAllowedDataSourceTypes
in interface com.sas.prompts.definitions.MutableDataSourceColumnDefinitionInterface
allowedDataSourceTypes
- either a long containing bit flags representing the allowed data source types
or nullpublic boolean isDataSourceTypeAllowed(long dataSourceType)
dataSourceType
- the data source type to check
public java.util.List getDataSources()
getDataSources
in interface com.sas.prompts.definitions.DataSourceColumnDefinitionInterface
public void setDataSources(java.util.List dataSources)
setDataSources
in interface com.sas.prompts.definitions.MutableDataSourceColumnDefinitionInterface
dataSources
- a List of data sources to allow the selection of columns or DataItems from.public long getAllowedColumnTypes()
getAllowedColumnTypes
in interface com.sas.prompts.definitions.DataSourceColumnDefinitionInterface
public void setAllowedColumnTypes(long allowedColumnTypes)
setAllowedColumnTypes
in interface com.sas.prompts.definitions.MutableDataSourceColumnDefinitionInterface
allowedColumnTypes
- a long with bit flags set to indicate what types of columns or DataItems are allowed.public void setAllowMultipleDataSources(boolean allowMultipleDataSources)
setAllowMultipleDataSources
in interface com.sas.prompts.definitions.MutableDataSourceColumnDefinitionInterface
allowMultipleDataSources
- whether items can be specified from multiple data sources at the same time or if all items
must be from the same data source.public boolean isAllowMultipleDataSources()
isAllowMultipleDataSources
in interface com.sas.prompts.definitions.DataSourceColumnDefinitionInterface
public int getMaximumValueCount()
SelectableDefinitionInterface
getMaximumValueCount
in interface SelectableDefinitionInterface
public int getMinimumValueCount()
SelectableDefinitionInterface
getMinimumValueCount
in interface SelectableDefinitionInterface
public int getSelectionType()
SelectableDefinitionInterface
getSelectionType
in interface SelectableDefinitionInterface
public boolean isSelectionOrdered()
SelectableDefinitionInterface
isSelectionOrdered
in interface SelectableDefinitionInterface
public void setMaximumValueCount(int maximumValueCount)
MutableSelectableDefinitionInterface
setMaximumValueCount
in interface MutableSelectableDefinitionInterface
maximumValueCount
- the maximum number of valid values for a prompt.public void setMinimumValueCount(int minimumValueCount)
MutableSelectableDefinitionInterface
setMinimumValueCount
in interface MutableSelectableDefinitionInterface
minimumValueCount
- the minimum number of valid values for a prompt.public void setSelectionOrdered(boolean selectionOrdered)
MutableSelectableDefinitionInterface
setSelectionOrdered
in interface MutableSelectableDefinitionInterface
selectionOrdered
- whether the order in which values are selected should be retained.public void configureAttributes(java.util.Map<java.lang.String,?> options, java.util.Map<java.lang.String,?> context)
configureAttributes
in interface com.sas.util.AttributeConfigurationInterface
configureAttributes
in class PromptDefinition
public java.util.List getAttributeDescriptors(java.util.Locale locale)
getAttributeDescriptors
in interface com.sas.util.AttributeDescription
getAttributeDescriptors
in class PromptDefinition
protected java.util.Map<java.lang.String,java.lang.String> getConstraints(java.util.Locale locale)
getConstraints
in class PromptDefinition
public boolean validIndividualValue(java.lang.Object value, java.util.Locale locale)
|
Components |
|
| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |