/*
 * @(#)FileRenamedEvent.java
 *
 * Copyright (c) 2002-2003 JSCAPE
 * 1147 S. 53rd Pl., Mesa, Arizona, 85206, U.S.A.
 * All rights reserved.
 *
 * This software is the confidential and proprietary information of
 * JSCAPE. ("Confidential Information").  You shall not disclose such
 * Confidential Information and shall use it only in accordance with
 * the terms of the license agreement you entered into with JSCAPE.
 */

package com.jscape.file;

import java.util.EventObject;

/**
 * Fired when file has been renamed using the FileUtils class.
 */
public class FileRenamedEvent
        extends EventObject {

    /**
     * Source path.
     */
    private String sourcePath;
    /**
     * Destination path.
     */
    private String destinationPath;

    /**
     * Creates a new FileRenamedEvent instance.
     *
     * @param source          the source of the event
     * @param sourcePath      the original absolute path of the source file renamed
     * @param destinationPath the new absolute path of the renamed file
     */
    public FileRenamedEvent(
            Object source,
            String sourcePath,
            String destinationPath) {
        super(source);
        this.sourcePath = sourcePath;
        this.destinationPath = destinationPath;
    }

    /**
     * Gets original source path of file renamed.
     *
     * @return original file path
     */
    public String getSourcePath() {
        return sourcePath;
    }

    /**
     * Gets path of renamed file.
     *
     * @return renamed file path
     */
    public String getDestinationPath() {
        return destinationPath;
    }

}
