forked from eficode/ClearCaseUCMPlugin
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #19 from Praqma/JENKINS-25069
JENKINS-25069, JENKINS-23533
- Loading branch information
Showing
9 changed files
with
139 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
src/main/java/net/praqma/hudson/remoting/GetLatestForActivities.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
/* | ||
* To change this license header, choose License Headers in Project Properties. | ||
* To change this template file, choose Tools | Templates | ||
* and open the template in the editor. | ||
*/ | ||
package net.praqma.hudson.remoting; | ||
|
||
import hudson.FilePath; | ||
import hudson.remoting.VirtualChannel; | ||
import java.io.File; | ||
import java.io.IOException; | ||
import java.util.List; | ||
import java.util.Map; | ||
import java.util.logging.Logger; | ||
import net.praqma.clearcase.exceptions.UnableToLoadEntityException; | ||
import net.praqma.clearcase.ucm.entities.Activity; | ||
import net.praqma.clearcase.ucm.entities.Version; | ||
import net.praqma.clearcase.ucm.utils.VersionList; | ||
|
||
/** | ||
* | ||
* @author Mads | ||
*/ | ||
public class GetLatestForActivities implements FilePath.FileCallable<Map<Activity, List<Version>>> { | ||
|
||
private static final Logger LOG = Logger.getLogger(GetLatestForActivities.class.getName()); | ||
private VersionList list; | ||
|
||
public GetLatestForActivities(VersionList list) { | ||
this.list = list; | ||
} | ||
|
||
@Override | ||
public Map<Activity, List<Version>> invoke(File f, VirtualChannel channel) throws IOException, InterruptedException { | ||
Map<Activity, List<Version>> activities = list.getLatestForActivities(); | ||
for(Activity a : activities.keySet()) { | ||
try { | ||
a.load(); | ||
} catch (UnableToLoadEntityException ex) { | ||
LOG.severe("Could not autoload actitity "+a); | ||
} | ||
} | ||
return activities; | ||
} | ||
|
||
/** | ||
* @return the list | ||
*/ | ||
public VersionList getList() { | ||
return list; | ||
} | ||
|
||
/** | ||
* @param list the list to set | ||
*/ | ||
public void setList(VersionList list) { | ||
this.list = list; | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters