Package de.sosd.mediaserver.domain.db

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


  @Transactional(propagation=Propagation.REQUIRED)
  private void setSystemOffline() {
    this.upnp.sendByeBye();
    this.upnp.stopListening();
    final SystemDomain system = this.systemDao.getSystem(cfg.getUSN());
    system.setOnline(false);
    this.systemDao.store(system);
  }
View Full Code Here


    }
  }

  @Transactional(propagation = Propagation.REQUIRED)
  private void setSystemOnline(String usn) {
    final SystemDomain system = this.systemDao.getSystem(usn);
    system.setOnline(true);
    for (final ScanFolderDomain sfd : system.getScanFolder()) {
      if (!ScanFolderState.NOT_FOUND.equals(sfd.getScanState())) {
        sfd.setScanState(ScanFolderState.IDLE);
      }
    }
    system.setMetaInfoGenerationRunning(false);
    system.setThumbnailGenerationRunning(false);
    this.systemDao.store(system);
    this.upnp.startListening();
  }
View Full Code Here

    return this.manager.createQuery("select new de.sosd.mediaserver.bean.ui.FrontendFolderBean(dir.id, dir.path, dir.lastScan, dir.scanInterval, dir.scanState,dir.folderCount, dir.fileCount, dir.overallSize) from Folder as dir").getResultList();
  }
 
  @Transactional(propagation = Propagation.REQUIRED)
  public StringKeyValuePair createDirectory(final ScanFolderDomain scanFolder, final String usn) {
    final SystemDomain systemProperties = systemDao.getSystem(usn);
    scanFolder.setSystem(systemProperties);
    systemProperties.getScanFolder().add(scanFolder);
    this.manager.persist(systemProperties);
   
    return new StringKeyValuePair(scanFolder.getId(), scanFolder.getPath());
  }
View Full Code Here

 
  @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

  private String webappName = "mediaserver";
 
  private String usn = null;

  public String getServerName() {
    final SystemDomain systemProperties = this.systemDao.getSystem(getUSN());
    return systemProperties.getName();
  }
View Full Code Here

  public void updateWebappConfiguration(final String protocol,final  String address,final  int port,final  String webappName) {
    this.port = port;
    this.webappName = webappName;
    this.address = address;
    this.protocol = protocol;
    SystemDomain system = systemDao.getSystem(getUSN());
    system.setHostname(getAddress());
    system.setPort(getPort());
    system.setWebappName(getWebappName());
    system.setProtocol(getProtocol());
   
    systemDao.store(system);
  }
View Full Code Here

 
  /**
   * @param port the port to set
   */
  public void loacWebappConfiguration() {
    SystemDomain system = systemDao.getSystem(getUSN());
    this.address  = system.getHostname();
    this.port = system.getPort();
    this.webappName = system.getWebappName();
    this.protocol = system.getProtocol();
  }
View Full Code Here

    this.webappName = system.getWebappName();
    this.protocol = system.getProtocol();
  }

  public String getMPlayerPath() {
    final SystemDomain systemProperties = this.systemDao.getSystem(getUSN());
    return systemProperties.getMplayerPath();
  }
View Full Code Here

    final SystemDomain systemProperties = this.systemDao.getSystem(getUSN());
    return systemProperties.getMplayerPath();
  }

  public String getPreviews() {
    final SystemDomain systemProperties = this.systemDao.getSystem(getUSN());
    return systemProperties.getPreviewCache();
  }
View Full Code Here

  private Thread metaInfoReader = null;
  private Thread thumbnailCreator = null;
 
 
  public void createMetaInfos() {
    final SystemDomain system = this.systemDao.getSystem(cfg.getUSN());
    final Boolean running = system.getMetaInfoGenerationRunning();
    if (((running == null) || !running.booleanValue())) {
      if (this.metaInfoReader != null) {
        this.metaInfoReader.interrupt();
      }
      this.metaInfoReader = new MetaInfoReaderThread(system);
View Full Code Here

TOP

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

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.