@Deprecated public class

FileEditRequestedEvent

extends BranchChangeRequestedEvent
java.lang.Object
   ↳ java.util.EventObject
     ↳ com.atlassian.bitbucket.event.ApplicationEvent
       ↳ com.atlassian.bitbucket.event.repository.RefChangeRequestedEvent
         ↳ com.atlassian.bitbucket.event.branch.BranchChangeRequestedEvent
           ↳ com.atlassian.bitbucket.event.content.FileEditRequestedEvent

This class is deprecated.
since 5.0 for removal in 6.0. Listeners for FileEditRequestedEvent should implement a PreRepositoryHook<EditFileHookRequest> instead.

Class Overview

An event that is raised just before a file is edited on the server.

This event is cancelable. A listener may prevent the file from being edited by canceling this event. Throwing an exception will not prevent the file from being edited; the exception will be logged and ignored.

Summary

[Expand]
Inherited Fields
From class java.util.EventObject
Public Constructors
FileEditRequestedEvent(Object source, Repository repository, CancelState cancelState, Branch branch, String path, InputSupplier<InputStream> content, String message)
Public Methods
@Nonnull InputSupplier<InputStream> getContent()
@Nonnull Optional<String> getMessage()
@Nonnull String getPath()
[Expand]
Inherited Methods
From class com.atlassian.bitbucket.event.branch.BranchChangeRequestedEvent
From class com.atlassian.bitbucket.event.repository.RefChangeRequestedEvent
From class com.atlassian.bitbucket.event.ApplicationEvent
From class java.util.EventObject
From class java.lang.Object
From interface com.atlassian.bitbucket.util.CancelState

Public Constructors

public FileEditRequestedEvent (Object source, Repository repository, CancelState cancelState, Branch branch, String path, InputSupplier<InputStream> content, String message)

Public Methods

@Nonnull public InputSupplier<InputStream> getContent ()

Returns
  • the new content of the edited file

@Nonnull public Optional<String> getMessage ()

Returns
  • the provided commit message, if any

@Nonnull public String getPath ()

Returns
  • the path of the edited (or created) file