public void addTrait(String guid, Struct traitDefinition) throws AtlasServiceException {
        String traitJson = InstanceSerialization.toJson(traitDefinition, true);
        LOG.debug("Adding trait to entity with id {} {}", guid, traitJson);
        callAPIWithBodyAndParams(API.ADD_TRAITS, traitJson, guid, URI_TRAITS);
    }
public void addTrait ( String guid , Struct traitDefinition ) throws AtlasServiceException { String traitJson = InstanceSerialization . toJson ( traitDefinition , true ) ; LOG . debug ( "Adding trait to entity with id {} {}" , guid , traitJson ) ; callAPIWithBodyAndParams ( API . ADD_TRAITS , traitJson , guid , URI_TRAITS ) ; }
Associate trait to an entity

@param guid      guid
@param traitDefinition trait definition