@SuppressWarnings("deprecation") @Override public List<OnmsIpInterface> findByIpAddress(final String ipAddress) { final List<OnmsIpInterface> ifaces = new ArrayList<>(); if (ipAddress == null) return ifaces; for (final OnmsIpInterface iface : findAll()) { if (ipAddress.equals(iface.getIpAddressAsString())) { ifaces.add(iface); } } return ifaces; }
@SuppressWarnings("deprecation") @Override public List<OnmsIpInterface> findByIpAddress(final String ipAddress) { final List<OnmsIpInterface> ifaces = new ArrayList<>(); if (ipAddress == null) return ifaces; for (final OnmsIpInterface iface : findAll()) { if (ipAddress.equals(iface.getIpAddressAsString())) { ifaces.add(iface); } } return ifaces; }
/** * <p>getIpAddress</p> * * @return a {@link java.lang.String} object. * * @deprecated */ @XmlTransient @Transient @JsonIgnore public String getIpAddressAsString() { return m_ipInterface.getIpAddressAsString(); }
/** * This method is used to determine if the named interface is included in * the passed package definition. If the interface belongs to the package * then a value of true is returned. If the interface does not belong to the * package a false value is returned. * * <strong>Note: </strong>Evaluation of the interface against a package * filter will only work if the IP is already in the database. * * @param iface * The interface to test against the package. * @return True if the interface is included in the package, false * otherwise. */ public boolean interfaceInPackage(final OnmsIpInterface iface, Package pkg) { return interfaceInPackage(iface.getIpAddressAsString(), pkg); } }
@SuppressWarnings("deprecation") @Override public OnmsIpInterface get(final OnmsNode node, final String ipAddress) { for (final OnmsIpInterface iface : findAll()) { if (node.equals(iface.getNode()) && ipAddress.equals(iface.getIpAddressAsString())) { return iface; } } return null; }
@SuppressWarnings("deprecation") @Override public OnmsIpInterface get(final OnmsNode node, final String ipAddress) { for (final OnmsIpInterface iface : findAll()) { if (node.equals(iface.getNode()) && ipAddress.equals(iface.getIpAddressAsString())) { return iface; } } return null; }
@SuppressWarnings("deprecation") @Override public OnmsIpInterface findByNodeIdAndIpAddress(final Integer nodeId, final String ipAddress) { for (final OnmsIpInterface iface : findAll()) { if (iface.getNode().getId().equals(nodeId) && ipAddress.equals(iface.getIpAddressAsString())) { return iface; } } return null; }
@SuppressWarnings("deprecation") @Override public OnmsIpInterface findByNodeIdAndIpAddress(final Integer nodeId, final String ipAddress) { for (final OnmsIpInterface iface : findAll()) { if (iface.getNode().getId().equals(nodeId) && ipAddress.equals(iface.getIpAddressAsString())) { return iface; } } return null; }
@SuppressWarnings("deprecation") @Override public OnmsIpInterface findByForeignKeyAndIpAddress(final String foreignSource, final String foreignId, final String ipAddress) { if (foreignId == null || ipAddress == null) { return null; } for (final OnmsIpInterface iface : findAll()) { if (!Objects.equals(ipAddress, iface.getIpAddressAsString())) { continue; } if (Objects.equals(foreignSource, iface.getForeignSource()) && Objects.equals(foreignId, iface.getForeignId())) { return iface; } } return null; }
@SuppressWarnings("deprecation") @Override public OnmsIpInterface findByForeignKeyAndIpAddress(final String foreignSource, final String foreignId, final String ipAddress) { if (foreignId == null || ipAddress == null) { return null; } for (final OnmsIpInterface iface : findAll()) { if (!Objects.equals(ipAddress, iface.getIpAddressAsString())) { continue; } if (Objects.equals(foreignSource, iface.getForeignSource()) && Objects.equals(foreignId, iface.getForeignId())) { return iface; } } return null; }
@Override public Object generateCell(Table source, Object itemId, Object columnId) { Property<OnmsIpInterface> property = source.getContainerProperty(itemId, columnId); if (property == null || property.getValue() == null) { return null; } else { return property.getValue().getIpAddressAsString(); } } }
@Override public Object generateCell(Table source, Object itemId, Object columnId) { Property<OnmsIpInterface> property = source.getContainerProperty(itemId, columnId); if (property == null || property.getValue() == null) { return null; } else { return property.getValue().getIpAddressAsString(); } } }