Ejemplo n.º 1
0
 /**
  * Set this property on the provided element.
  *
  * @param element the element
  * @param value the new property value
  * @param metadata the property metadata
  * @param visibility the property visibility
  */
 public final void setProperty(
     final Element element,
     final TRaw value,
     final Map<String, Object> metadata,
     final Visibility visibility) {
   element.setProperty(key, wrap(value), metadata, visibility);
 }
Ejemplo n.º 2
0
 /**
  * Get all values of this property from the provided Element.
  *
  * @param element the element
  * @return an Iterable over the values of this property on the given Element
  */
 @SuppressWarnings("unchecked")
 public final Iterable<TRaw> getPropertyValues(final Element element) {
   Iterable<Object> values = element != null ? element.getPropertyValues(key) : null;
   return values != null ? Iterables.transform(values, rawConverter) : Collections.EMPTY_LIST;
 }
Ejemplo n.º 3
0
 /**
  * Get the value of this property from the provided Element.
  *
  * @param element the element
  * @return the value of this property on the given Element or null if it is not configured
  */
 public final TRaw getPropertyValue(final Element element) {
   Object value = element != null ? element.getPropertyValue(key) : null;
   return value != null ? rawConverter.apply(value) : null;
 }
Ejemplo n.º 4
0
 /**
  * Set this property on the provided element.
  *
  * @param element the element
  * @param value the new property value
  * @param visibility the property visibility
  */
 public final void setProperty(
     final Element element, final TRaw value, final Visibility visibility) {
   element.setProperty(key, wrap(value), visibility);
 }