Package de.sosd.mediaserver.domain.db

Examples of de.sosd.mediaserver.domain.db.ScanFolderDomain


    return new StringKeyValuePair(scanFolder.getId(), scanFolder.getPath());
  }
 
  @Transactional(propagation = Propagation.REQUIRED)
  public void createFile(final String id, final String folderId, final File source) {
    final ScanFolderDomain parent = this.manager.find(ScanFolderDomain.class, folderId);
    final FileDomain f = new FileDomain(id, parent, source)
    this.manager.persist(f);
  }
View Full Code Here


    return this.manager.find(FileDomain.class, id) != null;
  }
 
  @Transactional(propagation = Propagation.REQUIRED)
  public void removeDirectory(final String id) {
    final ScanFolderDomain d = this.manager.find(ScanFolderDomain.class, id);
   
    SystemDomain system = d.getSystem();
    system.getScanFolder().remove(d);
    d.setSystem(null);
    this.manager.persist(system);
    this.manager.remove(d);   
  }
View Full Code Here

    return new FrontendSettingsBean(sys.getName(), "", "", sys.getPreviewCache(), sys.getMplayerPath(), sys.getMencoderPath());
  }

  @Transactional(propagation = Propagation.REQUIRED)
  public void updateScanInterval(final String folderId, final int scanInterval) {
    final ScanFolderDomain scfd = this.fsDao.getScanfolder(folderId);
    if (scfd != null) {
      scfd.setScanInterval(scanInterval);
    }
    this.fsDao.store(scfd);
  }
View Full Code Here

  @Transactional(propagation=Propagation.REQUIRED)
  public void addScanDirectoryTransactional(final File directory) {
    if (directory.isDirectory()) {
      final String id = this.idservice.getId(directory);
      if (!this.fsDao.isDirectoryPresent(id)) {
        final ScanFolderDomain scanFolder = new ScanFolderDomain(id, directory, null);
       
        final SystemDomain system = this.systemDao.getSystem(cfg.getUSN());
        system.getScanFolder().add(scanFolder);
        scanFolder.setSystem(system);
        scanFolder.setDidlRoot(this.didl.createDidlContainer(scanFolder, system.getDidlRoot()));
        this.systemDao.store(system);
        logger.info("added new scan-directory : " + scanFolder.getPath());
      }
    }
  }
View Full Code Here

TOP

Related Classes of de.sosd.mediaserver.domain.db.ScanFolderDomain

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.