/** * Indicates whether this entity can be modified. * * @return {@code true} if this entity can be modified, * {@code false} if not. */ public boolean canWrite() { return getEaiAcl().getBoolean("can_write", false); }
/** * Indicates whether this entity's permission can be changed. * * @return {@code true} if this entity's permission can be changed, * {@code false} if not. */ public boolean canChangePermissions() { return getEaiAcl().getBoolean("can_change_perms", false); }
/** * Indicates whether the entity can be shared to a specific user. * * @return {@code true} if this entity can be shared to a specific user, * {@code false} if not. */ public boolean canShareUser() { return getEaiAcl().getBoolean("can_share_user", false); }
/** * Indicates whether this entity can be modified. * * @return {@code true} if this entity can be modified, * {@code false} if not. */ public boolean isModifiable() { return getEaiAcl().getBoolean("modifiable", false); } }
/** * Indicates whether this entity can be shared via an app. * * @return {@code true} if this entity can be shared via an app, * {@code false} if not. */ public boolean canShareApp() { return getEaiAcl().getBoolean("can_share_app", false); }
/** * Indicates whether the entity can be shared globally. * * @return {@code true} if this entity can be shared globally, * {@code false} if not. */ public boolean canShareGlobal() { return getEaiAcl().getBoolean("can_share_global", false); }
/** * Returns the Boolean value associated with the specified key. Values * can be converted from: 0, 1, true, false. * * @param key The key to look up. * @return The Boolean value associated with the specified key. */ boolean getBoolean(String key) { if (toUpdate.containsKey(key)) return Value.toBoolean(toUpdate.get(key).toString()); return getContent().getBoolean(key); }
/** * Returns the Boolean value associated with the specified key, or the * default value if the key does not exist. Boolean values can be converted * from: 0, 1, true, false. * * @param key The key to look up. * @param defaultValue The default value. * @return The Boolean value associated with the specified key. */ boolean getBoolean(String key, boolean defaultValue) { if (toUpdate.containsKey(key)) return Value.toBoolean(toUpdate.get(key).toString()); return getContent().getBoolean(key, defaultValue); }