public class CollectionAttribute extends Element
| Modifier and Type | Field and Description |
|---|---|
static com.google.inject.Key<java.util.List<CollectionAttribute>> |
KEY
The key to access the collections of the model.
|
| Constructor and Description |
|---|
CollectionAttribute(Model model,
java.lang.String name) |
| Modifier and Type | Method and Description |
|---|---|
RestMethod |
addMethod(RestMethod method)
Add method to collection.
|
java.lang.String |
getFullName()
Returns a fully qualified name for the element.
|
java.lang.String |
getFullNameNoVersion()
Returns the full name with version prefix stripped if the full name has it.
|
Location |
getLocation()
Returns the location associated with this element.
|
java.lang.Iterable<RestMethod> |
getMethods()
Returns the methods associated with this collection.
|
Model |
getModel()
Returns the model associated with this element.
|
CollectionAttribute |
getParent()
Returns the parent collection, or null if none.
|
com.google.common.collect.ImmutableList<RestMethod> |
getReachableMethods()
Returns the methods associated with this collection and reachable with the current scoper.
|
TypeRef |
getResourceType()
Returns the resource type, or null, if none assigned.
|
java.lang.String |
getSimpleName()
Returns a simple name for the element.
|
java.lang.String |
getVersionWithDefault() |
void |
setParent(CollectionAttribute collection)
Set parent collection.
|
void |
setResourceType(TypeRef resourceType)
Sets the resource type.
|
addAttribute, getAttribute, getAttributeOrDefault, hasAttribute, putAttribute, removeAttributepublic static final com.google.inject.Key<java.util.List<CollectionAttribute>> KEY
public CollectionAttribute(Model model, java.lang.String name)
public Model getModel()
Elementpublic Location getLocation()
ElementgetLocation in class Elementpublic java.lang.String getSimpleName()
ElementgetSimpleName in class Elementpublic java.lang.String getFullName()
ElementgetFullName in class Elementpublic java.lang.Iterable<RestMethod> getMethods()
public com.google.common.collect.ImmutableList<RestMethod> getReachableMethods()
@Nullable public TypeRef getResourceType()
public void setResourceType(@Nullable
TypeRef resourceType)
@Nullable public CollectionAttribute getParent()
public java.lang.String getVersionWithDefault()
public java.lang.String getFullNameNoVersion()
public void setParent(CollectionAttribute collection)
@Nullable public RestMethod addMethod(RestMethod method)