Search in sources :

Example 6 with MetadataDependencyRegistryTracker

use of org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker in project spring-roo by spring-projects.

the class ProjectPathMonitoringInitializer method activate.

/**
 * This service is being activated so setup it:
 * <ul>
 * <li>Create and open the {@link MetadataDependencyRegistryTracker}.</li>
 * </ul>
 */
protected void activate(final ComponentContext context) {
    this.registryTracker = new MetadataDependencyRegistryTracker(context.getBundleContext(), this);
    this.registryTracker.open();
}
Also used : MetadataDependencyRegistryTracker(org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker)

Example 7 with MetadataDependencyRegistryTracker

use of org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker in project spring-roo by spring-projects.

the class IdentifierMetadataProviderImpl method activate.

/**
 * This service is being activated so setup it:
 * <ul>
 * <li>Create and open the {@link MetadataDependencyRegistryTracker}.</li>
 * <li>Create and open one {@link ItdTriggerBasedMetadataProviderTracker}
 * for each {@link ConfigurableMetadataProvider} and {@link SerializableMetadataProvider}.</li>
 * <li>Registers {@link RooJavaType#ROO_IDENTIFIER} as additional
 * JavaType that will trigger metadata registration.</li>
 * </ul>
 */
@Override
protected void activate(final ComponentContext cContext) {
    context = cContext.getBundleContext();
    this.registryTracker = new MetadataDependencyRegistryTracker(context, null, PhysicalTypeIdentifier.getMetadataIdentiferType(), getProvidesType());
    this.registryTracker.open();
    addMetadataTrigger(ROO_IDENTIFIER);
    this.configurableMetadataProviderTracker = new ItdTriggerBasedMetadataProviderTracker(context, ConfigurableMetadataProvider.class, ROO_IDENTIFIER);
    this.configurableMetadataProviderTracker.open();
    this.serializableMetadataProviderTracker = new ItdTriggerBasedMetadataProviderTracker(context, SerializableMetadataProvider.class, ROO_IDENTIFIER);
    this.serializableMetadataProviderTracker.open();
}
Also used : SerializableMetadataProvider(org.springframework.roo.addon.javabean.addon.SerializableMetadataProvider) MetadataDependencyRegistryTracker(org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker) ItdTriggerBasedMetadataProviderTracker(org.springframework.roo.classpath.itd.ItdTriggerBasedMetadataProviderTracker) ConfigurableMetadataProvider(org.springframework.roo.addon.configurable.addon.ConfigurableMetadataProvider)

Example 8 with MetadataDependencyRegistryTracker

use of org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker in project spring-roo by spring-projects.

the class JavaBeanMetadataProviderImpl method activate.

/**
 * This service is being activated so setup it:
 * <ul>
 * <li>Create and open the {@link MetadataDependencyRegistryTracker}</li>
 * <li>Registers {@link RooJavaType#ROO_JAVA_BEAN} as additional JavaType
 * that will trigger metadata registration.</li>
 * </ul>
 */
@Override
protected void activate(final ComponentContext cContext) {
    super.activate(cContext);
    BundleContext localContext = cContext.getBundleContext();
    this.registryTracker = new MetadataDependencyRegistryTracker(localContext, this, PhysicalTypeIdentifier.getMetadataIdentiferType(), getProvidesType());
    this.registryTracker.open();
    addMetadataTrigger(ROO_JAVA_BEAN);
}
Also used : MetadataDependencyRegistryTracker(org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker) BundleContext(org.osgi.framework.BundleContext)

Example 9 with MetadataDependencyRegistryTracker

use of org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker in project spring-roo by spring-projects.

the class EntityProjectionMetadataProviderImpl method activate.

/**
 * This service is being activated so setup it:
 * <ul>
 * <li>Create and open the {@link MetadataDependencyRegistryTracker}.</li>
 * <li>Registers {@link RooJavaType#ROO_ENTITY_PROJECTION} as additional
 * JavaType that will trigger metadata registration.</li>
 * <li>Set ensure the governor type details represent a class.</li>
 * </ul>
 */
@Override
protected void activate(final ComponentContext cContext) {
    context = cContext.getBundleContext();
    this.registryTracker = new MetadataDependencyRegistryTracker(context, this, PhysicalTypeIdentifier.getMetadataIdentiferType(), getProvidesType());
    this.registryTracker.open();
    addMetadataTrigger(ROO_ENTITY_PROJECTION);
}
Also used : MetadataDependencyRegistryTracker(org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker)

Example 10 with MetadataDependencyRegistryTracker

use of org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker in project spring-roo by spring-projects.

the class ToStringMetadataProviderImpl method activate.

/**
 * This service is being activated so setup it:
 * <ul>
 * <li>Create and open the {@link MetadataDependencyRegistryTracker}</li>
 * <li>Registers {@link RooJavaType#ROO_TO_STRING} as additional JavaType
 * that will trigger metadata registration.</li>
 * </ul>
 */
@Override
protected void activate(final ComponentContext cContext) {
    context = cContext.getBundleContext();
    this.registryTracker = new MetadataDependencyRegistryTracker(context, this, PhysicalTypeIdentifier.getMetadataIdentiferType(), getProvidesType());
    this.registryTracker.open();
    addMetadataTrigger(ROO_TO_STRING);
}
Also used : MetadataDependencyRegistryTracker(org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker)

Aggregations

MetadataDependencyRegistryTracker (org.springframework.roo.metadata.internal.MetadataDependencyRegistryTracker)47 BundleContext (org.osgi.framework.BundleContext)6 CustomDataKeyDecoratorTracker (org.springframework.roo.classpath.customdata.taggers.CustomDataKeyDecoratorTracker)6 LayerTypeMatcher (org.springframework.roo.classpath.layers.LayerTypeMatcher)5 JavaSymbolName (org.springframework.roo.model.JavaSymbolName)5 ConfigurableMetadataProvider (org.springframework.roo.addon.configurable.addon.ConfigurableMetadataProvider)2 ItdTriggerBasedMetadataProviderTracker (org.springframework.roo.classpath.itd.ItdTriggerBasedMetadataProviderTracker)2 Bundle (org.osgi.framework.Bundle)1 SerializableMetadataProvider (org.springframework.roo.addon.javabean.addon.SerializableMetadataProvider)1 MetadataDependency (org.springframework.roo.metadata.MetadataDependency)1