Class DefaultConfigurableBinaryAttributeDetector
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.SchemaBinaryAttributeDetector
-
- org.apache.directory.api.ldap.codec.api.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 Summary
Fields Modifier and Type Field Description static String[]DEFAULT_BINARY_ATTRIBUTESA list of all the known binary attributes
-
Constructor Summary
Constructors Constructor Description DefaultConfigurableBinaryAttributeDetector()Creates a new instance of a ConfigurableBinaryAttributeDetector.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBinaryAttribute(String... binaryAttributes)Add some binary Attributes Id to the list of attributesbooleanisBinary(String attributeId)Returns true if the attribute specified is not human readible.voidremoveBinaryAttribute(String... binaryAttributes)Remove some binary Attributes Id from the list of attributesvoidsetBinaryAttributes(String... binaryAttributes)Inject a new set of binary attributes that will replace the old one.-
Methods inherited from class org.apache.directory.api.ldap.codec.api.SchemaBinaryAttributeDetector
setSchemaManager
-
-
-
-
Field Detail
-
DEFAULT_BINARY_ATTRIBUTES
public static final String[] DEFAULT_BINARY_ATTRIBUTES
A list of all the known binary attributes
-
-
Method Detail
-
isBinary
public boolean isBinary(String attributeId)
Returns true if the attribute specified is not human readible.- Specified by:
isBinaryin interfaceBinaryAttributeDetector- Overrides:
isBinaryin classSchemaBinaryAttributeDetector- Parameters:
attributeId- the identifier/descriptor for the attribute to be checked.- Returns:
- true if the attribute specified is not human readible, false otherwise
-
addBinaryAttribute
public void addBinaryAttribute(String... binaryAttributes)
Add some binary Attributes Id to the list of attributes- Specified by:
addBinaryAttributein interfaceConfigurableBinaryAttributeDetector- Parameters:
binaryAttributes- The added binary attributes Id
-
removeBinaryAttribute
public void removeBinaryAttribute(String... binaryAttributes)
Remove some binary Attributes Id from the list of attributes- Specified by:
removeBinaryAttributein interfaceConfigurableBinaryAttributeDetector- Parameters:
binaryAttributes- The binary attributes Id to remove
-
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:
setBinaryAttributesin interfaceConfigurableBinaryAttributeDetector- Parameters:
binaryAttributes- The new set of binary attributes
-
-