Ejemplo n.º 1
0
def installParcel(parcel, oldVersion=None):
    # load our subparcels
    from application import schema
    schema.synchronize(parcel.itsView, "osaf.framework.certstore.data")
    schema.synchronize(parcel.itsView, "osaf.framework.certstore.blocks")

    from osaf.pim.collections import FilteredCollection
    import certificate, utils

    FilteredCollection.update(parcel, 'sslCertificateQuery',
        source=utils.getExtent(certificate.Certificate, parcel.itsView),
        filterMethod=(TrustedCACertsFilter(None, parcel), 'isTrustedCACert'),
        filterAttributes=['purpose', 'trust']
    )
    
    FilteredCollection.update(parcel, 'sslTrustedServerCertificatesQuery',
        source=utils.getExtent(certificate.Certificate, parcel.itsView),
        filterMethod=(TrustedServerCertsFilter(None, parcel),
                      'isTrustedServerCert'),
        filterAttributes=['purpose', 'trust']
    )
Ejemplo n.º 2
0
def installParcel(parcel, oldVersion=None):
    # load our subparcels
    from application import schema
    schema.synchronize(parcel.itsView, "osaf.framework.certstore.data")
    schema.synchronize(parcel.itsView, "osaf.framework.certstore.blocks")

    from osaf.pim.collections import FilteredCollection
    import certificate, utils

    FilteredCollection.update(parcel,
                              'sslCertificateQuery',
                              source=utils.getExtent(certificate.Certificate,
                                                     parcel.itsView),
                              filterMethod=(TrustedCACertsFilter(None, parcel),
                                            'isTrustedCACert'),
                              filterAttributes=['purpose', 'trust'])

    FilteredCollection.update(parcel,
                              'sslTrustedServerCertificatesQuery',
                              source=utils.getExtent(certificate.Certificate,
                                                     parcel.itsView),
                              filterMethod=(TrustedServerCertsFilter(
                                  None, parcel), 'isTrustedServerCert'),
                              filterAttributes=['purpose', 'trust'])
Ejemplo n.º 3
0
def installParcel(parcel, oldVersion=None):

    rv = parcel.itsView

    SharingPreferences.update(parcel, "prefs")

    # Even though we're not using this at the moment, I'm leaving it here
    # because people's personal parcels refer to this and we'll probably
    # resurrect this someday:
    Reference.update(parcel, "currentSharingAccount")

    SyncPeriodicTask.update(
        parcel,
        "sharingTask",
        invoke="osaf.sharing.BackgroundSyncHandler",
        run_at_startup=False,
        active=True,
        interval=datetime.timedelta(minutes=15),
    )

    # Make a collection of all Notes with an icalUID, so that
    # we can index it.
    filterAttribute = pim.Note.icalUID.name
    iCalendarItems = FilteredCollection.update(
        parcel,
        "iCalendarItems",
        source=schema.ns("osaf.pim", rv).noteCollection,
        filterExpression="view.hasTrueValues(uuid, '%s')" % (filterAttribute,),
        filterAttributes=[filterAttribute],
    )
    iCalendarItems.addIndex("icalUID", "value", attribute=filterAttribute)

    # Make a collection used to let the main ui view know what new shared
    # inbound occurrences have come in so that OnIdle can check for duplicate
    # recurrenceIDs (via the processSharingQueue function below):
    pim.ListCollection.update(parcel, "newItems")

    if not Globals.options.reload:
        prepareAccounts(rv)
Ejemplo n.º 4
0
def installParcel(parcel, oldVersion=None):

    rv = parcel.itsView

    SharingPreferences.update(parcel, "prefs")

    # Even though we're not using this at the moment, I'm leaving it here
    # because people's personal parcels refer to this and we'll probably
    # resurrect this someday:
    Reference.update(parcel, 'currentSharingAccount')

    SyncPeriodicTask.update(parcel,
                            "sharingTask",
                            invoke="osaf.sharing.BackgroundSyncHandler",
                            run_at_startup=False,
                            active=True,
                            interval=datetime.timedelta(minutes=15))

    # Make a collection of all Notes with an icalUID, so that
    # we can index it.
    filterAttribute = pim.Note.icalUID.name
    iCalendarItems = FilteredCollection.update(
        parcel,
        'iCalendarItems',
        source=schema.ns('osaf.pim', rv).noteCollection,
        filterExpression="view.hasTrueValues(uuid, '%s')" %
        (filterAttribute, ),
        filterAttributes=[filterAttribute])
    iCalendarItems.addIndex('icalUID', 'value', attribute=filterAttribute)

    # Make a collection used to let the main ui view know what new shared
    # inbound occurrences have come in so that OnIdle can check for duplicate
    # recurrenceIDs (via the processSharingQueue function below):
    pim.ListCollection.update(parcel, 'newItems')

    if not Globals.options.reload:
        prepareAccounts(rv)