public class ArtifactManager
extends java.lang.Object
Note that there can be more than one ArtifactManager, distinguished by an ID, probably a markerID. That is, all artifacts of the same markerID (probably shown in the same view) are managed by the same (distinct) ArtifactManager. TODO Question: why can't we just store the objects in an attribute??
| Modifier and Type | Field and Description |
|---|---|
static java.util.HashMap |
registry
Registry of artifact managers.
|
| Constructor and Description |
|---|
ArtifactManager(java.lang.String id)
Create ArtifactManager from id
|
| Modifier and Type | Method and Description |
|---|---|
void |
addArtifactToHash(IArtifact a)
Add an artifact to the hashtable for future lookup
|
void |
clear()
Remove all the artifacts
|
static IArtifact |
getArtifact(org.eclipse.core.resources.IMarker marker)
return the artifact for a marker; involves looking up the
Artifact Manager, then the Artifact within that.
|
IArtifact |
getArtifact(java.lang.String id)
retrieve artifact by unique ID.
|
java.util.HashMap |
getArtifactMap()
get hashtable of artifact map
|
java.lang.Object[] |
getArtifacts() |
static ArtifactManager |
getManager(java.lang.String id)
return the ArtifactManager used for managing artifacts of type "id"
(probably a marker id)
|
boolean |
removeArtifact(IArtifact a)
Remove artifact by artifact object
|
boolean |
removeArtifact(java.lang.String key)
Remove artifact by key
|
java.lang.String |
toString() |
public static java.util.HashMap registry
public ArtifactManager(java.lang.String id)
id - public static ArtifactManager getManager(java.lang.String id)
id - public static IArtifact getArtifact(org.eclipse.core.resources.IMarker marker) throws org.eclipse.core.runtime.CoreException
marker - org.eclipse.core.runtime.CoreExceptionpublic void addArtifactToHash(IArtifact a)
artifact - public IArtifact getArtifact(java.lang.String id)
id - public java.lang.Object[] getArtifacts()
public java.util.HashMap getArtifactMap()
public boolean removeArtifact(IArtifact a)
a - the artifact to removepublic boolean removeArtifact(java.lang.String key)
key - public void clear()
public java.lang.String toString()
toString in class java.lang.ObjectCopyright (c) 2011 IBM Corporation and others. All Rights Reserved.