Forge - Facets Addon API 2.0.0.Alpha3

org.jboss.forge.facets
Interface Faceted<FACETTYPE extends Facet<?>>

Type Parameters:
FACETTYPE - the base Facet type supported by this Faceted type.
All Known Implementing Classes:
AbstractFaceted

public interface Faceted<FACETTYPE extends Facet<?>>

Author:
Ken Finnigan

Method Summary
<F extends FACETTYPE>
F
getFacet(Class<F> type)
          Return the instance of the requested Facet type, or throw a FacetNotFoundException if no Facet of that type is installed.
 Iterable<FACETTYPE> getFacets()
          Return a Iterable of the currently installed Facets.
<F extends FACETTYPE>
Iterable<F>
getFacets(Class<F> type)
          Return a Iterable of the currently installed Facets matching the given type.
 boolean hasAllFacets(Class<? extends FACETTYPE>... facetDependencies)
          Return true if all Facets of the given types are present; otherwise, if any of the given facet types is missing, return false.
 boolean hasAllFacets(Iterable<Class<? extends FACETTYPE>> facetDependencies)
          Return true if all Facets of the given types are present; otherwise, if any of the given facet types is missing, return false.
 boolean hasFacet(Class<? extends FACETTYPE> type)
          Return true if a facet of the given type is present; return false otherwise.
 boolean install(FACETTYPE facet)
          Install and register the given Facet.
<F extends FACETTYPE>
boolean
supports(F facet)
          Return true if the given Facet is supported.
 boolean uninstall(FACETTYPE facet)
          Remove the given Facet from the internal collection of installed facets.
 

Method Detail

hasFacet

boolean hasFacet(Class<? extends FACETTYPE> type)
Return true if a facet of the given type is present; return false otherwise.


hasAllFacets

boolean hasAllFacets(Iterable<Class<? extends FACETTYPE>> facetDependencies)
Return true if all Facets of the given types are present; otherwise, if any of the given facet types is missing, return false.


hasAllFacets

boolean hasAllFacets(Class<? extends FACETTYPE>... facetDependencies)
Return true if all Facets of the given types are present; otherwise, if any of the given facet types is missing, return false.


getFacet

<F extends FACETTYPE> F getFacet(Class<F> type)
                             throws FacetNotFoundException
Return the instance of the requested Facet type, or throw a FacetNotFoundException if no Facet of that type is installed.

Throws:
FacetNotFoundException

getFacets

Iterable<FACETTYPE> getFacets()
Return a Iterable of the currently installed Facets. Return an empty list if no facets of that type were found.


getFacets

<F extends FACETTYPE> Iterable<F> getFacets(Class<F> type)
Return a Iterable of the currently installed Facets matching the given type.


install

boolean install(FACETTYPE facet)
Install and register the given Facet. If the facet is already installed, return true.


uninstall

boolean uninstall(FACETTYPE facet)
Remove the given Facet from the internal collection of installed facets.


supports

<F extends FACETTYPE> boolean supports(F facet)
Return true if the given Facet is supported.


Forge - Facets Addon API 2.0.0.Alpha3

Copyright © 2013 JBoss by Red Hat. All Rights Reserved.