Package org.apache.juneau.rest.beans
Class ChildResourceDescriptions
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<ResourceDescription>
org.apache.juneau.rest.beans.ResourceDescriptions
org.apache.juneau.rest.beans.ChildResourceDescriptions
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<ResourceDescription>,Collection<ResourceDescription>,List<ResourceDescription>,RandomAccess
A POJO structure that describes the list of child resources associated with a resource.
Typically used in top-level GET methods of router resources to render a list of available child resources.
See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
ConstructorsConstructorDescriptionBean constructor.ChildResourceDescriptions(RestContext context, RestRequest req) Constructor.ChildResourceDescriptions(RestContext context, RestRequest req, boolean sort) Constructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionAdds a newResourceDescriptionto this list.Adds a newResourceDescriptionto this list when the uri is different from the name.static ChildResourceDescriptionsof(RestRequest req) Static creator.Methods inherited from class org.apache.juneau.rest.beans.ResourceDescriptions
createMethods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll
-
Constructor Details
-
ChildResourceDescriptions
public ChildResourceDescriptions()Bean constructor. -
ChildResourceDescriptions
Constructor.- Parameters:
context- The servlet context that this bean describes.req- The HTTP servlet request.
-
ChildResourceDescriptions
Constructor.- Parameters:
context- The servlet context that this bean describes.req- The HTTP servlet request.sort- Iftrue , list will be ordered by name alphabetically. Default is to maintain the order as specified in the annotation.
-
ChildResourceDescriptions
Constructor.- Parameters:
req- The HTTP servlet request.
-
-
Method Details
-
of
Static creator.- Parameters:
req- The HTTP servlet request.- Returns:
- A new
ChildResourceDescriptionsbean.
-
append
Description copied from class:ResourceDescriptionsAdds a newResourceDescriptionto this list.- Overrides:
appendin classResourceDescriptions- Parameters:
name- The name of the child resource.description- The description of the child resource.- Returns:
- This object.
-
append
Description copied from class:ResourceDescriptionsAdds a newResourceDescriptionto this list when the uri is different from the name.- Overrides:
appendin classResourceDescriptions- Parameters:
name- The name of the child resource.uri- The URI of the child resource.description- The description of the child resource.- Returns:
- This object.
-