public final class ArtifactManagerImpl extends ArtifactManager implements PersistentStateComponent<ArtifactManagerState>, Disposable
Disposable.Parent
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COMPONENT_NAME |
static java.lang.String |
PACKAGING_ELEMENT_NAME |
static java.lang.String |
TYPE_ID_ATTRIBUTE |
ARTIFACT_COMPARATOR, TOPIC
Constructor and Description |
---|
ArtifactManagerImpl(Project project) |
Modifier and Type | Method and Description |
---|---|
Artifact |
addArtifact(java.lang.String name,
ArtifactType type,
CompositePackagingElement<?> root) |
void |
addElementsToDirectory(Artifact artifact,
java.lang.String relativePath,
java.util.Collection<? extends PackagingElement<?>> elements) |
void |
addElementsToDirectory(Artifact artifact,
java.lang.String relativePath,
PackagingElement<?> element) |
void |
commit(ArtifactModelImpl artifactModel) |
ModifiableArtifactModel |
createModifiableModel() |
void |
dispose()
Usually not invoked directly, see class javadoc.
|
Artifact |
findArtifact(java.lang.String name) |
java.util.List<? extends Artifact> |
getAllArtifactsIncludingInvalid() |
Artifact |
getArtifactByOriginal(Artifact artifact) |
Artifact [] |
getArtifacts() |
java.util.Collection<? extends Artifact> |
getArtifactsByType(ArtifactType type) |
java.util.List<? extends ArtifactImpl> |
getArtifactsList() |
ModificationTracker |
getModificationTracker() |
Artifact |
getOriginalArtifact(Artifact artifact) |
Project |
getProject() |
PackagingElementResolvingContext |
getResolvingContext() |
Artifact[] |
getSortedArtifacts() |
ArtifactManagerState |
getState() |
void |
initializeComponent()
If class also is a component, then this method will be called after loading state (even if not state) but only once throughout the life cycle
|
void |
loadState(ArtifactManagerState managerState)
This method is called when new component state is loaded.
|
getInstance
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
noStateLoaded
public static final java.lang.String COMPONENT_NAME
public static final java.lang.String PACKAGING_ELEMENT_NAME
public static final java.lang.String TYPE_ID_ATTRIBUTE
public ArtifactManagerImpl(Project project)
public Artifact [] getArtifacts()
getArtifacts
in interface ArtifactModel
public Artifact findArtifact(java.lang.String name)
findArtifact
in interface ArtifactModel
public Artifact getArtifactByOriginal(Artifact artifact)
getArtifactByOriginal
in interface ArtifactModel
public Artifact getOriginalArtifact(Artifact artifact)
getOriginalArtifact
in interface ArtifactModel
public java.util.Collection<? extends Artifact> getArtifactsByType(ArtifactType type)
getArtifactsByType
in interface ArtifactModel
public java.util.List<? extends Artifact> getAllArtifactsIncludingInvalid()
getAllArtifactsIncludingInvalid
in interface ArtifactModel
public ArtifactManagerState getState()
getState
in interface PersistentStateComponent<ArtifactManagerState>
null
value indicates
that the returned state won't be stored, as a result previously stored state will be used.XmlSerializer
public void loadState(ArtifactManagerState managerState)
PersistentStateComponent
State object should be used directly, defensive copying is not required.
loadState
in interface PersistentStateComponent<ArtifactManagerState>
managerState
- loaded component stateXmlSerializerUtil.copyBean(Object, Object)
public void dispose()
Disposable
dispose
in interface Disposable
public void initializeComponent()
PersistentStateComponent
initializeComponent
in interface PersistentStateComponent<ArtifactManagerState>
public Artifact[] getSortedArtifacts()
getSortedArtifacts
in class ArtifactManager
public ModifiableArtifactModel createModifiableModel()
createModifiableModel
in class ArtifactManager
public PackagingElementResolvingContext getResolvingContext()
getResolvingContext
in class ArtifactManager
public java.util.List<? extends ArtifactImpl> getArtifactsList()
public void commit(ArtifactModelImpl artifactModel)
public Project getProject()
public Artifact addArtifact(java.lang.String name, ArtifactType type, CompositePackagingElement<?> root)
addArtifact
in class ArtifactManager
public void addElementsToDirectory(Artifact artifact, java.lang.String relativePath, PackagingElement<?> element)
addElementsToDirectory
in class ArtifactManager
public void addElementsToDirectory(Artifact artifact, java.lang.String relativePath, java.util.Collection<? extends PackagingElement<?>> elements)
addElementsToDirectory
in class ArtifactManager
public ModificationTracker getModificationTracker()
getModificationTracker
in class ArtifactManager