@Test public void testCreateSecurityFromEventEntities() { prepareTargetEdOrgMocks(); Set<Entity> entities = new HashSet<Entity>(); entities.add(section1); entities.add(section2); SecurityEvent se = builder.createSecurityEvent(this.getClass().getName(), URI.create(ONE_PART_URI), LOG_MESSAGE, null, EntityNames.SECTION, entities); Assert.assertTrue(se.getActionUri().equals(ONE_PART_URI)); Assert.assertTrue(se.getLogMessage().equals(LOG_MESSAGE)); Assert.assertTrue(se.getUserEdOrg().equals(REALM_EDORG_STATEID)); Assert.assertTrue(containsTheSame(se.getTargetEdOrgList(), Arrays.asList(EDORG_STATEID, EDORG2_STATEID))); }
public SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage, boolean defaultTargetToUserEdOrg) { return createSecurityEvent( loggingClass, requestUri, slMessage, null, null,null, null, defaultTargetToUserEdOrg); }
SecurityEventBuilder { public SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage, boolean defaultTargetToUserEdOrg) { return createSecurityEvent( loggingClass, requestUri, slMessage, null, null,null, null, defaultTargetToUserEdOrg); } }
SecurityEventBuilder { public SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage, boolean defaultTargetToUserEdOrg) { return createSecurityEvent( loggingClass, requestUri, slMessage, null, null,null, null, defaultTargetToUserEdOrg); } SecurityEventBuilder(); }
SecurityEventBuilder { public SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage, boolean defaultTargetToUserEdOrg) { return createSecurityEvent( loggingClass, requestUri, slMessage, null, null,null, null, defaultTargetToUserEdOrg); } SecurityEventBuilder(); SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage, boolean defaultTargetToUserEdOrg); SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage,
                                             Entity explicitRealmEntity, String entityType, String[] entityIds); SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage,
                                             Entity explicitRealmEntity, String entityType, Set<Entity> entities); SecurityEvent createSecurityEvent(String loggingClass, URI explicitUri, String slMessage, SLIPrincipal explicitPrincipal, String clientId, Entity explicitRealmEntity,
                                             Set<String> targetEdOrgs, boolean defaultTargetToUserEdOrg); CallingApplicationInfoProvider getCallingApplicationInfoProvider(); void setCallingApplicationInfoProvider(CallingApplicationInfoProvider callingApplicationInfoProvider); }
SecurityEventBuilder { public SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage, boolean defaultTargetToUserEdOrg) { return createSecurityEvent( loggingClass, requestUri, slMessage, null, null,null, null, defaultTargetToUserEdOrg); } SecurityEventBuilder(); SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage, boolean defaultTargetToUserEdOrg); SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage,
                                             Entity explicitRealmEntity, String entityType, String[] entityIds); SecurityEvent createSecurityEvent(String loggingClass, URI requestUri, String slMessage,
                                             Entity explicitRealmEntity, String entityType, Set<Entity> entities); SecurityEvent createSecurityEvent(String loggingClass, URI explicitUri, String slMessage, SLIPrincipal explicitPrincipal, String clientId, Entity explicitRealmEntity,
                                             Set<String> targetEdOrgs, boolean defaultTargetToUserEdOrg); CallingApplicationInfoProvider getCallingApplicationInfoProvider(); void setCallingApplicationInfoProvider(CallingApplicationInfoProvider callingApplicationInfoProvider);  }