Class DefaultConfigurableBinaryAttributeDetector

  • All Implemented Interfaces:
    BinaryAttributeDetector, ConfigurableBinaryAttributeDetector

    public class DefaultConfigurableBinaryAttributeDetector
    extends SchemaBinaryAttributeDetector
    implements ConfigurableBinaryAttributeDetector
    An implementation of the BinaryAttributeDetector interface. It's used on the client side to detect if an Attribute is HumanRedable.
    One can inject some new attributes, replace the existing list, remove some attributes.
    We provide a list of Attributes which are known to be binary :
    • entryACI
    • prescriptiveACI
    • subentryACI
    • audio
    • javaByteCode
    • javaClassByteCode
    • krb5key
    • m-byteCode
    • privateKey
    • publicKey
    • userPKCS12
    • userSMIMECertificate
    • cACertificate
    • userCertificate
    • authorityRevocationList
    • certificateRevocationList
    • deltaRevocationList
    • crossCertificatePair
    • personalSignature
    • photo
    • jpegPhoto
    • supportedAlgorithms

    In order to reset the detector to get back to those default value, it's enough to call the setBinaryAttributes() with null as a parameter.
    Author:
    Apache Directory Project
    • Field Detail

      • DEFAULT_BINARY_ATTRIBUTES

        public static final String[] DEFAULT_BINARY_ATTRIBUTES
        A list of all the known binary attributes
    • Constructor Detail

      • DefaultConfigurableBinaryAttributeDetector

        public DefaultConfigurableBinaryAttributeDetector()
        Creates a new instance of a ConfigurableBinaryAttributeDetector. This will load a set of default attribute ID that are known to be binary.
    • Method Detail

      • isBinary

        public boolean isBinary​(String attributeId)
        Returns true if the attribute specified is not human readible.
        Specified by:
        isBinary in interface BinaryAttributeDetector
        Overrides:
        isBinary in class SchemaBinaryAttributeDetector
        Parameters:
        attributeId - the identifier/descriptor for the attribute to be checked.
        Returns:
        true if the attribute specified is not human readible, false otherwise
      • setBinaryAttributes

        public void setBinaryAttributes​(String... binaryAttributes)
        Inject a new set of binary attributes that will replace the old one. If one inject a null set of attributes, the list of attributes will be cleared, and reset to the default list of binary attributes. If one injects an empty String array, then all the attributes will be removed from the list, and we won't inject the default attributes into it.
        Specified by:
        setBinaryAttributes in interface ConfigurableBinaryAttributeDetector
        Parameters:
        binaryAttributes - The new set of binary attributes