private Pivot(Service service, AtomEntry entry) { this.service = service; this.openInSearch = entry.content.getString("open_in_search"); this.drilldownSearch = entry.content.getString("drilldown_search"); this.pivotSearch = entry.content.getString("pivot_search"); this.search = entry.content.getString("search"); this.tstatsSearch = entry.content.getString("tstats_search", null); }
/** * Returns the {@code int} value associated with the given key. * * @param key The key of the value being retrieved. * @return The value associated with the given key. */ int getInteger(String key) { return Value.toInteger(getString(key)); }
/** * Returns the {@code long} value associated with the given key. * * @param key The key of the value being retrieved. * @return The value associated with the given key. */ long getLong(String key) { return Value.toLong(getString(key)); }
/** * Returns the username of the entity owner. * * @return The entity owner's username. */ public String getOwner() { return getEaiAcl().getString("owner"); }
/** * Returns how this entity is shared (app, global, and/or user). * * @return Values that indicate how this entity is shared. */ public String getSharing() { return getEaiAcl().getString("sharing"); }
/** * Returns the app context of this entity. * * @return The app context of this entity. */ public String getApp() { return getEaiAcl().getString("app", "system"); }
/** * Returns the {@code Boolean} value associated with the given key. * * @param key The key of the value being retrieved. * @return The value associated with the given key, or {@code null} if the * key does not exist. */ boolean getBoolean(String key) { return Value.toBoolean(getString(key)); }
/** * Returns the {@code long} byte count value associated with the given key. * * @param key The key of the value being retrieved. * @return The value associated with the given key, or {@code null} if the * key does not exist. */ long getByteCount(String key) { return Value.toByteCount(getString(key)); }
/** * Returns the {@code Date} value associated with the given key. * * @param key The key of the value being retrieved. * @return The value associated with the given key, or {@code null} if the * key does not exist. */ Date getDate(String key) { return Value.toDate(getString(key)); }
/** * Returns the string value associated with the specified key, or the * default value if the key does not exist. * * @param key The key to look up. * @param defaultValue The default value. * @return The string value associated with the specified key. */ String getString(String key, String defaultValue) { if (toUpdate.containsKey(key)) return toUpdate.get(key).toString(); return getContent().getString(key, defaultValue); }
/** * Returns the string value associated with the specified key. * * @param key The key to look up. * @return The string value associated with the specified key. */ String getString(String key) { if (toUpdate.containsKey(key)) return toUpdate.get(key).toString(); return getContent().getString(key); }
/** * Returns the {@code float} value associated with the given key. * * @param key The key of the value being retrieved. * @return The value associated with the given key. */ float getFloat(String key) { return Value.toFloat(getString(key)); }
/** * Returns the {@code Date} value associated with the given key, or * {@code defaultValue} if the key does not exist. * * @param key The key of the value being retrieved. * @param defaultValue The value to return if the key does not exist. * @return The value associated with the given key, or {@code defaultValue} * if the key does not exist. */ Date getDate(String key, Date defaultValue) { if (!containsKey(key)) return defaultValue; return Value.toDate(getString(key)); }
/** * Returns the {@code Boolean} value associated with the given key, or the * {@code defaultValue} if the key does not exist. * * @param key The key of the value being retrieved. * @param defaultValue The value to return if the key does not exist. * @return The value associated with the given key, or {@code defaultValue} * if the key does not exist. */ boolean getBoolean(String key, boolean defaultValue) { if (!containsKey(key)) return defaultValue; return Value.toBoolean(getString(key)); }
/** * Returns the {@code long} byte count value associated with the given key, * or {@code defaultValue} if the key does not exist. * * @param key The key of the value being retrieved. * @param defaultValue The value to return if the key does not exist. * @return The value associated with the given key, or {@code defaultValue} * if the key does not exist. */ long getByteCount(String key, long defaultValue) { if (!containsKey(key)) return defaultValue; return Value.toByteCount(getString(key)); }
/** * Returns the {@code int} value associated with the given key, or * {@code defaultValue} if the key does not exist. * * @param key The key of the value being retrieved. * @param defaultValue The value to return if the key does not exist. * @return The value associated with the given key, or {@code defaultValue} * if the key does not exist. */ int getInteger(String key, int defaultValue) { if (!containsKey(key)) return defaultValue; return Value.toInteger(getString(key)); }
/** * Returns the {@code long} value associated with the given key, or * {@code defaultValue} if the key does not exist. * * @param key The key of the value being retrieved. * @param defaultValue The value to return if the key does not exist. * @return The value associated with the given key, or {@code defaultValue} * if the key does not exist. */ long getLong(String key, int defaultValue) { if (!containsKey(key)) return defaultValue; return Value.toLong(getString(key)); }