/**
* Copyright (c) 2010 Perforce Software. All rights reserved.
*/
package com.perforce.maven.scm.provider.p4.command.branch;
import java.util.ArrayList;
import java.util.List;
import com.perforce.maven.scm.provider.p4.command.P4Result;
import com.perforce.p4java.core.file.IFileSpec;
/**
* This class handles the result from the Perforce integrate command.
*/
public class P4BranchResult extends P4Result {
/** The additions. */
private List<String> additions = new ArrayList<String>();
/**
* @see com.perforce.maven.scm.provider.p4.command.P4Result#processMessage
* (java.lang.String)
*/
@Override
public String processMessage(String message) {
return null;
}
/**
* Extracts the file paths from the add command result filespecs.
*
* @param fileSpecs
* the file specs
*/
public void processAdditions(List<IFileSpec> fileSpecs) {
if (fileSpecs != null) {
for (IFileSpec fileSpec : fileSpecs) {
if (fileSpec != null) {
if (fileSpec.getDepotPath() != null) {
additions.add(fileSpec.getDepotPath().getPathString());
}
}
}
}
}
/**
* Gets the additions.
*
* @return the additions
*/
public List<String> getAdditions() {
return additions;
}
}