Class TLcyCompositeModelContentTypeProvider

java.lang.Object
com.luciad.lucy.util.TLcyGenericComposite<ILcyModelContentTypeProvider>
com.luciad.lucy.model.TLcyCompositeModelContentTypeProvider
All Implemented Interfaces:
ILcyModelContentType, ILcyModelContentTypeProvider, Iterable<ILcyModelContentTypeProvider>

public class TLcyCompositeModelContentTypeProvider extends TLcyGenericComposite<ILcyModelContentTypeProvider> implements ILcyModelContentTypeProvider

A composite implementation of ILcyModelContentTypeProvider according to the composite design pattern.

When creating a new TLcyCompositeModelContentTypeProvider using the default constructor (see TLcyCompositeModelContentTypeProvider()), the created instance will only work on/with the ILcyModelContentTypeProviders registered on this composite instance (see addModelContentTypeProvider(ILcyModelContentTypeProvider) and removeModelContentTypeProvider(ILcyModelContentTypeProvider)).

When creating a new TLcyCompositeModelContentTypeProvider using the constructor specifying an ILcyLucyEnv instance (see TLcyCompositeModelContentTypeProvider(com.luciad.lucy.ILcyLucyEnv), the created instance will work on the Lucy back-end services. It will use all registered ILcyModelContentTypeProvider instances of the Lucy back-end, adding and/or removing an ILcyModelContentTypeProvider will add/remove the ILcyModelContentTypeProvider as service from Lucy, ... .

Retrieving the model content type for an ILcdModel using the back-end based implementation can be done by creating a new instance of this class:


 //Create a new instance whenever you need it.
 TLcyCompositeModelContentTypeProvider provider = new TLcyCompositeModelContentTypeProvider( aLucyEnv );
 int modelContentType = provider.getModelContentType( aModel );
 //There is no need to keep a reference to the composite instance, you can create a new one
 //the next time you would need it
 provider = null;