@Override
 public void onReload() {
   view.setCsvName(ValueUtils.getValue(metadata.getName()));
   view.setVersion(metadata.getVersion());
   view.setSealed(metadata.isSealed());
   view.setMappings(mappings);
 }
  public boolean leave() {
    Log.trace("checking csv mapping");

    DefinitionsMappings mappings = view.getMappings();

    boolean valid = validateMappings(mappings);

    if (showMetadata) {
      String csvName = view.getCsvName();
      String version = view.getVersion();
      valid &= validateAttributes(csvName, version);
    }

    if (valid) {
      publishBus.fireEventFromSource(new MappingsUpdatedEvent(mappings), this);

      PublishMetadata metadata = new PublishMetadata();
      metadata.setName(ValueUtils.getValue(view.getCsvName()));
      metadata.setVersion(view.getVersion());
      metadata.setSealed(view.getSealed());
      metadata.setAttributes(this.metadata.getAttributes());
      publishBus.fireEventFromSource(new ItemUpdatedEvent<PublishMetadata>(metadata), this);
    }

    return valid;
  }
 protected void setMetadata(PublishMetadata metadata) {
   this.metadata = metadata;
   view.setCsvName(ValueUtils.getValue(metadata.getName()));
   view.setVersion(metadata.getVersion());
   view.setSealed(metadata.isSealed());
 }