/** {@inheritDoc} */ @Override public Property<?> readProperty(String name) { if (!existProperty(name)) { throw new PropertyNotFoundException(name); } return (Property<?>) wrapper.getCacheProperties().get(name).getObjectValue(); }
/** {@inheritDoc} */ @Override public void updateProperty(String name, String newValue) { Property<?> fp = readProperty(name); fp.setValueFromString(newValue); updateProperty(fp); }
/** {@inheritDoc} */ @Override public void deleteProperty(String name) { if (!existProperty(name)) { throw new PropertyNotFoundException(name); } wrapper.getCacheProperties().remove(name); }
/** {@inheritDoc} */ @Override public <T> void createProperty(Property<T> property) { if (property == null) { throw new IllegalArgumentException("Property cannot be null nor empty"); } if (existProperty(property.getName())) { throw new PropertyAlreadyExistException(property.getName()); } wrapper.getCacheProperties().put(new Element(property.getName(), property)); }
/** {@inheritDoc} */ @Override public <T> void updateProperty(Property<T> property) { if (property == null) { throw new IllegalArgumentException("Property cannot be null"); } if (!existProperty(property.getName())) { throw new PropertyNotFoundException(property.getName()); } wrapper.getCacheProperties().put(new Element(property.getName(), property)); }