Search in sources :

Example 1 with IdentifiableProvider

use of edu.uiuc.ncsa.security.core.IdentifiableProvider in project OA4MP by ncsa.

the class OA2ConfigurationLoader method getTSP.

protected Provider<TransactionStore> getTSP(IdentifiableProvider tp, OA2TConverter<? extends OA2ServiceTransaction> tc) {
    if (tsp == null) {
        // since this is referenced in an inner class below.
        final IdentifiableProvider tp1 = tp;
        OA2MultiTypeProvider storeProvider = new OA2MultiTypeProvider(cn, isDefaultStoreDisabled(), loggerProvider.get(), tp);
        storeProvider.addListener(createSQLTSP(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(createSQLTSP(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(createSQLTSP(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(new OA2FSTStoreProvider(cn, tp, getTokenForgeProvider(), tc));
        storeProvider.addListener(new TypedProvider<TransactionStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.TRANSACTIONS_STORE) {

            @Override
            public Object componentFound(CfgEvent configurationEvent) {
                if (checkEvent(configurationEvent)) {
                    return get();
                }
                return null;
            }

            @Override
            public TransactionStore get() {
                return new OA2MTStore(tp1);
            }
        });
        tsp = storeProvider;
    }
    return tsp;
}
Also used : TransactionStore(edu.uiuc.ncsa.security.delegation.storage.TransactionStore) CfgEvent(edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent) IdentifiableProvider(edu.uiuc.ncsa.security.core.IdentifiableProvider)

Example 2 with IdentifiableProvider

use of edu.uiuc.ncsa.security.core.IdentifiableProvider in project OA4MP by ncsa.

the class OA2ConfigurationLoader method getTSP.

@Override
protected Provider<TransactionStore> getTSP() {
    IdentifiableProvider tp = new ST2Provider(new OA4MPIdentifierProvider(TRANSACTION_ID, false));
    OA2TransactionKeys keys = new OA2TransactionKeys();
    OA2TConverter<OA2ServiceTransaction> tc = new OA2TConverter<OA2ServiceTransaction>(keys, tp, getTokenForgeProvider().get(), getClientStoreProvider().get());
    return getTSP(tp, tc);
}
Also used : OA4MPIdentifierProvider(edu.uiuc.ncsa.myproxy.oa4mp.server.admin.transactions.OA4MPIdentifierProvider) OA2ServiceTransaction(edu.uiuc.ncsa.myproxy.oa4mp.oauth2.OA2ServiceTransaction) IdentifiableProvider(edu.uiuc.ncsa.security.core.IdentifiableProvider)

Aggregations

IdentifiableProvider (edu.uiuc.ncsa.security.core.IdentifiableProvider)2 OA2ServiceTransaction (edu.uiuc.ncsa.myproxy.oa4mp.oauth2.OA2ServiceTransaction)1 OA4MPIdentifierProvider (edu.uiuc.ncsa.myproxy.oa4mp.server.admin.transactions.OA4MPIdentifierProvider)1 CfgEvent (edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent)1 TransactionStore (edu.uiuc.ncsa.security.delegation.storage.TransactionStore)1