public Map<String, Object> toMap() {
    TreeMap<String, Object> dataMap = new TreeMap<>();
    String name = getName();

    if (name != null) {
      dataMap.put(KEY_NAME, name);
    }

    return dataMap;
  }
Generates a Map of data that represents this AbstractKerberosDescriptor implementation.
<p/>
This method should be overwritten by AbstractKerberosDescriptor implementations to generate a
Map of data specific to it.
<p/>
It is not necessary to call this method from the overriding method.
<p/>
The map of data generated should be setup so that it can be fed back into the implementation
class to build a copy of it. For example:
<p/>
<pre>
 descriptor1 = AbstractKerberosDescriptorImpl(...)
 map = descriptor1.toMap()
 descriptor2 = AbstractKerberosDescriptor(map)
 descriptor1 should have the same data as descriptor2
</pre>

@return a Map of date representing this AbstractKerberosDescriptor implementation
ambari-server/src/main/java/org/apache/ambari/server/state/kerberos/AbstractKerberosDescriptor.java