Examples of Bean


Examples of org.apache.wicket.spring.injection.util.Bean

  {
    InjectableWithReferenceToNonexistingBean obj = new InjectableWithReferenceToNonexistingBean();
    Field field = obj.getClass().getDeclaredField("nonExisting");
    try
    {
      final Bean bean = (Bean)factory.getFieldValue(field, obj);
      /*
       * returned bean will not be null even though the bean is not found. what we get instead
       * is a proxy. we invoke a method on the proxy in order to cause it to try to locate the
       * bean and that is when it will fail
       */
      bean.method();
      fail();
    }
    catch (RuntimeException e)
    {
      // expected
View Full Code Here

Examples of org.apache.wicket.spring.injection.util.Bean

  {
    InjectableWithReferenceToNonexistingBean obj = new InjectableWithReferenceToNonexistingBean();
    Field field = obj.getClass().getDeclaredField("nonExisting");
    try
    {
      final Bean bean = (Bean)factory.getFieldValue(field, obj);
      /*
       * returned bean will not be null even though the bean is not found. what we get instead
       * is a proxy. we invoke a method on the proxy in order to cause it to try to locate the
       * bean and that is when it will fail
       */
      bean.method();
      fail();
    }
    catch (RuntimeException e)
    {
    }
View Full Code Here

Examples of org.apache.wicket.spring.injection.util.Bean

  {
    InjectableWithReferenceToNonexistingBean obj = new InjectableWithReferenceToNonexistingBean();
    Field field = obj.getClass().getDeclaredField("nonExisting");
    try
    {
      final Bean bean = (Bean)factory.getFieldValue(field, obj);
      /*
       * returned bean will not be null even though the bean is not found. what we get instead
       * is a proxy. we invoke a method on the proxy in order to cause it to try to locate the
       * bean and that is when it will fail
       */
      bean.method();
      fail();
    }
    catch (RuntimeException e)
    {
      // expected
View Full Code Here

Examples of org.apache.wicket.spring.injection.util.Bean

  {
    InjectableWithReferenceToNonexistingBean obj = new InjectableWithReferenceToNonexistingBean();
    Field field = obj.getClass().getDeclaredField("nonExisting");
    try
    {
      final Bean bean = (Bean)factory.getFieldValue(field, obj);
      /*
       * returned bean will not be null even though the bean is not found. what we get instead
       * is a proxy. we invoke a method on the proxy in order to cause it to try to locate the
       * bean and that is when it will fail
       */
      bean.method();
      fail();
    }
    catch (RuntimeException e)
    {
    }
View Full Code Here

Examples of org.boco.seamwebappgen.info.Bean

        {
          EntityCheck ck = new EntityCheck();

          ck.check(beanName, infoReader.getClass(beanName), infoReader.getRelationships(beanName));

          Bean bean = new Bean();

          bean.setName(beanName, infoReader.getPackage());
          bean.setBasePackage(basePackage);
          bean.setAttributes(infoReader.getBeanAttributes(beanName));
          bean.setKey(infoReader.getBeanKey(beanName));
          bean.setRelationships(infoReader.getRelationships(beanName));

          bean.setScope(infoReader.getBeanScope(beanName));
         
          // Attributi da visualizzare nella lista del bean
          bean.setShowAttributes(infoReader.getBeanShowAttributes(beanName, bean.getRelationships()));

          // Attributi provenienti da relazioni da visualizzare nel form del bean
          bean.setShowInFormAttributes(infoReader.getBeanShowInFormAttributes(beanName, bean.getRelationships()));

          // Attributi da utilizzare per la ricerca
          bean.setSearchAttributes(infoReader.getBeanSearchAttributes(beanName, bean.getRelationships()));

          // Legge le informazioni relative alle azioni nella pagina risultato della ricerca
          infoReader.setSearchListActionsInfo(bean);

          // Attributi da utilizzare per la ricerca nella pagina list
          bean.setLocalSearchAttributes(infoReader.getBeanLocalSearchAttributes(beanName, bean.getRelationships()));
          bean.setPrintMenuConditionInForm(infoReader.getNewMenuOptionConditionOnListSearch(beanName));
         
         
          // Liste di visualizzazione del bean
          bean.setLists(infoReader.getLists(beanName));

          // Informazioni sulla lista risultato della ricerca
          bean.setNewMenuOptionConditionOnListSearch(infoReader.getNewMenuOptionConditionOnListSearch(beanName));
          bean.setPrintMenuOptionConditionOnListSearch("");

          // Abilitazioni per la sicurezza
          bean.setRolesEnabledToCreate(infoReader.getRolesEnabledToCreate(beanName));
          bean.setRolesEnabledToEdit(infoReader.getRolesEnabledToEdit(beanName));
          bean.setRolesEnabledToDelete(infoReader.getRolesEnabledToDelete(beanName));
          bean.setRolesEnabledToSearch(infoReader.getRolesEnabledToSearch(beanName));

          bean.setCreateCondition(infoReader.getCreateCondition(beanName));
          bean.setEditCondition(infoReader.getEditCondition(beanName));
          bean.setDeleteCondition(infoReader.getDeleteCondition(beanName));
          bean.setSearchCondition(infoReader.getSearchCondition(beanName));

          // Gruppi di attributi nel form
          bean.setFormFieldsGroups(infoReader.getFormGroups(beanName));

          /*
           * Tutti i passaggi precedenti potrebbero essere
           * accorpati nella funzione
           *
           * public Bean getBean(String beanName) throws Exception
           *
           * che al momento sembra essere incompleta !!!!!
           *
           */

          //System.out.println(bean);
          /**
           * Genera il session bean di gestione del bean
           */
          if (!infoReader.ignoreBeanManager(beanName))
            BeanManagerGenerator.generateManager(sourceDir, targetDir, basePackage, bean);

          /**
           * Configura Callback e Sicurezza
           */
          PagesConfig.addListPages(targetDir, bean);

          /**
           * Genera le pagine per la gestione delle popup
           */
          HTMLGenerator.generatePopUp(bean, sourceDir, targetDir, basePackage);

          /**
           * Genera la pagina di gestione del bean
           */
          if (!infoReader.ignoreForm(beanName))
          {
            // Genera il form standard
            HTMLGenerator.generateFormPage(sourceDir, targetDir, bean, false);

            // Genera il form per le operazioni sul form nella popup
            if (infoReader.BeanCrudInPopUp(beanName))
              HTMLGenerator.generateFormPage(sourceDir, targetDir, bean, true);
          }
          /**
           * Genera le pagine html di help
           */
          HTMLGenerator.generateHelp(sourceDir, targetDir, bean);

          /**
           * Genera la pagina di ricerca del bean
           */
          if (bean.getSearchAttributes().size() > 1)
            HTMLGenerator.generateFormPageSearch(sourceDir, targetDir, bean);

          /**
           * Genera le pagine per le liste dei bean
           */
          if (!infoReader.ignoreLists(beanName))
            HTMLGenerator.generateListPages(sourceDir, targetDir, basePackage, bean);

          /**
           * Genera la lista dei bean stampabile
           */
          if (!infoReader.ignorePrintListForm(beanName))
            HTMLGenerator.generateListPagePrint(sourceDir, targetDir, basePackage, bean);
          /**
           * Genera il form del bean stampabile
           */
          if (!infoReader.ignorePrintForm(beanName))
            HTMLGenerator.generateFormPagePrint(sourceDir, targetDir, basePackage, bean);

          if (bean.getSearchAttributes().size() > 1)
            HTMLGenerator.generateListPageSearch(sourceDir, targetDir, basePackage, bean);

          MessagesGenerator.generateMessages(sourceDir, targetDir, bean);
        }

View Full Code Here

Examples of org.eclipse.sisu.inject.RankedBindingsTest.Bean

        final LocatedBeans<Annotation, Bean> beans = locate( Key.get( Bean.class ) );

        final Iterator<BeanEntry<Annotation, Bean>> itr1 = beans.iterator();
        final Iterator<BeanEntry<Annotation, Bean>> itr2 = beans.iterator();

        Bean a, b;

        a = itr1.next().getValue();
        assertSame( a, itr2.next().getValue() );
        a = itr1.next().getValue();
        assertSame( a, itr2.next().getValue() );
View Full Code Here

Examples of org.ftlines.metagen.eclipse.model.Bean

      this.errors = errors;
    }

    private void visitBean(ITypeBinding type) {

      Bean bean = new Bean(getVisibility(type.getModifiers()), type.getQualifiedName());
      beans.push(bean);
      if (!populateBean(type, bean)) {
        return;
      }

      // check if we need to extend a super meta class
      ITypeBinding cursor = type.getSuperclass();
      while (cursor != null) {
        Bean superbean = new Bean(getVisibility(cursor.getModifiers()), cursor.getQualifiedName());
        if (!populateBean(cursor, superbean)) {
          break;
        }
        if (superbean.willGenerateMeta()) {
          String supername = getMetaSuperName(cursor);
          bean.setSuperclass(supername);
          break;
        }
        cursor = cursor.getSuperclass();
View Full Code Here

Examples of org.fusesource.ide.camel.model.generated.Bean

      if (node.getUri() != null && node.getUri().trim().length()>0) {
        // uri specified, use it
        return node.getUri();
      }
    } else if (this instanceof Bean) {
      Bean node = (Bean) this;
      return "bean " + Strings.getOrElse(node.getRef());
    } else if (this instanceof Catch) {
      Catch node = (Catch) this;
      List exceptions = node.getExceptions();
      if (exceptions != null && exceptions.size() > 0) {
        return "catch " + exceptions;
      } else {
        return "catch " + Expressions.getExpressionOrElse(node.getHandled());
      }
    } else if (this instanceof Choice) {
      return "choice";
    } else if (this instanceof ConvertBody) {
      ConvertBody node = (ConvertBody) this;
      return "convertBody " + Strings.getOrElse(node.getType());
    } else if (this instanceof Enrich) {
      Enrich node = (Enrich) this;
      return "enrich " + Strings.getOrElse(node.getResourceUri());
    } else if (this instanceof Finally) {
      return "finally";
    } else if (this instanceof InOnly) {
      InOnly node = (InOnly) this;
      return "inOnly " + Strings.getOrElse(node.getUri());
    } else if (this instanceof InOut) {
      InOut node = (InOut) this;
      return "inOut " + Strings.getOrElse(node.getUri());
    } else if (this instanceof InterceptSendToEndpoint) {
      InterceptSendToEndpoint node = (InterceptSendToEndpoint) this;
      return "intercept " + Strings.getOrElse(node.getUri());
    } else if (this instanceof Log) {
      Log node = (Log) this;
      return "log " + Strings.getOrElse(node.getLogName());
    } else if (this instanceof Marshal) {
      return "marshal";
    } else if (this instanceof OnException) {
      OnException node = (OnException) this;
      return "on exception " + Strings.getOrElse(node.getExceptions());
    } else if (this instanceof Otherwise) {
      return "otherwise";
    } else if (this instanceof PollEnrich) {
      PollEnrich node = (PollEnrich) this;
      return "poll enrich " + Strings.getOrElse(node.getResourceUri());
    } else if (this instanceof RemoveHeader) {
      RemoveHeader node = (RemoveHeader) this;
      return "remove header " + Strings.getOrElse(node.getHeaderName());
    } else if (this instanceof RemoveProperty) {
      RemoveProperty node = (RemoveProperty) this;
      return "remove property " + Strings.getOrElse(node.getPropertyName());
    } else if (this instanceof Rollback) {
      Rollback node = (Rollback) this;
      return "rollback " + Strings.getOrElse(node.getMessage());
    } else if (this instanceof SetExchangePattern) {
      SetExchangePattern node = (SetExchangePattern) this;
      ExchangePattern pattern = node.getPattern();
      if (pattern == null) {
        return "setExchangePattern";
      } else {
        return "set " + pattern;
      }
    } else if (this instanceof Sort) {
      Sort node = (Sort) this;
      return "sort " + Expressions.getExpressionOrElse(node.getExpression());
    } else if (this instanceof When) {
      When node = (When) this;
      return "when " + Expressions.getExpressionOrElse(node.getExpression());
    } else if (this instanceof Unmarshal) {
      return "unmarshal";
    } else if (this instanceof Try) {
      return "try";
    } else if (this instanceof LoadBalance) {
View Full Code Here

Examples of org.hibernate.test.bytecode.Bean

    assertNotNull( optimizer.getInstantiationOptimizer() );
    assertNotNull( optimizer.getAccessOptimizer() );

    Object instance = optimizer.getInstantiationOptimizer().newInstance();
    assertEquals( instance.getClass(), Bean.class );
    Bean bean = ( Bean ) instance;

    optimizer.getAccessOptimizer().setPropertyValues( bean, BeanReflectionHelper.TEST_VALUES );
    assertEquals( bean.getSomeString(), BeanReflectionHelper.TEST_VALUES[0] );
    Object[] values = optimizer.getAccessOptimizer().getPropertyValues( bean );
    assertEquivalent( values, BeanReflectionHelper.TEST_VALUES );
  }
View Full Code Here

Examples of org.joda.beans.Bean

        // storing target data
        ComputationTarget computationTarget = _computationTargetResolver.resolve(targetSpec, VersionCorrection.LATEST);
        Object targetValue = computationTarget.getValue();
        if (targetValue instanceof Bean) {
          Bean bean = (Bean) targetValue;
          for (String propertyName : bean.propertyNames()) {
            Property<Object> property = bean.property(propertyName);
            final long targetPropertyId = nextId(RSK_SEQUENCE_NAME);
            targetProperties.add(getTargetPropertyArgs(targetPropertyId, computationTargetId, propertyName, property.get() == null ? "NULL" : property.get().toString()));
          }
        }
      }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.