Search in sources :

Example 1 with AutoAccessMethod

use of org.olat.resource.accesscontrol.provider.auto.model.AutoAccessMethod in project OpenOLAT by OpenOLAT.

the class AutoAccessManagerImpl method createAndPersistAdvanceOrderIfNotExist.

private void createAndPersistAdvanceOrderIfNotExist(Identity identity, IdentifierKey key, String value, Class<? extends AutoAccessMethod> type) {
    List<AccessMethod> methods = acService.getAvailableMethodsByType(type);
    AccessMethod method = methods.get(0);
    if (doesNotExist(identity, key, value, method)) {
        AdvanceOrder advanceOrder = advanceOrderDAO.create(identity, key, value, method);
        advanceOrderDAO.save(advanceOrder);
    }
}
Also used : AutoAccessMethod(org.olat.resource.accesscontrol.provider.auto.model.AutoAccessMethod) AccessMethod(org.olat.resource.accesscontrol.model.AccessMethod) AdvanceOrder(org.olat.resource.accesscontrol.provider.auto.AdvanceOrder)

Example 2 with AutoAccessMethod

use of org.olat.resource.accesscontrol.provider.auto.model.AutoAccessMethod in project openolat by klemens.

the class AutoAccessManagerImpl method createAndPersistAdvanceOrderIfNotExist.

private void createAndPersistAdvanceOrderIfNotExist(Identity identity, IdentifierKey key, String value, Class<? extends AutoAccessMethod> type) {
    List<AccessMethod> methods = acService.getAvailableMethodsByType(type);
    AccessMethod method = methods.get(0);
    if (doesNotExist(identity, key, value, method)) {
        AdvanceOrder advanceOrder = advanceOrderDAO.create(identity, key, value, method);
        advanceOrderDAO.save(advanceOrder);
    }
}
Also used : AutoAccessMethod(org.olat.resource.accesscontrol.provider.auto.model.AutoAccessMethod) AccessMethod(org.olat.resource.accesscontrol.model.AccessMethod) AdvanceOrder(org.olat.resource.accesscontrol.provider.auto.AdvanceOrder)

Aggregations

AccessMethod (org.olat.resource.accesscontrol.model.AccessMethod)2 AdvanceOrder (org.olat.resource.accesscontrol.provider.auto.AdvanceOrder)2 AutoAccessMethod (org.olat.resource.accesscontrol.provider.auto.model.AutoAccessMethod)2