Class Expansions
java.lang.Object
com.atlassian.servicedesk.api.util.expansion.Expansions
Represents a collection of
Expansion
' properties on a model object should be filled in by the service when returning the model object. This allows the
service to only provide as much information in the model as required by the requester.
Use the ExpansionsParser
to produce expansions from dot delimited strings.
-
Field Summary
-
Constructor Summary
ConstructorDescriptionExpansions
(Expansion... expansions) Expansions
(Iterable<Expansion> expansions) -
Method Summary
Modifier and TypeMethodDescriptionboolean
void
checkRecursiveExpansion
(String propertyName) Checks to see if the passed in expansion string is expanded again somewhere in the expansions map.boolean
getSubExpansions
(String propertyName) int
hashCode()
boolean
isEmpty()
merge
(Expansions expansions) Create a new Expansions that prepends the propertyName to the path of all expansions represented in this Expansions object.toArray()
toString()
-
Field Details
-
EMPTY
-
-
Constructor Details
-
Expansions
-
Expansions
-
-
Method Details
-
merge
-
merge
-
canExpand
-
getSubExpansions
-
prepend
Create a new Expansions that prepends the propertyName to the path of all expansions represented in this Expansions object.The new set of expansions will answer true to canExpand(propertyName) and getSubExpansions(propertyName) will return the original set of expansions.
- Parameters:
propertyName
- - the propertyName to prepend to the set of expansions- Returns:
- a new set of expansions with the propertyName at the root of the expansions.
-
toArray
-
isEmpty
public boolean isEmpty() -
toString
-
checkRecursiveExpansion
Checks to see if the passed in expansion string is expanded again somewhere in the expansions map. This check is used to prevent recursive expansions.- Parameters:
propertyName
- the expansion property- Throws:
IllegalArgumentException
- if the expansion is recursive
-
equals
-
hashCode
public int hashCode()
-