net.sourceforge.jfacets.impl
Class FacetRepositoryImpl

java.lang.Object
  extended by net.sourceforge.jfacets.impl.FacetRepositoryImpl
All Implemented Interfaces:
IFacetRepository

public class FacetRepositoryImpl
extends java.lang.Object
implements IFacetRepository

Implementation of the facet repository

Author:
Remi VANKEISBELCK - rvkb.com (remi 'at' rvkb.com)

Constructor Summary
FacetRepositoryImpl(IProfileRepository pRepo, IFacetFactory facetFactory, IFacetContextFactory facetContextFactory, IFacetDescriptorManager facetDescriptorManager)
          everything loaded at construction
 
Method Summary
 FacetDescriptor[] getDescriptors(IProfile profile, java.lang.Class targetObjectType)
          Return all the facet descriptors that match passed profile and object type, handling inheritance.
static java.lang.Class[] getDirectSuperTypes(java.lang.Class objectType)
          returns first level supertypes for passed objectType
 java.lang.Object getFacet(java.lang.String facetName, IProfile profile, java.lang.Object targetObject)
          Method for retrieving facets.
 java.lang.Object getFacet(java.lang.String name, IProfile profile, java.lang.Object targetObject, java.lang.Class targetObjectType)
          Method for retrieving facets.
 IFacetContextFactory getFacetContextFactory()
          Return the FacetContextFactory
 IFacetDescriptorManager getFacetDescriptorManager()
          Return the FacetDescriptorManager
 IFacetFactory getFacetFactory()
          Return the FacetFactory
 IProfileRepository getProfileRepository()
          Return the ProfileRepository
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FacetRepositoryImpl

public FacetRepositoryImpl(IProfileRepository pRepo,
                           IFacetFactory facetFactory,
                           IFacetContextFactory facetContextFactory,
                           IFacetDescriptorManager facetDescriptorManager)
everything loaded at construction

Method Detail

getDirectSuperTypes

public static java.lang.Class[] getDirectSuperTypes(java.lang.Class objectType)
returns first level supertypes for passed objectType


getDescriptors

public FacetDescriptor[] getDescriptors(IProfile profile,
                                        java.lang.Class targetObjectType)
Description copied from interface: IFacetRepository
Return all the facet descriptors that match passed profile and object type, handling inheritance.

Specified by:
getDescriptors in interface IFacetRepository

getProfileRepository

public IProfileRepository getProfileRepository()
Description copied from interface: IFacetRepository
Return the ProfileRepository

Specified by:
getProfileRepository in interface IFacetRepository

getFacetFactory

public IFacetFactory getFacetFactory()
Description copied from interface: IFacetRepository
Return the FacetFactory

Specified by:
getFacetFactory in interface IFacetRepository

getFacetContextFactory

public IFacetContextFactory getFacetContextFactory()
Description copied from interface: IFacetRepository
Return the FacetContextFactory

Specified by:
getFacetContextFactory in interface IFacetRepository

getFacetDescriptorManager

public IFacetDescriptorManager getFacetDescriptorManager()
Description copied from interface: IFacetRepository
Return the FacetDescriptorManager

Specified by:
getFacetDescriptorManager in interface IFacetRepository

getFacet

public java.lang.Object getFacet(java.lang.String facetName,
                                 IProfile profile,
                                 java.lang.Object targetObject)
Description copied from interface: IFacetRepository
Method for retrieving facets. Uses targetObject's run-time type.

Specified by:
getFacet in interface IFacetRepository
Returns:
the facet (with assigned context if implementing IFacet) if found, null if not found

getFacet

public java.lang.Object getFacet(java.lang.String name,
                                 IProfile profile,
                                 java.lang.Object targetObject,
                                 java.lang.Class targetObjectType)
Description copied from interface: IFacetRepository
Method for retrieving facets. Uses passed targetObjectClass, therefore you can pass null targetObjects !

Specified by:
getFacet in interface IFacetRepository
Returns:
the facet (with assigned context if implementing) if found, null if not found


Copyright © 2011. All Rights Reserved.