/** * Creates RAM persistence object from scope * * @param scope * Scope */ public RamPersistence(IScope scope) { this((ResourcePatternResolver) ScopeUtils.findApplication(scope)); }
/** * Creates RAM persistence object from scope * * @param scope * Scope */ public RamPersistence(IScope scope) { this((ResourcePatternResolver) ScopeUtils.findApplication(scope)); }
public static File getPreviewFile(IScope scope, String name, String extension) { String appScopeName = ScopeUtils.findApplication(scope).getName(); File file = new File(String.format("%s/webapps/%s/%s", System.getProperty("red5.root"), appScopeName, "previews/" + name + extension)); return file; }
public static File getUserRecordFile(IScope scope, String userVoDFolder, String name) { String appScopeName = ScopeUtils.findApplication(scope).getName(); File file = new File(String.format("%s/webapps/%s/%s", System.getProperty("red5.root"), appScopeName, "streams/" + userVoDFolder + "/" + name )); return file; }
final IScope app = ScopeUtils.findApplication(scope); final String prefix = "streams/"; while (scope != null && scope != app) {
final IScope app = ScopeUtils.findApplication(scope); final String prefix = "streams/"; while (scope != null && scope != app) {
String appScopeName = ScopeUtils.findApplication(scope).getName(); file = new File(String.format("%s/webapps/%s/%s", System.getProperty("red5.root"), appScopeName, fileName));
public static File getRecordFile(IScope scope, String name, String extension) { // get stream filename generator IStreamFilenameGenerator generator = (IStreamFilenameGenerator) ScopeUtils.getScopeService(scope, IStreamFilenameGenerator.class, DefaultStreamFilenameGenerator.class); // generate filename String fileName = generator.generateFilename(scope, name, extension, GenerationType.RECORD); File file = null; if (generator.resolvesToAbsolutePath()) { file = new File(fileName); } else { Resource resource = scope.getContext().getResource(fileName); if (resource.exists()) { try { file = resource.getFile(); logger.debug("File exists: {} writable: {}", file.exists(), file.canWrite()); } catch (IOException ioe) { logger.error("File error: {}", ioe); } } else { String appScopeName = ScopeUtils.findApplication(scope).getName(); file = new File( String.format("%s/webapps/%s/%s", System.getProperty("red5.root"), appScopeName, fileName)); } } return file; }
String appScopeName = ScopeUtils.findApplication(scope).getName(); file = new File(String.format("%s/webapps/%s/%s", System.getProperty("red5.root"), appScopeName, fileName));
log.debug("Configuring room scope: {}", scope); IScope appScope = ScopeUtils.findApplication(scope);