/*
 *  Copyright 2004-2006 Stefan Reuter
 *
 *  Licensed under the Apache License, Version 2.0 (the "License");
 *  you may not use this file except in compliance with the License.
 *  You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 *  Unless required by applicable law or agreed to in writing, software
 *  distributed under the License is distributed on an "AS IS" BASIS,
 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 *  See the License for the specific language governing permissions and
 *  limitations under the License.
 *
 */
package org.asteriskjava.manager.event;

/**
 * Abstract base class providing common properties channel related events.
 * 
 * @author srt
 * @version $Id$
 */
public abstract class AbstractChannelEvent extends ManagerEvent
{
    /**
     * Serializable version identifier.
     */
    static final long serialVersionUID = 5906599407896179295L;

    /**
     * The name of the channel.
     */
    private String channel;

    /**
     * This Caller*ID Number of the channel.
     */
    private String callerIdNum;

    /**
     * The Caller*ID Name of the channel.
     */
    private String callerIdName;

    /**
     * The unique id of the channel.
     */
    private String uniqueId;

    protected AbstractChannelEvent(Object source)
    {
        super(source);
    }

    /**
     * Returns the name of the channel.
     * 
     * @return the name of the channel.
     */
    public final String getChannel()
    {
        return channel;
    }

    public final void setChannel(String channel)
    {
        this.channel = channel;
    }

    /**
     * Returns the unique id of the channel.
     * 
     * @return the unique id of the channel.
     */
    public final String getUniqueId()
    {
        return uniqueId;
    }

    public final void setUniqueId(String uniqueId)
    {
        this.uniqueId = uniqueId;
    }

    /**
     * Returns the Caller*ID of the channel if set or <code>null</code> if none has been set.
     *
     * @return the Caller*ID
     * @deprecated
     * @see #getCallerIdNum()
     */
    @Deprecated public final String getCallerId()
    {
        return callerIdNum;
    }

    /**
     * Sets the Caller*ID of the channel.
     * 
     * @param callerId the Caller*ID of the channel.
     * @deprecated
     */
    @Deprecated public final void setCallerId(String callerId)
    {
        this.callerIdNum = callerId;
    }

    /**
     * Returns the Caller*ID number of the channel if set or <code>null</code> if none has been set.
     *
     * @return the Caller*ID number
     * @since 0.3
     */
    public final String getCallerIdNum()
    {
        return callerIdNum;
    }

    public final void setCallerIdNum(String callerIdNum)
    {
        this.callerIdNum = callerIdNum;
    }

    /**
     * Returns the Caller*ID Name of the channel if set or <code>null</code> if none has been set.
     * 
     * @return the Caller*ID Name of the channel.
     */
    public final String getCallerIdName()
    {
        return callerIdName;
    }

    public final void setCallerIdName(String callerIdName)
    {
        this.callerIdName = callerIdName;
    }
}

@@ -1300,16 +1300,225 @@
 queId;%0A%0A
+    /**%0A     * Old callerIdNum now is connectionLineNum%0A     */%0A    private String connectionLineNum;%0A%0A    /**%0A     * Old callerIdName now is connectionLineName%0A     */%0A    private String connectionLineName;%0A%0A
     prot
@@ -3432,10 +3432,470 @@
 ;%0A    %7D%0A
+    %0A    public final void setConnectionLineNum(String connectionLineNum)%0A    %7B%0A%09this.connectionLineNum = connectionLineNum;%0A    %7D%0A    %0A    public final String getConnectionLineNum()%0A    %7B%0A%09return this.connectionLineNum;%0A    %7D%0A    %0A    public final void setConnectionLineName(String connectionLineName)%0A    %7B%0A%09this.connectionLineName = connectionLineName;%0A    %7D%0A    %0A    public final String getConnectionLineName()%0A    %7B%0A%09return this.connectionLineName;%0A    %7D%0A
 %7D%0A

Add connectionLineNum and connectionLineName