com.atlassian.confluence.api.model
Class Expansions

java.lang.Object
  extended by com.atlassian.confluence.api.model.Expansions

@ExperimentalApi
public class Expansions
extends Object


Field Summary
static Expansions EMPTY
           
 
Constructor Summary
Expansions(Expansion... expansions)
           
Expansions(Iterable<Expansion> expansions)
           
 
Method Summary
 boolean canExpand(String propertyName)
           
 void checkRecursiveExpansion(String expansion)
          Checks to see if the passed in expansion string is expanded again somewhere in the expansions map.
 boolean equals(Object o)
           
 Expansions getSubExpansions(String propertyName)
           
 boolean isEmpty()
           
 Expansion[] merge(Expansion[] expansions)
           
 Expansions merge(Expansions expansions)
           
static Expansions of(String... expansionStr)
           
 Expansions prepend(String propertyName)
          Create a new Expansions that prepends the propertyName to the path of all expansions represented in this Expansions object.
 Expansion[] toArray()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

EMPTY

public static final Expansions EMPTY
Constructor Detail

Expansions

public Expansions(Expansion... expansions)

Expansions

public Expansions(Iterable<Expansion> expansions)
Method Detail

of

public static Expansions of(String... expansionStr)

merge

public Expansions merge(Expansions expansions)

merge

public Expansion[] merge(Expansion[] expansions)

canExpand

public boolean canExpand(String propertyName)

getSubExpansions

public Expansions getSubExpansions(String propertyName)

prepend

public Expansions prepend(String propertyName)
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

public Expansion[] toArray()

isEmpty

public boolean isEmpty()

toString

public String toString()
Overrides:
toString in class Object

checkRecursiveExpansion

public void checkRecursiveExpansion(String expansion)
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:
expansion -

equals

public boolean equals(Object o)
Overrides:
equals in class Object


Copyright © 2003–2015 Atlassian. All rights reserved.