Examples of BasicBean


Examples of net.alteiar.newversion.shared.bean.BasicBean

    for (File dir : baseDir.listFiles()) {
      if (dir.isDirectory()) {
        for (File fi : dir.listFiles()) {
          if (fi.isFile()) {
            BasicBean bean = DocumentIO.loadBeanLocal(fi);
            if (bean != null) {
              addBean(bean);
            }
          }
        }
View Full Code Here

Examples of net.alteiar.newversion.shared.bean.BasicBean

   * @return
   * @throws Exception
   */
  private void loadDocument(UniqueID guid) {
    try {
      BasicBean localBean = searchBean(getSpecificPath(), guid);
      BasicBean globalBean = searchBean(getGlobalPath(), guid);
      if (localBean != null) {
        // load local bean if exist
        documentAdded(localBean);

      } else if (globalBean != null) {
View Full Code Here

Examples of net.alteiar.newversion.shared.bean.BasicBean

  public int getLocalDocumentCount() {
    return documents.size();
  }

  private BasicBean searchBean(String path, UniqueID id) {
    BasicBean beanFound = null;
    String filename = DocumentIO.validateFilename(id.toString());

    File found = searchFile(new File(path), filename);
    if (found != null) {
      try {
View Full Code Here

Examples of net.alteiar.newversion.shared.bean.BasicBean

    }
    IDocument doc = getDocument(id, -1L);

    if (doc == null) {
      // try to find it localy in campaign
      BasicBean bean = searchBean(getSpecificPath(), id);
      if (bean != null) {
        documentAdded(bean);
      } else {
        // try to find it globaly
        bean = searchBean(getGlobalPath(), id);
View Full Code Here

Examples of net.alteiar.newversion.shared.bean.BasicBean

    this.revalidate();
    this.repaint();
  }

  public void buildElement(BeanDirectory dir) {
    BasicBean bean = builder.buildDocument();

    if (bean != null) {
      BeanDocument doc = new BeanDocument(dir, builder.getDocumentName(),
          builder.getDocumentType(), bean);
View Full Code Here

Examples of net.alteiar.newversion.shared.bean.BasicBean

    BeanDocument b = getBeans(bean);
    assertNotNull("The bean should'nt be null", b);

    long begin = System.currentTimeMillis();
    long end = System.currentTimeMillis();
    BasicBean beanRec = b.getBean();
    while (beanRec == null && (end - begin) < getTimeout()) {
      beanRec = b.getBean();
      end = System.currentTimeMillis();
      sleep(50);
    }
View Full Code Here

Examples of net.alteiar.newversion.shared.bean.BasicBean

    BeanDocument b = getBeans(bean);
    assertNotNull("The bean should'nt be null", b);

    long begin = System.currentTimeMillis();
    long end = System.currentTimeMillis();
    BasicBean beanRec = b.getBean();
    while (beanRec == null && (end - begin) < getTimeout()) {
      beanRec = b.getBean();
      end = System.currentTimeMillis();
      sleep(50);
    }
View Full Code Here

Examples of org.jboss.ejb3.test.interceptors.basic.BasicBean

   public void test2() throws Exception
   {
      log.info("======= Basic.test2()");
      assertEquals(0, BasicInterceptor.postConstructs);
     
      BasicBean bean = new BasicBean();
      System.out.println("instanceAdvisor = " + ((InstanceAdvised) bean)._getInstanceAdvisor());
     
      assertEquals("BasicInterceptor postConstruct must have been called once", 1, BasicInterceptor.postConstructs);
     
      System.out.println(bean.getClass() + " " + bean.getClass().getClassLoader());
      System.out.println("  " + Arrays.toString(bean.getClass().getInterfaces()));
      String result = bean.sayHi("Test");
      System.out.println(result);
     
      assertEquals("sayHi didn't invoke BasicInterceptor.aroundInvoke once", 1, BasicInterceptor.aroundInvokes);
      assertEquals("sayHi didn't invoke BasicBean.aroundInvoke once", 1, BasicBean.aroundInvokes);
     
      bean.intercept();
      assertEquals("intercept didn't invoke BasicMethodInterceptor.aroundInvoke", 1, BasicMethodInterceptor.aroundInvokes);
      bean.intercept();
      assertEquals("intercept didn't invoke BasicMethodInterceptor.aroundInvoke", 2, BasicMethodInterceptor.aroundInvokes);
     
      assertEquals("intercept didn't invoke BasicInterceptor.aroundInvoke", 3, BasicInterceptor.aroundInvokes);
      assertEquals("BasicInterceptor postConstruct must have been called once", 1, BasicInterceptor.postConstructs);
      // 12.7 footnote 57
View Full Code Here

Examples of org.jboss.ejb3.test.interceptors.basic.BasicBean

   }
  
   public void testInstances() throws Exception
   {
      log.info("======= Basic.testInstances()");
      BasicBean bean1 = new BasicBean();
      BasicBean bean2 = new BasicBean();
     
      bean1.setState(1);
      bean2.setState(2);
     
      assertEquals(1, bean1.getState());
      assertEquals(2, bean2.getState());
      log.info("======= Done");
   }
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.