|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sourceforge.jfacets.annotations.AnnotatedFacetDescriptorManager
public class AnnotatedFacetDescriptorManager
The AnnotatedFacetDescriptorManager : loads and manages descriptors for facets
using the @FacetKey annotation.
This manager scans the classpath in order to find classes that implement
the IFacet interface and are marked with a @FacetKey annotation. If found,
a descriptor is crated and added for this facet, based on the information
supplied in the annotation's attributes.
IMPORTANT : You HAVE to provide at least one base package when
creating this objects.
| Constructor Summary | |
|---|---|
AnnotatedFacetDescriptorManager(List<String> basePackages)
Create the manager and set base packages that will be scanned for annotated facets. |
|
| Method Summary | |
|---|---|
ClassLoader |
getClassLoader()
|
FacetDescriptor |
getDescriptor(String name,
String profileId,
Class targetObjectType)
Return the descriptor sctrictly associated to passed params if any, null of not found. |
FacetDescriptor[] |
getDescriptors()
Return all descriptors in an array. |
DuplicatedKeyPolicyType |
getDuplicatedKeyPolicy()
|
AnnotatedFacetDescriptorManager |
initialize()
Loads all available Facet Descriptors by scanning the CLASSPATH with specified base packages. |
AnnotatedFacetDescriptorManager |
setClassLoader(ClassLoader classLoader)
Set the class loader to be used for classpath scanning |
AnnotatedFacetDescriptorManager |
setDuplicatedKeyPolicy(DuplicatedKeyPolicyType policyType)
Set the duplicated key policy. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AnnotatedFacetDescriptorManager(List<String> basePackages)
basePackages - the packages as a list of Strings| Method Detail |
|---|
public AnnotatedFacetDescriptorManager setDuplicatedKeyPolicy(DuplicatedKeyPolicyType policyType)
policyType - the policy to use
public AnnotatedFacetDescriptorManager setClassLoader(ClassLoader classLoader)
classLoader - the classloader to be used
public ClassLoader getClassLoader()
public DuplicatedKeyPolicyType getDuplicatedKeyPolicy()
public AnnotatedFacetDescriptorManager initialize()
public FacetDescriptor getDescriptor(String name,
String profileId,
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 | |||||||||