org.apache.directory.shared.ldap.extras.extended.ads_impl.storedProcedure
Class StoredProcedureRequestDecorator

java.lang.Object
  extended by org.apache.directory.shared.ldap.codec.api.MessageDecorator<M>
      extended by org.apache.directory.shared.ldap.codec.decorators.RequestDecorator<M>
          extended by org.apache.directory.shared.ldap.codec.decorators.ResultResponseRequestDecorator<M,R>
              extended by org.apache.directory.shared.ldap.codec.decorators.SingleReplyRequestDecorator<Q,P>
                  extended by org.apache.directory.shared.ldap.codec.api.ExtendedRequestDecorator<StoredProcedureRequest,StoredProcedureResponse>
                      extended by org.apache.directory.shared.ldap.extras.extended.ads_impl.storedProcedure.StoredProcedureRequestDecorator
All Implemented Interfaces:
Decorator<StoredProcedureRequest>, StoredProcedureRequest, AbandonableRequest, ExtendedRequest<StoredProcedureResponse>, Message, Request, ResultResponseRequest<StoredProcedureResponse>, SingleReplyRequest<StoredProcedureResponse>

public class StoredProcedureRequestDecorator
extends ExtendedRequestDecorator<StoredProcedureRequest,StoredProcedureResponse>
implements StoredProcedureRequest

A Decorator for stored procedure extended operation requests.

Author:
Apache Directory Project

Field Summary
 
Fields inherited from class org.apache.directory.shared.ldap.codec.api.ExtendedRequestDecorator
requestValue
 
Fields inherited from class org.apache.directory.shared.ldap.codec.api.MessageDecorator
messageLength
 
Fields inherited from interface org.apache.directory.shared.ldap.extras.extended.StoredProcedureRequest
EXTENSION_OID
 
Fields inherited from interface org.apache.directory.shared.ldap.model.message.ExtendedRequest
RESP_TYPE, TYPE
 
Constructor Summary
StoredProcedureRequestDecorator(LdapApiService codec)
           
StoredProcedureRequestDecorator(LdapApiService codec, StoredProcedureRequest decoratedRequest)
           
 
Method Summary
 void addParameter(Object type, Object value)
          
 void addParameter(StoredProcedureParameter parameter)
          
 int computeLength()
          Compute the StoredProcedure length 0x30 L1 | +--> 0x04 L2 language +--> 0x04 L3 procedure [+--> 0x30 L4 (parameters) | +--> 0x30 L5-1 (parameter) | | | +--> 0x04 L6-1 type | +--> 0x04 L7-1 value | +--> 0x30 L5-2 (parameter) | | | +--> 0x04 L6-2 type | +--> 0x04 L7-2 value | +--> ...
 ByteBuffer encode()
          Encode the StoredProcedure message to a PDU.
 StoredProcedureParameter getCurrentParameter()
           
 Class<?> getJavaParameterType(int index)
          
 Object getJavaParameterValue(int index)
          
 String getLanguage()
          
 List<StoredProcedureParameter> getParameters()
          
 Object getParameterType(int index)
          
 Object getParameterValue(int index)
          
 byte[] getProcedure()
          
 String getProcedureSpecification()
          
 byte[] getRequestValue()
          
 void setCurrentParameter(StoredProcedureParameter currentParameter)
           
 void setLanguage(String language)
          
 void setProcedure(byte[] procedure)
           
 void setRequestValue(byte[] payload)
          
 int size()
          
 String toString()
          Returns the StoredProcedure string
 
Methods inherited from class org.apache.directory.shared.ldap.codec.api.ExtendedRequestDecorator
addAllControls, addControl, encode, getExtendedRequestLength, getRequestName, getRequestNameBytes, removeControl, setExtendedRequestLength, setMessageId, setRequestName, setRequestNameBytes
 
Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.SingleReplyRequestDecorator
abandon, addAbandonListener, getResponseType, isAbandoned
 
Methods inherited from class org.apache.directory.shared.ldap.codec.decorators.ResultResponseRequestDecorator
getResultResponse, hasResponse
 
Methods inherited from class org.apache.directory.shared.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
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.ExtendedRequest
addAllControls, addControl, getRequestName, removeControl, setMessageId, setRequestName
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.SingleReplyRequest
getResponseType
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.ResultResponseRequest
getResultResponse
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.Request
hasResponse
 
Methods inherited from interface org.apache.directory.shared.ldap.model.message.Message
get, getControl, getControls, getMessageId, getType, hasControl, put
 

Constructor Detail

StoredProcedureRequestDecorator

public StoredProcedureRequestDecorator(LdapApiService codec)

StoredProcedureRequestDecorator

public StoredProcedureRequestDecorator(LdapApiService codec,
                                       StoredProcedureRequest decoratedRequest)
Method Detail

getCurrentParameter

public StoredProcedureParameter getCurrentParameter()

setCurrentParameter

public void setCurrentParameter(StoredProcedureParameter currentParameter)

computeLength

public int computeLength()
Compute the StoredProcedure length 0x30 L1 | +--> 0x04 L2 language +--> 0x04 L3 procedure [+--> 0x30 L4 (parameters) | +--> 0x30 L5-1 (parameter) | | | +--> 0x04 L6-1 type | +--> 0x04 L7-1 value | +--> 0x30 L5-2 (parameter) | | | +--> 0x04 L6-2 type | +--> 0x04 L7-2 value | +--> ... | +--> 0x30 L5-m (parameter) | +--> 0x04 L6-m type +--> 0x04 L7-m value

Specified by:
computeLength in interface Decorator<StoredProcedureRequest>
Overrides:
computeLength in class ExtendedRequestDecorator<StoredProcedureRequest,StoredProcedureResponse>

encode

public ByteBuffer encode()
                  throws EncoderException
Encode the StoredProcedure message to a PDU.

Returns:
The PDU.
Throws:
EncoderException

toString

public String toString()
Returns the StoredProcedure string

Overrides:
toString in class MessageDecorator<StoredProcedureRequest>
Returns:
The StoredProcedure string

setProcedure

public void setProcedure(byte[] procedure)
Specified by:
setProcedure in interface StoredProcedureRequest

setRequestValue

public void setRequestValue(byte[] payload)

Overrides:
setRequestValue in class ExtendedRequestDecorator<StoredProcedureRequest,StoredProcedureResponse>

getRequestValue

public byte[] getRequestValue()

Overrides:
getRequestValue in class ExtendedRequestDecorator<StoredProcedureRequest,StoredProcedureResponse>

getLanguage

public String getLanguage()

Specified by:
getLanguage in interface StoredProcedureRequest

setLanguage

public void setLanguage(String language)

Specified by:
setLanguage in interface StoredProcedureRequest

getProcedureSpecification

public String getProcedureSpecification()

Specified by:
getProcedureSpecification in interface StoredProcedureRequest

size

public int size()

Specified by:
size in interface StoredProcedureRequest

getParameterType

public Object getParameterType(int index)

Specified by:
getParameterType in interface StoredProcedureRequest

getJavaParameterType

public Class<?> getJavaParameterType(int index)

Specified by:
getJavaParameterType in interface StoredProcedureRequest

getParameterValue

public Object getParameterValue(int index)

Specified by:
getParameterValue in interface StoredProcedureRequest

getJavaParameterValue

public Object getJavaParameterValue(int index)

Specified by:
getJavaParameterValue in interface StoredProcedureRequest

addParameter

public void addParameter(Object type,
                         Object value)

Specified by:
addParameter in interface StoredProcedureRequest

getProcedure

public byte[] getProcedure()

Specified by:
getProcedure in interface StoredProcedureRequest

getParameters

public List<StoredProcedureParameter> getParameters()

Specified by:
getParameters in interface StoredProcedureRequest

addParameter

public void addParameter(StoredProcedureParameter parameter)

Specified by:
addParameter in interface StoredProcedureRequest


Copyright © 2003-2011 The Apache Software Foundation. All Rights Reserved.