001/*
002 * Copyright (c) 2009-2012 The Regents of the University of California.
003 * All rights reserved.
004 *
005 * '$Author: jianwu $'
006 * '$Date: 2012-10-10 00:45:41 +0000 (Wed, 10 Oct 2012) $' 
007 * '$Revision: 30849 $'
008 * 
009 * Permission is hereby granted, without written agreement and without
010 * license or royalty fees, to use, copy, modify, and distribute this
011 * software and its documentation for any purpose, provided that the above
012 * copyright notice and the following two paragraphs appear in all copies
013 * of this software.
014 *
015 * IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
016 * FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
017 * ARISING OUT OF THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF
018 * THE UNIVERSITY OF CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF
019 * SUCH DAMAGE.
020 *
021 * THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
022 * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
023 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE SOFTWARE
024 * PROVIDED HEREUNDER IS ON AN "AS IS" BASIS, AND THE UNIVERSITY OF
025 * CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE, SUPPORT, UPDATES,
026 * ENHANCEMENTS, OR MODIFICATIONS.
027 *
028 */
029
030package org.sdm.spa.actors.transport;
031
032import org.kepler.ssh.ExecException;
033import org.sdm.spa.actors.transport.vo.ConnectionDetails;
034
035
036/**
037 * Default class for copying files within the localhost.This class doesn't have 
038 * have any specific implementation. All methods in turn call the Parent class'
039 * copyLocal method.
040 * @author D3X140
041 *
042 */
043public class LocalFileCopier extends FileCopierBase {
044
045        @Override
046        protected CopyResult copyFrom(ConnectionDetails srcDetails, String srcFile, 
047                        String destFile, boolean recursive) throws ExecException {
048                return copyLocal(srcFile, destFile, recursive);
049        }
050
051        @Override
052        protected CopyResult copyTo(String srcFile,
053                        ConnectionDetails destDetails,String destFile, boolean recursive) throws ExecException {
054                return copyLocal(srcFile,destFile,recursive);
055        }
056
057        @Override
058        protected CopyResult copyRemote(ConnectionDetails srcDetails, String srcFile,
059                        ConnectionDetails destDetails, String destFile, boolean recursive)
060                        throws ExecException {
061                return copyLocal(srcFile,destFile, recursive);
062        }
063
064        @Override
065        protected int getDefaultPort() {
066                return -1;
067        }
068
069}