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 */
019package org.apache.maven.scm.command.mkdir;
020
021import java.util.List;
022
023import org.apache.maven.scm.ScmFile;
024import org.apache.maven.scm.ScmResult;
025
026/**
027 * Result of making directories in SCM.
028 *
029 * @author <a href="mailto:oching@apache.org">Maria Odea Ching</a>
030 *
031 */
032public class MkdirScmResult extends ScmResult {
033    private static final long serialVersionUID = -8717329738246682608L;
034
035    private String revision;
036
037    private List<ScmFile> createdDirs;
038
039    public MkdirScmResult(ScmResult scmResult) {
040        super(scmResult);
041    }
042
043    public MkdirScmResult(String commandLine, String providerMessage, String commandOutput, boolean success) {
044        super(commandLine, providerMessage, commandOutput, success);
045    }
046
047    public MkdirScmResult(String commandLine, String revision) {
048        this(commandLine, null, null, true);
049
050        this.revision = revision;
051    }
052
053    public MkdirScmResult(String commandLine, List<ScmFile> createdDirs) {
054        this(commandLine, null, null, true);
055
056        this.createdDirs = createdDirs;
057    }
058
059    public MkdirScmResult(String revision, ScmResult result) {
060        super(result);
061
062        this.revision = revision;
063    }
064
065    public MkdirScmResult(List<ScmFile> createdDirs, ScmResult result) {
066        super(result);
067
068        this.createdDirs = createdDirs;
069    }
070
071    public String getRevision() {
072        return revision;
073    }
074
075    public List<ScmFile> getCreatedDirs() {
076        return createdDirs;
077    }
078}