
syncloud.synchronization.nodes.SyncBundleFactory Maven / Gradle / Ivy
The newest version!
package syncloud.synchronization.nodes;
import syncloud.synchronization.ISynchronizer;
import syncloud.storage.IFile;
import syncloud.storage.IFolder;
import syncloud.storage.INode;
import java.util.List;
public class SyncBundleFactory {
public static ISyncBundle create(ISynchronizer sync, List syncNodes) {
for (SyncNode syncNode: syncNodes) {
INode node = syncNode.getNode();
if (node != null) {
if (node instanceof IFolder) return new FoldersSyncBundle(sync, syncNodes);
if (node instanceof IFile) return new FilesSyncBundle(sync, syncNodes);
}
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy