'Validate and parse the links portion of an application
configuration and store the links in the internal links map.
:param unicode application: The name of the application this config
is mapped to.
:param list links: A list of ``str`` values specifying the names
of applications that this application should link to.
:raises ConfigurationError: if the links config does not validate.
:returns: ``None``'

def _parse_app_links(self, application, links):

    _check_type(links, list, u"'links'    must    be    a    list", application)
    for link in links:
        if (not isinstance(link, (str, unicode))):
            raise ConfigurationError(u"Application    '{application}'    has    a    config    error.    'links'    must    be    a    list    of    application    names    with    optional    :alias.".format(application=application))
        parsed_link = link.split(u':')
        local_link = parsed_link[0]
        aliased_link = local_link
        if (len(parsed_link) == 2):
            aliased_link = parsed_link[1]
        if (local_link not in self._application_names):
            raise ConfigurationError(u"Application    '{application}'    has    a    config    error.    'links'    value    '{link}'    could    not    be    mapped    to    any    application;    application    '{link}'    does    not    exist.".format(application=application, link=link))
        self._application_links[application].append({u'target_application': local_link, u'alias': aliased_link})
