use of org.codice.alliance.libs.klv.SecurityClassificationKlvProcessor in project alliance by codice.
the class MpegTsInputTransformer method setSecurityClassificationDefault.
public void setSecurityClassificationDefault(String classification) {
notNull(classification, CLASSIFICATION_MUST_BE_NON_NULL);
klvProcessor.accept(new BaseKlvProcessorVisitor() {
@Override
public void visit(SecurityClassificationKlvProcessor securityClassificationKlvProcessor) {
securityClassificationKlvProcessor.setDefaultSecurityClassification(classification);
}
});
}
use of org.codice.alliance.libs.klv.SecurityClassificationKlvProcessor in project alliance by codice.
the class MpegTsInputTransformerTest method testSetSecurityClassificationCodeDefault.
@Test
public void testSetSecurityClassificationCodeDefault() {
SecurityClassificationKlvProcessor processor = spy(new SecurityClassificationKlvProcessor(mock(SecurityClassificationService.class), Collections.emptyMap(), ""));
MpegTsInputTransformer transformer = new MpegTsInputTransformer(inputTransformer, metacardTypes, stanag4609Processor, klvHandlerFactory, defaultKlvHandler, stanagParserFactory, processor, DISTANCE_TOLERANCE);
transformer.setSecurityClassificationDefault(CLASSIFICATION);
verify(processor).setDefaultSecurityClassification(CLASSIFICATION);
}
use of org.codice.alliance.libs.klv.SecurityClassificationKlvProcessor in project alliance by codice.
the class MpegTsInputTransformerTest method assertSecurityClassificationCode.
private void assertSecurityClassificationCode(Consumer<MpegTsInputTransformer> c, short code) {
SecurityClassificationKlvProcessor processor = spy(new SecurityClassificationKlvProcessor(mock(SecurityClassificationService.class), Collections.emptyMap(), ""));
MpegTsInputTransformer transformer = new MpegTsInputTransformer(inputTransformer, metacardTypes, stanag4609Processor, klvHandlerFactory, defaultKlvHandler, stanagParserFactory, processor, DISTANCE_TOLERANCE);
c.accept(transformer);
verify(processor).setSecurityClassification(code, CLASSIFICATION);
}
Aggregations