001    /*
002     * Copyright (C) 2003-2009 eXo Platform SAS.
003     *
004     * This is free software; you can redistribute it and/or modify it
005     * under the terms of the GNU Lesser General Public License as
006     * published by the Free Software Foundation; either version 2.1 of
007     * the License, or (at your option) any later version.
008     *
009     * This software is distributed in the hope that it will be useful,
010     * but WITHOUT ANY WARRANTY; without even the implied warranty of
011     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
012     * Lesser General Public License for more details.
013     *
014     * You should have received a copy of the GNU Lesser General Public
015     * License along with this software; if not, write to the Free
016     * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
017     * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
018     */
019    package org.crsh.ssh.term.scp;
020    
021    import org.crsh.cmdline.annotations.Argument;
022    import org.crsh.cmdline.annotations.Command;
023    import org.crsh.cmdline.annotations.Option;
024    import org.crsh.cmdline.annotations.Required;
025    
026    /**
027     * @author <a href="mailto:julien.viet@exoplatform.com">Julien Viet</a>
028     * @version $Revision$
029     */
030    public class SCPAction {
031    
032      /** . */
033      @Option(names="r")
034      private Boolean recursive;
035    
036      /** . */
037      @Option(names="v")
038      private Boolean verbose;
039    
040      /** . */
041      @Option(names="p")
042      private Boolean preserve;
043    
044      /** . */
045      @Option(names="f")
046      private Boolean source;
047    
048      /** . */
049      @Option(names="t")
050      private Boolean sink;
051    
052      /** . */
053      @Option(names="d")
054      private Boolean directory;
055    
056      /** . */
057      @Argument
058      @Required
059      private String target;
060    
061      public Boolean isRecursive() {
062        return recursive;
063      }
064    
065      public void setRecursive(Boolean recursive) {
066        this.recursive = recursive;
067      }
068    
069      public Boolean isVerbose() {
070        return verbose;
071      }
072    
073      public void setVerbose(Boolean verbose) {
074        this.verbose = verbose;
075      }
076    
077      public Boolean isPreserve() {
078        return preserve;
079      }
080    
081      public void setPreserve(Boolean preserve) {
082        this.preserve = preserve;
083      }
084    
085      public Boolean isSource() {
086        return source;
087      }
088    
089      public void setSource(Boolean source) {
090        this.source = source;
091      }
092    
093      public Boolean isSink() {
094        return sink;
095      }
096    
097      public void setSink(Boolean sink) {
098        this.sink = sink;
099      }
100    
101      public Boolean isDirectory() {
102        return directory;
103      }
104    
105      public void setDirectory(Boolean directory) {
106        this.directory = directory;
107      }
108    
109      public String getTarget() {
110        return target;
111      }
112    
113      public void setTarget(String target) {
114        this.target = target;
115      }
116    
117      @Override
118      public String toString() {
119        return "SCPAction[recursive=" + recursive + ",verbose=" + verbose + ",preserve=" + preserve + ",source=" + source +
120          ",sink=" + sink + ",directory=" + directory + ",target=" + target + "]";
121      }
122    }