Class EiffelArtifactPublisher
- java.lang.Object
-
- com.axis.jenkins.plugins.eiffel.eiffelbroadcaster.EiffelArtifactPublisher
-
public class EiffelArtifactPublisher extends Object
Transforms anEiffelArtifactCreatedEvent
with one or more files declared into anEiffelArtifactPublishedEvent
that contains the URIs to the Jenkins artifacts that correspond to the Eiffel artifact's files.
-
-
Constructor Summary
Constructors Constructor Description EiffelArtifactPublisher(EiffelEvent contextEvent, URI runURI, VirtualFile artifactRoot)
Constructs a new object instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EiffelArtifactPublishedEvent
prepareEvent(EiffelArtifactCreatedEvent creationEvent)
Prepares aEiffelArtifactPublishedEvent
that's ready to be sent.
-
-
-
Constructor Detail
-
EiffelArtifactPublisher
public EiffelArtifactPublisher(@NonNull EiffelEvent contextEvent, @NonNull URI runURI, @NonNull VirtualFile artifactRoot)
Constructs a new object instance.- Parameters:
contextEvent
- the event that theEiffelArtifactPublishedEvent
should link to with a CONTEXT linkrunURI
- theURI
of theRun
that contains the files for the artifactartifactRoot
- aVirtualFile
that represents the Jenkins artifact root directory
-
-
Method Detail
-
prepareEvent
public EiffelArtifactPublishedEvent prepareEvent(@NonNull EiffelArtifactCreatedEvent creationEvent) throws EmptyArtifactException, IOException, MissingArtifactException, URISyntaxException
Prepares aEiffelArtifactPublishedEvent
that's ready to be sent.- Parameters:
creationEvent
- theEiffelArtifactCreatedEvent
that should be published- Throws:
EmptyArtifactException
- when theEiffelArtifactCreatedEvent
doesn't contain any files indata.fileInformation
IOException
- when there was a problem correlating the files in theEiffelArtifactCreatedEvent
with the files in theRun
's artifactsMissingArtifactException
- when one or more of the files listed in theEiffelArtifactCreatedEvent
'sdata.fileInformation
array doesn't exist in Jenkins's artifact directoryURISyntaxException
- when an error occurred when trying to construct a URI to an artifact file
-
-