Folks.IndividualAggregator.ensure_individual_property_writeable – folks – Vala Binding Reference

Folks.IndividualAggregator.ensure_individual_property_writeable – folks Reference Manual

# ensure_individual_property_writeable

## Description:

public async Persona ensure_individual_property_writeable (Individual individual, string property_name) throws IndividualAggregatorError

Ensure that the given property is writeable for the given Individual.

This makes sure that there is at least one Persona in the individual which has `property_name` in its Persona.writeable_properties . If no such persona exists in the individual, a new one will be created and linked to the individual. (Note that due to the design of the aggregator, this will result in the previous individual being removed and replaced by a new one with the new persona; listen to the Individual.removed signal to see the replacement.)

It may not be possible to create a new persona which has the given property as writeable. In that case, a IndividualAggregatorError.NO_PRIMARY_STORE or IndividualAggregatorError.PROPERTY_NOT_WRITEABLE error will be thrown.

This method is safe to call multiple times concurrently, although concurrent calls for the same individual may result in duplicate personas being created.

## Parameters:

individual | the individual for which `property_name` should be writeable
property_name | the name of the property which needs to be writeable (this should be in lower case using hyphens, e.g. “web-service-addresses”)

## Returns:

a persona (new or existing) which has the given property as writeable

## Exceptions:

IndividualAggregatorError.NO_PRIMARY_STORE | if no primary store was configured for this individual aggregator
IndividualAggregatorError.PROPERTY_NOT_WRITEABLE | if the given `property_name` referred to a non-writeable property
IndividualAggregatorError | if adding a new persona (using IndividualAggregator.add_persona_from_details) failed, or if linking personas (using IndividualAggregator.link_personas) failed

## Since:

0.6.2