Search in sources :

Example 6 with PrincipalData

use of org.candlepin.auth.PrincipalData in project candlepin by candlepin.

the class EventResourceTest method getEvent.

protected Event getEvent() {
    Event e = new Event();
    e.setTarget(Event.Target.CONSUMER);
    e.setType(Event.Type.CREATED);
    e.setPrincipal(new PrincipalData());
    return e;
}
Also used : PrincipalData(org.candlepin.auth.PrincipalData) Event(org.candlepin.audit.Event)

Example 7 with PrincipalData

use of org.candlepin.auth.PrincipalData in project candlepin by candlepin.

the class EventAdapterTest method mockEvent.

private Event mockEvent(Event.Target tgt, Event.Type type) {
    Event e = new Event();
    e.setTarget(tgt);
    e.setType(type);
    e.setPrincipal(new PrincipalData());
    e.setTimestamp(new Date());
    return e;
}
Also used : PrincipalData(org.candlepin.auth.PrincipalData) Date(java.util.Date)

Example 8 with PrincipalData

use of org.candlepin.auth.PrincipalData in project candlepin by candlepin.

the class EventTranslatorTest method initSourceObject.

@Override
protected Event initSourceObject() {
    Event source = new Event();
    source.setId("id");
    source.setTargetName("target-name");
    source.setConsumerUuid("consumer-uuid");
    source.setEntityId("entity-id");
    source.setMessageText("message-text");
    source.setOwnerId("owner-id");
    source.setPrincipalStore("principal-store");
    source.setPrincipal(new PrincipalData("principal-type", "principal-name"));
    source.setReferenceId("reference-id");
    source.setTimestamp(new Date());
    source.setType(Event.Type.CREATED);
    source.setTarget(Event.Target.POOL);
    source.setReferenceType(Event.ReferenceType.POOL);
    source.setEventData("event-data");
    return source;
}
Also used : PrincipalData(org.candlepin.auth.PrincipalData) Event(org.candlepin.audit.Event) Date(java.util.Date)

Aggregations

PrincipalData (org.candlepin.auth.PrincipalData)8 Date (java.util.Date)3 Event (org.candlepin.audit.Event)3 StringWriter (java.io.StringWriter)1 ArrayList (java.util.ArrayList)1 Target (org.candlepin.audit.Event.Target)1 Type (org.candlepin.audit.Event.Type)1