/**
* Copyright (c) 2010 Perforce Software. All rights reserved.
*/
package com.perforce.maven.scm.provider.p4.command.tag;
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 label command.
*/
public class P4TagResult extends P4Result {
/** The tagged. */
private List<String> tagged = 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 tag command result filespecs.
*
* @param fileSpecs
* the file specs
*/
public void processTagged(List<IFileSpec> fileSpecs) {
if (fileSpecs != null) {
for (IFileSpec fileSpec : fileSpecs) {
if (fileSpec != null) {
if (fileSpec.getDepotPath() != null) {
tagged.add(fileSpec.getDepotPath().getPathString());
}
}
}
}
}
/**
* Gets the tagged.
*
* @return the tagged
*/
public List<String> getTagged() {
return tagged;
}
}