@Test public void testShare() { dir1.share(generateRSAKeyPair(EncryptionUtil.RSA_KEYLENGTH.BIT_512)); Assert.assertTrue(dir1.isShared()); Assert.assertTrue(dir2.isShared()); Assert.assertTrue(child3.isShared()); Assert.assertTrue(dir3.isShared()); Assert.assertTrue(dir4.isShared()); Assert.assertFalse(root.isShared()); Assert.assertFalse(child1.isShared()); Assert.assertFalse(child2.isShared()); dir1.unshare(); Assert.assertFalse(root.isShared()); Assert.assertFalse(dir1.isShared()); Assert.assertFalse(dir2.isShared()); Assert.assertFalse(dir3.isShared()); Assert.assertFalse(dir4.isShared()); Assert.assertFalse(child1.isShared()); Assert.assertFalse(child2.isShared()); Assert.assertFalse(child3.isShared()); }
public abstract boolean isShared();
Index implements Comparable<Index>, Serializable { public abstract boolean isShared(); }
Index implements Comparable<Index>, Serializable { public abstract boolean isShared(); Index(KeyPair fileKeys);  Index(KeyPair fileKeys, String name, FolderIndex parent); }
Index implements Comparable<Index>, Serializable { public abstract boolean isShared(); Index(KeyPair fileKeys);  Index(KeyPair fileKeys, String name, FolderIndex parent); KeyPair getFileKeys(); PublicKey getFilePublicKey(); String getName(); void setName(String name); void setParent(FolderIndex parent); void decoupleFromParent(); FolderIndex getParent(); FolderIndex getSharedTopFolder(); boolean isSharedOrHasSharedChildren(); String getFullPath(); File asFile(File root); abstract boolean isShared(); abstract Set<String> getCalculatedUserList(); abstract KeyPair getProtectionKeys(); abstract boolean isFolder(); abstract boolean canWrite(); boolean isFile(); @Override int compareTo(Index other); @Override boolean equals(Object obj); @Override int hashCode(); @Override abstract String toString(); static List<Index> getIndexList(Index node); }
Index implements Comparable<Index>, Serializable { public abstract boolean isShared(); Index(KeyPair fileKeys);  Index(KeyPair fileKeys, String name, FolderIndex parent); KeyPair getFileKeys(); PublicKey getFilePublicKey(); String getName(); void setName(String name); void setParent(FolderIndex parent); void decoupleFromParent(); FolderIndex getParent(); FolderIndex getSharedTopFolder(); boolean isSharedOrHasSharedChildren(); String getFullPath(); File asFile(File root); abstract boolean isShared(); abstract Set<String> getCalculatedUserList(); abstract KeyPair getProtectionKeys(); abstract boolean isFolder(); abstract boolean canWrite(); boolean isFile(); @Override int compareTo(Index other); @Override boolean equals(Object obj); @Override int hashCode(); @Override abstract String toString(); static List<Index> getIndexList(Index node);  }