|
Griffon 0.9.5-rc2 | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD |
griffon.core.ApplicationHandlergriffon.core.ArtifactManager
public interface ArtifactManager extends ApplicationHandler
Helper class capable of dealing with artifacts and their handlers.
Field Summary | |
---|---|
GriffonClass[] |
EMPTY_GRIFFON_CLASS_ARRAY
|
List |
EMPTY_GRIFFON_CLASS_LIST
|
Method Summary | |
---|---|
GriffonClass
|
findGriffonClass(String name, String type)
Finds an artifact by name and type. |
GriffonClass
|
findGriffonClass(Class clazz, String type)
Finds an artifact by class and type. |
GriffonClass
|
findGriffonClass(Object obj)
Finds an artifact by class. |
GriffonClass
|
findGriffonClass(Class clazz)
Finds an artifact by class. |
GriffonClass
|
findGriffonClass(String fqnClassName)
Finds an artifact by name. |
List
|
getAllClasses()
Finds all artifact classes. |
List
|
getClassesOfType(String type)
Finds all artifacts of an specific type. |
void
|
loadArtifactMetadata()
Reads the artifacts definitions file from the classpath. |
void
|
registerArtifactHandler(ArtifactHandler handler)
Registers an ArtifactHandler by type. |
void
|
unregisterArtifactHandler(ArtifactHandler handler)
Removes an ArtifactHandler by type. |
Methods inherited from interface ApplicationHandler | |
---|---|
getApp |
Field Detail |
---|
public GriffonClass[] EMPTY_GRIFFON_CLASS_ARRAY
public List EMPTY_GRIFFON_CLASS_LIST
Method Detail |
---|
public GriffonClass findGriffonClass(String name, String type)
Example: findGriffonClass("Book", "controller") will return an artifact class that describes BookController.
name
- the name of the artifact, e.g. 'Book'type
- the type of the artifact, e.g. 'controller'
public GriffonClass findGriffonClass(Class clazz, String type)
Example: findGriffonClass(BookController, "controller") will return an artifact class that describes BookController.
clazz
- the name of the artifact, e.g. com.acme.BookControllertype
- the type of the artifact, e.g. 'controller'
public GriffonClass findGriffonClass(Object obj)
Example: findGriffonClass(aBookControllerInstance) will return an artifact class that describes BookController.
obj
- an artifact instance
public GriffonClass findGriffonClass(Class clazz)
Example: findGriffonClass(BookController) will return an artifact class that describes BookController.
clazz
- a Class instance
public GriffonClass findGriffonClass(String fqnClassName)
Example: findGriffonClass("BookController") will return an artifact class that describes BookController.
fqnClassName
- full qualified class name
public List getAllClasses()
public List getClassesOfType(String type)
Example: getClassesOfType("controller") will return all artifact classes that describe controllers.
type
- an artifact type, e.g. 'controller'
public void loadArtifactMetadata()
Should call initialize() on artifact handlers if there are any registered already.
public void registerArtifactHandler(ArtifactHandler handler)
Should call initialize() on the handler.
handler
- an ArtifactHandler
public void unregisterArtifactHandler(ArtifactHandler handler)
handler
- an ArtifactHandler
Groovy Documentation