Search in sources :

Example 6 with CasConfigurationMetadataRepository

use of org.apereo.cas.metadata.CasConfigurationMetadataRepository 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

CasConfigurationMetadataRepository (org.apereo.cas.metadata.CasConfigurationMetadataRepository)6 lombok.val (lombok.val)3 Slf4j (lombok.extern.slf4j.Slf4j)2 StringUtils (org.apache.commons.lang3.StringUtils)2 Test (org.junit.jupiter.api.Test)2 ConfigurationMetadataProperty (org.springframework.boot.configurationmetadata.ConfigurationMetadataProperty)2 CommandMarker (org.springframework.shell.core.CommandMarker)2 CliCommand (org.springframework.shell.core.annotation.CliCommand)2 Service (org.springframework.stereotype.Service)2 Comparator (java.util.Comparator)1 HashMap (java.util.HashMap)1 LinkedHashMap (java.util.LinkedHashMap)1 Map (java.util.Map)1 ClassUtils (org.apache.commons.lang3.ClassUtils)1 EncryptionJwtSigningJwtCryptographyProperties (org.apereo.cas.configuration.model.core.util.EncryptionJwtSigningJwtCryptographyProperties)1 EncryptionRandomizedSigningJwtCryptographyProperties (org.apereo.cas.configuration.model.core.util.EncryptionRandomizedSigningJwtCryptographyProperties)1 EncodingUtils (org.apereo.cas.util.EncodingUtils)1 Base64RandomStringGenerator (org.apereo.cas.util.gen.Base64RandomStringGenerator)1 Unchecked (org.jooq.lambda.Unchecked)1 ConfigurationMetadataGroup (org.springframework.boot.configurationmetadata.ConfigurationMetadataGroup)1