code: @Override
      public boolean setAttributes(Map<String, Object> values) {
          int successes = 0;
          if (values != null) {
              beginUpdate();
              try {
                  for (Map.Entry<String, Object> entry : values.entrySet()) {
                      if (setAttribute(entry.getKey(), entry.getValue())) {
                          successes++;
                      }
                  }
              } finally {
                  endUpdate();
              }
          }
          // expect every value to have been added
          return (successes == values.size());
      }
docs: {@inheritDoc}