Package org.sourceid.saml20.adapter.gui
Class FilterableSelectionFieldDescriptor
- java.lang.Object
-
- org.sourceid.saml20.adapter.gui.FieldDescriptor
-
- org.sourceid.saml20.adapter.gui.FilterableSelectionFieldDescriptor
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
AuthnSourceSelectionFieldDescriptor,ConnectionSelectionFieldDescriptor,OAuthClientSelectionFieldDescriptor,OAuthScopeSelectionFieldDescriptor,PingOneEnvironmentFieldDescriptor,PolicyContractFieldDescriptor
public abstract class FilterableSelectionFieldDescriptor extends FieldDescriptor
An abstract base type for describing PingFederate administration console GUI fields that show a dropdown that can be filtered with user input.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classFilterableSelectionFieldDescriptor.FilterableSelectionFieldDefaultValidatorstatic classFilterableSelectionFieldDescriptor.QueryParamAdmin API query string to be added to the corresponding Admin API call as defined in SearchableType.static classFilterableSelectionFieldDescriptor.SearchableTypeA SearchableType class defines the Admin API attributes and end-point used to query data.static classFilterableSelectionFieldDescriptor.SearchableTypeConfigWrapper object of SearchableType (for specifying Admin API end-point) and list of QueryParam (for specifying query strings)-
Nested classes/interfaces inherited from class org.sourceid.saml20.adapter.gui.FieldDescriptor
FieldDescriptor.FieldValidationWrapper
-
-
Field Summary
Fields Modifier and Type Field Description static StringSELECTED_VALUE_DELIMITERstatic StringSTORAGE_KEY_DELIMITER
-
Constructor Summary
Constructors Constructor Description FilterableSelectionFieldDescriptor(String name, String description)Creates a new FilterableSelectionFieldDescriptor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description StringgetFormattedValue(String value)Gets the formatted value, by default returns the same string value returned by getSelectedDisplayName.abstract List<FilterableSelectionFieldDescriptor.SearchableTypeConfig>getSearchableTypes()Gets the list of search type configurations of a FilterableSelectionFieldDescriptor instance.StringgetSelectedDisplayName(String valueForStorage)Gets the display string value of a stored value returned by parseSelectedValueForStorage.booleanisValidFormat(String selectedTypeAndId)Validates the format of a selectedTypeAndId string.StringparseSelectedValueForStorage(String selectedValue)Parses the selected value of the filterable drop-down menu for storage.-
Methods inherited from class org.sourceid.saml20.adapter.gui.FieldDescriptor
addValidator, addValidator, getDefaultForLegacyConfig, getDefaultValue, getDescription, getLabel, getName, getValidationChain, isHidden, setDefaultForLegacyConfig, setDefaultValue, setHidden, setLabel
-
-
-
-
Field Detail
-
SELECTED_VALUE_DELIMITER
public static final String SELECTED_VALUE_DELIMITER
- See Also:
- Constant Field Values
-
STORAGE_KEY_DELIMITER
public static final String STORAGE_KEY_DELIMITER
- See Also:
- Constant Field Values
-
-
Method Detail
-
isValidFormat
public final boolean isValidFormat(String selectedTypeAndId)
Validates the format of a selectedTypeAndId string. Invalid strings are ignored by the UI.- Parameters:
selectedTypeAndId- a string to be checked on to see if it contains both valid search type and object id information- Returns:
trueif the specified selectedTypeAndId is of a valid format, i.e. '[Search Type]-[Object id]'
-
getSearchableTypes
public abstract List<FilterableSelectionFieldDescriptor.SearchableTypeConfig> getSearchableTypes()
Gets the list of search type configurations of a FilterableSelectionFieldDescriptor instance.- Returns:
- a list of search type configuration supported by this filterable selection field descriptor
-
parseSelectedValueForStorage
public String parseSelectedValueForStorage(String selectedValue)
Parses the selected value of the filterable drop-down menu for storage.- Parameters:
selectedValue- selected value of the filterable drop-down menu, following the format "[search type tab title]-[selected entry ID]"NOTE: The search type tab title part is only useful when the filterable selection field descriptor implementation supports multiple search types, so for implementation that supports only one search type, the tab title may be parsed out and discarded. For example, for the selected value, 'OAuth Clients-sampleOAuthClient', where 'OAuth Clients' is the search type tab title and 'sampleOAuthClient' is the unique OAuth client ID that may be used to retrieve an OAuth client data object from a data store, a FilterableSelectionFieldDescriptor implementation that only supports searches over OAuth clients may have no reason to keep track of the search type, so the tab title 'OAuth Clients' may be discarded.- Returns:
- parsed string value based on the selectedValue to be used when the selected value is saved
-
getSelectedDisplayName
public String getSelectedDisplayName(String valueForStorage)
Gets the display string value of a stored value returned by parseSelectedValueForStorage.For example, when a unique OAuth client ID is returned by parseSelectedValueForStorage, instead of using the client ID as the display string, a FilterableSelectionFieldDescriptor implementation may opt to display the corresponding client name of client ID instead, possibly obtained through data store query.- Parameters:
valueForStorage- typically an unique ID of a data object, e.g. a connection (system) ID, an adapter ID, or an OAuth client ID etc.- Returns:
- drop-down box display value for the selected item
-
getFormattedValue
public String getFormattedValue(String value)
Gets the formatted value, by default returns the same string value returned by getSelectedDisplayName.- Overrides:
getFormattedValuein classFieldDescriptor- Parameters:
value- typically an unique ID of a data object, e.g. a connection ID, an adapter ID, or an OAuth client ID etc.- Returns:
- string value returned by getSelectedDisplayName
-
-