@JsonCreator private static DeniedByIpAccessListLine create( @Nullable @JsonProperty(PROP_DESCRIPTION) String description, @Nullable @JsonProperty(PROP_INDEX) Integer index, @Nullable @JsonProperty(PROP_LINE_DESCRIPTION) String lineDescription, @Nullable @JsonProperty(PROP_NAME) String name) { checkArgument(description != null, "Missing %s", PROP_DESCRIPTION); checkArgument(index != null, "Missing %s", PROP_INDEX); checkArgument(lineDescription != null, "Missing %s", PROP_LINE_DESCRIPTION); checkArgument(name != null, "Missing %s", PROP_NAME); return new DeniedByIpAccessListLine(description, index, lineDescription, name); }
@Override protected Integer featureValueOf(DeniedByIpAccessListLine actual) { return actual.getIndex(); } }
@Override protected String featureValueOf(DeniedByIpAccessListLine actual) { return actual.getLineDescription(); } }
@Override protected String featureValueOf(DeniedByIpAccessListLine actual) { return actual.getName(); } }
public void recordAction( @Nonnull IpAccessList ipAccessList, int index, @Nonnull IpAccessListLine line) { String lineDescription = firstNonNull(line.getName(), line.toString()); String type = firstNonNull(ipAccessList.getSourceType(), "filter"); String name = firstNonNull(ipAccessList.getSourceName(), ipAccessList.getName()); String actionStr = line.getAction() == LineAction.PERMIT ? "permitted" : "denied"; String description = String.format( "Flow %s by %s named %s, index %d: %s", actionStr, type, name, index, lineDescription); if (line.getAction() == LineAction.PERMIT) { _currentTreeNode.setEvent( new PermittedByIpAccessListLine( description, index, lineDescription, ipAccessList.getName())); } else { _currentTreeNode.setEvent( new DeniedByIpAccessListLine( description, index, lineDescription, ipAccessList.getName())); } }