当前位置: 首页>>代码示例>>Java>>正文


Java SettingsService.getSubsonicHome方法代码示例

本文整理汇总了Java中net.sourceforge.subsonic.service.SettingsService.getSubsonicHome方法的典型用法代码示例。如果您正苦于以下问题:Java SettingsService.getSubsonicHome方法的具体用法?Java SettingsService.getSubsonicHome怎么用?Java SettingsService.getSubsonicHome使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在net.sourceforge.subsonic.service.SettingsService的用法示例。


在下文中一共展示了SettingsService.getSubsonicHome方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getImageCacheDirectory

import net.sourceforge.subsonic.service.SettingsService; //导入方法依赖的package包/类
private synchronized File getImageCacheDirectory(int size) {
    File dir = new File(SettingsService.getSubsonicHome(), "thumbs");
    dir = new File(dir, String.valueOf(size));
    if (!dir.exists()) {
        if (dir.mkdirs()) {
            LOG.info("Created thumbnail cache " + dir);
        } else {
            LOG.error("Failed to create thumbnail cache " + dir);
        }
    }

    return dir;
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:14,代码来源:CoverArtController.java

示例2: createDataSource

import net.sourceforge.subsonic.service.SettingsService; //导入方法依赖的package包/类
private DataSource createDataSource() {
    File subsonicHome = SettingsService.getSubsonicHome();
    DriverManagerDataSource ds = new DriverManagerDataSource();
    ds.setDriverClassName("org.hsqldb.jdbcDriver");
    ds.setUrl("jdbc:hsqldb:file:" + subsonicHome.getPath() + "/db/subsonic");
    ds.setUsername("sa");
    ds.setPassword("");

    return ds;
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:11,代码来源:HsqlDaoHelper.java

示例3: afterPropertiesSet

import net.sourceforge.subsonic.service.SettingsService; //导入方法依赖的package包/类
public void afterPropertiesSet() throws Exception {
    Configuration configuration = ConfigurationFactory.parseConfiguration();

    // Override configuration to make sure cache is stored in Subsonic home dir.
    File cacheDir = new File(SettingsService.getSubsonicHome(), "cache");
    configuration.getDiskStoreConfiguration().setPath(cacheDir.getPath());

    cacheManager = CacheManager.create(configuration);
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:10,代码来源:CacheFactory.java

示例4: doFilter

import net.sourceforge.subsonic.service.SettingsService; //导入方法依赖的package包/类
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
        throws IOException, ServletException {

    // Already verified?
    if (subsonicHomeVerified) {
        chain.doFilter(req, res);
        return;
    }

    File home = SettingsService.getSubsonicHome();
    if (!directoryExists(home)) {
        error(res, "<p>The directory <b>" + home + "</b> does not exist. Please create it and make it writable, " +
                   "then restart the servlet container.</p>" +
                   "<p>(You can override the directory location by specifying -Dsubsonic.home=... when " +
                   "starting the servlet container.)</p>");

    } else if (!directoryWritable(home)) {
        error(res, "<p>The directory <b>" + home + "</b> is not writable. Please change file permissions, " +
                   "then restart the servlet container.</p>" +
                   "<p>(You can override the directory location by specifying -Dsubsonic.home=... when " +
                   "starting the servlet container.)</p>");

    } else {
        subsonicHomeVerified = true;
        logServerInfo(req);
        chain.doFilter(req, res);
    }
}
 
开发者ID:sindremehus,项目名称:subsonic,代码行数:29,代码来源:BootstrapVerificationFilter.java

示例5: createDataSource

import net.sourceforge.subsonic.service.SettingsService; //导入方法依赖的package包/类
private DataSource createDataSource() {
	
    File subsonicHome = SettingsService.getSubsonicHome();
    DriverManagerDataSource ds = new DriverManagerDataSource();
    
    ds.setDriverClassName("org.hsqldb.jdbcDriver");
    ds.setUrl("jdbc:hsqldb:file:" + subsonicHome.getPath() + "/db/subsonic");
    ds.setUsername("sa");
    ds.setPassword("");

    return ds;
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:13,代码来源:DaoHelper.java

示例6: doFilter

import net.sourceforge.subsonic.service.SettingsService; //导入方法依赖的package包/类
public void doFilter(ServletRequest req, ServletResponse res, FilterChain chain)
        throws IOException, ServletException {

    // Already verified?
    if (subsonicHomeVerified) {
        chain.doFilter(req, res);
        return;
    }

    File home = SettingsService.getSubsonicHome();
    if (!directoryExists(home)) {
        error(res, "<p>The directory <b>" + home + "</b> does not exist. Please create it and make it writable, " +
                   "then restart the servlet container.</p>" +
                   "<p>(You can override the directory location by specifying -Dsubsonic.home=... when " +
                   "starting the servlet container.)</p>");

    } else if (!directoryWritable(home)) {
        error(res, "<p>The directory <b>" + home + "</b> is not writable. Please change file permissions, " +
                   "then restart the servlet container.</p>" +
                   "<p>(You can override the directory location by specifying -Dsubsonic.home=... when " +
                   "starting the servlet container.)</p>");

    } else {
        subsonicHomeVerified = true;
        chain.doFilter(req, res);
    }
}
 
开发者ID:FutureSonic,项目名称:FutureSonic-Server,代码行数:28,代码来源:BootstrapVerificationFilter.java


注:本文中的net.sourceforge.subsonic.service.SettingsService.getSubsonicHome方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。