use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent in project OA4MP by ncsa.
the class AbstractConfigurationLoader method getCASP.
protected MultiDSClientApprovalStoreProvider getCASP() {
if (casp == null) {
casp = new MultiDSClientApprovalStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get());
final ClientApprovalProvider caProvider = new ClientApprovalProvider();
ClientApproverConverter cp = new ClientApproverConverter(caProvider);
casp.addListener(new DSFSClientApprovalStoreProvider(cn, cp));
casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, cp));
casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, cp));
casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, cp));
casp.addListener(new TypedProvider<ClientApprovalStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.CLIENT_APPROVAL_STORE) {
@Override
public Object componentFound(CfgEvent configurationEvent) {
if (checkEvent(configurationEvent)) {
return get();
}
return null;
}
@Override
public ClientApprovalStore get() {
return new ClientApprovalMemoryStore(caProvider);
}
});
}
return casp;
}
use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent 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;
}
use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent in project OA4MP by ncsa.
the class OA2ConfigurationLoader method getCASP.
@Override
protected MultiDSClientApprovalStoreProvider getCASP() {
if (casp == null) {
casp = new MultiDSClientApprovalStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get());
final ClientApprovalProvider caProvider = new ClientApprovalProvider();
ClientApprovalKeys caKeys = new ClientApprovalKeys();
caKeys.identifier("client_id");
ClientApproverConverter cp = new ClientApproverConverter(caKeys, caProvider);
casp.addListener(new DSFSClientApprovalStoreProvider(cn, cp));
casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, cp));
casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, cp));
casp.addListener(new DSSQLClientApprovalStoreProvider(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, cp));
casp.addListener(new TypedProvider<ClientApprovalStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.CLIENT_APPROVAL_STORE) {
@Override
public Object componentFound(CfgEvent configurationEvent) {
if (checkEvent(configurationEvent)) {
return get();
}
return null;
}
@Override
public ClientApprovalStore get() {
return new ClientApprovalMemoryStore(caProvider);
}
});
}
return casp;
}
use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent in project OA4MP by ncsa.
the class OA2ConfigurationLoader method getCSP.
@Override
protected MultiDSClientStoreProvider getCSP() {
if (csp == null) {
OA2ClientConverter converter = new OA2ClientConverter(getClientProvider());
csp = new OA2MultiDSClientStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get(), null, null, getClientProvider());
csp.addListener(new DSFSClientStoreProvider(cn, converter, getClientProvider()));
csp.addListener(new OA2ClientSQLStoreProvider(getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, converter, getClientProvider()));
csp.addListener(new OA2ClientSQLStoreProvider(getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, converter, getClientProvider()));
csp.addListener(new OA2ClientSQLStoreProvider(getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, converter, getClientProvider()));
csp.addListener(new TypedProvider<ClientStore>(cn, OA4MPConfigTags.MEMORY_STORE, OA4MPConfigTags.CLIENTS_STORE) {
@Override
public Object componentFound(CfgEvent configurationEvent) {
if (checkEvent(configurationEvent)) {
return get();
}
return null;
}
@Override
public ClientStore get() {
return new OA2ClientMemoryStore(getClientProvider());
}
});
}
return csp;
}
use of edu.uiuc.ncsa.security.core.configuration.provider.CfgEvent in project OA4MP by ncsa.
the class AbstractConfigurationLoader method getTSP.
protected Provider<TransactionStore> getTSP() {
if (tsp == null) {
final DSTransactionProvider tp = new DSTransactionProvider<OA4MPServiceTransaction>();
TransactionConverter<OA4MPServiceTransaction> tc = new TransactionConverter(tp, getTokenForgeProvider().get(), (ClientStore<? extends Client>) getCSP().get());
MultiDSTransactionStoreProvider storeProvider = new MultiDSTransactionStoreProvider(cn, isDefaultStoreDisabled(), loggerProvider.get(), tp);
storeProvider.addListener(new DSSQLTransactionStoreProvider(cn, getMySQLConnectionPoolProvider(), OA4MPConfigTags.MYSQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
storeProvider.addListener(new DSSQLTransactionStoreProvider(cn, getMariaDBConnectionPoolProvider(), OA4MPConfigTags.MARIADB_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
storeProvider.addListener(new DSSQLTransactionStoreProvider(cn, getPgConnectionPoolProvider(), OA4MPConfigTags.POSTGRESQL_STORE, getCSP(), tp, getTokenForgeProvider(), tc));
storeProvider.addListener(new DSFSTransactionStoreProvider(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 TransactionMemoryStore(tp);
}
});
tsp = storeProvider;
}
return tsp;
}
Aggregations