Enum AliasDerefMode
- java.lang.Object
-
- java.lang.Enum<AliasDerefMode>
-
- org.apache.directory.api.ldap.model.message.AliasDerefMode
-
- All Implemented Interfaces:
Serializable
,Comparable<AliasDerefMode>
public enum AliasDerefMode extends Enum<AliasDerefMode>
Type-safe derefAliases search parameter enumeration which determines the mode of alias handling. Note that the jndi values of these ValuedEnums correspond to the string value for the java.naming.ldap.derefAliases JNDI LDAP specific property. The integer value represents the values used in the LDAP ASN.1 for different settings.- Author:
- Apache Directory Project
-
-
Enum Constant Summary
Enum Constants Enum Constant Description DEREF_ALWAYS
Alias handling mode value that dereferences alwaysDEREF_FINDING_BASE_OBJ
Alias handling mode value that dereferences only in finding the baseDEREF_IN_SEARCHING
Alias handling mode value that dereferences only when searchingNEVER_DEREF_ALIASES
Alias handling mode value that treats aliases like entries
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static AliasDerefMode
getDerefMode(int val)
get the AliasDerefMode corresponding to the integer value passedstatic AliasDerefMode
getDerefMode(String val)
get the AliasDerefMode corresponding to the string value jndiValue passedstatic AliasDerefMode
getEnum(Map<String,Object> env)
Gets the enumeration from by extracting the value for the JNDI LDAP specific environment property, java.naming.ldap.derefAliases, from the environment.String
getJndiValue()
int
getValue()
boolean
isDerefAlways()
Checks to see if we dereference while searching and finding the base.boolean
isDerefFindingBase()
Checks to see if we dereference while finding the base.boolean
isDerefInSearching()
Checks to see if we dereference while searching.boolean
isNeverDeref()
Checks to see if we never dereference aliases.static AliasDerefMode
valueOf(String name)
Returns the enum constant of this type with the specified name.static AliasDerefMode[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NEVER_DEREF_ALIASES
public static final AliasDerefMode NEVER_DEREF_ALIASES
Alias handling mode value that treats aliases like entries
-
DEREF_IN_SEARCHING
public static final AliasDerefMode DEREF_IN_SEARCHING
Alias handling mode value that dereferences only when searching
-
DEREF_FINDING_BASE_OBJ
public static final AliasDerefMode DEREF_FINDING_BASE_OBJ
Alias handling mode value that dereferences only in finding the base
-
DEREF_ALWAYS
public static final AliasDerefMode DEREF_ALWAYS
Alias handling mode value that dereferences always
-
-
Method Detail
-
values
public static AliasDerefMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AliasDerefMode c : AliasDerefMode.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AliasDerefMode valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
getValue
public int getValue()
- Returns:
- The value associated with the current element.
-
getEnum
public static AliasDerefMode getEnum(Map<String,Object> env)
Gets the enumeration from by extracting the value for the JNDI LDAP specific environment property, java.naming.ldap.derefAliases, from the environment.- Parameters:
env
- the JNDI environment with a potential value for the java.naming.ldap.derefAliases property- Returns:
- the enumeration for the environment
-
isDerefAlways
public boolean isDerefAlways()
Checks to see if we dereference while searching and finding the base.- Returns:
- true if value is DEREF_ALWAYS, false otherwise
-
isNeverDeref
public boolean isNeverDeref()
Checks to see if we never dereference aliases.- Returns:
- true if value is NEVER_DEREF_ALIASES, false otherwise
-
isDerefInSearching
public boolean isDerefInSearching()
Checks to see if we dereference while searching.- Returns:
- true if value is DEREF_ALWAYS_VAL, or DEREF_IN_SEARCHING, and false otherwise.
-
isDerefFindingBase
public boolean isDerefFindingBase()
Checks to see if we dereference while finding the base.- Returns:
- true if value is DEREF_ALWAYS, or DEREF_FINDING_BASE_OBJ, and false otherwise.
-
getDerefMode
public static AliasDerefMode getDerefMode(int val)
get the AliasDerefMode corresponding to the integer value passed- Parameters:
val
- the AliasDerefMode's integer value- Returns:
- the AliasDerefMode whose value is equivalent to the given integer value
-
getDerefMode
public static AliasDerefMode getDerefMode(String val)
get the AliasDerefMode corresponding to the string value jndiValue passed- Parameters:
val
- the AliasDerefMode's string value- Returns:
- the AliasDerefMode whose value is equivalent to the given string value
-
getJndiValue
public String getJndiValue()
- Returns:
- The JNDI value
-
-