use of org.olat.resource.accesscontrol.provider.auto.IdentifierKey in project OpenOLAT by OpenOLAT.
the class AutoAccessManagerImpl method findRepositoryEntries.
private List<RepositoryEntry> findRepositoryEntries(AdvanceOrder advanceOrder) {
IdentifierKey identifierKey = advanceOrder.getIdentifierKey();
String identifierValue = advanceOrder.getIdentifierValue();
return identifierHandler.findRepositoryEntries(identifierKey, identifierValue);
}
use of org.olat.resource.accesscontrol.provider.auto.IdentifierKey in project OpenOLAT by OpenOLAT.
the class AutoAccessManagerImpl method createAdvanceOrders.
@Override
public void createAdvanceOrders(AdvanceOrderInput input) {
if (!inputValidator.isValid(input))
return;
IdentifierValueSplitter splitter = splitterFactory.getSplitter(input.getSplitterType());
Collection<String> values = splitter.split(input.getRawValues());
for (IdentifierKey key : input.getKeys()) {
for (String value : values) {
createAndPersistAdvanceOrderIfNotExist(input.getIdentity(), key, value, input.getMethodClass());
}
}
}
use of org.olat.resource.accesscontrol.provider.auto.IdentifierKey in project OpenOLAT by OpenOLAT.
the class AutoAccessManagerImpl method loadPendingAdvanceOrders.
@Override
public Collection<AdvanceOrder> loadPendingAdvanceOrders(RepositoryEntry entry) {
if (entry == null)
return new ArrayList<>();
Map<IdentifierKey, String> searchValues = new EnumMap<>(IdentifierKey.class);
for (IdentifierKey key : IdentifierKey.values()) {
String value = identifierHandler.getRepositoryEntryValue(key, entry);
searchValues.put(key, value);
}
return advanceOrderDAO.loadPendingAdvanceOrders(searchValues);
}
use of org.olat.resource.accesscontrol.provider.auto.IdentifierKey in project OpenOLAT by OpenOLAT.
the class InputValidatorTest method setUp.
@Before
public void setUp() {
inputMock = mock(AdvanceOrderInput.class);
when(inputMock.getIdentity()).thenReturn(new IdentityImpl());
Set<IdentifierKey> keys = new HashSet<>();
keys.add(IdentifierKey.externalId);
when(inputMock.getKeys()).thenReturn(keys);
when(inputMock.getRawValues()).thenReturn("rawValues");
doReturn(AutoAccessMethod.class).when(inputMock).getMethodClass();
}
use of org.olat.resource.accesscontrol.provider.auto.IdentifierKey in project openolat by klemens.
the class AutoAccessManagerImpl method findRepositoryEntries.
private List<RepositoryEntry> findRepositoryEntries(AdvanceOrder advanceOrder) {
IdentifierKey identifierKey = advanceOrder.getIdentifierKey();
String identifierValue = advanceOrder.getIdentifierValue();
return identifierHandler.findRepositoryEntries(identifierKey, identifierValue);
}
Aggregations