@Override public Algorithm getEncryption(final Path file) throws BackgroundException { return delegate.getEncryption(vault.encrypt(session, file)); }
@Override public Set<Algorithm> getKeys(final Path file, final LoginCallback prompt) throws BackgroundException { return delegate.getKeys(vault.encrypt(session, file), prompt); }
@Override public Algorithm getDefault(final Path file) throws BackgroundException { return delegate.getDefault(vault.encrypt(session, file)); }
managedEncryptionKeys = session.getFeature(Encryption.class).getKeys(file, prompt); for(final Path f : files) { selectedEncryptionKeys.add(session.getFeature(Encryption.class).getEncryption(f));
file.getName())); try { status.setEncryption(feature.getEncryption(file)); status.setEncryption(feature.getDefault(file)); status.setEncryption(feature.getDefault(file));
@Override public void setEncryption(final Path file, final Algorithm algorithm) throws BackgroundException { delegate.setEncryption(vault.encrypt(session, file), algorithm); }
@Override public void setEncryption(final Path file, final Algorithm algorithm) throws BackgroundException { registry.find(session, file).getFeature(session, Encryption.class, proxy).setEncryption(file, algorithm); }
@Override public Algorithm getEncryption(final Path file) throws BackgroundException { return registry.find(session, file).getFeature(session, Encryption.class, proxy).getEncryption(file); }
@Override public Set<Algorithm> getKeys(final Path file, final LoginCallback prompt) throws BackgroundException { return registry.find(session, file).getFeature(session, Encryption.class, proxy).getKeys(file, prompt); }
@Override public Algorithm getDefault(final Path file) throws BackgroundException { return registry.find(session, file).getFeature(session, Encryption.class, proxy).getDefault(file); }
protected void write(final Session<?> session, final Encryption feature, final Path file) throws BackgroundException { if(this.isCanceled()) { throw new ConnectionCanceledException(); } listener.message(MessageFormat.format(LocaleFactory.localizedString("Writing metadata of {0}", "Status"), file.getName())); feature.setEncryption(file, algorithm); if(file.isDirectory()) { if(callback.recurse(file, algorithm)) { for(Path child : session.getFeature(ListService.class).list(file, new WorkerListProgressListener(this, listener))) { this.write(session, feature, child); } } } }
final Encryption.Algorithm encryption = encryptionFeature.getEncryption(file); target.setServerSideEncryptionAlgorithm(encryption.algorithm);
@Override public Set<Encryption.Algorithm> run(final Session<?> session) throws BackgroundException { final Encryption feature = session.getFeature(Encryption.class); final Set<Encryption.Algorithm> keys = new HashSet<>(); for(Path file : this.getContainers(files)) { if(this.isCanceled()) { throw new ConnectionCanceledException(); } keys.addAll(feature.getKeys(file, prompt)); } return keys; }
@Override public Path run(final Session<?> session) throws BackgroundException { final Directory feature = session.getFeature(Directory.class); final TransferStatus status = new TransferStatus(); final Encryption encryption = session.getFeature(Encryption.class); if(encryption != null) { status.setEncryption(encryption.getDefault(folder)); } final Redundancy redundancy = session.getFeature(Redundancy.class); if(redundancy != null) { status.setStorageClass(redundancy.getDefault()); } status.setTimestamp(System.currentTimeMillis()); final UnixPermission permission = session.getFeature(UnixPermission.class); if(permission != null) { status.setPermission(permission.getDefault(EnumSet.of(Path.Type.directory))); } return feature.mkdir(folder, region, status); }
@Override public Path run(final Session<?> session) throws BackgroundException { final Touch feature = session.getFeature(Touch.class); final TransferStatus status = new TransferStatus() .exists(false) .length(0L) .withMime(new MappingMimeTypeService().getMime(file.getName())); final Encryption encryption = session.getFeature(Encryption.class); if(encryption != null) { status.setEncryption(encryption.getDefault(file)); } final Redundancy redundancy = session.getFeature(Redundancy.class); if(redundancy != null) { status.setStorageClass(redundancy.getDefault()); } status.setTimestamp(System.currentTimeMillis()); final UnixPermission permission = session.getFeature(UnixPermission.class); if(permission != null) { status.setPermission(permission.getDefault(EnumSet.of(Path.Type.file))); } return feature.touch(file, status); }
final Encryption encryption = session.getFeature(Encryption.class); if(encryption != null) { status.setEncryption(encryption.getDefault(home));