Add a new persona in the given PersonaStore based on the details
provided.
If the target store is offline, this function will throw IndividualAggregatorError.STORE_OFFLINE. It's the responsibility of the caller to cache details and re-try this function if it wishes to make offline adds work.
The details hash is a backend-specific mapping of key, value strings. Common keys include:
If a Persona with the given details already exists in the store, no error will be
thrown and this function will return null
.
parent |
an optional Individual to add the new Persona to. This persona will be appended to its ordered list of personas. |
persona_store |
the PersonaStore to add the persona to |
details |
a key-value map of details to use in creating the new Persona |
the new Persona or |
IndividualAggregatorError.STORE_OFFLINE |
if the persona store was offline |
IndividualAggregatorError.ADD_FAILED |
if any other error occurred while adding the persona |
0.3.5