Class StoredProcedureRequestDecorator
- java.lang.Object
-
- org.apache.directory.api.ldap.codec.api.MessageDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.RequestDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator<M>
-
- org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator<Q>
-
- org.apache.directory.api.ldap.codec.decorators.ExtendedRequestDecorator<StoredProcedureRequest>
-
- org.apache.directory.api.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureRequestDecorator
-
- All Implemented Interfaces:
Asn1Object
,Decorator<StoredProcedureRequest>
,StoredProcedureRequest
,AbandonableRequest
,ExtendedRequest
,Message
,Request
,ResultResponseRequest
,SingleReplyRequest
public class StoredProcedureRequestDecorator extends ExtendedRequestDecorator<StoredProcedureRequest> implements StoredProcedureRequest
A Decorator for stored procedure extended operation requests.- Author:
- Apache Directory Project
-
-
Field Summary
-
Fields inherited from interface org.apache.directory.api.ldap.extras.extended.storedProcedure.StoredProcedureRequest
EXTENSION_OID
-
-
Constructor Summary
Constructors Constructor Description StoredProcedureRequestDecorator(LdapApiService codec)
Create a new StoredProcedureRequestDecorator instanceStoredProcedureRequestDecorator(LdapApiService codec, StoredProcedureRequest decoratedRequest)
Create a new StoredProcedureRequestDecorator instance
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addParameter(Object type, Object value)
Adds the parameter.void
addParameter(StoredProcedureParameter parameter)
Adds a parameterStoredProcedureParameter
getCurrentParameter()
Class<?>
getJavaParameterType(int index)
Gets the java parameter type.Object
getJavaParameterValue(int index)
Gets the java parameter value.String
getLanguage()
Gets the language.List<StoredProcedureParameter>
getParameters()
Object
getParameterType(int index)
Gets the parameter type.Object
getParameterValue(int index)
Gets the parameter value.byte[]
getProcedure()
String
getProcedureSpecification()
Gets the procedure specification.byte[]
getRequestValue()
Gets the Extended request payloadvoid
setCurrentParameter(StoredProcedureParameter currentParameter)
Sets the current parametervoid
setLanguage(String language)
Sets the language.void
setProcedure(byte[] procedure)
void
setRequestValue(byte[] payload)
sets the Extended request payloadint
size()
Size.String
toString()
Returns the StoredProcedure string-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ExtendedRequestDecorator
addAllControls, addControl, computeLength, encode, getRequestName, removeControl, setMessageId, setRequestName
-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.SingleReplyRequestDecorator
abandon, addAbandonListener, getResponseType, isAbandoned
-
Methods inherited from class org.apache.directory.api.ldap.codec.decorators.ResultResponseRequestDecorator
getResultResponse, hasResponse
-
Methods inherited from class org.apache.directory.api.ldap.codec.api.MessageDecorator
get, getCodecService, getControl, getControls, getControlsLength, getCurrentControl, getDecorated, getDecorator, getMessageId, getMessageLength, getType, hasControl, put, setControlsLength, setMessageLength
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ExtendedRequest
addAllControls, addControl, getRequestName, removeControl, setMessageId, setRequestName
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Message
get, getControl, getControls, getMessageId, getType, hasControl, put
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.Request
hasResponse
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.ResultResponseRequest
getResultResponse
-
Methods inherited from interface org.apache.directory.api.ldap.model.message.SingleReplyRequest
getResponseType
-
-
-
-
Constructor Detail
-
StoredProcedureRequestDecorator
public StoredProcedureRequestDecorator(LdapApiService codec)
Create a new StoredProcedureRequestDecorator instance- Parameters:
codec
- The LDAP API service to use
-
StoredProcedureRequestDecorator
public StoredProcedureRequestDecorator(LdapApiService codec, StoredProcedureRequest decoratedRequest)
Create a new StoredProcedureRequestDecorator instance- Parameters:
codec
- The LDAP API service to usedecoratedRequest
- The decorated request
-
-
Method Detail
-
getCurrentParameter
public StoredProcedureParameter getCurrentParameter()
- Returns:
- The current parameter
-
setCurrentParameter
public void setCurrentParameter(StoredProcedureParameter currentParameter)
Sets the current parameter- Parameters:
currentParameter
- The current parameter
-
toString
public String toString()
Returns the StoredProcedure string- Overrides:
toString
in classMessageDecorator<StoredProcedureRequest>
- Returns:
- The StoredProcedure string
-
setProcedure
public void setProcedure(byte[] procedure)
- Specified by:
setProcedure
in interfaceStoredProcedureRequest
- Parameters:
procedure
- The procedure's bytecode
-
setRequestValue
public void setRequestValue(byte[] payload)
sets the Extended request payload- Overrides:
setRequestValue
in classExtendedRequestDecorator<StoredProcedureRequest>
- Parameters:
payload
- The extended payload
-
getRequestValue
public byte[] getRequestValue()
Gets the Extended request payload- Overrides:
getRequestValue
in classExtendedRequestDecorator<StoredProcedureRequest>
- Returns:
- The extended payload
-
getLanguage
public String getLanguage()
Gets the language.- Specified by:
getLanguage
in interfaceStoredProcedureRequest
- Returns:
- the language
-
setLanguage
public void setLanguage(String language)
Sets the language.- Specified by:
setLanguage
in interfaceStoredProcedureRequest
- Parameters:
language
- the new language
-
getProcedureSpecification
public String getProcedureSpecification()
Gets the procedure specification.- Specified by:
getProcedureSpecification
in interfaceStoredProcedureRequest
- Returns:
- the procedure specification
-
size
public int size()
Size.- Specified by:
size
in interfaceStoredProcedureRequest
- Returns:
- the procedure's bytcode size
-
getParameterType
public Object getParameterType(int index)
Gets the parameter type.- Specified by:
getParameterType
in interfaceStoredProcedureRequest
- Parameters:
index
- the index- Returns:
- the parameter type
-
getJavaParameterType
public Class<?> getJavaParameterType(int index)
Gets the java parameter type.- Specified by:
getJavaParameterType
in interfaceStoredProcedureRequest
- Parameters:
index
- the index- Returns:
- the java parameter type
-
getParameterValue
public Object getParameterValue(int index)
Gets the parameter value.- Specified by:
getParameterValue
in interfaceStoredProcedureRequest
- Parameters:
index
- the index- Returns:
- the parameter value
-
getJavaParameterValue
public Object getJavaParameterValue(int index)
Gets the java parameter value.- Specified by:
getJavaParameterValue
in interfaceStoredProcedureRequest
- Parameters:
index
- the index- Returns:
- the java parameter value
-
addParameter
public void addParameter(Object type, Object value)
Adds the parameter.- Specified by:
addParameter
in interfaceStoredProcedureRequest
- Parameters:
type
- the typevalue
- the value
-
getProcedure
public byte[] getProcedure()
- Specified by:
getProcedure
in interfaceStoredProcedureRequest
- Returns:
- The byte[] containing the procedure's bytecode
-
getParameters
public List<StoredProcedureParameter> getParameters()
- Specified by:
getParameters
in interfaceStoredProcedureRequest
- Returns:
- The list of parameters for this stored procedure
-
addParameter
public void addParameter(StoredProcedureParameter parameter)
Adds a parameter- Specified by:
addParameter
in interfaceStoredProcedureRequest
- Parameters:
parameter
- The parameter to add
-
-