@Test public void shouldEncryptAProperty() { final SystemProperty<Long> longProperty = SystemProperty.Builder.ofType(Long.class) .setKey("an-encrypted-property") .setDefaultValue(42L) .setDynamic(false) .setEncrypted(true) .build(); longProperty.setValue(84L); assertThat(JiveGlobals.isPropertyEncrypted("an-encrypted-property"), is(true)); }
public void setValue(final T value) { JiveGlobals.setProperty(key, TO_STRING.get(getConverterClass()).apply(value, this), isEncrypted()); }
SystemProperty { public void setValue(final T value) { JiveGlobals.setProperty(key, TO_STRING.get(getConverterClass()).apply(value, this), isEncrypted()); } }
SystemProperty { public void setValue(final T value) { JiveGlobals.setProperty(key, TO_STRING.get(getConverterClass()).apply(value, this), isEncrypted()); } private  SystemProperty(final Builder<T> builder); }
SystemProperty { public void setValue(final T value) { JiveGlobals.setProperty(key, TO_STRING.get(getConverterClass()).apply(value, this), isEncrypted()); } private  SystemProperty(final Builder<T> builder); static Collection<SystemProperty> getProperties(); @SuppressWarnings("WeakerAccess") static void removePropertiesForPlugin(final String plugin); static Optional<SystemProperty> getProperty(final String key); @SuppressWarnings("unchecked") T getValue(); String getValueAsSaved(); String getDisplayValue(); boolean hasValueChanged(); String getDefaultDisplayValue(); void setValue(final T value); String getPlugin(); boolean isDynamic(); boolean isEncrypted(); boolean isRestartRequired(); void addListener(final Consumer<T> listener); void removeListener(final Consumer<T> listener); String getKey(); String getDescription(); T getDefaultValue(); }
SystemProperty { public void setValue(final T value) { JiveGlobals.setProperty(key, TO_STRING.get(getConverterClass()).apply(value, this), isEncrypted()); } private  SystemProperty(final Builder<T> builder); static Collection<SystemProperty> getProperties(); @SuppressWarnings("WeakerAccess") static void removePropertiesForPlugin(final String plugin); static Optional<SystemProperty> getProperty(final String key); @SuppressWarnings("unchecked") T getValue(); String getValueAsSaved(); String getDisplayValue(); boolean hasValueChanged(); String getDefaultDisplayValue(); void setValue(final T value); String getPlugin(); boolean isDynamic(); boolean isEncrypted(); boolean isRestartRequired(); void addListener(final Consumer<T> listener); void removeListener(final Consumer<T> listener); String getKey(); String getDescription(); T getDefaultValue();  }