Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Note
titleAPI/Impl

Since the API of MyFaces CODI is separated, you can implement your custom implementation-module for an existing api-module. However, MyFaces CODI is a community project. So it's a good idea to donate improvements of any kind instead of permanently forking the implementation.

Deactivating default implementations - Details

Deactivatable

This interface allows to use a common interface (similar to a marker interface) for deactivatable framework-artifacts which can’t be deactivated by calling #veto (like pre-configured CDI extensions provided by MyFaces CODI -> usually this interface isn't intended for CDI beans). By default everything is pre-configured to support zero-config. It isn’t required but suggested to use this interface because it allows to find such classes easily.
Users just have to be aware of this concept to deactivate parts of MyFaces CODI. It isn't mandatory, but suggested to use ClassDeactivation#isClassActivated for implementing Deactivatable#isActivated.
Since it is just a common interface which allows users to find deactivatable framework-classes easily, Deactivatable#isActivated has to be called manually by the implementing class.

ClassDeactivation

This class allows to evaluate, if a given class is deactivated for a specific application. ClassDeactivation aggregates all configured ClassDeactivator implementations. A class gets deactivated, if one of the available ClassDeactivator implementations returns this class.

ClassDeactivator

A ClassDeactivator can be configured for your environment (see Environment config options). An implementation of this interface has to implement #getDeactivatedClasses which returns all (framework-)classes which shouldn't get used. Since it is the equivalent of #veto for pre-configured framework-classes, every class which gets returned usually implements Deactivatable.

AbstractClassDeactivator

This abstract class is a helper which allows to use #addDeactivatedClass and therefore an easier handling for adding classes which should be deactivated.

Core Config

CodiCoreConfig is the type-safe config provided by the core. It's possible to provide a custom (type-safe) implementation with std. CDI concepts like @Specializes, @Alternative or ProcessAnnotatedType#veto. As an alternative CODI provides an alternative configuration module as well as an alternative implementation module which allows to use resource-bundles to configure the framework via property files.

...

  • BeanEntryFactory (and BeanEntry)
  • EditableAccessDecisionVoterContext
  • WindowContextManager
  • InterceptorStrategy

Custom implementations can be provided via the std. @Alternative (or @Specializes) mechanism provided by CDI.

...

A BeanEntryFactory is responsible for creating instances of BeanEntry. A BeanEntry is used internally for storing conversation scoped beans.

WindowContextManager

A WindowContextManager is responsible for managing the current WindowContext. This interface is a basic (and read-only) implementation which is independent of a concrete view-technology. Modules like the JSF module can use it as base interface. The JSF module provides an EditableWindowContextManager SPI which allows to manage the WindowContext in a more specific manner which might be related to peculiarities of a concrete view-technology. If you don't need further APIs of the WindowContextManager, you don't need #getCurrentWindowContext in your application. You can directly inject the current WindowContext via @Inject.

EditableAccessDecisionVoterContext

...