@Override public void onClick(final AjaxRequestTarget target) { try { fileDownload.initiate(target); } catch (Exception e) { SyncopeConsoleSession.get().error( StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } } };
@Override public void onClick(final AjaxRequestTarget target) { try { connectorRestClient.reload(); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); } catch (Exception e) { LOG.error("While reloading all connectors", e); SyncopeConsoleSession.get().error( StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } };
@Override public void onClick(final AjaxRequestTarget target, final UserTO ignore) { try { restClient.delete(model.getObject().getETagValue(), model.getObject().getKey()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); } catch (Exception e) { LOG.error("While deleting object {}", model.getObject().getKey(), e); SyncopeConsoleSession.get().error( StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); }
@Override public void onClick(final AjaxRequestTarget target, final GroupTO ignore) { try { restClient.delete(model.getObject().getETagValue(), model.getObject().getKey()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); } catch (SyncopeClientException e) { LOG.error("While deleting object {}", model.getObject().getKey(), e); SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); }
@Override public void onClick(final AjaxRequestTarget target, final UserTO ignore) { try { SyncopeConsoleSession.get().getAnonymousClient().getService(UserSelfService.class). requestPasswordReset(model.getObject().getUsername(), null); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); } catch (Exception e) { LOG.error("While actioning object {}", model.getObject().getKey(), e); SyncopeConsoleSession.get().error( StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }, ActionType.REQUEST_PASSWORD_RESET, StandardEntitlement.USER_UPDATE).
@Override public void onClick(final AjaxRequestTarget target, final ResourceProvision provision) { try { resourceRestClient.removeSyncToken(resourceTO.getKey(), provision.getAnyType()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); } catch (Exception e) { LOG.error("While removing sync token for {}/{}", resourceTO.getKey(), provision.getAnyType(), e); SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }, ActionLink.ActionType.REMOVE_SYNC_TOKEN, StandardEntitlement.RESOURCE_UPDATE).
@Override public void onClick(final AjaxRequestTarget target, final ImplementationTO ignore) { try { restClient.delete(model.getObject().getType(), model.getObject().getKey()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); } catch (SyncopeClientException e) { LOG.error("While deleting object {}", model.getObject().getKey(), e); SyncopeConsoleSession.get().error( StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }, ActionLink.ActionType.DELETE, StandardEntitlement.IMPLEMENTATION_DELETE, true);
@Override public void onClick(final AjaxRequestTarget target, final AnyObjectTO ignore) { try { restClient.delete(model.getObject().getETagValue(), model.getObject().getKey()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); } catch (SyncopeClientException e) { LOG.error("While deleting object {}", model.getObject().getKey(), e); SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); }
@Override public void onClick(final AjaxRequestTarget target, final ApplicationTO ignore) { try { restClient.delete(model.getObject().getKey()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); } catch (SyncopeClientException e) { LOG.error("While deleting application {}", model.getObject().getKey(), e); SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }, ActionLink.ActionType.DELETE, StandardEntitlement.APPLICATION_DELETE, true);
@Override public void onClick(final AjaxRequestTarget target, final MailTemplateTO ignore) { try { restClient.deleteTemplate(model.getObject().getKey()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); } catch (SyncopeClientException e) { LOG.error("While deleting object {}", model.getObject().getKey(), e); SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass(). getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }, ActionLink.ActionType.DELETE, StandardEntitlement.MAIL_TEMPLATE_DELETE, true);
@Override protected void onSubmit(final AjaxRequestTarget target) { try { onApplyInternal(groupTO, typeModel.getObject(), target); toggle(target, false); } catch (SyncopeClientException e) { SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); LOG.error("While inspecting group memebers of type {}", typeModel.getObject(), e); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); }
@Override public void onError(final AjaxRequestTarget target) { SyncopeConsoleSession.get().error(getString(Constants.OPERATION_ERROR)); ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); }
@Override public void onClick(final AjaxRequestTarget target, final ResourceHistoryConfTO modelObject) { try { restClient.restore(modelObject.getKey()); ResourceHistoryConfDirectoryPanel.this.getTogglePanel().close(target); target.add(container); } catch (SyncopeClientException e) { LOG.error("While restoring {}", resHistoryConfTO.getKey(), e); SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }, ActionLink.ActionType.RESTORE, StandardEntitlement.RESOURCE_HISTORY_RESTORE);
@Override public void onSubmit(final AjaxRequestTarget target) { final Pair<Boolean, String> result = check(target); if (result.getLeft()) { SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); } else { SyncopeConsoleSession.get().error(getString("error_connection") + ": " + result.getRight()); } ((BasePage) getPage()).getNotificationPanel().refresh(target); } };
@Override public void onClick(final AjaxRequestTarget target, final PropagationTaskTO modelObject) { try { restClient.startExecution(taskTO.getKey(), null); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); } catch (SyncopeClientException e) { SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); LOG.error("While running {}", taskTO.getKey(), e); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }, ActionLink.ActionType.EXECUTE, StandardEntitlement.TASK_EXECUTE);
@Override protected void onSubmit(final AjaxRequestTarget target) { try { getRestClient().startExecution(key, startAtDateModel.getObject()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); toggle(target, false); target.add(container); } catch (SyncopeClientException e) { SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); LOG.error("While running task {}", key, e); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); }
@Override protected void onError(final AjaxRequestTarget target) { SyncopeConsoleSession.get().error(getString(Constants.OPERATION_ERROR)); super.onError(target); ((BasePage) getPage()).getNotificationPanel().refresh(target); }
@Override public void onClick(final AjaxRequestTarget target, final ConnInstanceHistoryConfTO modelObject) { try { restClient.delete(modelObject.getKey()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); ConnInstanceHistoryConfDirectoryPanel.this.getTogglePanel().close(target); } catch (SyncopeClientException e) { LOG.error("While deleting {}", connHistoryConfTO.getKey(), e); SyncopeConsoleSession.get().error(StringUtils.isBlank(e.getMessage()) ? e.getClass().getName() : e.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }, ActionLink.ActionType.DELETE, StandardEntitlement.CONNECTOR_HISTORY_DELETE, true);
@Override public void onClick(final AjaxRequestTarget target) { try { restClient.startExecution(reconciliationReportKey, null); overlay.setVisible(true); target.add(ReconciliationWidget.this); setCheckReconciliationJob(true); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); } catch (Exception e) { LOG.error("While starting reconciliation report", e); SyncopeConsoleSession.get().error("Could not start reconciliation report"); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } };
@Override public void onClick(final AjaxRequestTarget target, final ExecTO ignore) { ExecutionsDirectoryPanel.this.getTogglePanel().close(target); try { restClient.deleteExecution(taskExecutionTO.getKey()); SyncopeConsoleSession.get().info(getString(Constants.OPERATION_SUCCEEDED)); target.add(container); } catch (SyncopeClientException scce) { SyncopeConsoleSession.get().error(scce.getMessage()); } ((BasePage) pageRef.getPage()).getNotificationPanel().refresh(target); } }, ActionLink.ActionType.DELETE, StandardEntitlement.TASK_DELETE, true);