Search in sources :

Example 6 with ConfigurationMetadataProperty

use of org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty in project cas by apereo.

the class ListUndocumentedPropertiesCommand method listUndocumented.

/**
 * List undocumented settings.
 */
@CliCommand(value = "list-undocumented", help = "List all CAS undocumented properties.")
public void listUndocumented() {
    final CasConfigurationMetadataRepository repository = new CasConfigurationMetadataRepository();
    repository.getRepository().getAllProperties().entrySet().stream().filter(p -> p.getKey().startsWith("cas.") && (StringUtils.isBlank(p.getValue().getShortDescription()) || StringUtils.isBlank(p.getValue().getDescription()))).map(Map.Entry::getValue).sorted(Comparator.comparing(ConfigurationMetadataProperty::getId)).forEach(p -> LOGGER.info("Property: {} @ {}", p.getId(), p.getType()));
}
Also used : CasConfigurationMetadataRepository(org.apereo.cas.metadata.CasConfigurationMetadataRepository) Slf4j(lombok.extern.slf4j.Slf4j) CliCommand(org.springframework.shell.core.annotation.CliCommand) Service(org.springframework.stereotype.Service) Map(java.util.Map) Comparator(java.util.Comparator) StringUtils(org.apache.commons.lang3.StringUtils) ConfigurationMetadataProperty(org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty) CommandMarker(org.springframework.shell.core.CommandMarker) ConfigurationMetadataProperty(org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty) CasConfigurationMetadataRepository(org.apereo.cas.metadata.CasConfigurationMetadataRepository) CliCommand(org.springframework.shell.core.annotation.CliCommand)

Aggregations

ConfigurationMetadataProperty (org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty)6 Map (java.util.Map)4 Slf4j (lombok.extern.slf4j.Slf4j)4 File (java.io.File)3 List (java.util.List)3 Pattern (java.util.regex.Pattern)3 Collectors (java.util.stream.Collectors)3 StreamSupport (java.util.stream.StreamSupport)3 StringUtils (org.apache.commons.lang3.StringUtils)3 CasConfigurationMetadataRepository (org.apereo.cas.metadata.CasConfigurationMetadataRepository)3 JsonInclude (com.fasterxml.jackson.annotation.JsonInclude)2 PrettyPrinter (com.fasterxml.jackson.core.PrettyPrinter)2 TypeReference (com.fasterxml.jackson.core.type.TypeReference)2 DefaultPrettyPrinter (com.fasterxml.jackson.core.util.DefaultPrettyPrinter)2 DeserializationFeature (com.fasterxml.jackson.databind.DeserializationFeature)2 ObjectMapper (com.fasterxml.jackson.databind.ObjectMapper)2 JavaParser (com.github.javaparser.JavaParser)2 CompilationUnit (com.github.javaparser.ast.CompilationUnit)2 Modifier (com.github.javaparser.ast.Modifier)2 ClassOrInterfaceDeclaration (com.github.javaparser.ast.body.ClassOrInterfaceDeclaration)2