public QloudsonicVoucherFinder() { super(SupportDirectoryFinderFactory.get().find(), new Filter<Local>() { @Override public boolean accept(final Local file) { return "qloudsonicvoucher".equals(FilenameUtils.getExtension(file.getName())); } @Override public Pattern toPattern() { return Pattern.compile("qloudsonicvoucher"); } }); }
protected LicenseFactory() { this(SupportDirectoryFinderFactory.get().find()); }
@Override protected License open(final Local file) { // Verify immediately and exit if not a valid receipt final ReceiptVerifier verifier = new ReceiptVerifier(file); if(verifier.verify(new DisabledLicenseVerifierCallback())) { // Set name final Receipt receipt = new Receipt(file, verifier.getGuid()); if(log.isInfoEnabled()) { log.info(String.format("Valid receipt %s in %s", receipt, file)); } // Copy to Application Support for users switching versions final Local support = SupportDirectoryFinderFactory.get().find(); try { file.copy(LocalFactory.get(support, String.format("%s.cyberduckreceipt", receipt.getName()))); } catch(AccessDeniedException e) { log.warn(e.getMessage()); } return receipt; } else { log.error(String.format("Invalid receipt found in %s", file)); System.exit(APPSTORE_VALIDATION_FAILURE); return null; } }
final Local library = LocalFactory.get(SupportDirectoryFinderFactory.get().find(), PreferencesFactory.get().getProperty("profiles.folder.name")); if(library.exists()) {
LocalFactory.get(SupportDirectoryFinderFactory.get().find(), PreferencesFactory.get().getProperty("profiles.folder.name")).getAbbreviatedPath())); builder.append(StringUtils.LF);
for(Local file : SupportDirectoryFinderFactory.get().find().list().filter(new Filter<Local>() { @Override public boolean accept(final Local file) {
protected Credentials prompt(final LoginOptions options, final Credentials credentials) { if(options.save && options.keychain) { if(!PreferencesFactory.get().getBoolean("keychain.secure")) { console.printf(String.format("WARNING! Passwords are stored in plain text in %s.", LocalFactory.get(SupportDirectoryFinderFactory.get().find(), "credentials").getAbbreviatedPath())); } credentials.setSaved(prompt.prompt(LocaleFactory.get().localize("Save password", "Credentials"))); } else { credentials.setSaved(options.save); } return credentials; } }
if(l.verify(new DisabledLicenseVerifierCallback())) { try { f.copy(LocalFactory.get(SupportDirectoryFinderFactory.get().find(), f.getName())); final NSAlert alert = NSAlert.alert( l.toString(), newDocument().addBookmark(host); final Local profiles = LocalFactory.get(SupportDirectoryFinderFactory.get().find(), preferences.getProperty("profiles.folder.name")); if(!profiles.exists()) {