package ro.isdc.wro.manager.factory;

import ro.isdc.wro.manager.WroManager;
import ro.isdc.wro.model.group.processor.Injector;
import ro.isdc.wro.model.group.processor.InjectorBuilder;


/**
 * Responsible for injecting {@link WroManager} each time it is created by decorated factory.
 *
 * @author Alex Objelean
 * @created 23 Jun 2012
 * @since 1.4.7
 * @deprecated Not required anymore. The {@link WroManager} objects are injected in {@link WroManager.Builder} during
 *             initialization.
 */
@Deprecated
public class InjectableWroManagerFactoryDecorator
    extends WroManagerFactoryDecorator {
  private Injector injector;

  public InjectableWroManagerFactoryDecorator(final WroManagerFactory decorated) {
    super(decorated);
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public WroManager create() {
    final WroManager manager = getDecoratedObject().create();
    getInjector().inject(manager);
    return manager;
  }

  /**
   * @return {@link Injector} used to inject the created manager.
   */
  public Injector getInjector() {
    if (injector == null) {
      injector = InjectorBuilder.create(getDecoratedObject()).build();
    }
    return injector;
  }
}

@@ -495,16 +495,53 @@
 ization.
+ This class with be removed in 1.7.0.
 %0A */%0A@De
@@ -862,34 +862,14 @@
     
-final WroManager manager =
+return
  get
@@ -900,63 +900,8 @@
 ();%0A
-    getInjector().inject(manager);%0A    return manager;%0A
   %7D%0A
@@ -973,22 +973,36 @@
 anager.%0A
-
    */%0A
+  @Deprecated%0A
   public

update implementation of InjectableWroManagerFactoryDecorator which is deprecated and will be removed in 1.7.0