Examples of AsciiFileDataSourceVO


Examples of com.infiniteautomation.asciifile.vo.AsciiFileDataSourceVO

public class AsciiFileEditDwr extends DataSourceEditDwr{

     @DwrPermission(user = true)
      public ProcessResult saveFileDataSource(BasicDataSourceVO basic, int updatePeriods, int updatePeriodType, String filePath) {
          AsciiFileDataSourceVO ds = (AsciiFileDataSourceVO) Common.getUser().getEditDataSource();

          setBasicProps(ds, basic);
          ds.setUpdatePeriods(updatePeriods);
          ds.setUpdatePeriodType(updatePeriodType);
          ds.setFilePath(filePath);
         
          return tryDataSourceSave(ds);
     
View Full Code Here

Examples of com.infiniteautomation.asciifile.vo.AsciiFileDataSourceVO

    return "dsEdit.file.desc";
  }

  @Override
  protected DataSourceVO<?> createDataSourceVO() {
    return new AsciiFileDataSourceVO();
  }
View Full Code Here

Examples of com.infiniteautomation.asciifile.vo.AsciiFileDataSourceVO

  /**
   * Load a file path
   * @throws Exception
   */
  public boolean connect () throws Exception{
    AsciiFileDataSourceVO vo = (AsciiFileDataSourceVO) this.getVo();
   
   
   
        this.file = new File( vo.getFilePath() );
    if ( !file.exists() ) {
      raiseEvent(DATA_SOURCE_EXCEPTION_EVENT, System.currentTimeMillis(), true, new TranslatableMessage("file.event.fileNotFound",vo.getFilePath()));
      return false;
    }else if ( !file.canRead() ){
      raiseEvent(DATA_SOURCE_EXCEPTION_EVENT, System.currentTimeMillis(), true, new TranslatableMessage("file.event.readFailed",vo.getFilePath()));
      return false;
        }else{
      this.fobs = new FileAlterationObserver(this.file);
      this.fobs.initialize();
      this.fobs.addListener(this);
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.