public Inclusion getInclusion(final DiffNode node) { if (node != null && !isInactive()) { final Inclusion inclusion = propertyNameInclusions.get(node.getPropertyName()); if (inclusion == INCLUDED || inclusion == EXCLUDED) { return inclusion; } final Inclusion parentNodeInclusion = getInclusion(node.getParentNode()); if (parentNodeInclusion == INCLUDED) { return INCLUDED; } } return DEFAULT; }
/** * If this node represents a bean property, this method will simply return its name. Otherwise it will return the * property name of its closest bean property representing ancestor. This way intermediate nodes like those * representing collection, map or array items will be semantically tied to their container objects. * <p/> * That is especially useful for inclusion and exclusion rules. For example, when a List is explicitly included by * property name, it would be weird if the inclusion didn't also apply to its items. */ public String getPropertyName() { if (isPropertyAware()) { return ((PropertyAwareAccessor) accessor).getPropertyName(); } else if (parentNode != null) { return parentNode.getPropertyName(); } return null; }
public IdentityStrategy resolve(final DiffNode node) { if (isQualified(node)) { final PropertyId propertyKey = new PropertyId(node.getParentNode().getValueType(), node.getPropertyName()); return strategies.get(propertyKey); } return null; }
private static boolean isQualified(final DiffNode node) { if (node.isPropertyAware()) { if (node.getParentNode() == null || node.getParentNode().getValueType() == null) { return false; } if (node.getPropertyName() == null) { return false; } return true; } return false; }
public Inclusion getInclusion(final DiffNode node) { if (isQualified(node)) { final PropertyId propertyKey = new PropertyId(node.getParentNode().getValueType(), node.getPropertyName()); final Inclusion inclusion = inclusions.get(propertyKey); if (inclusion != null && inclusion != DEFAULT) { return inclusion; } else { if (hasIncludedSiblings(node)) { return EXCLUDED; } } } return DEFAULT; }
private static boolean isQualified(final DiffNode node) { if (node.isPropertyAware()) { if (node.getParentNode() == null || node.getParentNode().getValueType() == null) { return false; } if (node.getPropertyName() == null) { return false; } return true; } return false; }
public Inclusion getInclusion(final DiffNode node) { if (node != null && !isInactive()) { final Inclusion inclusion = propertyNameInclusions.get(node.getPropertyName()); if (inclusion == INCLUDED || inclusion == EXCLUDED) { return inclusion; } final Inclusion parentNodeInclusion = getInclusion(node.getParentNode()); if (parentNodeInclusion == INCLUDED) { return INCLUDED; } } return DEFAULT; }
/** * If this node represents a bean property, this method will simply return its name. Otherwise it will return the * property name of its closest bean property representing ancestor. This way intermediate nodes like those * representing collection, map or array items will be semantically tied to their container objects. * <p/> * That is especially useful for inclusion and exclusion rules. For example, when a List is explicitly included by * property name, it would be weird if the inclusion didn't also apply to its items. */ public String getPropertyName() { if (isPropertyAware()) { return ((PropertyAwareAccessor) accessor).getPropertyName(); } else if (parentNode != null) { return parentNode.getPropertyName(); } return null; }
public IdentityStrategy resolve(final DiffNode node) { if (isQualified(node)) { final PropertyId propertyKey = new PropertyId(node.getParentNode().getValueType(), node.getPropertyName()); return strategies.get(propertyKey); } return null; }
private static boolean isQualified(final DiffNode node) { if (node.isPropertyAware()) { if (node.getParentNode() == null || node.getParentNode().getValueType() == null) { return false; } if (node.getPropertyName() == null) { return false; } return true; } return false; }
private static boolean isQualified(final DiffNode node) { if (node.isPropertyAware()) { if (node.getParentNode() == null || node.getParentNode().getValueType() == null) { return false; } if (node.getPropertyName() == null) { return false; } return true; } return false; }
public Inclusion getInclusion(final DiffNode node) { if (isQualified(node)) { final PropertyId propertyKey = new PropertyId(node.getParentNode().getValueType(), node.getPropertyName()); final Inclusion inclusion = inclusions.get(propertyKey); if (inclusion != null && inclusion != DEFAULT) { return inclusion; } else { if (hasIncludedSiblings(node)) { return EXCLUDED; } } } return DEFAULT; }