Package net.alteiar.newversion.shared.bean

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


      File localFile) {

    ArrayList<E> result = new ArrayList<E>();
    for (File f : localFile.listFiles()) {
      try {
        BasicBean bean = DocumentIO.loadBeanLocal(f);
        result.add((E) bean);
      } catch (Exception e) {
        Logger.getLogger(CampaignClient.class).warn(
            "fail to load global bean " + f.getName(), e);
      }
View Full Code Here


      suppressBeanListeners.remove(listener.getId());
    }
  }

  public void addWaitBeanListener(WaitBeanListener listener) {
    BasicBean bean = getBean(listener.getBeanId());
    if (bean != null) {
      listener.beanReceived(bean);
      return;
    }
View Full Code Here

    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

   * @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

  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

    }
    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

    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

    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

    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

TOP

Related Classes of net.alteiar.newversion.shared.bean.BasicBean

Copyright © 2018 www.massapicom. 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.