Forge - Shell API 1.2.0.Final

org.jboss.forge.project
Interface Project

All Known Implementing Classes:
BaseProject

public interface Project

Author:
Lincoln Baxter, III

Method Summary
 boolean exists()
          Return true if this project's file-system has been created and initialized; otherwise, return false.
 Object getAttribute(String key)
          Get an value from this project's internal attributes.
<F extends Facet>
F
getFacet(Class<F> type)
          Return the instance of the requested Facet type, or throw a FacetNotFoundException if no Facet of that type is registered.
 Collection<Facet> getFacets()
          Return a Collection of the currently installed Facets.
<F extends Facet>
Collection<F>
getFacets(Class<F> type)
          Return a Collection of the currently installed Facets matching the given type.
 DirectoryResource getProjectRoot()
          Get the File representing the root directory of this Project
 boolean hasAllFacets(Class<? extends Facet>... facetDependencies)
          Return true if this project has all Facets of the given types; otherwise, if any of the given facet types is missing, return false.
 boolean hasAllFacets(Collection<Class<? extends Facet>> facetDependencies)
          Return true if this project has all Facets of the given types; otherwise, if any of the given facet types is missing, return false.
 boolean hasFacet(Class<? extends Facet> type)
          Return true if this project has a facet of the given type; return false otherwise.
 Project installFacet(Facet facet)
          Install and register the given Facet.
 Project registerFacet(Facet facet)
          Add the given Facet to this Project's internal collection of installed facets.
 void removeAttribute(String key)
          Remove a value from this project's internal attributes.
 Project removeFacet(Facet facet)
          Remove the given Facet from this Project's internal collection of installed facets.
 void setAttribute(String key, Object value)
          Set a value in this project's internal attributes.
 Project unregisterFacet(Facet facet)
          Remove the given Facet from this Project's internal collection of installed facets.
 

Method Detail

getAttribute

Object getAttribute(String key)
Get an value from this project's internal attributes. If the value is not set, return null instead.

Parameters:
key - the attribute name

setAttribute

void setAttribute(String key,
                  Object value)
Set a value in this project's internal attributes.


removeAttribute

void removeAttribute(String key)
Remove a value from this project's internal attributes.


hasFacet

boolean hasFacet(Class<? extends Facet> type)
Return true if this project has a facet of the given type; return false otherwise.


hasAllFacets

boolean hasAllFacets(Collection<Class<? extends Facet>> facetDependencies)
Return true if this project has all Facets of the given types; otherwise, if any of the given facet types is missing, return false.


hasAllFacets

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


getFacet

<F extends Facet> 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 registered.

Throws:
FacetNotFoundException

getFacets

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


getFacets

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


installFacet

Project installFacet(Facet facet)
Install and register the given Facet. If the facet is already installed, register it instead (See registerFacet(Facet).


registerFacet

Project registerFacet(Facet facet)
Add the given Facet to this Project's internal collection of installed facets.


unregisterFacet

Project unregisterFacet(Facet facet)
Remove the given Facet from this Project's internal collection of installed facets.


removeFacet

Project removeFacet(Facet facet)
Remove the given Facet from this Project's internal collection of installed facets.

Returns:

getProjectRoot

DirectoryResource getProjectRoot()
Get the File representing the root directory of this Project


exists

boolean exists()
Return true if this project's file-system has been created and initialized; otherwise, return false.


Forge - Shell API 1.2.0.Final

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