private void importEntity(Entity remoteEntity,
ReferencedSite site,
Entity localEntity,
ValueFactory valueFactory) {
ManagedEntityState state = site.getConfiguration().getDefaultManagedEntityState();
if(state == null){
state = config.getDefaultManagedEntityState();
}
//this wrapper allows to use an API to write metadata
ManagedEntity managedEntity = ManagedEntity.init(localEntity, state);