|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.slamd.scripting.engine.Variable
com.sun.slamd.scripting.ldap.LDAPEntryVariable
This class defines a variable intended to store an LDAP entry. LDAP entries have the following methods:
| Field Summary | |
static int |
ADD_ATTRIBUTE_1_METHOD_NUMBER
The method number for the first "addAttribute" method. |
static int |
ADD_ATTRIBUTE_2_METHOD_NUMBER
The method number for the second "addAttribute" method. |
static int |
ADD_ATTRIBUTE_3_METHOD_NUMBER
The method number for the third "addAttribute" method. |
static java.lang.String |
ADD_ATTRIBUTE_METHOD_NAME
The name of the method that will be used to add a new attribute to this entry. |
static int |
ASSIGN_1_METHOD_NUMBER
The method number for the first "assign" method. |
static int |
ASSIGN_2_METHOD_NUMBER
The method number for the second "assign" method. |
static java.lang.String |
ASSIGN_METHOD_NAME
The name of the method that will be used to initialize this entry. |
static java.lang.String |
GET_ATTRIBUTE_AT_METHOD_NAME
The name of the method that will be used to retrieve the attribute in the specified position from this entry |
static int |
GET_ATTRIBUTE_AT_METHOD_NUMBER
The method number for the "getAttributeat" method. |
static java.lang.String |
GET_ATTRIBUTE_COUNT_METHOD_NAME
The name of the method that will be used to retrieve the number of attributes stored in this entry |
static int |
GET_ATTRIBUTE_COUNT_METHOD_NUMBER
The method number for the "getAttributeCount" method. |
static java.lang.String |
GET_ATTRIBUTE_METHOD_NAME
The name of the method that will be used to retrieve the attribute with the specified name from this entry |
static int |
GET_ATTRIBUTE_METHOD_NUMBER
The method number for the "getAttribute" method. |
static java.lang.String |
GET_ATTRIBUTE_NAMES_METHOD_NAME
The name of the method that will be used to retrieve the names of the attributes stored in this entry |
static int |
GET_ATTRIBUTE_NAMES_METHOD_NUMBER
The method number for the "getAttributeNames" method. |
static java.lang.String |
GET_DN_METHOD_NAME
The name of the method that will be used to retrieve the DN for this entry. |
static int |
GET_DN_METHOD_NUMBER
The method number for the "getDN" method. |
static java.lang.String |
GET_NORMALIZED_DN_METHOD_NAME
The name of the method that will be used to retrieve the lowercase normalized DN for this entry. |
static int |
GET_NORMALIZED_DN_METHOD_NUMBER
The method number for the "getNormalizedDN" method. |
static java.lang.String |
GET_PARENT_DN_METHOD_NAME
The name of the method that will be used to retrieve the DN of this entry's parent. |
static int |
GET_PARENT_DN_METHOD_NUMBER
The method number for the "getParentDN" method. |
static java.lang.String |
GET_VALUE_METHOD_NAME
The name of the method that will be used to retrieve the value for the specified attribute. |
static int |
GET_VALUE_METHOD_NUMBER
The method number for the "getValue" method. |
static java.lang.String |
GET_VALUES_METHOD_NAME
The name of the method that will be used to retrieve the set of values for the specified attribute. |
static int |
GET_VALUES_METHOD_NUMBER
The method number for the "getValues" method. |
static java.lang.String |
HAS_ATTRIBUTE_METHOD_NAME
The name of the method that will be used to determine if this entry contains the specified attribute. |
static int |
HAS_ATTRIBUTE_METHOD_NUMBER
The method number for the "hasAttribute" method. |
static java.lang.String |
IS_NULL_METHOD_NAME
The name of the method that will be used in order to determine if this entry has not been initialized. |
static int |
IS_NULL_METHOD_NUMBER
The method number for the "isNull" method. |
static Method[] |
LDAP_ENTRY_VARIABLE_METHODS
The set of methods associated with LDAP entry variables. |
static java.lang.String |
LDAP_ENTRY_VARIABLE_TYPE
The name that will be used for the data type of LDAP entry variables. |
static java.lang.String |
NOT_NULL_METHOD_NAME
The name of the method that will be used in order to determine if this entry is not uninitialized. |
static int |
NOT_NULL_METHOD_NUMBER
The method number for the "notNull" method. |
static java.lang.String |
REMOVE_ALL_ATTRIBUTES_METHOD_NAME
The name of the method that will be used to remove all attributes from this entry |
static int |
REMOVE_ALL_ATTRIBUTES_METHOD_NUMBER
The method number for the "removeAllAttributes" method. |
static java.lang.String |
REMOVE_ATTRIBUTE_METHOD_NAME
The name of the method that will be used to remove a specified attribute from this entry |
static int |
REMOVE_ATTRIBUTE_METHOD_NUMBER
The method number for the "removeAttribute" method. |
static java.lang.String |
REPLACE_ATTRIBUTE_METHOD_NAME
The name of the method that will be used to replace an attribute in this entry |
static int |
REPLACE_ATTRIBUTE_METHOD_NUMBER
The method number for the "replaceAttribute" method. |
| Constructor Summary | |
LDAPEntryVariable()
Creates a new variable with no name, to be used only when creating a variable with Class.newInstance(), and only when
setName() is called after that to set the name. |
|
LDAPEntryVariable(netscape.ldap.LDAPEntry entry)
Creates a new LDAP entry variable base on the provided LDAPEntry object. |
|
| Method Summary | |
void |
addAttribute(LDAPAttributeVariable attribute)
Adds the specified attribute to this entry. |
void |
assign(Argument argument)
Assigns the value of the provided argument to this variable. |
Variable |
executeMethod(int lineNumber,
int methodNumber,
Argument[] arguments)
Executes the specified method, using the provided variables as arguments to the method, and makes the return value available to the caller. |
LDAPAttributeVariable |
getAttribute(java.lang.String attributeName)
Retrieves the requested attribute from this entry. |
LDAPAttributeVariable[] |
getAttributes()
Retrieves the set of attributes stored in this entry. |
java.lang.String |
getAttributeValue(java.lang.String attributeName)
Retrieves the value of the requested attribute from this entry. |
java.lang.String[] |
getAttributeValues(java.lang.String attributeName)
Retrieves the values of the requested attribute from this entry. |
java.lang.String |
getDN()
Retrieves the DN for this entry. |
netscape.ldap.LDAPAttribute[] |
getLDAPAttributes()
Retrieves the set of attributes stored in this entry as LDAPAttribute objects. |
int |
getMethodNumber(java.lang.String methodName,
java.lang.String[] argumentTypes)
Retrieves the method number for the method that has the specified name and argument types, or -1 if there is no such method. |
Method[] |
getMethods()
Retrieves a list of all methods defined for this variable. |
java.lang.String |
getReturnTypeForMethod(java.lang.String methodName,
java.lang.String[] argumentTypes)
Retrieves the return type for the method with the specified name and argument types. |
java.lang.String |
getValueAsString()
Retrieves a string representation of the value of this argument. |
java.lang.String |
getVariableTypeName()
Retrieves the name of the variable type for this variable. |
boolean |
hasMethod(java.lang.String methodName)
Indicates whether this variable type has a method with the specified name. |
void |
setAttributes(netscape.ldap.LDAPAttribute[] attributes)
Specifies the set of attributes to use for this entry. |
void |
setAttributes(LDAPAttributeVariable[] attributes)
Specifies the set of attributes to use for this entry. |
void |
setDN(java.lang.String entryDN)
Specifies the DN for this entry. |
netscape.ldap.LDAPEntry |
toLDAPEntry()
Converts this LDAP entry variable to an LDAPEntry object. |
| Methods inherited from class com.sun.slamd.scripting.engine.Variable |
getArgumentAsString, getArgumentType, getArgumentValue, getName, getStatTrackers, isValidIdentifier, setName, startStatTrackers, stopStatTrackers |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String LDAP_ENTRY_VARIABLE_TYPE
public static final java.lang.String ADD_ATTRIBUTE_METHOD_NAME
public static final int ADD_ATTRIBUTE_1_METHOD_NUMBER
public static final int ADD_ATTRIBUTE_2_METHOD_NUMBER
public static final int ADD_ATTRIBUTE_3_METHOD_NUMBER
public static final java.lang.String ASSIGN_METHOD_NAME
public static final int ASSIGN_1_METHOD_NUMBER
public static final int ASSIGN_2_METHOD_NUMBER
public static final java.lang.String GET_ATTRIBUTE_METHOD_NAME
public static final int GET_ATTRIBUTE_METHOD_NUMBER
public static final java.lang.String GET_ATTRIBUTE_AT_METHOD_NAME
public static final int GET_ATTRIBUTE_AT_METHOD_NUMBER
public static final java.lang.String GET_ATTRIBUTE_COUNT_METHOD_NAME
public static final int GET_ATTRIBUTE_COUNT_METHOD_NUMBER
public static final java.lang.String GET_ATTRIBUTE_NAMES_METHOD_NAME
public static final int GET_ATTRIBUTE_NAMES_METHOD_NUMBER
public static final java.lang.String GET_DN_METHOD_NAME
public static final int GET_DN_METHOD_NUMBER
public static final java.lang.String GET_NORMALIZED_DN_METHOD_NAME
public static final int GET_NORMALIZED_DN_METHOD_NUMBER
public static final java.lang.String GET_PARENT_DN_METHOD_NAME
public static final int GET_PARENT_DN_METHOD_NUMBER
public static final java.lang.String GET_VALUE_METHOD_NAME
public static final int GET_VALUE_METHOD_NUMBER
public static final java.lang.String GET_VALUES_METHOD_NAME
public static final int GET_VALUES_METHOD_NUMBER
public static final java.lang.String HAS_ATTRIBUTE_METHOD_NAME
public static final int HAS_ATTRIBUTE_METHOD_NUMBER
public static final java.lang.String IS_NULL_METHOD_NAME
public static final int IS_NULL_METHOD_NUMBER
public static final java.lang.String NOT_NULL_METHOD_NAME
public static final int NOT_NULL_METHOD_NUMBER
public static final java.lang.String REMOVE_ALL_ATTRIBUTES_METHOD_NAME
public static final int REMOVE_ALL_ATTRIBUTES_METHOD_NUMBER
public static final java.lang.String REMOVE_ATTRIBUTE_METHOD_NAME
public static final int REMOVE_ATTRIBUTE_METHOD_NUMBER
public static final java.lang.String REPLACE_ATTRIBUTE_METHOD_NAME
public static final int REPLACE_ATTRIBUTE_METHOD_NUMBER
public static final Method[] LDAP_ENTRY_VARIABLE_METHODS
| Constructor Detail |
public LDAPEntryVariable()
Class.newInstance(), and only when
setName() is called after that to set the name.
public LDAPEntryVariable(netscape.ldap.LDAPEntry entry)
entry - The LDAPEntry object that should be used to create this LDAP
entry variable.| Method Detail |
public netscape.ldap.LDAPEntry toLDAPEntry()
public java.lang.String getDN()
public void setDN(java.lang.String entryDN)
entryDN - The DN for this entry.public LDAPAttributeVariable[] getAttributes()
public LDAPAttributeVariable getAttribute(java.lang.String attributeName)
attributeName - The name of the attribute to be retrieved.
null if the attribute is
not defined.public java.lang.String getAttributeValue(java.lang.String attributeName)
attributeName - The name of the attribute to be retrieved.
null if the
attribute is not defined or does not have any values.public java.lang.String[] getAttributeValues(java.lang.String attributeName)
attributeName - The name of the attribute to be retrieved.
null if the
attribute is not defined.public netscape.ldap.LDAPAttribute[] getLDAPAttributes()
public void setAttributes(LDAPAttributeVariable[] attributes)
attributes - The set of attributes to use for this entry.public void setAttributes(netscape.ldap.LDAPAttribute[] attributes)
attributes - The set of attributes to use for this entry.public void addAttribute(LDAPAttributeVariable attribute)
attribute - The attribute to be added to this entry.public java.lang.String getVariableTypeName()
getVariableTypeName in class Variablepublic Method[] getMethods()
getMethods in class Variablepublic boolean hasMethod(java.lang.String methodName)
hasMethod in class VariablemethodName - The name of the method.
true if this variable has a method with the specified
name, or false if it does not.
public int getMethodNumber(java.lang.String methodName,
java.lang.String[] argumentTypes)
getMethodNumber in class VariablemethodName - The name of the method.argumentTypes - The list of argument types for the method.
public java.lang.String getReturnTypeForMethod(java.lang.String methodName,
java.lang.String[] argumentTypes)
getReturnTypeForMethod in class VariablemethodName - The name of the method.argumentTypes - The set of argument types for the method.
null if there is
no such method defined.
public Variable executeMethod(int lineNumber,
int methodNumber,
Argument[] arguments)
throws ScriptException
executeMethod in class VariablelineNumber - The line number of the script in which the method
call occurs.methodNumber - The method number of the method to execute.arguments - The set of arguments to use for the method.
null if it
does not return a value.
ScriptException - If the specified method does not exist, or if a
problem occurs while attempting to execute it.
public void assign(Argument argument)
throws ScriptException
assign in class Variableargument - The argument whose value should be assigned to this
variable.
ScriptException - If a problem occurs while performing the
assignment.public java.lang.String getValueAsString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||