Class TranscodingRuleLoader


  • public class TranscodingRuleLoader
    extends Object
    A mechanism for loading a set of TranscodingRule objects from sources such as maps or directories of property files.
    • Field Detail

      • log

        @Nonnull
        private org.slf4j.Logger log
        Class logger.
      • rules

        @Nonnull
        @NonnullElements
        private final Collection<net.shibboleth.idp.attribute.transcoding.TranscodingRule> rules
        Rules loaded.
    • Constructor Detail

      • TranscodingRuleLoader

        public TranscodingRuleLoader​(@Nonnull @ParameterName(name="dir")
                                     Path dir)
                              throws IOException
        Load rules from all files found below a directory root.

        Files are assumed to be Java property files in text format.

        Individual rules that fail to load will be skipped.

        Parameters:
        dir - root to search
        Throws:
        IOException - if an error occurs
      • TranscodingRuleLoader

        public TranscodingRuleLoader​(@Nonnull @NonnullElements @ParameterName(name="maps")
                                     Collection<Map<String,​Object>> maps)
        Constructor.
        Parameters:
        maps - a collection of maps to build rules around directly.
    • Method Detail

      • getRules

        @Nonnull
        @NonnullElements
        public Collection<net.shibboleth.idp.attribute.transcoding.TranscodingRule> getRules()
        Get the rules loaded by this object.
        Returns:
        collection of rules