use of org.sonatype.nexus.repository.storage.internal.BucketUpdatedEvent in project nexus-public by sonatype.
the class BucketEntityAdapter method newEvent.
@Nullable
@Override
public EntityEvent newEvent(final ODocument document, final EventKind eventKind) {
final EntityMetadata metadata = new AttachedEntityMetadata(this, document);
final String repositoryName = document.field(P_REPOSITORY_NAME);
log.debug("newEvent: eventKind: {}, repositoryName: {}, metadata: {}", eventKind, repositoryName, metadata);
switch(eventKind) {
case CREATE:
return new BucketCreatedEvent(metadata, repositoryName);
case UPDATE:
return new BucketUpdatedEvent(metadata, repositoryName);
case DELETE:
return new BucketDeletedEvent(metadata, repositoryName);
default:
return null;
}
}
Aggregations