Class AbstractRepositoryModificationEvent
java.lang.Object
java.util.EventObject
com.atlassian.bitbucket.event.ApplicationEvent
com.atlassian.bitbucket.event.repository.RepositoryEvent
com.atlassian.bitbucket.event.repository.AbstractRepositoryModificationEvent
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
RepositoryModificationRequestedEvent
,RepositoryModifiedEvent
Base class for constructing events which relate to repository modifications.
RepositoryEvent.getRepository()
always returns the current persisted state for the repository. Whether that matches
the old values
or the new values
depends on the specific event, and
will be documented on the derived event class.
- See Also:
-
Field Summary
Fields inherited from class java.util.EventObject
source
-
Constructor Summary
ConstructorDescriptionAbstractRepositoryModificationEvent
(Object source, Repository repository, Repository oldValue, Repository newValue) -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the updated repository values.Retrieves the original repository values.boolean
isMoved()
boolean
boolean
boolean
boolean
Methods inherited from class com.atlassian.bitbucket.event.repository.RepositoryEvent
getRepository
Methods inherited from class com.atlassian.bitbucket.event.ApplicationEvent
getDate, getUser
Methods inherited from class java.util.EventObject
getSource, toString
-
Field Details
-
newValue
-
oldValue
-
-
Constructor Details
-
AbstractRepositoryModificationEvent
public AbstractRepositoryModificationEvent(@Nonnull Object source, @Nonnull Repository repository, @Nonnull Repository oldValue, @Nonnull Repository newValue)
-
-
Method Details
-
getNewValue
Retrieves the updated repository values.- Returns:
- the updated repository
-
getOldValue
Retrieves the original repository values.- Returns:
- the original repository
-
isNameChanged
public boolean isNameChanged() -
isOriginChanged
public boolean isOriginChanged() -
isMoved
public boolean isMoved()- Returns:
- true if repository was moved
- Since:
- 5.4
-
isSlugChanged
public boolean isSlugChanged() -
isStateChanged
public boolean isStateChanged()
-