@ ReadOperation public List < ConfigurationMetadataSearchResult > search ( @ Selector final String name ) { val allProps = repository . getRepository ( ) . getAllProperties ( ) ; if ( StringUtils . isNotBlank ( name ) && RegexUtils . isValidRegex ( name ) ) { val names = StreamSupport . stream ( RelaxedPropertyNames . forCamelCase ( name ) . spliterator ( ) , false ) . map ( Object :: toString ) . collect ( Collectors . joining ( "|" ) ) ; val pattern = RegexUtils . createPattern ( names ) ; return allProps . entrySet ( ) . stream ( ) . filter ( propEntry -> RegexUtils . find ( pattern , propEntry . getKey ( ) ) ) . map ( propEntry -> new ConfigurationMetadataSearchResult ( propEntry . getValue ( ) , repository ) ) . sorted ( ) . collect ( Collectors . toList ( ) ) ; } return new ArrayList <> ( ) ; }
Search for property .