// ------------------------------------------------------------------------- @Override public boolean matches(AbstractDocument obj) { if (obj instanceof SecurityDocument == false) { return false; } SecurityDocument document = (SecurityDocument) obj; ManageableSecurity security = document.getSecurity(); if (getObjectIds() != null && getObjectIds().contains(document.getObjectId()) == false) { return false; } if (getExternalIdSearch() != null && getExternalIdSearch().matches(security.getIdentifiers()) == false) { return false; } if (getName() != null && RegexUtils.wildcardMatch(getName(), document.getName()) == false) { return false; } if (getSecurityType() != null && getSecurityType().equals(security.getSecurityType()) == false) { return false; } if (getExternalIdValue() != null) { for (ExternalId identifier : security.getIdentifiers()) { if (RegexUtils.wildcardMatch(getExternalIdValue(), identifier.getValue()) == false) { return false; } } } return true; }