Exemplo n.º 1
0
  private void deleteDefinitionPerformed(
      AjaxRequestTarget target, AccessCertificationDefinitionType definition) {
    OperationResult result = new OperationResult(OPERATION_DELETE_DEFINITION);
    try {
      Task task = createSimpleTask(OPERATION_DELETE_DEFINITION);
      ObjectDelta<AccessCertificationDefinitionType> delta =
          ObjectDelta.createDeleteDelta(
              AccessCertificationDefinitionType.class, definition.getOid(), getPrismContext());
      getModelService()
          .executeChanges(WebComponentUtil.createDeltaCollection(delta), null, task, result);
    } catch (Exception ex) {
      result.recordPartialError("Couldn't delete campaign definition.", ex);
      LoggingUtils.logUnexpectedException(LOGGER, "Couldn't delete campaign definition", ex);
    }

    result.computeStatusIfUnknown();
    if (result.isSuccess()) {
      result.recordStatus(
          OperationResultStatus.SUCCESS, "The definition has been successfully deleted.");
    }

    getDefinitionsTable().clearCache();

    showResult(result);
    target.add(getFeedbackPanel(), getDefinitionsTable());
  }
Exemplo n.º 2
0
  private void createCampaignPerformed(
      AjaxRequestTarget target, AccessCertificationDefinitionType definition) {
    LOGGER.debug("Create certification campaign performed for {}", definition.asPrismObject());

    OperationResult result = new OperationResult(OPERATION_CREATE_CAMPAIGN);
    try {
      Task task = createSimpleTask(OPERATION_CREATE_CAMPAIGN);
      getCertificationService().createCampaign(definition.getOid(), task, result);
    } catch (Exception ex) {
      result.recordFatalError(ex);
    } finally {
      result.computeStatusIfUnknown();
    }

    showResult(result);
    target.add(getFeedbackPanel());
  }
Exemplo n.º 3
0
 private void showCampaignsPerformed(
     AjaxRequestTarget target, AccessCertificationDefinitionType definition) {
   PageParameters parameters = new PageParameters();
   parameters.add(OnePageParameterEncoder.PARAMETER, definition.getOid());
   navigateToNext(PageCertCampaigns.class, parameters);
 }
Exemplo n.º 4
0
 protected void detailsPerformed(
     AjaxRequestTarget target, AccessCertificationDefinitionType service) {
   PageParameters parameters = new PageParameters();
   parameters.add(OnePageParameterEncoder.PARAMETER, service.getOid());
   navigateToNext(PageCertDefinition.class, parameters);
 }