|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sourceforge.jfacets.groovy.GroovyFacetDescriptorManager
public class GroovyFacetDescriptorManager
The Facet Descriptor Manager for Groovy Facets, which scans the CLASSPATH for
"*.facet" or "*.groovy" Scripts, and creates associated descriptors.
The name, profileId and target type key has to be in the file path, which
has to follow naming conventions :
// / .facet
/admin/com.xyz.MyClass/Viewmaps to the
(View, admin, com.xyz.MyClass)facet key.
| Constructor Summary | |
|---|---|
GroovyFacetDescriptorManager(java.util.List<java.lang.String> basePackages)
Create the manager and set base packages. |
|
| Method Summary | |
|---|---|
java.lang.String |
computeScriptPath(java.lang.String name,
java.lang.String profileId,
java.lang.Class targetObjectType)
Utility method : Compute and return the path to a Facet Script for passed parameters. |
FacetDescriptor |
getDescriptor(java.lang.String name,
java.lang.String profileId,
java.lang.Class targetObjectType)
Return the descriptor sctrictly associated to passed params if any, null of not found. |
FacetDescriptor[] |
getDescriptors()
Return all descriptors in an array. |
java.io.InputStream |
getStreamToScript(FacetDescriptor d)
Return an input stream on the facet Script file, by using getClass().getResourceAtStream(). |
void |
initialize()
Loads all available Groovy Facet Descriptors by scanning the CLASSPATH with specified base packages. |
void |
setApplicationContext(org.springframework.context.ApplicationContext ctx)
injected Spring context |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GroovyFacetDescriptorManager(java.util.List<java.lang.String> basePackages)
basePackages - | Method Detail |
|---|
public void setApplicationContext(org.springframework.context.ApplicationContext ctx)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwareorg.springframework.beans.BeansExceptionpublic void initialize()
public java.lang.String computeScriptPath(java.lang.String name,
java.lang.String profileId,
java.lang.Class targetObjectType)
public java.io.InputStream getStreamToScript(FacetDescriptor d)
getClass().getResourceAtStream().
public FacetDescriptor getDescriptor(java.lang.String name,
java.lang.String profileId,
java.lang.Class targetObjectType)
getDescriptor in interface IFacetDescriptorManagerpublic FacetDescriptor[] getDescriptors()
getDescriptors in interface IFacetDescriptorManager
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||