|
||||||||||
| 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.LDAPUtilsVariable
This class defines a variable that provides the capability to perform various tasks that can be helpful when interacting with a directory server. Those tasks are made available through the following methods:
| Field Summary | |
static java.lang.String |
CREATE_ORG_ENTRY_METHOD_NAME
The name of the method that creates an organization entry. |
static int |
CREATE_ORG_ENTRY_METHOD_NUMBER
The methodNumber for the "createOrgEntry" method. |
static java.lang.String |
CREATE_ORG_UNIT_ENTRY_METHOD_NAME
The name of the method that creates an organizationalUnit entry. |
static int |
CREATE_ORG_UNIT_ENTRY_METHOD_NUMBER
The method number for the "createOrgUnitEntry" method. |
static java.lang.String |
CREATE_TEMPLATE_ENTRY_METHOD_NAME
The name of the method that creates a new template-based entry. |
static int |
CREATE_TEMPLATE_ENTRY_METHOD_NUMBER
The method number for the "createTemplateEntry" method. |
static java.lang.String |
CREATE_USER_ENTRY_METHOD_NAME
The name of the method that creates a new user entry. |
static int |
CREATE_USER_ENTRY_METHOD_NUMBER
The method number for the "createUserEntry" method. |
static Method[] |
LDAP_UTILS_VARIABLE_METHODS
The set of methods that are defined for "ldaputils" variables. |
static java.lang.String |
LDAP_UTILS_VARIABLE_TYPE
The name that will be used for the data type of LDAP utiliy variables. |
static java.lang.String |
LOAD_TEMPLATE_FILE_URL_METHOD_NAME
The name of the method that reads the template file. |
static int |
LOAD_TEMPLATE_FILE_URL_METHOD_NUMBER
The method number for the "loadTemplateFileURL" method. |
static java.lang.String |
ORG_TEMPLATE_NAME
The name of the template that will be used for creating organization entries. |
static java.lang.String |
ORG_UNIT_TEMPLATE_NAME
The name of the template that will be used for creating organizationalUnit entries. |
static java.lang.String |
USER_TEMPLATE_NAME
The name of the template that will be used for creating user entries. |
| Constructor Summary | |
LDAPUtilsVariable()
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. |
|
| Method Summary | |
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. |
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. |
| 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_UTILS_VARIABLE_TYPE
public static final java.lang.String CREATE_ORG_ENTRY_METHOD_NAME
public static final int CREATE_ORG_ENTRY_METHOD_NUMBER
public static final java.lang.String CREATE_ORG_UNIT_ENTRY_METHOD_NAME
public static final int CREATE_ORG_UNIT_ENTRY_METHOD_NUMBER
public static final java.lang.String CREATE_TEMPLATE_ENTRY_METHOD_NAME
public static final int CREATE_TEMPLATE_ENTRY_METHOD_NUMBER
public static final java.lang.String CREATE_USER_ENTRY_METHOD_NAME
public static final int CREATE_USER_ENTRY_METHOD_NUMBER
public static final java.lang.String LOAD_TEMPLATE_FILE_URL_METHOD_NAME
public static final int LOAD_TEMPLATE_FILE_URL_METHOD_NUMBER
public static final java.lang.String ORG_TEMPLATE_NAME
public static final java.lang.String ORG_UNIT_TEMPLATE_NAME
public static final java.lang.String USER_TEMPLATE_NAME
public static final Method[] LDAP_UTILS_VARIABLE_METHODS
| Constructor Detail |
public LDAPUtilsVariable()
Class.newInstance(), and only when
setName() is called after that to set the name.
| Method Detail |
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 | |||||||||