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     *    http://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     */
020    
021    package org.apache.directory.shared.ldap.codec.extended.operations.storedProcedure;
022    
023    
024    import org.apache.directory.shared.asn1.ber.AbstractContainer;
025    
026    
027    /**
028     * A container for the StoredProcedure codec
029     * 
030     * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
031     * @version $Rev$, $Date$, 
032     */
033    public class StoredProcedureContainer extends AbstractContainer
034    {
035        // ~ Instance fields
036        // ----------------------------------------------------------------------------
037    
038        /** StoredProcedure */
039        private StoredProcedure storedProcedure;
040    
041    
042        // ~ Constructors
043        // -------------------------------------------------------------------------------
044    
045        public StoredProcedureContainer()
046        {
047            super();
048            stateStack = new int[1];
049            grammar = StoredProcedureGrammar.getInstance();
050            states = StoredProcedureStatesEnum.getInstance();
051        }
052    
053    
054        // ~ Methods
055        // ------------------------------------------------------------------------------------
056        /**
057         * @return Returns the ldapMessage.
058         */
059        public StoredProcedure getStoredProcedure()
060        {
061            return storedProcedure;
062        }
063    
064    
065        /**
066         * Set a StoredProcedure object into the container. It will be completed by the
067         * ldapDecoder.
068         * 
069         * @param ldapMessage
070         *            The ldapMessage to set.
071         */
072        public void setStoredProcedure( StoredProcedure storedProcedure )
073        {
074            this.storedProcedure = storedProcedure;
075        }
076    
077    
078        public void clean()
079        {
080            super.clean();
081    
082            storedProcedure = null;
083        }
084    }