Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-06-16 00:11:12 +0000
committerrescobar2010-06-16 00:11:12 +0000
commit40d6e92620d48dd8facbdb1f731a4f00af901eeb (patch)
tree0ed36cd61cb3673e79042562b88e0827ac05883a /plugins/org.eclipse.osee.framework.skynet.core
parentac194d88ac36cfaa094e2da61a9761751e0977a3 (diff)
downloadorg.eclipse.osee-40d6e92620d48dd8facbdb1f731a4f00af901eeb.tar.gz
org.eclipse.osee-40d6e92620d48dd8facbdb1f731a4f00af901eeb.tar.xz
org.eclipse.osee-40d6e92620d48dd8facbdb1f731a4f00af901eeb.zip
Diffstat (limited to 'plugins/org.eclipse.osee.framework.skynet.core')
-rw-r--r--plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java14
1 files changed, 11 insertions, 3 deletions
diff --git a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java
index 72cade25802..7662feedf9a 100644
--- a/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java
+++ b/plugins/org.eclipse.osee.framework.skynet.core/src/org/eclipse/osee/framework/skynet/core/utility/Artifacts.java
@@ -33,7 +33,7 @@ import org.eclipse.osee.framework.skynet.core.types.IArtifact;
/**
* Utility methods for common tasks performed on Artifact's.
- *
+ *
* @author Robert A. Fisher
* @author Donald G. Dunne
*/
@@ -43,6 +43,14 @@ public final class Artifacts {
// This constructor is private because there is no reason to instantiate this class
}
+ public static Collection<Integer> toIds(Collection<? extends IArtifact> artifacts) {
+ Set<Integer> toReturn = new HashSet<Integer>(artifacts.size());
+ for (IArtifact artifact : artifacts) {
+ toReturn.add(artifact.getArtId());
+ }
+ return toReturn;
+ }
+
public static List<String> toGuids(Collection<? extends IArtifact> artifacts) {
List<String> guids = new ArrayList<String>(artifacts.size());
for (IArtifact artifact : artifacts) {
@@ -106,7 +114,7 @@ public final class Artifacts {
/**
* Recurses default hierarchy and collections children of parentArtifact that are of type class
- *
+ *
* @param <A>
* @param parentArtifact
* @param children
@@ -167,7 +175,7 @@ public final class Artifacts {
details.put("Historical", String.valueOf(artifact.isHistorical()));
details.put("Deleted", String.valueOf(artifact.isDeleted()));
details.put("Revision",
- (String.valueOf(artifact.isInDb() ? String.valueOf(artifact.getTransactionNumber()) : "Not In Db")));
+ String.valueOf(artifact.isInDb() ? String.valueOf(artifact.getTransactionNumber()) : "Not In Db"));
details.put("Read Only", String.valueOf(artifact.isReadOnly()));
details.put("Last Modified", (artifact.isInDb() ? String.valueOf(artifact.getLastModified()) : "Not In Db"));
try {

Back to the top