Package com.unboundid.scim2.server.utils
Class ResourceTrimmer
- java.lang.Object
-
- com.unboundid.scim2.server.utils.ResourceTrimmer
-
- Direct Known Subclasses:
ScimResourceTrimmer
public abstract class ResourceTrimmer extends Object
An abstract class which may be implemented to trim resources down to selected attributes.
-
-
Constructor Summary
Constructors Constructor Description ResourceTrimmer()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract booleanshouldReturn(Path path)Determine if the attribute specified by the path should be returned.protected com.fasterxml.jackson.databind.node.ArrayNodetrimArrayNode(com.fasterxml.jackson.databind.node.ArrayNode arrayNode, Path parentPath)Trim attributes of the values in the array node to return.com.fasterxml.jackson.databind.node.ObjectNodetrimObjectNode(com.fasterxml.jackson.databind.node.ObjectNode objectNode)Trim attributes of the object node to return.
-
-
-
Constructor Detail
-
ResourceTrimmer
public ResourceTrimmer()
-
-
Method Detail
-
trimObjectNode
@NotNull public com.fasterxml.jackson.databind.node.ObjectNode trimObjectNode(@NotNull com.fasterxml.jackson.databind.node.ObjectNode objectNode)
Trim attributes of the object node to return.- Parameters:
objectNode- The object node to return.- Returns:
- The trimmed object node ready to return to the client.
-
trimArrayNode
@NotNull protected com.fasterxml.jackson.databind.node.ArrayNode trimArrayNode(@NotNull com.fasterxml.jackson.databind.node.ArrayNode arrayNode, @NotNull Path parentPath)
Trim attributes of the values in the array node to return.- Parameters:
arrayNode- The array node to return.parentPath- The parent path of attributes in the array.- Returns:
- The trimmed object node ready to return to the client.
-
shouldReturn
public abstract boolean shouldReturn(@NotNull Path path)
Determine if the attribute specified by the path should be returned.- Parameters:
path- The path for the attribute.- Returns:
trueto return the attribute orfalseto remove the attribute from the returned resource.
-
-