target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testDateToString_null() { assertNull(FormatHelper.dateToString(null)); }
public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); }
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } }
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } private FormatHelper(); }
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } private FormatHelper(); static String dateToString(final TemporalAccessor temporalAccessor); static String dateTimeToString(final Tem...
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } private FormatHelper(); static String dateToString(final TemporalAccessor temporalAccessor); static String dateTimeToString(final Tem...
@Test public void resolveAutoKeys_reference_auto() { RpslObject person = RpslObject.parse("" + "person: John Doe\n" + "nic-hdl: AUTO-1\n"); subject.resolveAutoKeys(person, update, updateContext, Action.CREATE); RpslObject mntner = RpslObject.parse("" + "mntner: TST-MNT\n" + "admin-c: AUTO-1\n"); final RpslObject rpslOb...
public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateContext, attributes...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
@Test public void resolveAutoKeys_self_reference() { RpslObject person = RpslObject.parse("" + "person: John Doe\n" + "nic-hdl: AUTO-1\n" + "tech-c: AUTO-1\n" + "remarks: AUTO-1"); final RpslObject rpslObject = subject.resolveAutoKeys(person, update, updateContext, Action.CREATE); assertThat(rpslObject.toString(), is("...
public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateContext, attributes...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
@Test public void resolveAutoKeys_modify() throws Exception { RpslObject person = RpslObject.parse("" + "person: John Doe\n" + "nic-hdl: JD1-RIPE\n"); subject.resolveAutoKeys(person, update, updateContext, Action.MODIFY); verify(autoKeyFactory, never()).claim(anyString()); verify(autoKeyFactory, never()).generate(anySt...
public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateContext, attributes...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
@Test public void resolveAutoKeys_key_specified_available_create() throws Exception { RpslObject person = RpslObject.parse("" + "person: John Doe\n" + "nic-hdl: JD1-RIPE\n"); when(autoKeyFactory.claim(anyString())).thenReturn(new NicHandle("JD", 1, "RIPE")); final RpslObject rpslObject = subject.resolveAutoKeys(person,...
public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateContext, attributes...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
@Test public void resolveAutoKeys_key_specified_invalid() throws Exception { RpslObject person = RpslObject.parse("" + "person: John Doe\n" + "nic-hdl: INVALID_NIC_HANDLE\n"); when(autoKeyFactory.claim(anyString())).thenThrow(new ClaimException(ValidationMessages.syntaxError("INVALID_NIC_HANDLE", ""))); final RpslObjec...
public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateContext, attributes...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
@Test public void resolveAutoKeys_key_specified_not_available_create() throws Exception { RpslObject person = RpslObject.parse("" + "person: John Doe\n" + "nic-hdl: JD1-RIPE\n"); when(autoKeyFactory.claim(anyString())).thenThrow(new ClaimException(UpdateMessages.nicHandleNotAvailable("JD1-RIPE"))); final RpslObject rps...
public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateContext, attributes...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
@Test public void resolveAutoKeys_reference_not_found() { when(autoKeyFactory.getKeyPlaceholder(anyString())).thenReturn(ciString("AUTO-1")); RpslObject mntner = RpslObject.parse("" + "mntner: TST-MNT\n" + "admin-c: AUTO-1\n"); final RpslObject rpslObject = subject.resolveAutoKeys(mntner, update, updateContext, Action....
public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateContext, attributes...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
AutoKeyResolver { public RpslObject resolveAutoKeys(final RpslObject object, final Update update, final UpdateContext updateContext, final Action action) { final Map<RpslAttribute, RpslAttribute> attributesToReplace = Maps.newHashMap(); if (Action.CREATE.equals(action)) { claimOrGenerateAutoKeys(update, object, updateC...
@Test(expected = IllegalArgumentException.class) public void generate_invalid_placeHolder() { subject.generate("AUTO", RpslObject.parse("person: name")); }
@Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
@Test public void generate_specified_space() { when(nicHandleRepository.claimNextAvailableIndex("DW", SOURCE)).thenReturn(new NicHandle("DW", 10, SOURCE)); final NicHandle nicHandle = subject.generate("AUTO-1234567DW", RpslObject.parse("person: name\nnic-hdl: AUTO-1234567DW")); assertThat(nicHandle.toString(), is("DW10...
@Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
@Test public void generate_unspecified_space() { when(nicHandleRepository.claimNextAvailableIndex("JAS", SOURCE)).thenReturn(new NicHandle("JAS", 10, SOURCE)); final NicHandle nicHandle = subject.generate("AUTO-111", RpslObject.parse("person: John Archibald Smith\nnic-hdl: AUTO-111")); assertThat(nicHandle.toString(), ...
@Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
@Test public void testDateToString_date() { assertThat(FormatHelper.dateToString(LocalDate.of(2001, 10, 1)), is("2001-10-01")); }
public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); }
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } }
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } private FormatHelper(); }
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } private FormatHelper(); static String dateToString(final TemporalAccessor temporalAccessor); static String dateTimeToString(final Tem...
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } private FormatHelper(); static String dateToString(final TemporalAccessor temporalAccessor); static String dateTimeToString(final Tem...
@Test public void generate_unspecified_lower() { when(nicHandleRepository.claimNextAvailableIndex("SN", SOURCE)).thenReturn(new NicHandle("SN", 10, SOURCE)); final NicHandle nicHandle = subject.generate("AUTO-111", RpslObject.parse("person: some name\nnic-hdl: AUTO-111")); assertThat(nicHandle.toString(), is("SN10-RIPE...
@Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
@Test public void generate_unspecified_long() { when(nicHandleRepository.claimNextAvailableIndex("SATG", SOURCE)).thenReturn(new NicHandle("SATG", 10, SOURCE)); final NicHandle nicHandle = subject.generate("AUTO-1234567", RpslObject.parse("person: Satellite advisory Technologies Group Ltd\nnic-hdl: AUTO-1234567")); ass...
@Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getTypeAttribute().getCleanValue().toString()); } @Autowired NicHandleFactory(final NicHandleRepository nicHandleReposit...
@Test public void getAttributeType() { assertThat(subject.getAttributeType(), is(AttributeType.NIC_HDL)); }
@Override public AttributeType getAttributeType() { return AttributeType.NIC_HDL; }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public AttributeType getAttributeType() { return AttributeType.NIC_HDL; } }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public AttributeType getAttributeType() { return AttributeType.NIC_HDL; } @Autowired NicHandleFactory(final NicHandleRepository nicHandleRepository, final CountryCodeRepository countryCodeRepository); }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public AttributeType getAttributeType() { return AttributeType.NIC_HDL; } @Autowired NicHandleFactory(final NicHandleRepository nicHandleRepository, final CountryCodeRepository countryCodeRepository); @Override AttributeType getAttributeType(); @Ov...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public AttributeType getAttributeType() { return AttributeType.NIC_HDL; } @Autowired NicHandleFactory(final NicHandleRepository nicHandleRepository, final CountryCodeRepository countryCodeRepository); @Override AttributeType getAttributeType(); @Ov...
@Test public void claim() throws Exception { final NicHandle nicHandle = new NicHandle("DW", 10, "RIPE"); when(nicHandleRepository.claimSpecified(nicHandle)).thenReturn(true); assertThat(subject.claim("DW10-RIPE"), is(nicHandle)); }
@Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString())); } return nicHandle; }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
@Test public void claim_not_available() { when(nicHandleRepository.claimSpecified(new NicHandle("DW", 10, "RIPE"))).thenReturn(false); try { subject.claim("DW10-RIPE"); fail("Claim succeeded?"); } catch (ClaimException e) { assertThat(e.getErrorMessage(), is(UpdateMessages.nicHandleNotAvailable("DW10-RIPE"))); } }
@Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString())); } return nicHandle; }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
@Test public void claim_invalid_handle() { try { subject.claim("INVALID_HANDLE"); fail("Claim succeeded?"); } catch (ClaimException e) { assertThat(e.getErrorMessage(), is(ValidationMessages.syntaxError("INVALID_HANDLE"))); } }
@Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString())); } return nicHandle; }
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
NicHandleFactory extends AbstractAutoKeyFactory<NicHandle> { @Override public NicHandle claim(final String key) throws ClaimException { final NicHandle nicHandle = parseNicHandle(key); if (!nicHandleRepository.claimSpecified(nicHandle)) { throw new ClaimException(UpdateMessages.nicHandleNotAvailable(nicHandle.toString(...
@Test(expected = IllegalArgumentException.class) public void generate_invalid_placeHolder() { subject.generate("AUTO", RpslObject.parse("organisation: AUTO\norg-name: name")); }
@Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
@Test public void generate_specified_space() { when(organisationIdRepository.claimNextAvailableIndex("DW", SOURCE)).thenReturn(new OrganisationId("DW", 10, SOURCE)); final OrganisationId organisationId = subject.generate("AUTO-1234567DW", RpslObject.parse("organisation: AUTO\norg-name: name")); assertThat(organisationI...
@Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
@Test public void generate_unspecified_space_single_word_name() { when(organisationIdRepository.claimNextAvailableIndex("TA", SOURCE)).thenReturn(new OrganisationId("TA", 1, SOURCE)); RpslObject orgObject = RpslObject.parse("organisation: AUTO-1\norg-name: Tesco"); final OrganisationId organisationId = subject.generate...
@Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
@Test public void generate_unspecified_space() { when(organisationIdRepository.claimNextAvailableIndex("SATG", SOURCE)).thenReturn(new OrganisationId("SATG", 10, SOURCE)); final OrganisationId organisationId = subject.generate("AUTO-111", RpslObject.parse("organisation: AUTO\norg-name: Satellite advisory Technologies G...
@Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId generate(final String keyPlaceHolder, final RpslObject object) { return generateForName(keyPlaceHolder, object.getValueForAttribute(AttributeType.ORG_NAME).toString()); } @Autowired OrganisationIdFactory(final Organi...
@Test public void testDateToString_dateTime() throws Exception { assertThat(FormatHelper.dateToString(LocalDateTime.of(2001, 10, 1, 12, 0, 0)), is("2001-10-01")); }
public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); }
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } }
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } private FormatHelper(); }
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } private FormatHelper(); static String dateToString(final TemporalAccessor temporalAccessor); static String dateTimeToString(final Tem...
FormatHelper { public static String dateToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } return DATE_FORMAT.format(temporalAccessor); } private FormatHelper(); static String dateToString(final TemporalAccessor temporalAccessor); static String dateTimeToString(final Tem...
@Test public void getAttributeType() { assertThat(subject.getAttributeType(), is(AttributeType.ORGANISATION)); }
@Override public AttributeType getAttributeType() { return AttributeType.ORGANISATION; }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public AttributeType getAttributeType() { return AttributeType.ORGANISATION; } }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public AttributeType getAttributeType() { return AttributeType.ORGANISATION; } @Autowired OrganisationIdFactory(final OrganisationIdRepository organisationIdRepository); }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public AttributeType getAttributeType() { return AttributeType.ORGANISATION; } @Autowired OrganisationIdFactory(final OrganisationIdRepository organisationIdRepository); @Override AttributeType getAttributeType(); @Override OrganisationId...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public AttributeType getAttributeType() { return AttributeType.ORGANISATION; } @Autowired OrganisationIdFactory(final OrganisationIdRepository organisationIdRepository); @Override AttributeType getAttributeType(); @Override OrganisationId...
@Test public void claim() throws Exception { try { subject.claim("ORG-DW10-RIPE"); fail("claim() supported?"); } catch (ClaimException e) { assertThat(e.getErrorMessage(), is(ValidationMessages.syntaxError("ORG-DW10-RIPE (must be AUTO-nnn for create)"))); } }
@Override public OrganisationId claim(final String key) throws ClaimException { throw new ClaimException(ValidationMessages.syntaxError(key, "must be AUTO-nnn for create")); }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId claim(final String key) throws ClaimException { throw new ClaimException(ValidationMessages.syntaxError(key, "must be AUTO-nnn for create")); } }
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId claim(final String key) throws ClaimException { throw new ClaimException(ValidationMessages.syntaxError(key, "must be AUTO-nnn for create")); } @Autowired OrganisationIdFactory(final OrganisationIdRepository organisa...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId claim(final String key) throws ClaimException { throw new ClaimException(ValidationMessages.syntaxError(key, "must be AUTO-nnn for create")); } @Autowired OrganisationIdFactory(final OrganisationIdRepository organisa...
OrganisationIdFactory extends AbstractAutoKeyFactory<OrganisationId> { @Override public OrganisationId claim(final String key) throws ClaimException { throw new ClaimException(ValidationMessages.syntaxError(key, "must be AUTO-nnn for create")); } @Autowired OrganisationIdFactory(final OrganisationIdRepository organisa...
@Test public void isX509Key() throws IOException { assertThat(X509CertificateWrapper.looksLikeX509Key(x509Keycert), is(true)); assertThat(X509CertificateWrapper.looksLikeX509Key(pgpKeycert), is(false)); }
static boolean looksLikeX509Key(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(X509_HEADER) != -1 && pgpKey.indexOf(X509_FOOTER) != -1; }
X509CertificateWrapper implements KeyWrapper { static boolean looksLikeX509Key(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(X509_HEADER) != -1 && pgpKey.indexOf(X509_FOOTER) != -1; } }
X509CertificateWrapper implements KeyWrapper { static boolean looksLikeX509Key(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(X509_HEADER) != -1 && pgpKey.indexOf(X509_FOOTER) != -1; } private X509CertificateWrapper(final X509Certifica...
X509CertificateWrapper implements KeyWrapper { static boolean looksLikeX509Key(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(X509_HEADER) != -1 && pgpKey.indexOf(X509_FOOTER) != -1; } private X509CertificateWrapper(final X509Certifica...
X509CertificateWrapper implements KeyWrapper { static boolean looksLikeX509Key(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(X509_HEADER) != -1 && pgpKey.indexOf(X509_FOOTER) != -1; } private X509CertificateWrapper(final X509Certifica...
@Test public void getMethod() { X509CertificateWrapper subject = X509CertificateWrapper.parse(x509Keycert); assertThat(subject.getMethod(), is("X509")); }
@Override public String getMethod() { return METHOD; }
X509CertificateWrapper implements KeyWrapper { @Override public String getMethod() { return METHOD; } }
X509CertificateWrapper implements KeyWrapper { @Override public String getMethod() { return METHOD; } private X509CertificateWrapper(final X509Certificate certificate); }
X509CertificateWrapper implements KeyWrapper { @Override public String getMethod() { return METHOD; } private X509CertificateWrapper(final X509Certificate certificate); static X509CertificateWrapper parse(final RpslObject rpslObject); static X509CertificateWrapper parse(final byte[] certificate); @Override boolean equ...
X509CertificateWrapper implements KeyWrapper { @Override public String getMethod() { return METHOD; } private X509CertificateWrapper(final X509Certificate certificate); static X509CertificateWrapper parse(final RpslObject rpslObject); static X509CertificateWrapper parse(final byte[] certificate); @Override boolean equ...
@Test public void getFingerprint() { X509CertificateWrapper subject = X509CertificateWrapper.parse(x509Keycert); assertThat(subject.getFingerprint(), is("16:4F:B6:A4:D9:BC:0C:92:D4:48:13:FE:B6:EF:E2:82")); }
@Override public String getFingerprint() { try { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] der = certificate.getEncoded(); md.update(der); byte[] digest = md.digest(); StringBuilder builder = new StringBuilder(); for (byte next : digest) { if (builder.length() > 0) { builder.append(':'); } builder.app...
X509CertificateWrapper implements KeyWrapper { @Override public String getFingerprint() { try { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] der = certificate.getEncoded(); md.update(der); byte[] digest = md.digest(); StringBuilder builder = new StringBuilder(); for (byte next : digest) { if (builder.len...
X509CertificateWrapper implements KeyWrapper { @Override public String getFingerprint() { try { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] der = certificate.getEncoded(); md.update(der); byte[] digest = md.digest(); StringBuilder builder = new StringBuilder(); for (byte next : digest) { if (builder.len...
X509CertificateWrapper implements KeyWrapper { @Override public String getFingerprint() { try { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] der = certificate.getEncoded(); md.update(der); byte[] digest = md.digest(); StringBuilder builder = new StringBuilder(); for (byte next : digest) { if (builder.len...
X509CertificateWrapper implements KeyWrapper { @Override public String getFingerprint() { try { MessageDigest md = MessageDigest.getInstance("MD5"); byte[] der = certificate.getEncoded(); md.update(der); byte[] digest = md.digest(); StringBuilder builder = new StringBuilder(); for (byte next : digest) { if (builder.len...
@Test public void isExpired() { X509CertificateWrapper subject = X509CertificateWrapper.parse(x509Keycert); assertThat(subject.isExpired(dateTimeProvider), is(false)); when(dateTimeProvider.getCurrentDateTime()).thenReturn(LocalDateTime.now().plusYears(100)); assertThat(subject.isExpired(dateTimeProvider), is(true)); }
public boolean isExpired(final DateTimeProvider dateTimeProvider) { final LocalDateTime notAfter = DateUtil.fromDate(certificate.getNotAfter()); return notAfter.isBefore(dateTimeProvider.getCurrentDateTime()); }
X509CertificateWrapper implements KeyWrapper { public boolean isExpired(final DateTimeProvider dateTimeProvider) { final LocalDateTime notAfter = DateUtil.fromDate(certificate.getNotAfter()); return notAfter.isBefore(dateTimeProvider.getCurrentDateTime()); } }
X509CertificateWrapper implements KeyWrapper { public boolean isExpired(final DateTimeProvider dateTimeProvider) { final LocalDateTime notAfter = DateUtil.fromDate(certificate.getNotAfter()); return notAfter.isBefore(dateTimeProvider.getCurrentDateTime()); } private X509CertificateWrapper(final X509Certificate certifi...
X509CertificateWrapper implements KeyWrapper { public boolean isExpired(final DateTimeProvider dateTimeProvider) { final LocalDateTime notAfter = DateUtil.fromDate(certificate.getNotAfter()); return notAfter.isBefore(dateTimeProvider.getCurrentDateTime()); } private X509CertificateWrapper(final X509Certificate certifi...
X509CertificateWrapper implements KeyWrapper { public boolean isExpired(final DateTimeProvider dateTimeProvider) { final LocalDateTime notAfter = DateUtil.fromDate(certificate.getNotAfter()); return notAfter.isBefore(dateTimeProvider.getCurrentDateTime()); } private X509CertificateWrapper(final X509Certificate certifi...
@Test(expected = IllegalArgumentException.class) public void invalidCertificateBase64IsTruncated() { final RpslObject keycert = RpslObject.parse( "key-cert: X509-3465\n" + "method: X509\n" + "owner: /description=570433-veZWA34E9nftz1i7/C=PL/ST=Foo/L=Bar/CN=Test/emailAddress=noreply@test.com\n" + "fingerpr: 07:AC:10:C0:...
public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(StandardCharsets.ISO_8859_1)); } catch (StreamParsingE...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
@Test(expected = IllegalArgumentException.class) public void invalidCertificateNoBase64Data() { final RpslObject keycert = RpslObject.parse( "key-cert: X509-3465\n" + "method: X509\n" + "owner: /description=570433-veZWA34E9nftz1i7/C=PL/ST=Foo/L=Bar/CN=Test/emailAddress=noreply@test.com\n" + "fingerpr: 07:AC:10:C0:22:64...
public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(StandardCharsets.ISO_8859_1)); } catch (StreamParsingE...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
@Test(expected = IllegalArgumentException.class) public void invalidCertificateInvalidBase64Data() { final RpslObject keycert = RpslObject.parse( "key-cert: X509-3465\n" + "method: X509\n" + "owner: /description=570433-veZWA34E9nftz1i7/C=PL/ST=Foo/L=Bar/CN=Test/emailAddress=noreply@test.com\n" + "fingerpr: 07:AC:10:C0:...
public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(StandardCharsets.ISO_8859_1)); } catch (StreamParsingE...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
@Test(expected = IllegalArgumentException.class) public void invalidCertificateNoCertifLines() { final RpslObject keycert = RpslObject.parse( "key-cert: X509-3465\n" + "method: X509\n" + "owner: /description=570433-veZWA34E9nftz1i7/C=PL/ST=Foo/L=Bar/CN=Test/emailAddress=noreply@test.com\n" + "fingerpr: 07:AC:10:C0:22:6...
public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(StandardCharsets.ISO_8859_1)); } catch (StreamParsingE...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
X509CertificateWrapper implements KeyWrapper { public static X509CertificateWrapper parse(final RpslObject rpslObject) { if (!looksLikeX509Key(rpslObject)) { throw new IllegalArgumentException("The supplied object has no key"); } try { return parse(RpslObjectFilter.getCertificateFromKeyCert(rpslObject).getBytes(Standar...
@Test public void testDateTimeToString_null() { assertNull(FormatHelper.dateTimeToString(null)); }
public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); }
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } }
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } private FormatHe...
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } private FormatHe...
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } private FormatHe...
@Test public void createKeyWrapper_invalid_pgp_key() { final RpslObject rpslObject = RpslObject.parse("" + "key-cert: PGPKEY-28F6CD6C\n" + "method: PGP\n" + "owner: DFN-CERT (2003), ENCRYPTION Key\n" + "fingerpr: 1C40 500A 1DC4 A8D8 D3EA ABF9 EE99 1EE2 28F6 CD6C\n" + "certif: -----BEGIN PGP PUBLIC KEY BLOCK-----\n" + "...
@CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(object)) { return X5...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
@Test public void createKeyWrapper_invalid_x509_key() { final RpslObject rpslObject = RpslObject.parse("" + "key-cert: AUTO-1\n" + "method: X509\n" + "owner: /CN=4a96eecf-9d1c-4e12-8add-5ea5522976d8\n" + "fingerpr: 82:7C:C5:40:D1:DB:AE:6A:FA:F8:40:3E:3C:9C:27:7C\n" + "certif: -----BEGIN CERTIFICATE-----\n" + "certif: -...
@CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(object)) { return X5...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
@Test public void createKeyWrapper_pgp_key() { final RpslObject rpslObject = RpslObject.parse("" + "key-cert: X509-1\n" + "method: X509\n" + "owner: /C=NL/O=RIPE NCC/OU=Members/CN=zz.example.denis/Email=denis@ripe.net\n" + "fingerpr: E7:0F:3B:D4:2F:DD:F5:84:3F:4C:D2:98:78:F3:10:3D\n" + "certif: -----BEGIN CERTIFICATE--...
@CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(object)) { return X5...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
@Test public void createKeyWrapper_x509_key() { final RpslObject rpslObject = RpslObject.parse("" + "key-cert: PGPKEY-81CCF97D\n" + "method: PGP\n" + "owner: Unknown <unread@ripe.net>\n" + "fingerpr: EDDF 375A B830 D1BB 26E5 ED3B 76CA 91EF 81CC F97D\n" + "certif: -----BEGIN PGP PUBLIC KEY BLOCK-----\n" + "certif: Versi...
@CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(object)) { return X5...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
KeyWrapperFactory { @CheckForNull public KeyWrapper createKeyWrapper(final RpslObject object, final UpdateContainer updateContainer, final UpdateContext updateContext) { try { if (PgpPublicKeyWrapper.looksLikePgpKey(object)) { return PgpPublicKeyWrapper.parse(object); } else if (X509CertificateWrapper.looksLikeX509Key(...
@Test public void isPgpKey() { assertThat(PgpPublicKeyWrapper.looksLikePgpKey(pgpKeycert), is(true)); assertThat(PgpPublicKeyWrapper.looksLikePgpKey(x509Keycert), is(false)); }
static boolean looksLikePgpKey(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(PGP_HEADER) != -1 && pgpKey.indexOf(PGP_FOOTER) != -1; }
PgpPublicKeyWrapper implements KeyWrapper { static boolean looksLikePgpKey(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(PGP_HEADER) != -1 && pgpKey.indexOf(PGP_FOOTER) != -1; } }
PgpPublicKeyWrapper implements KeyWrapper { static boolean looksLikePgpKey(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(PGP_HEADER) != -1 && pgpKey.indexOf(PGP_FOOTER) != -1; } PgpPublicKeyWrapper(final PGPPublicKey masterKey, final L...
PgpPublicKeyWrapper implements KeyWrapper { static boolean looksLikePgpKey(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(PGP_HEADER) != -1 && pgpKey.indexOf(PGP_FOOTER) != -1; } PgpPublicKeyWrapper(final PGPPublicKey masterKey, final L...
PgpPublicKeyWrapper implements KeyWrapper { static boolean looksLikePgpKey(final RpslObject rpslObject) { final String pgpKey = RpslObjectFilter.getCertificateFromKeyCert(rpslObject); return pgpKey.indexOf(PGP_HEADER) != -1 && pgpKey.indexOf(PGP_FOOTER) != -1; } PgpPublicKeyWrapper(final PGPPublicKey masterKey, final L...
@Test public void multiplePublicKeys() throws Exception { try { PgpPublicKeyWrapper.parse(RpslObject.parse(getResource("keycerts/PGPKEY-MULTIPLE-PUBLIC-KEYS.TXT"))); fail(); } catch (IllegalArgumentException e) { assertThat(e.getMessage(), is("The supplied object has multiple keys")); } }
public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.ISO_8859_1); final ArmoredInputStream armored...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
@Test public void parsePrivateKey() throws Exception { try { PgpPublicKeyWrapper.parse(RpslObject.parse(getResource("keycerts/PGPKEY-PRIVATE-KEY.TXT"))); fail(); } catch (IllegalArgumentException e) { assertThat(e.getMessage(), is("The supplied object has no key")); } }
public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.ISO_8859_1); final ArmoredInputStream armored...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
@Test public void isExpired() { final PgpPublicKeyWrapper subject = PgpPublicKeyWrapper.parse( RpslObject.parse( "key-cert: PGPKEY-C88CA438\n" + "method: PGP\n" + "owner: Expired <expired@ripe.net>\n" + "fingerpr: 610A 2457 2BA3 A575 5F85 4DD8 5E62 6C72 C88C A438\n" + "certif: -----BEGIN PGP PUBLIC KEY BLOCK-----\n" + ...
public boolean isExpired(final DateTimeProvider dateTimeProvider) { final long validSeconds = masterKey.getValidSeconds(); if (validSeconds > 0) { final int days = Long.valueOf(Long.divideUnsigned(validSeconds, SECONDS_IN_ONE_DAY)).intValue(); final LocalDateTime expired = (DateUtil.fromDate(masterKey.getCreationTime()...
PgpPublicKeyWrapper implements KeyWrapper { public boolean isExpired(final DateTimeProvider dateTimeProvider) { final long validSeconds = masterKey.getValidSeconds(); if (validSeconds > 0) { final int days = Long.valueOf(Long.divideUnsigned(validSeconds, SECONDS_IN_ONE_DAY)).intValue(); final LocalDateTime expired = (D...
PgpPublicKeyWrapper implements KeyWrapper { public boolean isExpired(final DateTimeProvider dateTimeProvider) { final long validSeconds = masterKey.getValidSeconds(); if (validSeconds > 0) { final int days = Long.valueOf(Long.divideUnsigned(validSeconds, SECONDS_IN_ONE_DAY)).intValue(); final LocalDateTime expired = (D...
PgpPublicKeyWrapper implements KeyWrapper { public boolean isExpired(final DateTimeProvider dateTimeProvider) { final long validSeconds = masterKey.getValidSeconds(); if (validSeconds > 0) { final int days = Long.valueOf(Long.divideUnsigned(validSeconds, SECONDS_IN_ONE_DAY)).intValue(); final LocalDateTime expired = (D...
PgpPublicKeyWrapper implements KeyWrapper { public boolean isExpired(final DateTimeProvider dateTimeProvider) { final long validSeconds = masterKey.getValidSeconds(); if (validSeconds > 0) { final int days = Long.valueOf(Long.divideUnsigned(validSeconds, SECONDS_IN_ONE_DAY)).intValue(); final LocalDateTime expired = (D...
@Test public void unreadableKeyring() { try { PgpPublicKeyWrapper.parse( RpslObject.parse( "key-cert: PGPKEY-2424420B\n" + "method: PGP\n" + "owner: Test User <noreply@ripe.net>\n" + "fingerpr: 3F0D 878A 9352 5F7C 4BED F475 A72E FF2A 2424 420B\n" + "certif: -----BEGIN PGP PUBLIC KEY BLOCK-----\n" + "certif: Comment: GP...
public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.ISO_8859_1); final ArmoredInputStream armored...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
PgpPublicKeyWrapper implements KeyWrapper { public static PgpPublicKeyWrapper parse(final RpslObject object) { if (!looksLikePgpKey(object)) { throw new IllegalArgumentException("The supplied object has no key"); } try { final byte[] bytes = RpslObjectFilter.getCertificateFromKeyCert(object).getBytes(StandardCharsets.I...
@Test public void isRevoked() { final PgpPublicKeyWrapper subject = PgpPublicKeyWrapper.parse( RpslObject.parse( "key-cert: PGPKEY-A48E76B2\n" + "method: PGP\n" + "owner: Revoked <revoked@ripe.net>\n" + "fingerpr: D9A8 D291 0E72 DE20 FE50 C8FD FC24 50DF A48E 76B2\n" + "certif: -----BEGIN PGP PUBLIC KEY BLOCK-----\n" + ...
public boolean isRevoked() { return masterKey.hasRevocation(); }
PgpPublicKeyWrapper implements KeyWrapper { public boolean isRevoked() { return masterKey.hasRevocation(); } }
PgpPublicKeyWrapper implements KeyWrapper { public boolean isRevoked() { return masterKey.hasRevocation(); } PgpPublicKeyWrapper(final PGPPublicKey masterKey, final List<PGPPublicKey> subKeys); }
PgpPublicKeyWrapper implements KeyWrapper { public boolean isRevoked() { return masterKey.hasRevocation(); } PgpPublicKeyWrapper(final PGPPublicKey masterKey, final List<PGPPublicKey> subKeys); static PgpPublicKeyWrapper parse(final RpslObject object); PGPPublicKey getPublicKey(); List<PGPPublicKey> getSubKeys(); @Over...
PgpPublicKeyWrapper implements KeyWrapper { public boolean isRevoked() { return masterKey.hasRevocation(); } PgpPublicKeyWrapper(final PGPPublicKey masterKey, final List<PGPPublicKey> subKeys); static PgpPublicKeyWrapper parse(final RpslObject object); PGPPublicKey getPublicKey(); List<PGPPublicKey> getSubKeys(); @Over...
@Test public void testDateTimeToString_date() { assertThat(FormatHelper.dateTimeToString(LocalDate.of(2001, 10, 1)), is("2001-10-01")); }
public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); }
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } }
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } private FormatHe...
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } private FormatHe...
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } private FormatHe...
@Test public void verify_smime_plaintext() throws Exception { final String signedData = ( "Content-Transfer-Encoding: 7bit\n" + "Content-Type: text/plain;\n" + "\tcharset=us-ascii\n" + "\n" + "person: First Person\n" + "address: St James Street\n" + "address: Burnley\n" + "address: UK\n" + "phone: +44 282 420469\n" + "...
public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigners().iterator(); if ...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
@Test public void verify_smime_plaintext_multiple_paragraphs() throws Exception { final String signedData = ("Content-Type: text/plain; charset=\"iso-8859-1\"\n" + "Content-Transfer-Encoding: 7bit\n" + "Content-Language: de-DE\n" + "\n" + "inetnum: 193.0.0.0 - 193.0.0.255\n" + "netname: NETNAME\n" + "descr: Description...
public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigners().iterator(); if ...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
@Test public void verify_smime_multipart_inetnum() throws Exception { final String signedData = ( "Content-Type: multipart/alternative;\n" + "boundary=\"_000_54F98DDECB052B4A98783EDEF1B77C4C30649470SG000708corproo_\"\n" + "Content-Language: de-DE\n" + "\n" + "--_000_54F98DDECB052B4A98783EDEF1B77C4C30649470SG000708corpr...
public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigners().iterator(); if ...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
@Test public void verify_smime_multipart_person() throws Exception { final String signedData = ( "Content-Type: multipart/alternative;\n" + "\tboundary=\"Apple-Mail=_C45B4ECE-1DB6-4DDE-8B6D-4DB0BB0CDC8E\"\n" + "\n" + "\n" + "--Apple-Mail=_C45B4ECE-1DB6-4DDE-8B6D-4DB0BB0CDC8E\n" + "Content-Transfer-Encoding: 7bit\n" + "...
public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigners().iterator(); if ...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
X509SignedMessage { public boolean verify(final X509Certificate certificate) { try { CMSProcessable cmsProcessable = new CMSProcessableByteArray(signedData.getBytes()); CMSSignedData signedData = new CMSSignedData(cmsProcessable, Base64.decode(signature)); Iterator signersIterator = signedData.getSignerInfos().getSigne...
@Test public void isEquals() { X509SignedMessage first = new X509SignedMessage("First Test", "First Signature"); X509SignedMessage second = new X509SignedMessage("Second Test", "Second Signature"); assertThat(first.equals(first), is(true)); assertThat(first.equals(second), is(false)); }
@Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final X509SignedMessage that = (X509SignedMessage) o; return Objects.equals(signature, that.signature); }
X509SignedMessage { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final X509SignedMessage that = (X509SignedMessage) o; return Objects.equals(signature, that.signature); } }
X509SignedMessage { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final X509SignedMessage that = (X509SignedMessage) o; return Objects.equals(signature, that.signature); } X509SignedMessage(final String signedData, final String s...
X509SignedMessage { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final X509SignedMessage that = (X509SignedMessage) o; return Objects.equals(signature, that.signature); } X509SignedMessage(final String signedData, final String s...
X509SignedMessage { @Override public boolean equals(final Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; final X509SignedMessage that = (X509SignedMessage) o; return Objects.equals(signature, that.signature); } X509SignedMessage(final String signedData, final String s...
@Test public void log() throws Exception { subject = new LoggingHandlerAdapter(loggerContext); subject.log(statementInfo, resultInfo); verify(loggerContext, times(1)).logQuery(statementInfo, resultInfo); }
@Override public void log(final StatementInfo statementInfo, final ResultInfo resultInfo) { loggerContext.logQuery(statementInfo, resultInfo); }
LoggingHandlerAdapter implements LoggingHandler { @Override public void log(final StatementInfo statementInfo, final ResultInfo resultInfo) { loggerContext.logQuery(statementInfo, resultInfo); } }
LoggingHandlerAdapter implements LoggingHandler { @Override public void log(final StatementInfo statementInfo, final ResultInfo resultInfo) { loggerContext.logQuery(statementInfo, resultInfo); } @Autowired LoggingHandlerAdapter(final LoggerContext loggerContext); }
LoggingHandlerAdapter implements LoggingHandler { @Override public void log(final StatementInfo statementInfo, final ResultInfo resultInfo) { loggerContext.logQuery(statementInfo, resultInfo); } @Autowired LoggingHandlerAdapter(final LoggerContext loggerContext); @Override void log(final StatementInfo statementInfo, f...
LoggingHandlerAdapter implements LoggingHandler { @Override public void log(final StatementInfo statementInfo, final ResultInfo resultInfo) { loggerContext.logQuery(statementInfo, resultInfo); } @Autowired LoggingHandlerAdapter(final LoggerContext loggerContext); @Override void log(final StatementInfo statementInfo, f...
@Test public void logUpdateResult_create_success() { final RpslObject maintainer = RpslObject.parse("mntner: TST-MNT"); final UpdateResult updateResult = new UpdateResult(maintainer, maintainer, Action.CREATE, UpdateStatus.SUCCESS, new ObjectMessages(), 0, false); when(update.getCredentials()).thenReturn(new Credential...
public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); }
UpdateLog { public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); } }
UpdateLog { public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); } UpdateLog(); UpdateLog(final Logger logger); }
UpdateLog { public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); } UpdateLog(); UpdateLog(final Logger logger); void logUpdateResult(final UpdateRe...
UpdateLog { public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); } UpdateLog(); UpdateLog(final Logger logger); void logUpdateResult(final UpdateRe...
@Test public void logUpdateResult_create_success_dryRun() { final RpslObject maintainer = RpslObject.parse("mntner: TST-MNT"); final UpdateResult updateResult = new UpdateResult(maintainer, maintainer, Action.CREATE, UpdateStatus.SUCCESS, new ObjectMessages(), 0, true); when(update.getCredentials()).thenReturn(new Cred...
public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); }
UpdateLog { public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); } }
UpdateLog { public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); } UpdateLog(); UpdateLog(final Logger logger); }
UpdateLog { public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); } UpdateLog(); UpdateLog(final Logger logger); void logUpdateResult(final UpdateRe...
UpdateLog { public void logUpdateResult(final UpdateRequest updateRequest, final UpdateContext updateContext, final Update update, final Stopwatch stopwatch) { logger.info(formatMessage(updateRequest, updateContext, update, stopwatch)); } UpdateLog(); UpdateLog(final Logger logger); void logUpdateResult(final UpdateRe...
@Test public void logException() throws Exception { subject.logUpdate(update); subject.logException(update, new NullPointerException()); subject.close(); final String log = outputStream.toString("UTF-8"); assertThat(log, containsString("" + "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n" + "<dbupdate c...
public void logException(final Update update, final Throwable throwable) { final Element updateElement = createOrGetUpdateElement(update); final Element exceptionElement = doc.createElement("exception"); updateElement.appendChild(exceptionElement); exceptionElement.appendChild(keyValue("class", throwable.getClass().get...
AuditLogger { public void logException(final Update update, final Throwable throwable) { final Element updateElement = createOrGetUpdateElement(update); final Element exceptionElement = doc.createElement("exception"); updateElement.appendChild(exceptionElement); exceptionElement.appendChild(keyValue("class", throwable....
AuditLogger { public void logException(final Update update, final Throwable throwable) { final Element updateElement = createOrGetUpdateElement(update); final Element exceptionElement = doc.createElement("exception"); updateElement.appendChild(exceptionElement); exceptionElement.appendChild(keyValue("class", throwable....
AuditLogger { public void logException(final Update update, final Throwable throwable) { final Element updateElement = createOrGetUpdateElement(update); final Element exceptionElement = doc.createElement("exception"); updateElement.appendChild(exceptionElement); exceptionElement.appendChild(keyValue("class", throwable....
AuditLogger { public void logException(final Update update, final Throwable throwable) { final Element updateElement = createOrGetUpdateElement(update); final Element exceptionElement = doc.createElement("exception"); updateElement.appendChild(exceptionElement); exceptionElement.appendChild(keyValue("class", throwable....
@Test public void logDuration() throws Exception { subject.logUpdate(update); subject.logDuration(update, "1 ns"); subject.close(); final String log = outputStream.toString("UTF-8"); assertThat(log, containsString("" + "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n" + "<dbupdate created=\"2012-12-01 00...
public void logDuration(final Update update, final String duration) { final Element updateElement = createOrGetUpdateElement(update); updateElement.appendChild(keyValue("duration", duration)); }
AuditLogger { public void logDuration(final Update update, final String duration) { final Element updateElement = createOrGetUpdateElement(update); updateElement.appendChild(keyValue("duration", duration)); } }
AuditLogger { public void logDuration(final Update update, final String duration) { final Element updateElement = createOrGetUpdateElement(update); updateElement.appendChild(keyValue("duration", duration)); } AuditLogger(final DateTimeProvider dateTimeProvider, final OutputStream outputStream); }
AuditLogger { public void logDuration(final Update update, final String duration) { final Element updateElement = createOrGetUpdateElement(update); updateElement.appendChild(keyValue("duration", duration)); } AuditLogger(final DateTimeProvider dateTimeProvider, final OutputStream outputStream); @SuppressWarnings("Throw...
AuditLogger { public void logDuration(final Update update, final String duration) { final Element updateElement = createOrGetUpdateElement(update); updateElement.appendChild(keyValue("duration", duration)); } AuditLogger(final DateTimeProvider dateTimeProvider, final OutputStream outputStream); @SuppressWarnings("Throw...
@Test public void testDateTimeToString_dateTime() throws Exception { assertThat(FormatHelper.dateTimeToString(LocalDateTime.of(2001, 10, 1, 12, 13, 14)), is("2001-10-01 12:13:14")); }
public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); }
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } }
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } private FormatHe...
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } private FormatHe...
FormatHelper { public static String dateTimeToString(final TemporalAccessor temporalAccessor) { if (temporalAccessor == null) { return null; } if (temporalAccessor.isSupported(ChronoField.HOUR_OF_DAY)) { return DATE_TIME_FORMAT.format(temporalAccessor); } return DATE_FORMAT.format(temporalAccessor); } private FormatHe...
@Test public void logQuery() throws Exception { final Map<Integer, Object> params = Maps.newTreeMap(); params.put(1, "p1"); params.put(2, 22); final List<List<String>> rows = Arrays.asList( Arrays.asList("c1-1", "c1-2"), Arrays.asList("c2-1", "c2-2")); final StatementInfo statementInfo = new StatementInfo("sql", params...
public void logQuery(final Update update, final StatementInfo statementInfo, final ResultInfo resultInfo) { final Element updateElement = createOrGetUpdateElement(update); final Element queryElement = doc.createElement("query"); updateElement.appendChild(queryElement); queryElement.appendChild(keyValue("sql", statement...
AuditLogger { public void logQuery(final Update update, final StatementInfo statementInfo, final ResultInfo resultInfo) { final Element updateElement = createOrGetUpdateElement(update); final Element queryElement = doc.createElement("query"); updateElement.appendChild(queryElement); queryElement.appendChild(keyValue("s...
AuditLogger { public void logQuery(final Update update, final StatementInfo statementInfo, final ResultInfo resultInfo) { final Element updateElement = createOrGetUpdateElement(update); final Element queryElement = doc.createElement("query"); updateElement.appendChild(queryElement); queryElement.appendChild(keyValue("s...
AuditLogger { public void logQuery(final Update update, final StatementInfo statementInfo, final ResultInfo resultInfo) { final Element updateElement = createOrGetUpdateElement(update); final Element queryElement = doc.createElement("query"); updateElement.appendChild(queryElement); queryElement.appendChild(keyValue("s...
AuditLogger { public void logQuery(final Update update, final StatementInfo statementInfo, final ResultInfo resultInfo) { final Element updateElement = createOrGetUpdateElement(update); final Element queryElement = doc.createElement("query"); updateElement.appendChild(queryElement); queryElement.appendChild(keyValue("s...
@Test public void empty() throws Exception { subject.close(); assertThat(outputStream.toString("UTF-8"), is("" + "<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"no\"?>\n" + "<dbupdate created=\"2012-12-01 00:00:00\">\n" + " <messages/>\n" + " <updates/>\n" + "</dbupdate>\n" )); verify(outputStream, times(1)).clo...
public void close() { try { writeAndClose(); } catch (IOException e) { LOGGER.error("IO Exception", e); } }
AuditLogger { public void close() { try { writeAndClose(); } catch (IOException e) { LOGGER.error("IO Exception", e); } } }
AuditLogger { public void close() { try { writeAndClose(); } catch (IOException e) { LOGGER.error("IO Exception", e); } } AuditLogger(final DateTimeProvider dateTimeProvider, final OutputStream outputStream); }
AuditLogger { public void close() { try { writeAndClose(); } catch (IOException e) { LOGGER.error("IO Exception", e); } } AuditLogger(final DateTimeProvider dateTimeProvider, final OutputStream outputStream); @SuppressWarnings("ThrowableResultOfMethodCallIgnored" /* Throwable is logged */) void log(final Message messag...
AuditLogger { public void close() { try { writeAndClose(); } catch (IOException e) { LOGGER.error("IO Exception", e); } } AuditLogger(final DateTimeProvider dateTimeProvider, final OutputStream outputStream); @SuppressWarnings("ThrowableResultOfMethodCallIgnored" /* Throwable is logged */) void log(final Message messag...
@Test public void checkDirs() { subject.remove(); final File f = new File(folder.getRoot(), "test/"); subject.setBaseDir(f.getAbsolutePath()); subject.checkDirs(); subject.init("folder"); assertThat(f.exists(), is(true)); }
public void checkDirs() { getCreatedDir(baseDir); }
LoggerContext { public void checkDirs() { getCreatedDir(baseDir); } }
LoggerContext { public void checkDirs() { getCreatedDir(baseDir); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); }
LoggerContext { public void checkDirs() { getCreatedDir(baseDir); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); void setBaseDir(final String baseDir); @PostConstruct void start(); void checkDirs(); void init(final String folderName); void remove(); File getFile(final String filename); File log(f...
LoggerContext { public void checkDirs() { getCreatedDir(baseDir); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); void setBaseDir(final String baseDir); @PostConstruct void start(); void checkDirs(); void init(final String folderName); void remove(); File getFile(final String filename); File log(f...
@Test public void getFile() throws Exception { assertThat(subject.getFile("test.txt").getName(), is("001.test.txt.gz")); assertThat(subject.getFile("test.txt").getName(), is("002.test.txt.gz")); assertThat(subject.getFile("test.txt").getName(), is("003.test.txt.gz")); }
public File getFile(final String filename) { final Context tempContext = getContext(); return getFile(tempContext.baseDir, tempContext.nextFileNumber(), filename); }
LoggerContext { public File getFile(final String filename) { final Context tempContext = getContext(); return getFile(tempContext.baseDir, tempContext.nextFileNumber(), filename); } }
LoggerContext { public File getFile(final String filename) { final Context tempContext = getContext(); return getFile(tempContext.baseDir, tempContext.nextFileNumber(), filename); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); }
LoggerContext { public File getFile(final String filename) { final Context tempContext = getContext(); return getFile(tempContext.baseDir, tempContext.nextFileNumber(), filename); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); void setBaseDir(final String baseDir); @PostConstruct void start(); vo...
LoggerContext { public File getFile(final String filename) { final Context tempContext = getContext(); return getFile(tempContext.baseDir, tempContext.nextFileNumber(), filename); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); void setBaseDir(final String baseDir); @PostConstruct void start(); vo...
@Test public void log() throws Exception { final File file = subject.log("test.txt", new LogCallback() { @Override public void log(final OutputStream outputStream) throws IOException { outputStream.write("test".getBytes()); } }); final InputStream is = new GZIPInputStream(new BufferedInputStream(new FileInputStream(new...
public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOutputStream(os); }...
LoggerContext { public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOut...
LoggerContext { public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOut...
LoggerContext { public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOut...
LoggerContext { public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOut...
@Test(expected = IllegalStateException.class) public void log_throws_exception() { subject.log("filename", new LogCallback() { @Override public void log(final OutputStream outputStream) throws IOException { throw new IOException(); } }); }
public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOutputStream(os); }...
LoggerContext { public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOut...
LoggerContext { public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOut...
LoggerContext { public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOut...
LoggerContext { public File log(final String name, final LogCallback callback) { final File file = getFile(name); OutputStream os = null; try { os = getOutputstream(file); callback.log(os); } catch (IOException e) { throw new IllegalStateException("Unable to write to " + file.getAbsolutePath(), e); } finally { closeOut...
@Test public void log_query_no_context_should_not_fail() { subject.logQuery(new StatementInfo("sql"), new ResultInfo(Collections.<List<String>>emptyList())); }
public void logQuery(final StatementInfo statementInfo, final ResultInfo resultInfo) { final Context ctx = context.get(); if (ctx != null && ctx.currentUpdate != null) { ctx.auditLogger.logQuery(ctx.currentUpdate, statementInfo, resultInfo); } }
LoggerContext { public void logQuery(final StatementInfo statementInfo, final ResultInfo resultInfo) { final Context ctx = context.get(); if (ctx != null && ctx.currentUpdate != null) { ctx.auditLogger.logQuery(ctx.currentUpdate, statementInfo, resultInfo); } } }
LoggerContext { public void logQuery(final StatementInfo statementInfo, final ResultInfo resultInfo) { final Context ctx = context.get(); if (ctx != null && ctx.currentUpdate != null) { ctx.auditLogger.logQuery(ctx.currentUpdate, statementInfo, resultInfo); } } @Autowired LoggerContext(final DateTimeProvider dateTimeP...
LoggerContext { public void logQuery(final StatementInfo statementInfo, final ResultInfo resultInfo) { final Context ctx = context.get(); if (ctx != null && ctx.currentUpdate != null) { ctx.auditLogger.logQuery(ctx.currentUpdate, statementInfo, resultInfo); } } @Autowired LoggerContext(final DateTimeProvider dateTimeP...
LoggerContext { public void logQuery(final StatementInfo statementInfo, final ResultInfo resultInfo) { final Context ctx = context.get(); if (ctx != null && ctx.currentUpdate != null) { ctx.auditLogger.logQuery(ctx.currentUpdate, statementInfo, resultInfo); } } @Autowired LoggerContext(final DateTimeProvider dateTimeP...
@Test(expected = IllegalStateException.class) public void logUpdateComplete_no_context_should_fail() { subject.logUpdateCompleted(update); }
public void logUpdateCompleted(final UpdateContainer updateContainer) { logUpdateComplete(updateContainer, null); }
LoggerContext { public void logUpdateCompleted(final UpdateContainer updateContainer) { logUpdateComplete(updateContainer, null); } }
LoggerContext { public void logUpdateCompleted(final UpdateContainer updateContainer) { logUpdateComplete(updateContainer, null); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); }
LoggerContext { public void logUpdateCompleted(final UpdateContainer updateContainer) { logUpdateComplete(updateContainer, null); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); void setBaseDir(final String baseDir); @PostConstruct void start(); void checkDirs(); void init(final String folderName)...
LoggerContext { public void logUpdateCompleted(final UpdateContainer updateContainer) { logUpdateComplete(updateContainer, null); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); void setBaseDir(final String baseDir); @PostConstruct void start(); void checkDirs(); void init(final String folderName)...
@Test public void logException() throws IOException { final String content = "mntner: DEV-ROOT-MNT"; final RpslObject object = RpslObject.parse(content); when(update.getOperation()).thenReturn(Operation.DELETE); when(update.getParagraph()).thenReturn(new Paragraph(content)); when(update.getSubmittedObject()).thenReturn...
public void logException(final UpdateContainer updateContainer, final Throwable throwable) { getContext().auditLogger.logException(updateContainer.getUpdate(), throwable); }
LoggerContext { public void logException(final UpdateContainer updateContainer, final Throwable throwable) { getContext().auditLogger.logException(updateContainer.getUpdate(), throwable); } }
LoggerContext { public void logException(final UpdateContainer updateContainer, final Throwable throwable) { getContext().auditLogger.logException(updateContainer.getUpdate(), throwable); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); }
LoggerContext { public void logException(final UpdateContainer updateContainer, final Throwable throwable) { getContext().auditLogger.logException(updateContainer.getUpdate(), throwable); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); void setBaseDir(final String baseDir); @PostConstruct void sta...
LoggerContext { public void logException(final UpdateContainer updateContainer, final Throwable throwable) { getContext().auditLogger.logException(updateContainer.getUpdate(), throwable); } @Autowired LoggerContext(final DateTimeProvider dateTimeProvider); void setBaseDir(final String baseDir); @PostConstruct void sta...
@Test public void log() throws IOException, MessagingException { final MailMessageLogCallback subject = new MailMessageLogCallback(message); subject.log(outputStream); verify(outputStream).write("".getBytes()); }
@Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPasswordsInContents(messageData); outputStream.wri...
MailMessageLogCallback implements LogCallback { @Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPa...
MailMessageLogCallback implements LogCallback { @Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPa...
MailMessageLogCallback implements LogCallback { @Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPa...
MailMessageLogCallback implements LogCallback { @Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPa...
@Test public void empty_input_test() { final Iterable subject = getSimpleIterable(); final Iterator<Integer> iterator = subject.iterator(); assertFalse(iterator.hasNext()); }
@Override public Iterator<T> iterator() { return new IteratorTransformer(head); }
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } }
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } IterableTransformer(final Iterable<? extends T> wrap); }
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } IterableTransformer(final Iterable<? extends T> wrap); IterableTransformer<T> setHeader(T... header); IterableTransformer<T> setHeader(Collection<T> header); abstract void apply(final T input, ...
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } IterableTransformer(final Iterable<? extends T> wrap); IterableTransformer<T> setHeader(T... header); IterableTransformer<T> setHeader(Collection<T> header); abstract void apply(final T input, ...
@Test public void run() { subject = spy(subject); subject.setGrsImportEnabled(false); subject.run(); verify(subject, times(0)).grsImport(anyString(), anyBoolean()); }
@Override @Scheduled(cron = "0 0 0 * * *") @SchedulerLock(name = "GrsImporter") public void run() { if (!grsImportEnabled) { LOGGER.info("GRS import is not enabled"); return; } List<Future> futures = grsImport(defaultSources, false); for (Future future : futures) { try { future.get(); } catch (InterruptedException | Ex...
GrsImporter implements DailyScheduledTask { @Override @Scheduled(cron = "0 0 0 * * *") @SchedulerLock(name = "GrsImporter") public void run() { if (!grsImportEnabled) { LOGGER.info("GRS import is not enabled"); return; } List<Future> futures = grsImport(defaultSources, false); for (Future future : futures) { try { futu...
GrsImporter implements DailyScheduledTask { @Override @Scheduled(cron = "0 0 0 * * *") @SchedulerLock(name = "GrsImporter") public void run() { if (!grsImportEnabled) { LOGGER.info("GRS import is not enabled"); return; } List<Future> futures = grsImport(defaultSources, false); for (Future future : futures) { try { futu...
GrsImporter implements DailyScheduledTask { @Override @Scheduled(cron = "0 0 0 * * *") @SchedulerLock(name = "GrsImporter") public void run() { if (!grsImportEnabled) { LOGGER.info("GRS import is not enabled"); return; } List<Future> futures = grsImport(defaultSources, false); for (Future future : futures) { try { futu...
GrsImporter implements DailyScheduledTask { @Override @Scheduled(cron = "0 0 0 * * *") @SchedulerLock(name = "GrsImporter") public void run() { if (!grsImportEnabled) { LOGGER.info("GRS import is not enabled"); return; } List<Future> futures = grsImport(defaultSources, false); for (Future future : futures) { try { futu...
@Test public void log_never_throws_exception() throws IOException, MessagingException { final MailMessageLogCallback subject = new MailMessageLogCallback(message); doThrow(MessagingException.class).when(message).writeTo(outputStream); subject.log(outputStream); verify(outputStream).write("".getBytes()); }
@Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPasswordsInContents(messageData); outputStream.wri...
MailMessageLogCallback implements LogCallback { @Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPa...
MailMessageLogCallback implements LogCallback { @Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPa...
MailMessageLogCallback implements LogCallback { @Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPa...
MailMessageLogCallback implements LogCallback { @Override public void log(final OutputStream outputStream) throws IOException { ByteArrayOutputStream baos = new ByteArrayOutputStream(); try { message.writeTo(baos); String messageData = new String( baos.toByteArray(), "UTF-8" ); String filtered = PasswordFilter.filterPa...
@Test public void sendResponse() throws Exception { subject.sendEmail("to", "subject", "test", ""); verify(mailSender, times(1)).send(any(MimeMessagePreparator.class)); }
@Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
@Test public void sendResponse_disabled() throws Exception { ReflectionTestUtils.setField(subject, "outgoingMailEnabled", false); subject.sendEmail("to", "subject", "test", ""); verifyZeroInteractions(mailSender); }
@Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
@Test public void send_invoked_only_once_on_permanent_negative_response() { Mockito.doAnswer(invocation -> { throw new SendFailedException("550 rejected: mail rejected for policy reasons"); }).when(mailSender).send(any(MimeMessagePreparator.class)); try { subject.sendEmail("to", "subject", "test", ""); fail(); } catch ...
@Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
@Test public void sendResponseAndCheckForReplyTo() throws Exception { final String replyToAddress = "test@ripe.net"; setExpectReplyToField(replyToAddress); subject.sendEmail("to", "subject", "test", replyToAddress); }
@Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
@Test public void sendResponseAndCheckForEmptyReplyTo() throws Exception { final String replyToAddress = ""; setExpectReplyToField(replyToAddress); subject.sendEmail("to", "subject", "test", ""); }
@Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } }
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
MailGatewaySmtp implements MailGateway { @Override public void sendEmail(final String to, final ResponseMessage responseMessage) { sendEmail(to, responseMessage.getSubject(), responseMessage.getMessage(), responseMessage.getReplyTo()); } @Autowired MailGatewaySmtp(final LoggerContext loggerContext, final MailConfigura...
@Test public void testToString() { assertThat(OverrideCredential.parse("").toString(), is("OverrideCredential{NOT_VALID}")); assertThat(OverrideCredential.parse("user").toString(), is("OverrideCredential{NOT_VALID}")); assertThat(OverrideCredential.parse("user,password").toString(), is("OverrideCredential{user,FILTERED...
@Override public String toString() { if (!overrideValues.isPresent()){ return "OverrideCredential{NOT_VALID}"; } if (StringUtils.isBlank(overrideValues.get().getRemarks())){ return String.format("OverrideCredential{%s,FILTERED}", overrideValues.get().getUsername()); } return String.format("OverrideCredential{%s,FILTERE...
OverrideCredential implements Credential { @Override public String toString() { if (!overrideValues.isPresent()){ return "OverrideCredential{NOT_VALID}"; } if (StringUtils.isBlank(overrideValues.get().getRemarks())){ return String.format("OverrideCredential{%s,FILTERED}", overrideValues.get().getUsername()); } return S...
OverrideCredential implements Credential { @Override public String toString() { if (!overrideValues.isPresent()){ return "OverrideCredential{NOT_VALID}"; } if (StringUtils.isBlank(overrideValues.get().getRemarks())){ return String.format("OverrideCredential{%s,FILTERED}", overrideValues.get().getUsername()); } return S...
OverrideCredential implements Credential { @Override public String toString() { if (!overrideValues.isPresent()){ return "OverrideCredential{NOT_VALID}"; } if (StringUtils.isBlank(overrideValues.get().getRemarks())){ return String.format("OverrideCredential{%s,FILTERED}", overrideValues.get().getUsername()); } return S...
OverrideCredential implements Credential { @Override public String toString() { if (!overrideValues.isPresent()){ return "OverrideCredential{NOT_VALID}"; } if (StringUtils.isBlank(overrideValues.get().getRemarks())){ return String.format("OverrideCredential{%s,FILTERED}", overrideValues.get().getUsername()); } return S...
@Test public void contains() { assertThat(subject.contains(ciString("AS100")), is(false)); assertThat(subject.contains(ciString("AS102")), is(true)); }
public boolean contains(final CIString autnum) { return cachedLegacyAutnums.contains(autnum); }
LegacyAutnum { public boolean contains(final CIString autnum) { return cachedLegacyAutnums.contains(autnum); } }
LegacyAutnum { public boolean contains(final CIString autnum) { return cachedLegacyAutnums.contains(autnum); } @Autowired LegacyAutnum(final LegacyAutnumDao legacyAutnumDao); }
LegacyAutnum { public boolean contains(final CIString autnum) { return cachedLegacyAutnums.contains(autnum); } @Autowired LegacyAutnum(final LegacyAutnumDao legacyAutnumDao); @PostConstruct synchronized void init(); boolean contains(final CIString autnum); int getTotal(); }
LegacyAutnum { public boolean contains(final CIString autnum) { return cachedLegacyAutnums.contains(autnum); } @Autowired LegacyAutnum(final LegacyAutnumDao legacyAutnumDao); @PostConstruct synchronized void init(); boolean contains(final CIString autnum); int getTotal(); }
@Test public void string() { final OrganisationId subject = new OrganisationId("SAT", 1, "RIPE"); assertThat(subject.toString(), is("ORG-SAT1-RIPE")); }
@Override public String toString() { return new StringBuilder() .append("ORG-") .append(getSpace().toUpperCase()) .append(getIndex()) .append("-") .append(getSuffix()) .toString(); }
OrganisationId extends AutoKey { @Override public String toString() { return new StringBuilder() .append("ORG-") .append(getSpace().toUpperCase()) .append(getIndex()) .append("-") .append(getSuffix()) .toString(); } }
OrganisationId extends AutoKey { @Override public String toString() { return new StringBuilder() .append("ORG-") .append(getSpace().toUpperCase()) .append(getIndex()) .append("-") .append(getSuffix()) .toString(); } OrganisationId(final String space, final int index, final String suffix); }
OrganisationId extends AutoKey { @Override public String toString() { return new StringBuilder() .append("ORG-") .append(getSpace().toUpperCase()) .append(getIndex()) .append("-") .append(getSuffix()) .toString(); } OrganisationId(final String space, final int index, final String suffix); @Override String toString(); }
OrganisationId extends AutoKey { @Override public String toString() { return new StringBuilder() .append("ORG-") .append(getSpace().toUpperCase()) .append(getIndex()) .append("-") .append(getSuffix()) .toString(); } OrganisationId(final String space, final int index, final String suffix); @Override String toString(); ...
@Test public void parse_auto() { try { NicHandle.parse("AUTO-1", source, countryCodes); fail("AUTO- should not be supported as NIC-HDL"); } catch (NicHandleParseException e) { assertThat(e.getMessage(), is("Primary key generation request cannot be parsed as NIC-HDL: AUTO-1")); } }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test(expected = NullPointerException.class) public void null_test() { final Iterable<Integer> subject = getSimpleIterable(1, null, 2, null); final Iterator<Integer> iterator = subject.iterator(); assertTrue(iterator.hasNext()); assertThat(iterator.next(), is(1)); assertTrue(iterator.hasNext()); assertNull(iterator.nex...
@Override public Iterator<T> iterator() { return new IteratorTransformer(head); }
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } }
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } IterableTransformer(final Iterable<? extends T> wrap); }
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } IterableTransformer(final Iterable<? extends T> wrap); IterableTransformer<T> setHeader(T... header); IterableTransformer<T> setHeader(Collection<T> header); abstract void apply(final T input, ...
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } IterableTransformer(final Iterable<? extends T> wrap); IterableTransformer<T> setHeader(T... header); IterableTransformer<T> setHeader(Collection<T> header); abstract void apply(final T input, ...
@Test public void parse_auto_lowercase() { try { NicHandle.parse("auto-1", source, countryCodes); fail("AUTO- should not be supported as NIC-HDL"); } catch (NicHandleParseException e) { assertThat(e.getMessage(), is("Primary key generation request cannot be parsed as NIC-HDL: auto-1")); } }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test public void parse_empty() { try { NicHandle.parse("", source, countryCodes); fail("Empty should not be supported as NIC-HDL"); } catch (NicHandleParseException e) { assertThat(e.getMessage(), is("Invalid NIC-HDL: ")); } }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test(expected = NicHandleParseException.class) public void parse_space_too_long() { NicHandle.parse("SPACE", source, countryCodes); }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test(expected = NicHandleParseException.class) public void parse_suffix_too_long() { NicHandle.parse("DW-VERYLONGSUFFIX", source, countryCodes); }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test(expected = NicHandleParseException.class) public void parse_suffix_invalid() { NicHandle.parse("DW-SOMETHING", source, countryCodes); }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test public void equal_null() { final NicHandle nicHandle = NicHandle.parse("DW", source, countryCodes); assertFalse(nicHandle.equals(null)); }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test public void equal_otherClass() { final NicHandle nicHandle = NicHandle.parse("DW", source, countryCodes); assertFalse(nicHandle.equals("")); }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test public void equal_self() { final NicHandle nicHandle = NicHandle.parse("DW", source, countryCodes); assertTrue(nicHandle.equals(nicHandle)); }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test public void equal_same() { final NicHandle nicHandle = NicHandle.parse("DW", source, countryCodes); assertTrue(nicHandle.equals(NicHandle.parse("DW", source, countryCodes))); }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test public void equal_different() { final NicHandle nicHandle = NicHandle.parse("DW", source, countryCodes); assertFalse(nicHandle.equals(NicHandle.parse("AB", source, countryCodes))); }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test public void simple_test() { final Iterable<Integer> subject = getSimpleIterable(1,2,3); final Iterator<Integer> iterator = subject.iterator(); assertTrue(iterator.hasNext()); assertThat(iterator.next(), is(1)); assertTrue(iterator.hasNext()); assertThat(iterator.next(), is(2)); assertTrue(iterator.hasNext()); ass...
@Override public Iterator<T> iterator() { return new IteratorTransformer(head); }
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } }
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } IterableTransformer(final Iterable<? extends T> wrap); }
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } IterableTransformer(final Iterable<? extends T> wrap); IterableTransformer<T> setHeader(T... header); IterableTransformer<T> setHeader(Collection<T> header); abstract void apply(final T input, ...
IterableTransformer implements Iterable<T> { @Override public Iterator<T> iterator() { return new IteratorTransformer(head); } IterableTransformer(final Iterable<? extends T> wrap); IterableTransformer<T> setHeader(T... header); IterableTransformer<T> setHeader(Collection<T> header); abstract void apply(final T input, ...
@Test public void hashCode_check() { NicHandle.parse("DW", source, countryCodes).hashCode(); }
public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher matcher = NIC_HDL_PATTERN.mat...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
NicHandle extends AutoKey { public static NicHandle parse(final String nicHdl, final CIString source, final Set<CIString> countryCodes) { if (StringUtils.startsWithIgnoreCase(nicHdl, "AUTO-")) { throw new NicHandleParseException("Primary key generation request cannot be parsed as NIC-HDL: " + nicHdl); } final Matcher m...
@Test public void no_warnings() { assertThat(subject.getGlobalMessages().getAllMessages(), hasSize(0)); }
public Messages getGlobalMessages() { return globalMessages; }
UpdateContext { public Messages getGlobalMessages() { return globalMessages; } }
UpdateContext { public Messages getGlobalMessages() { return globalMessages; } UpdateContext(final LoggerContext loggerContext); }
UpdateContext { public Messages getGlobalMessages() { return globalMessages; } UpdateContext(final LoggerContext loggerContext); boolean isDryRun(); void dryRun(); int getNrSinceRestart(); boolean isBatchUpdate(); void setBatchUpdate(); void addDnsCheckResponse(final DnsCheckRequest request, final DnsCheckResponse resp...
UpdateContext { public Messages getGlobalMessages() { return globalMessages; } UpdateContext(final LoggerContext loggerContext); boolean isDryRun(); void dryRun(); int getNrSinceRestart(); boolean isBatchUpdate(); void setBatchUpdate(); void addDnsCheckResponse(final DnsCheckRequest request, final DnsCheckResponse resp...
@Test public void no_errors() { final RpslObject mntner = RpslObject.parse(MAINTAINER); final Update update = new Update(new Paragraph(MAINTAINER), Operation.DELETE, Lists.<String>newArrayList(), mntner); final PreparedUpdate preparedUpdate = new PreparedUpdate(update, null, mntner, Action.DELETE); assertThat(subject.h...
public boolean hasErrors(final UpdateContainer updateContainer) { return getOrCreateContext(updateContainer).objectMessages.hasErrors(); }
UpdateContext { public boolean hasErrors(final UpdateContainer updateContainer) { return getOrCreateContext(updateContainer).objectMessages.hasErrors(); } }
UpdateContext { public boolean hasErrors(final UpdateContainer updateContainer) { return getOrCreateContext(updateContainer).objectMessages.hasErrors(); } UpdateContext(final LoggerContext loggerContext); }
UpdateContext { public boolean hasErrors(final UpdateContainer updateContainer) { return getOrCreateContext(updateContainer).objectMessages.hasErrors(); } UpdateContext(final LoggerContext loggerContext); boolean isDryRun(); void dryRun(); int getNrSinceRestart(); boolean isBatchUpdate(); void setBatchUpdate(); void ad...
UpdateContext { public boolean hasErrors(final UpdateContainer updateContainer) { return getOrCreateContext(updateContainer).objectMessages.hasErrors(); } UpdateContext(final LoggerContext loggerContext); boolean isDryRun(); void dryRun(); int getNrSinceRestart(); boolean isBatchUpdate(); void setBatchUpdate(); void ad...
@Test public void status() { final String content = "mntner: DEV-ROOT-MNT"; final RpslObject mntner = RpslObject.parse(content); final Update update = new Update(new Paragraph(content), Operation.DELETE, Lists.<String>newArrayList(), mntner); final PreparedUpdate preparedUpdate = new PreparedUpdate(update, null, mntner...
public void status(final UpdateContainer updateContainer, final UpdateStatus status) { getOrCreateContext(updateContainer).status = status; loggerContext.logStatus(updateContainer, status); }
UpdateContext { public void status(final UpdateContainer updateContainer, final UpdateStatus status) { getOrCreateContext(updateContainer).status = status; loggerContext.logStatus(updateContainer, status); } }
UpdateContext { public void status(final UpdateContainer updateContainer, final UpdateStatus status) { getOrCreateContext(updateContainer).status = status; loggerContext.logStatus(updateContainer, status); } UpdateContext(final LoggerContext loggerContext); }
UpdateContext { public void status(final UpdateContainer updateContainer, final UpdateStatus status) { getOrCreateContext(updateContainer).status = status; loggerContext.logStatus(updateContainer, status); } UpdateContext(final LoggerContext loggerContext); boolean isDryRun(); void dryRun(); int getNrSinceRestart(); bo...
UpdateContext { public void status(final UpdateContainer updateContainer, final UpdateStatus status) { getOrCreateContext(updateContainer).status = status; loggerContext.logStatus(updateContainer, status); } UpdateContext(final LoggerContext loggerContext); boolean isDryRun(); void dryRun(); int getNrSinceRestart(); bo...
@Test public void createAck() { final RpslObject object = RpslObject.parse(MAINTAINER); final Update delete = new Update(new Paragraph(MAINTAINER), Operation.DELETE, Lists.<String>newArrayList(), object); subject.setAction(delete, Action.DELETE); final Update deleteWithError = new Update(new Paragraph(MAINTAINER), Oper...
public Ack createAck() { final List<UpdateResult> updateResults = Lists.newArrayList(); for (final Update update : contexts.keySet()) { updateResults.add(createUpdateResult(update)); } final List<Paragraph> ignoredParagraphs = getIgnoredParagraphs(); return new Ack(updateResults, ignoredParagraphs); }
UpdateContext { public Ack createAck() { final List<UpdateResult> updateResults = Lists.newArrayList(); for (final Update update : contexts.keySet()) { updateResults.add(createUpdateResult(update)); } final List<Paragraph> ignoredParagraphs = getIgnoredParagraphs(); return new Ack(updateResults, ignoredParagraphs); } }
UpdateContext { public Ack createAck() { final List<UpdateResult> updateResults = Lists.newArrayList(); for (final Update update : contexts.keySet()) { updateResults.add(createUpdateResult(update)); } final List<Paragraph> ignoredParagraphs = getIgnoredParagraphs(); return new Ack(updateResults, ignoredParagraphs); } U...
UpdateContext { public Ack createAck() { final List<UpdateResult> updateResults = Lists.newArrayList(); for (final Update update : contexts.keySet()) { updateResults.add(createUpdateResult(update)); } final List<Paragraph> ignoredParagraphs = getIgnoredParagraphs(); return new Ack(updateResults, ignoredParagraphs); } U...
UpdateContext { public Ack createAck() { final List<UpdateResult> updateResults = Lists.newArrayList(); for (final Update update : contexts.keySet()) { updateResults.add(createUpdateResult(update)); } final List<Paragraph> ignoredParagraphs = getIgnoredParagraphs(); return new Ack(updateResults, ignoredParagraphs); } U...
@Test(expected = UnsupportedOperationException.class) public void credentials_are_immutable() { final ContentWithCredentials subject = new ContentWithCredentials("test", Lists.newArrayList(credential)); subject.getCredentials().add(mock(Credential.class)); }
public List<Credential> getCredentials() { return credentials; }
ContentWithCredentials { public List<Credential> getCredentials() { return credentials; } }
ContentWithCredentials { public List<Credential> getCredentials() { return credentials; } ContentWithCredentials(final String content); ContentWithCredentials(final String content, final Charset charset); ContentWithCredentials(final String content, final List<Credential> credentials); ContentWithCredentials(final S...
ContentWithCredentials { public List<Credential> getCredentials() { return credentials; } ContentWithCredentials(final String content); ContentWithCredentials(final String content, final Charset charset); ContentWithCredentials(final String content, final List<Credential> credentials); ContentWithCredentials(final S...
ContentWithCredentials { public List<Credential> getCredentials() { return credentials; } ContentWithCredentials(final String content); ContentWithCredentials(final String content, final Charset charset); ContentWithCredentials(final String content, final List<Credential> credentials); ContentWithCredentials(final S...
@Test public void getUpdate() { assertThat(subject.getUpdate(), is(update)); }
@Override public Update getUpdate() { return update; }
PreparedUpdate implements UpdateContainer { @Override public Update getUpdate() { return update; } }
PreparedUpdate implements UpdateContainer { @Override public Update getUpdate() { return update; } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); PreparedUpdate(final Update update, @Nullable final RpslObject originalObject...
PreparedUpdate implements UpdateContainer { @Override public Update getUpdate() { return update; } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); PreparedUpdate(final Update update, @Nullable final RpslObject originalObject...
PreparedUpdate implements UpdateContainer { @Override public Update getUpdate() { return update; } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); PreparedUpdate(final Update update, @Nullable final RpslObject originalObject...
@Test public void getParagraph() { subject.getParagraph(); verify(update).getParagraph(); }
public Paragraph getParagraph() { return update.getParagraph(); }
PreparedUpdate implements UpdateContainer { public Paragraph getParagraph() { return update.getParagraph(); } }
PreparedUpdate implements UpdateContainer { public Paragraph getParagraph() { return update.getParagraph(); } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); PreparedUpdate(final Update update, @Nullable final RpslObject ori...
PreparedUpdate implements UpdateContainer { public Paragraph getParagraph() { return update.getParagraph(); } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); PreparedUpdate(final Update update, @Nullable final RpslObject ori...
PreparedUpdate implements UpdateContainer { public Paragraph getParagraph() { return update.getParagraph(); } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); PreparedUpdate(final Update update, @Nullable final RpslObject ori...
@Test public void getOriginalObject() { assertThat(subject.getReferenceObject(), is(originalObject)); }
@Nullable public RpslObject getReferenceObject() { if (originalObject != null) { return originalObject; } return updatedObject; }
PreparedUpdate implements UpdateContainer { @Nullable public RpslObject getReferenceObject() { if (originalObject != null) { return originalObject; } return updatedObject; } }
PreparedUpdate implements UpdateContainer { @Nullable public RpslObject getReferenceObject() { if (originalObject != null) { return originalObject; } return updatedObject; } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); Pr...
PreparedUpdate implements UpdateContainer { @Nullable public RpslObject getReferenceObject() { if (originalObject != null) { return originalObject; } return updatedObject; } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); Pr...
PreparedUpdate implements UpdateContainer { @Nullable public RpslObject getReferenceObject() { if (originalObject != null) { return originalObject; } return updatedObject; } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); Pr...
@Test public void getUpdatedObject() { assertThat(subject.getUpdatedObject(), is(updatedObject)); }
@Nullable public RpslObject getUpdatedObject() { return updatedObject; }
PreparedUpdate implements UpdateContainer { @Nullable public RpslObject getUpdatedObject() { return updatedObject; } }
PreparedUpdate implements UpdateContainer { @Nullable public RpslObject getUpdatedObject() { return updatedObject; } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); PreparedUpdate(final Update update, @Nullable final RpslObj...
PreparedUpdate implements UpdateContainer { @Nullable public RpslObject getUpdatedObject() { return updatedObject; } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); PreparedUpdate(final Update update, @Nullable final RpslObj...
PreparedUpdate implements UpdateContainer { @Nullable public RpslObject getUpdatedObject() { return updatedObject; } PreparedUpdate(final Update update, @Nullable final RpslObject originalObject, @Nullable final RpslObject updatedObject, final Action action); PreparedUpdate(final Update update, @Nullable final RpslObj...