use of org.sonatype.nexus.orient.entity.AttachedEntityMetadata in project nexus-public by sonatype.
the class PurgeUnusedSnapshotsFacetImplTest method mockBucket.
private void mockBucket() {
EntityAdapter owner = mock(EntityAdapter.class);
ODocument document = mock(ODocument.class);
ORID orID = new ORecordId(1, 1);
when(document.getIdentity()).thenReturn(orID);
EntityMetadata entityMetadata = new AttachedEntityMetadata(owner, document);
when(bucket.getEntityMetadata()).thenReturn(entityMetadata);
}
use of org.sonatype.nexus.orient.entity.AttachedEntityMetadata in project nexus-public by sonatype.
the class OrientAnonymousConfigurationEntityAdapter method newEvent.
@Override
@Nullable
public EntityEvent newEvent(final ODocument document, final EventKind eventKind) {
EntityMetadata metadata = new AttachedEntityMetadata(this, document);
log.debug("Emitted {} event with metadata {}", eventKind, metadata);
switch(eventKind) {
case CREATE:
return new OrientAnonymousConfigurationCreatedEvent(metadata);
case UPDATE:
return new OrientAnonymousConfigurationUpdatedEvent(metadata);
case DELETE:
return new OrientAnonymousConfigurationDeletedEvent(metadata);
default:
return null;
}
}
use of org.sonatype.nexus.orient.entity.AttachedEntityMetadata in project nexus-public by sonatype.
the class OrientRealmConfigurationEntityAdapter method newEvent.
@Override
public EntityEvent newEvent(final ODocument document, final EventKind eventKind) {
AttachedEntityMetadata metadata = new AttachedEntityMetadata(this, document);
log.debug("Emitted {} event with metadata {}", eventKind, metadata);
switch(eventKind) {
case CREATE:
return new OrientRealmConfigurationCreatedEvent(metadata);
case UPDATE:
return new OrientRealmConfigurationUpdatedEvent(metadata);
case DELETE:
return new OrientRealmConfigurationDeletedEvent(metadata);
default:
return null;
}
}
use of org.sonatype.nexus.orient.entity.AttachedEntityMetadata in project nexus-public by sonatype.
the class OrientEmailConfigurationEntityAdapter method newEvent.
@Nullable
@Override
public EntityEvent newEvent(final ODocument document, final EventKind eventKind) {
EntityMetadata metadata = new AttachedEntityMetadata(this, document);
log.debug("Emitted {} event with metadata {}", eventKind, metadata);
switch(eventKind) {
case CREATE:
return new OrientEmailConfigurationCreatedEvent(metadata);
case UPDATE:
return new OrientEmailConfigurationUpdatedEvent(metadata);
case DELETE:
return new OrientEmailConfigurationDeletedEvent(metadata);
default:
return null;
}
}
use of org.sonatype.nexus.orient.entity.AttachedEntityMetadata in project nexus-public by sonatype.
the class OrientRoutingRuleEntityAdapter method newEvent.
@Nullable
@Override
public EntityEvent newEvent(final ODocument document, final EventKind eventKind) {
final EntityMetadata metadata = new AttachedEntityMetadata(this, document);
log.trace("newEvent: eventKind: {}, metadata: {}", eventKind, metadata);
switch(eventKind) {
case UPDATE:
return new OrientRoutingRuleUpdatedEvent(metadata);
case DELETE:
return new OrientRoutingRuleDeletedEvent(metadata);
default:
return super.newEvent(document, eventKind);
}
}
Aggregations