Search in sources :

Example 1 with ExtendedRequestImpl

use of org.apache.directory.api.ldap.model.message.ExtendedRequestImpl in project directory-ldap-api by apache.

the class DefaultLdapCodecService method newExtendedRequest.

/**
 * {@inheritDoc}
 */
@Override
public ExtendedRequest newExtendedRequest(String oid, byte[] value) {
    ExtendedRequest req;
    ExtendedOperationFactory extendedRequestFactory = extendedOperationFactories.get(oid);
    if (extendedRequestFactory != null) {
        req = extendedRequestFactory.newRequest(value);
    } else {
        ExtendedRequestDecorator<ExtendedRequest> decorator = new ExtendedRequestDecorator(this, new ExtendedRequestImpl());
        decorator.setRequestName(oid);
        decorator.setRequestValue(value);
        req = decorator;
    }
    return req;
}
Also used : ExtendedRequestDecorator(org.apache.directory.api.ldap.codec.decorators.ExtendedRequestDecorator) ExtendedRequestImpl(org.apache.directory.api.ldap.model.message.ExtendedRequestImpl) ExtendedOperationFactory(org.apache.directory.api.ldap.codec.api.ExtendedOperationFactory) ExtendedRequest(org.apache.directory.api.ldap.model.message.ExtendedRequest)

Aggregations

ExtendedOperationFactory (org.apache.directory.api.ldap.codec.api.ExtendedOperationFactory)1 ExtendedRequestDecorator (org.apache.directory.api.ldap.codec.decorators.ExtendedRequestDecorator)1 ExtendedRequest (org.apache.directory.api.ldap.model.message.ExtendedRequest)1 ExtendedRequestImpl (org.apache.directory.api.ldap.model.message.ExtendedRequestImpl)1