@Dependent @Generated("org.uberfire.annotations.processors.WorkbenchPerspectiveProcessor") @Named("FormDisplayPerspective") /* * WARNING! This class is generated. Do not modify. */ public class FormDisplayPerspectiveActivity extends AbstractWorkbenchPerspectiveActivity { @Inject private FormDisplayPerspective realPresenter; @Inject //Constructor injection for testing public FormDisplayPerspectiveActivity(final PlaceManager placeManager) { super( placeManager ); } @Override public String getIdentifier() { return "FormDisplayPerspective"; } @Override public PerspectiveDefinition getDefaultPerspectiveLayout() { return realPresenter.getPerspective(); } }
@Named @Dependent public class AfterJobScopeListener implements JobListener { private @Inject BatchEEScopeExtension scopeExtension; @Override public void beforeJob() throws Exception { // no-op } @Override public void afterJob() throws Exception { scopeExtension.getJobContext().exitJobExecution(); } }
@Dependent public class TaskFormViewImpl extends Composite implements TaskFormPresenter.TaskFormView { private static Binder uiBinder = GWT.create(Binder.class); @UiField FlowPanel content; @Inject private EmbeddedFormDisplayer formDisplayer; @PostConstruct public void init() { initWidget(uiBinder.createAndBindUi(this)); content.add(formDisplayer); } @Override public FormDisplayerView getDisplayerView() { return formDisplayer; } interface Binder extends UiBinder<Widget, TaskFormViewImpl> { } }
/** * Creates a helper which allows to use a {@link ScriptExecutor} within el-expressions * @return el-helper for the script-executor */ @Produces @Dependent @Named(SCRIPT_EXECUTOR) //TODO add support for args public Map<String, Object> createScriptExecutorBean() { return createExpressionLanguageHelper(); }
@Produces @Dependent @PersistenceUnitName("any") // the value is nonbinding, thus 'any' is just a dummy parameter here public EntityManagerFactory createEntityManagerFactoryForUnit(InjectionPoint injectionPoint) { PersistenceUnitName unitNameAnnotation = injectionPoint.getAnnotated().getAnnotation(PersistenceUnitName.class); if (unitNameAnnotation == null) { LOG.warning("@PersisteneUnitName annotation could not be found at EntityManagerFactory injection point!"); return null; } String unitName = unitNameAnnotation.value(); Properties properties = persistenceConfigurationProvider.getEntityManagerFactoryConfiguration(unitName); EntityManagerFactory emf = Persistence.createEntityManagerFactory(unitName, properties); return emf; } }
@SuppressWarnings("unchecked") @ConfigurationValue("") @Dependent @Produces <T> Optional<T> produceOptionalConfigValue(InjectionPoint injectionPoint) { Type type = injectionPoint.getAnnotated().getBaseType(); final Class<T> valueType; if (type instanceof ParameterizedType) { ParameterizedType parameterizedType = (ParameterizedType) type; Type[] typeArguments = parameterizedType.getActualTypeArguments(); valueType = unwrapType(typeArguments[0]); } else { valueType = (Class<T>) String.class; } return Optional.ofNullable(resolve(injectionPoint, valueType)); }
@Produces @Dependent protected ResourceBundle injectableResourceBundle(InjectionPoint injectionPoint) { Bundle bundle = getBundleClass(injectionPoint.getAnnotated().getAnnotations()); if(bundle != null) { Class bundleClass = bundle.value(); if(bundleClass != null && !Class.class.getName().equals(bundleClass.getName())) { return createDefaultResourceBundle().useBundle(bundleClass); } if(!"".equals(bundle.name())) { return createDefaultResourceBundle().useBundle(bundle.name()); } } return createDefaultResourceBundle(); }
@Dependent abstract class InterceptorBase<T extends Metric, A extends Annotation> {
@Dependent @Generated("org.uberfire.annotations.processors.WorkbenchPerspectiveProcessor") @Named("ProvisioningManagementPerspective") /* * WARNING! This class is generated. Do not modify. */ public class ProvisioningManagementPerspectiveActivity extends AbstractWorkbenchPerspectiveActivity { @Inject private ProvisioningManagementPerspective realPresenter; @Inject //Constructor injection for testing public ProvisioningManagementPerspectiveActivity(final PlaceManager placeManager) { super( placeManager ); } @Override public String getIdentifier() { return "ProvisioningManagementPerspective"; } @Override public PerspectiveDefinition getDefaultPerspectiveLayout() { return realPresenter.buildPerspective(); } }
@Named @Dependent public class BeforeJobScopeListener implements JobListener { private @Inject BatchEEScopeExtension scopeExtension; @Override public void beforeJob() throws Exception { scopeExtension.getJobContext().enterJobExecution(); } @Override public void afterJob() throws Exception { // no-op } }
@Dependent public class TaskFormViewImpl extends Composite implements TaskFormPresenter.TaskFormView { private static Binder uiBinder = GWT.create(Binder.class); @UiField FlowPanel content; @Inject private EmbeddedFormDisplayer formDisplayer; @PostConstruct public void init() { initWidget(uiBinder.createAndBindUi(this)); content.add(formDisplayer); } @Override public FormDisplayerView getDisplayerView() { return formDisplayer; } interface Binder extends UiBinder<Widget, TaskFormViewImpl> { } }
/** * Creates a helper which allows to use a {@link ScriptExecutor} within el-expressions * @return el-helper for the script-executor */ @Produces @Dependent @Named(SCRIPT_EXECUTOR) //TODO add support for args public Map<String, Object> createScriptExecutorBean() { return createExpressionLanguageHelper(); }