コード例 #1
0
  /* No qualifier */ FortResponse deleteOrgInheritance(FortRequest request) {
    FortResponse response = createResponse();

    try {
      OrgUnitRelationship relationship = (OrgUnitRelationship) request.getEntity();
      DelAdminMgr delegatedAdminMgr = DelAdminMgrFactory.createInstance(request.getContextId());
      delegatedAdminMgr.setAdmin(request.getSession());
      delegatedAdminMgr.deleteInheritance(relationship.getParent(), relationship.getChild());
      response.setEntity(relationship);
    } catch (SecurityException se) {
      createError(response, LOG, se);
    }

    return response;
  }
コード例 #2
0
  /* No qualifier */ FortResponse deleteAdminRole(FortRequest request) {
    FortResponse response = createResponse();

    try {
      AdminRole inRole = (AdminRole) request.getEntity();
      DelAdminMgr delegatedAdminMgr = DelAdminMgrFactory.createInstance(request.getContextId());
      delegatedAdminMgr.setAdmin(request.getSession());
      delegatedAdminMgr.deleteRole(inRole);
      response.setEntity(inRole);
    } catch (SecurityException se) {
      createError(response, LOG, se);
    }

    return response;
  }
コード例 #3
0
  /* No qualifier */ FortResponse updateOrg(FortRequest request) {
    FortResponse response = createResponse();

    try {
      OrgUnit inOrg = (OrgUnit) request.getEntity();
      DelAdminMgr delegatedAdminMgr = DelAdminMgrFactory.createInstance(request.getContextId());
      delegatedAdminMgr.setAdmin(request.getSession());
      OrgUnit retOrg = delegatedAdminMgr.update(inOrg);
      response.setEntity(retOrg);
    } catch (SecurityException se) {
      createError(response, LOG, se);
    }

    return response;
  }
コード例 #4
0
  /* No qualifier */ FortResponse updateAdminRole(FortRequest request) {
    FortResponse response = createResponse();

    try {
      AdminRole inRole = (AdminRole) request.getEntity();
      DelAdminMgr delegatedAdminMgr = DelAdminMgrFactory.createInstance(request.getContextId());
      delegatedAdminMgr.setAdmin(request.getSession());
      AdminRole retRole = delegatedAdminMgr.updateRole(inRole);
      response.setEntity(retRole);
    } catch (SecurityException se) {
      LOG.info("Caught " + se + " errorId=" + se.getErrorId());
      response.setErrorCode(se.getErrorId());
      response.setErrorMessage(se.getMessage());
    }

    return response;
  }