Package org.sourceid.saml20.adapter.gui
Class OAuthClientSelectionFieldDescriptor
java.lang.Object
org.sourceid.saml20.adapter.gui.FieldDescriptor
org.sourceid.saml20.adapter.gui.FilterableSelectionFieldDescriptor
org.sourceid.saml20.adapter.gui.OAuthClientSelectionFieldDescriptor
- All Implemented Interfaces:
Serializable
A filterable dropdown control that enables the selection of an OAuth client
in a way that's user friendly and scalable.
- Since:
- 9.1
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumdefine the set of fields that may be filterable in a searchstatic enumUsed in the constructor of OAuthClientSelectionFieldDescriptor to specify grant type requirement of OAuth clients that are searchable in the resulting filterable drop-down menu.Nested classes/interfaces inherited from class org.sourceid.saml20.adapter.gui.FilterableSelectionFieldDescriptor
FilterableSelectionFieldDescriptor.FilterableSelectionFieldDefaultValidator, FilterableSelectionFieldDescriptor.QueryParam, FilterableSelectionFieldDescriptor.SearchableType, FilterableSelectionFieldDescriptor.SearchableTypeConfigNested classes/interfaces inherited from class org.sourceid.saml20.adapter.gui.FieldDescriptor
FieldDescriptor.FieldValidationWrapper -
Field Summary
Fields inherited from class org.sourceid.saml20.adapter.gui.FilterableSelectionFieldDescriptor
SELECTED_VALUE_DELIMITER, STORAGE_KEY_DELIMITER -
Constructor Summary
ConstructorsConstructorDescriptionOAuthClientSelectionFieldDescriptor(String name, String description, List<OAuthClientSelectionFieldDescriptor.GrantType> includeGrantTypeList) Creates a new OAuthClientSelectionFieldDescriptor. -
Method Summary
Modifier and TypeMethodDescriptiongetFormattedValue(String value) Gets the formatted value, by default returns the same string value returned by getSelectedDisplayName.Gets the list of search type configurations of a FilterableSelectionFieldDescriptor instance.getSelectedDisplayName(String valueForStorage) Gets the display string value of a stored value returned by parseSelectedValueForStorage.parseSelectedValueForStorage(String selectedValue) Parses the selected value of the filterable drop-down menu for storage.Methods inherited from class org.sourceid.saml20.adapter.gui.FilterableSelectionFieldDescriptor
isValidFormatMethods inherited from class org.sourceid.saml20.adapter.gui.FieldDescriptor
addValidator, addValidator, getDefaultForLegacyConfig, getDefaultValue, getDescription, getLabel, getName, getValidationChain, isHidden, setDefaultForLegacyConfig, setDefaultValue, setHidden, setLabel
-
Constructor Details
-
OAuthClientSelectionFieldDescriptor
public OAuthClientSelectionFieldDescriptor(String name, String description, List<OAuthClientSelectionFieldDescriptor.GrantType> includeGrantTypeList) Creates a new OAuthClientSelectionFieldDescriptor.- Parameters:
name- the field namedescription- a helpful description of the fieldincludeGrantTypeList- a list of grant types to restrict searchable clients in the resulting filterable drop-down menuNOTE: An OAuth client is included in the search space of the filterable drop-down menu if and only if it supports at least one of the grant types specified in this list. If the list is empty, all clients are included.
-
-
Method Details
-
parseSelectedValueForStorage
Description copied from class:FilterableSelectionFieldDescriptorParses the selected value of the filterable drop-down menu for storage.- Overrides:
parseSelectedValueForStoragein classFilterableSelectionFieldDescriptor- 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
Description copied from class:FilterableSelectionFieldDescriptorGets 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.- Overrides:
getSelectedDisplayNamein classFilterableSelectionFieldDescriptor- 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
Description copied from class:FilterableSelectionFieldDescriptorGets the formatted value, by default returns the same string value returned by getSelectedDisplayName.- Overrides:
getFormattedValuein classFilterableSelectionFieldDescriptor- 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
-
getSearchableTypes
Description copied from class:FilterableSelectionFieldDescriptorGets the list of search type configurations of a FilterableSelectionFieldDescriptor instance.- Specified by:
getSearchableTypesin classFilterableSelectionFieldDescriptor- Returns:
- a list of search type configuration supported by this filterable selection field descriptor
-
getIncludeGrantTypeSet
-