@Override
  public String execute() {
    Attribute attribute = attributeService.getAttribute(id);

    if (attribute != null) {
      attribute.setName(name);
      attribute.setValueType(valueType);
      attribute.setMandatory(mandatory);
      attribute.setDataElementAttribute(dataElementAttribute);
      attribute.setDataElementGroupAttribute(dataElementGroupAttribute);
      attribute.setIndicatorAttribute(indicatorAttribute);
      attribute.setIndicatorGroupAttribute(indicatorGroupAttribute);
      attribute.setOrganisationUnitAttribute(organisationUnitAttribute);
      attribute.setOrganisationUnitGroupAttribute(organisationUnitGroupAttribute);
      attribute.setUserAttribute(userAttribute);
      attribute.setUserGroupAttribute(userGroupAttribute);

      attributeService.updateAttribute(attribute);

      return SUCCESS;
    }

    return ERROR;
  }