|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface Resource
A model of a managed resource .
| Method Summary | ||
|---|---|---|
String |
description()
Returns the description of the resource. |
|
|
facet(Class<T> type)
Returns a facet bound to a given type. |
|
Facet |
facet(QName name)
Returns a facet with a given name. |
|
Set<Facet> |
facets()
Returns the facets of the resource. |
|
|
hasFacet(Class<T> type)
Returns true if the resource has a facet bound to a given type. |
|
boolean |
hasFacet(QName name)
Returns true if the resource has a facet with a given name. |
|
String |
id()
Returns the identifier of the resource |
|
QName |
name()
Returns the name of the resource. |
|
void |
removeFacet(QName name)
Removes a facet with a given name. |
|
void |
setDescription(String description)
Sets the description of the resource. |
|
void |
setFacet(Element data)
Adds a UntypedFacet with a given data to the resource |
|
void |
setFacet(Facet facet)
Adds a facet to the resource. |
|
void |
setName(QName name)
Sets the name of the resource. |
|
long |
version()
Returns the edit version of the resource. |
|
| Method Detail |
|---|
String id()
long version()
QName name()
void setName(QName name)
name - the nameString description()
void setDescription(String description)
description - the descriptionSet<Facet> facets()
boolean hasFacet(QName name)
true if the resource has a facet with a given name.
name - the name
true if the resource has a facet with the given name, false otherwise<T extends TypedFacet> boolean hasFacet(Class<T> type)
true if the resource has a facet bound to a given type.
type - the type
true if the resource has a facet bound to the given type, false otherwise
Facet facet(QName name)
throws IllegalArgumentException
name - the name
IllegalArgumentException - if the resource does not have a facet with the given name
<T extends TypedFacet> T facet(Class<T> type)
throws IllegalArgumentException
type - the type
IllegalArgumentException - if the resource does not have a facet bound to the given type
void removeFacet(QName name)
throws IllegalArgumentException
name - the name
IllegalArgumentException - if the resource does not have a facet with the given name
void setFacet(Facet facet)
throws IllegalArgumentException
facet - the facet
IllegalArgumentException - if the resource has already a facet with the same name
void setFacet(Element data)
throws IllegalArgumentException
UntypedFacet with a given data to the resource
data - the facet's data
IllegalArgumentException - if the resource has already a facet with the same name
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||