Class BasicKeyInfoGeneratorFactory.BasicKeyInfoGenerator

    • Constructor Detail

      • BasicKeyInfoGenerator

        protected BasicKeyInfoGenerator​(@Nonnull
                                        BasicKeyInfoGeneratorFactory.BasicOptions newOptions,
                                        @Nullable
                                        Class<? extends KeyInfo> type)
        Constructor.
        Parameters:
        newOptions - the options to be used by the generator
        type - the type of element to produce
    • Method Detail

      • buildKeyInfo

        protected KeyInfo buildKeyInfo()
                                throws SecurityException
        Build a new KeyInfo instance.

        The exact element type is determined by keyInfoType which was supplied at factory construction.

        Returns:
        a new KeyInfo instance
        Throws:
        SecurityException - if class type can not be mapped to an element QName
      • classToElementName

        @Nullable
        protected QName classToElementName​(@Nonnull
                                           Class<? extends KeyInfo> type)
        Map the specified KeyInfo type to an element QName.

        Subclasses may override to implement new types or custom mappings.

        Parameters:
        type - the KeyInfo element type
        Returns:
        the mapped element name
      • processKeyNames

        protected void processKeyNames​(@Nonnull
                                       KeyInfo keyInfo,
                                       @Nonnull
                                       Credential credential)
        Process the values of Credential.getKeyNames().
        Parameters:
        keyInfo - the KeyInfo that is being built
        credential - the Credential that is geing processed
      • processEntityID

        protected void processEntityID​(@Nonnull
                                       KeyInfo keyInfo,
                                       @Nonnull
                                       Credential credential)
        Process the value of Credential.getEntityId().
        Parameters:
        keyInfo - the KeyInfo that is being built
        credential - the Credential that is geing processed