public class OverlayManager
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.List<org.apache.maven.artifact.Artifact> |
artifactsOverlays |
private java.util.List<Overlay> |
overlays |
private org.apache.maven.project.MavenProject |
project |
Constructor and Description |
---|
OverlayManager(java.util.List<Overlay> overlays,
org.apache.maven.project.MavenProject project,
Overlay currentProjectOverlay)
Creates a manager with the specified overlays.
|
Modifier and Type | Method and Description |
---|---|
private boolean |
compareOverlayWithArtifact(Overlay overlay,
org.apache.maven.artifact.Artifact artifact)
Compare groupId && artifactId && type && classifier.
|
(package private) org.apache.maven.artifact.Artifact |
getAssociatedArtifact(Overlay overlay)
Returns the Artifact associated to the specified overlay.
|
java.util.List<java.lang.String> |
getOverlayIds()
Returns the id of the resolved overlays.
|
java.util.List<Overlay> |
getOverlays()
Returns the resolved overlays.
|
private java.util.List<org.apache.maven.artifact.Artifact> |
getOverlaysAsArtifacts()
Returns a list of WAR
Artifact describing the overlays of the current project. |
(package private) void |
initialize(Overlay currentProjectOverlay)
Initializes the manager and validates the overlays configuration.
|
private final java.util.List<Overlay> overlays
private final org.apache.maven.project.MavenProject project
private final java.util.List<org.apache.maven.artifact.Artifact> artifactsOverlays
public OverlayManager(java.util.List<Overlay> overlays, org.apache.maven.project.MavenProject project, Overlay currentProjectOverlay) throws InvalidOverlayConfigurationException
overlays
- the overlaysproject
- the maven projectcurrentProjectOverlay
- the overlay for the current projectInvalidOverlayConfigurationException
- if the config is invalidpublic java.util.List<Overlay> getOverlays()
public java.util.List<java.lang.String> getOverlayIds()
void initialize(Overlay currentProjectOverlay) throws InvalidOverlayConfigurationException
currentProjectOverlay
- the overlay for the current projectInvalidOverlayConfigurationException
- if the configuration is invalidorg.apache.maven.artifact.Artifact getAssociatedArtifact(Overlay overlay) throws InvalidOverlayConfigurationException
overlay
- an overlayInvalidOverlayConfigurationException
- if the overlay does not have an
associated artifactprivate boolean compareOverlayWithArtifact(Overlay overlay, org.apache.maven.artifact.Artifact artifact)
overlay
- the overlayartifact
- the artifactprivate java.util.List<org.apache.maven.artifact.Artifact> getOverlaysAsArtifacts()
Artifact
describing the overlays of the current project.