/**
* Copyright (c) 2010 Perforce Software. All rights reserved.
*/
package com.perforce.maven.mojo.jobs;
import java.util.List;
import java.util.Map;
import com.perforce.maven.scm.provider.p4.command.P4Result;
import com.perforce.p4java.core.IJob;
/**
* This class handles the result from the Perforce jobs command.
*/
public class P4JobsResult extends P4Result {
/**
* @see com.perforce.maven.scm.provider.p4.command.P4Result#processMessage
* (java.lang.String)
*/
@Override
public String processMessage(String message) {
return null;
}
/**
* @see com.perforce.maven.scm.provider.p4.command.P4Result#processOutput
* (java.util.List)
*/
public void processJobs(List<IJob> jobs) {
if (jobs != null) {
for (IJob job : jobs) {
if (job != null) {
StringBuilder sb = new StringBuilder();
sb.append("JobId").append("=").append(job.getId())
.append(LINE_SEPARATOR);
Map<String, Object> rawFields = job.getRawFields();
if (rawFields != null) {
for (Map.Entry<String, Object> entry : rawFields
.entrySet()) {
String key = entry.getKey();
Object value = entry.getValue();
sb.append(key).append("=")
.append((value != null) ? value : "")
.append(LINE_SEPARATOR);
}
}
commandOutput += sb.toString();
}
}
}
}
}
# |
Change |
User |
Description |
Committed |
|
#2
|
10055 |
Matt Attaway |
Pull over numerous changes from @dantran's branch. |
|
|
#1
|
8496 |
Matt Attaway |
Move P4Ant and P4Maven into their proper homes |
|
|
//public/perforce/p4maven/main/com.perforce.maven.mojo/src/main/java/com/perforce/maven/mojo/jobs/P4JobsResult.java |
#1
|
8270 |
Matt Attaway |
Initial add of P4Maven source code |
|
|