Package org.ldaptive.handler
Class CaseChangeEntryHandler
java.lang.Object
org.ldaptive.AbstractFreezable
org.ldaptive.handler.AbstractEntryHandler
org.ldaptive.handler.CaseChangeEntryHandler
- All Implemented Interfaces:
Function<LdapEntry,,LdapEntry> Freezable,LdapEntryHandler
Provides the ability to modify the case of search entry DNs, attribute names, and attribute values.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classCase change entry handler builder.static enumEnum to define the type of case change. -
Field Summary
FieldsModifier and TypeFieldDescriptionType of case modification to make to the attribute names.private String[]Attribute names to modify.Type of case modification to make to the attributes values.Type of case modification to make to the entry DN.private static final inthash code seed.Fields inherited from class org.ldaptive.handler.AbstractEntryHandler
logger -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.CaseChangeEntryHandler(CaseChangeEntryHandler.CaseChange dnChange, CaseChangeEntryHandler.CaseChange attrNameChange, CaseChangeEntryHandler.CaseChange attrValueChange, String... attrNames) Creates a new case change entry handler. -
Method Summary
Modifier and TypeMethodDescriptionbuilder()Creates a builder for this class.booleanReturns the attribute name case change.String[]Returns the attribute names.Returns the attribute value case change.Returns the DN case change.protected StringhandleAttributeName(String name) Returns the supplied attribute name unaltered.protected voidhandleAttributes(LdapEntry entry) Handle the attributes of a search entry.protected StringhandleAttributeValue(String value) Returns the supplied attribute value unaltered.protected StringHandle the dn of a search entry.inthashCode()voidSets the attribute name case change.voidsetAttributeNames(String... names) Sets the attribute names.voidSets the attribute value case change.voidSets the DN case change.toString()Methods inherited from class org.ldaptive.handler.AbstractEntryHandler
handleAttribute, handleAttributeValue, handleEntryMethods inherited from class org.ldaptive.AbstractFreezable
assertMutable, freeze, freeze, freeze, isFrozen
-
Field Details
-
HASH_CODE_SEED
private static final int HASH_CODE_SEEDhash code seed.- See Also:
-
dnCaseChange
Type of case modification to make to the entry DN. -
attributeNameCaseChange
Type of case modification to make to the attribute names. -
attributeValueCaseChange
Type of case modification to make to the attributes values. -
attributeNames
Attribute names to modify.
-
-
Constructor Details
-
CaseChangeEntryHandler
public CaseChangeEntryHandler()Default constructor. -
CaseChangeEntryHandler
public CaseChangeEntryHandler(CaseChangeEntryHandler.CaseChange dnChange, CaseChangeEntryHandler.CaseChange attrNameChange, CaseChangeEntryHandler.CaseChange attrValueChange, String... attrNames) Creates a new case change entry handler.- Parameters:
dnChange- to apply to entry DNattrNameChange- to apply to attribute namesattrValueChange- to apply to attribute valuesattrNames- to apply these changes to
-
-
Method Details
-
getDnCaseChange
Returns the DN case change.- Returns:
- case change
-
setDnCaseChange
Sets the DN case change.- Parameters:
cc- case change
-
getAttributeNameCaseChange
Returns the attribute name case change.- Returns:
- case change
-
setAttributeNameCaseChange
Sets the attribute name case change.- Parameters:
cc- case change
-
getAttributeValueCaseChange
Returns the attribute value case change.- Returns:
- case change
-
setAttributeValueCaseChange
Sets the attribute value case change.- Parameters:
cc- case change
-
getAttributeNames
Returns the attribute names.- Returns:
- attribute names
-
setAttributeNames
Sets the attribute names.- Parameters:
names- of the attributes
-
apply
-
handleDn
Description copied from class:AbstractEntryHandlerHandle the dn of a search entry.- Overrides:
handleDnin classAbstractEntryHandler- Parameters:
entry- search entry to extract the dn from- Returns:
- handled dn
-
handleAttributes
Description copied from class:AbstractEntryHandlerHandle the attributes of a search entry.- Overrides:
handleAttributesin classAbstractEntryHandler- Parameters:
entry- search entry to extract the attributes from
-
handleAttributeName
Description copied from class:AbstractEntryHandlerReturns the supplied attribute name unaltered.- Overrides:
handleAttributeNamein classAbstractEntryHandler- Parameters:
name- to handle- Returns:
- handled name
-
handleAttributeValue
Description copied from class:AbstractEntryHandlerReturns the supplied attribute value unaltered.- Overrides:
handleAttributeValuein classAbstractEntryHandler- Parameters:
value- to handle- Returns:
- handled value
-
equals
- Overrides:
equalsin classAbstractEntryHandler
-
hashCode
public int hashCode()- Specified by:
hashCodein classAbstractEntryHandler
-
toString
-
builder
Creates a builder for this class.- Returns:
- new builder
-