public class FacetHolderImpl extends Object implements FacetHolder
| Constructor and Description |
|---|
FacetHolderImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addFacet(Facet facet)
Adds the facet, extracting its
type as the key. |
void |
addFacet(MultiTypedFacet facet)
Adds the
multi-typed facet, extracting each of
its types as keys. |
boolean |
containsDoOpFacet(Class<? extends Facet> facetType)
Whether there is a facet registered of the specified type that is not a
no-op. |
boolean |
containsFacet(Class<? extends Facet> facetType)
Whether there is a facet registered of the specified type.
|
<T extends Facet> |
getFacet(Class<T> facetType)
Get the facet of the specified type (as per the type it reports from
Facet.facetType()). |
List<Facet> |
getFacets(org.apache.isis.applib.filter.Filter<Facet> filter)
Returns all
Facets matching the specified FacetFilter. |
Class<? extends Facet>[] |
getFacetTypes()
Get the list of all facet types that are supported by objects of
this specification.
|
void |
removeFacet(Class<? extends Facet> facetType)
Remove the facet of the specified type.
|
void |
removeFacet(Facet facet)
Remove the facet whose type is that reported by
Facet.facetType()
. |
public FacetHolderImpl()
public boolean containsFacet(Class<? extends Facet> facetType)
FacetHoldercontainsFacet in interface FacetHolderpublic boolean containsDoOpFacet(Class<? extends Facet> facetType)
FacetHolderno-op.
Convenience; saves having to FacetHolder.getFacet(Class) and then check if
null and not a no-op.
containsDoOpFacet in interface FacetHolderpublic void addFacet(Facet facet)
FacetHoldertype as the key.
If there are any facet of the same type, they will be overwritten
provided that either the Facet specifies to
always replace or if the existing
Facet is a no-op.
addFacet in interface FacetHolderpublic void addFacet(MultiTypedFacet facet)
FacetHoldermulti-typed facet, extracting each of
its types as keys.
If there are any facet of the same type, they will be overwritten
provided that either the Facet specifies to
always replace or if the existing
Facet is a no-op.
addFacet in interface FacetHolderpublic void removeFacet(Facet facet)
FacetHolderFacet.facetType()
.removeFacet in interface FacetHolderpublic void removeFacet(Class<? extends Facet> facetType)
FacetHolderremoveFacet in interface FacetHolderpublic <T extends Facet> T getFacet(Class<T> facetType)
FacetHolderFacet.facetType()).getFacet in interface FacetHolderpublic Class<? extends Facet>[] getFacetTypes()
FacetHoldergetFacetTypes in interface FacetHolderpublic List<Facet> getFacets(org.apache.isis.applib.filter.Filter<Facet> filter)
FacetHolderFacets matching the specified FacetFilter.getFacets in interface FacetHolderCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.