001/* 002 * Licensed to the Apache Software Foundation (ASF) under one 003 * or more contributor license agreements. See the NOTICE file 004 * distributed with this work for additional information 005 * regarding copyright ownership. The ASF licenses this file 006 * to you under the Apache License, Version 2.0 (the 007 * "License"); you may not use this file except in compliance 008 * with the License. You may obtain a copy of the License at 009 * 010 * https://www.apache.org/licenses/LICENSE-2.0 011 * 012 * Unless required by applicable law or agreed to in writing, 013 * software distributed under the License is distributed on an 014 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 015 * KIND, either express or implied. See the License for the 016 * specific language governing permissions and limitations 017 * under the License. 018 * 019 */ 020package org.apache.directory.api.ldap.extras.extended.endTransaction; 021 022 023import org.apache.directory.api.ldap.model.message.ExtendedRequest; 024 025 026/** 027 * The EndTransactionRequest interface. This is for the RFC 5805 End Transaction Request, 028 * which grammar is : 029 * <pre> 030 * ExtendedRequest ::= [APPLICATION 23] SEQUENCE { 031 * requestName [0] LDAPOID, 032 * requestValue [1] OCTET STRING OPTIONAL } 033 * </pre> 034 * 035 * where 'requestName' is 1.3.6.1.1.21.3 and requestValue is a BER encoded value. The 036 * syntax for this value is : 037 * 038 * <pre> 039 * txnEndReq ::= SEQUENCE { 040 * commit BOOLEAN DEFAULT TRUE, 041 * identifier OCTET STRING } 042 * </pre> 043 * 044 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a> 045 */ 046public interface EndTransactionRequest extends ExtendedRequest 047{ 048 /** The OID for the EndTransaction extended operation request. */ 049 String EXTENSION_OID = "1.3.6.1.1.21.3"; 050 051 /** 052 * @return <tt>true</tt> if the operation should be committed, <tt>false</tt> otherwise 053 */ 054 boolean getCommit(); 055 056 057 /** 058 * Set the Commit flag for this transaction. 059 * 060 * @param commit <tt>true</tt> if the transaction should be committed, <tt>false</tt> if 061 * it should be rollbacked. 062 */ 063 void setCommit( boolean commit ); 064 065 066 /** 067 * @return The transaction ID 068 */ 069 byte[] getTransactionId(); 070 071 /** 072 * Set the transaction ID to commit or rollback 073 * 074 * @param transactionId The transaction ID we got from the startTransaction response 075 */ 076 void setTransactionId( byte[] transactionId ); 077}