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 */
020package org.apache.directory.server.config.beans;
021
022
023import org.apache.directory.server.config.ConfigurationElement;
024
025
026/**
027 * A class used to store the LdapServerExtendedOpHandler configuration.
028 *
029 * @author <a href="mailto:dev@directory.apache.org">Apache Directory Project</a>
030 */
031public class ExtendedOpHandlerBean extends AdsBaseBean
032{
033    /** The Extended Operation ID */
034    @ConfigurationElement(attributeType = "ads-extendedOpId", isRdn = true)
035    private String extendedOpId;
036
037    /** The Extended Operation FQCN */
038    @ConfigurationElement(attributeType = "ads-extendedOpHandlerClass")
039    private String extendedOpHandlerClass;
040
041
042    /**
043     * Create a new LdapServerExtendedOpHandlerBean instance
044     */
045    public ExtendedOpHandlerBean()
046    {
047        super();
048    }
049
050
051    /**
052     * @return the extendedOpId
053     */
054    public String getExtendedOpId()
055    {
056        return extendedOpId;
057    }
058
059
060    /**
061     * @param extendedOpId the extendedOpId to set
062     */
063    public void setExtendedOpId( String extendedOpId )
064    {
065        this.extendedOpId = extendedOpId;
066    }
067
068
069    /**
070     * @return the ldapServerExtendedOpHandlerClass
071     */
072    public String getExtendedOpHandlerClass()
073    {
074        return extendedOpHandlerClass;
075    }
076
077
078    /**
079     * @param extendedOpHandlerClass the ExtendedOpHandlerClass to set
080     */
081    public void setExtendedOpHandlerClass( String extendedOpHandlerClass )
082    {
083        this.extendedOpHandlerClass = extendedOpHandlerClass;
084    }
085
086
087    /**
088     * {@inheritDoc}
089     */
090    public String toString( String tabs )
091    {
092        StringBuilder sb = new StringBuilder();
093
094        sb.append( tabs ).append( "Extended operation handler :\n" );
095        sb.append( tabs ).append( "  extended operation ID : " ).append( extendedOpId ).append( '\n' );
096        sb.append( tabs ).append( "  extended operation handler class : " ).append( extendedOpHandlerClass )
097            .append( '\n' );
098
099        return sb.toString();
100    }
101
102
103    /**
104     * {@inheritDoc}
105     */
106    public String toString()
107    {
108        return toString( "" );
109    }
110}