@PreAuthorize("hasRole('" + StandardEntitlement.CONNECTOR_HISTORY_DELETE + "')") public void delete(final String key) { ConnInstanceHistoryConf connInstanceHistoryConf = connInstanceHistoryConfDAO.find(key); if (connInstanceHistoryConf == null) { throw new NotFoundException("Connector History Conf '" + key + "'"); } connInstanceHistoryConfDAO.delete(key); }
@Override protected ConnInstanceHistoryConfTO resolveReference(final Method method, final Object... args) throws UnresolvedReferenceException { if (!"list".equals(method.getName())) { try { String key = (String) args[0]; return binder.getConnInstanceHistoryConfTO(connInstanceHistoryConfDAO.find(key)); } catch (Throwable ignore) { LOG.debug("Unresolved reference", ignore); throw new UnresolvedReferenceException(ignore); } } throw new UnresolvedReferenceException(); }
@PreAuthorize("hasRole('" + StandardEntitlement.CONNECTOR_HISTORY_RESTORE + "')") public void restore(final String key) { ConnInstanceHistoryConf connInstanceHistoryConf = connInstanceHistoryConfDAO.find(key); if (connInstanceHistoryConf == null) { throw new NotFoundException("Connector History Conf '" + key + "'"); } binder.update(connInstanceHistoryConf.getConf()); }