com.atlassian.confluence.api.model.reference
Class CollapsedReference<T>
java.lang.Object
com.atlassian.confluence.api.model.reference.Reference<T>
com.atlassian.confluence.api.model.reference.CollapsedReference<T>
- All Implemented Interfaces:
- java.lang.Iterable<T>
public final class CollapsedReference<T>
- extends Reference<T>
A collapsed reference is a property that potentially has a value, but the property's
value has not been expanded at the time fo the request. If the reference exists it
will contain enough information to identify the referent object.
|
Method Summary |
boolean |
exists()
|
T |
get()
|
java.util.Map<java.lang.Object,java.lang.Object> |
getIdProperties()
A map of properties key by the idProperty enum in the model class for the referent object. |
boolean |
isExpanded()
indicates a reference is expanded and can be resolved to an object by calling get, or whether
the reference is collapsed and calling get will throw an exception. |
java.util.Iterator<T> |
iterator()
|
java.lang.Class |
referentClass()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
exists
public boolean exists()
- Specified by:
exists in class Reference<T>
- Returns:
- true if the object is expanded and exists, or is collapsed and has enough information to identify itself, false if the object does not exist (is empty)
isExpanded
public boolean isExpanded()
- Description copied from class:
Reference
- indicates a reference is expanded and can be resolved to an object by calling get, or whether
the reference is collapsed and calling get will throw an exception.
- Specified by:
isExpanded in class Reference<T>
- Returns:
- true if the reference is expanded, false otherwise
get
public T get()
- Specified by:
get in class Reference<T>
- Returns:
- the reference object or null if the object does not exist. It is Illegal to call get() on a reference
that has not been expanded
iterator
public java.util.Iterator<T> iterator()
getIdProperties
public java.util.Map<java.lang.Object,java.lang.Object> getIdProperties()
- Description copied from class:
Reference
- A map of properties key by the idProperty enum in the model class for the referent object.
The map contains properties sufficient to identify the referent object.
- Specified by:
getIdProperties in class Reference<T>
- Returns:
- a map of id properties keyed by idProperty enum
referentClass
public java.lang.Class referentClass()
- Specified by:
referentClass in class Reference<T>
- Returns:
- the class of the referent object.
Copyright © 2003-2013 Atlassian. All Rights Reserved.