示例#1
0
 protected void addPropertyInternal(Property property) {
   if (property.getKey() == null) {
     throw new IllegalArgumentException("key is required for property");
   }
   Object propertyValue = property.getValue();
   if (propertyValue instanceof PropertyValue && !((PropertyValue) propertyValue).isStore()) {
     return;
   }
   Property existingProperty =
       getProperty(property.getKey(), property.getName(), property.getVisibility());
   if (existingProperty == null) {
     this.properties.add(property);
   } else {
     if (existingProperty instanceof MutableProperty) {
       ((MutableProperty) existingProperty).update(property);
     } else {
       throw new VertexiumException(
           "Could not update property of type: " + existingProperty.getClass().getName());
     }
   }
 }