Package it.eng.spago.security

Examples of it.eng.spago.security.IEngUserProfile


    //Start writing log in the DB
    Session aSession =null;
    try {
      aSession = HibernateUtil.currentSession();
      Connection jdbcConnection = aSession.connection();
      IEngUserProfile profile = UserUtilities.getUserProfile();
      AuditLogUtilities.updateAudit(jdbcConnection,  profile, "activity.WorkFlowMenu", null);
    } catch (HibernateException he) {
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    } finally {
      if (aSession!=null){
View Full Code Here


 
  public void doService() {
    Integer documentId;
    String documentLabel;
    BIObject obj;
    IEngUserProfile profile;
    List roleNames;
    List roles;
   
   
    logger.debug("IN");
View Full Code Here

     
      // START get the lov result
      String lovResult = null;
      try {
        // get the result of the lov
        IEngUserProfile profile = getUserProfile();

        // get from cache, if available
        LovResultCacheManager executionCacheManager = new LovResultCacheManager();
        lovResult = executionCacheManager.getLovResult(profile, biObjectParameter, executionInstance, true);
       
View Full Code Here

              }
            }

            IParameterUseDAO paruseDAO = DAOFactory.getParameterUseDAO();
            SessionContainer permSess = getRequestContainer().getSessionContainer().getPermanentContainer();
            IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE)
            paruseDAO.setUserProfile(profile);
            if (paruseIdInt.intValue() == -1) {
              // it is requested to insert a new ParameterUse
              paruseDAO.insertParameterUse(paruse);
            } else {
              // it is requested to modify a ParameterUse.
              paruseDAO.modifyParameterUse(paruse);
            }
            prepareParameterDetailPage(response, parameter, null, selectedParuseIdStr,
                ObjectsTreeConstants.DETAIL_MOD, false, true);
            return;
          } else {
            prepareParameterDetailPage(response, parameter, null, selectedParuseIdStr,
                ObjectsTreeConstants.DETAIL_MOD, false, true);
              return;
          }
         
        } else if (deleteParameterUse != null) {
          // it is requested to delete the visible ParameterUse
          int paruseId = findParuseId(deleteParameterUse);
          checkForDependancies(new Integer(paruseId));
          // if there are some errors into the errorHandler does not write into DB
          Collection errors = errorHandler.getErrors();
          if (errors != null && errors.size() > 0) {
            Iterator iterator = errors.iterator();
            while (iterator.hasNext()) {
              Object error = iterator.next();
              if (error instanceof EMFValidationError) {
                  prepareParameterDetailPage(response, parameter, paruse, paruseIdStr,
                      ObjectsTreeConstants.DETAIL_MOD, false, false);
                return;
              }
            }
          }

          IParameterUseDAO paruseDAO = DAOFactory.getParameterUseDAO();
          paruse = paruseDAO.loadByUseID(new Integer(paruseId));
          paruseDAO.eraseParameterUse(paruse);
          selectedParuseIdStr = "";
          prepareParameterDetailPage(response, parameter, null, selectedParuseIdStr,
              ObjectsTreeConstants.DETAIL_MOD, false, true);
          return;
         
        } else {
          // It is request to save the Parameter with also the visible ParameterUse
          // If a new ParameterUse was visualized and no fields were inserted, the ParameterUse is not validated and saved
          boolean paruseToBeSaved = true;
          if (GenericValidator.isBlankOrNull(paruse.getLabel())
              && GenericValidator.isBlankOrNull(paruse.getName())
              && paruse.getUseID().intValue() == -1
              && paruse.getIdLov().intValue() == -1
              && paruse.getAssociatedChecks().size() == 0
              && paruse.getAssociatedRoles().size() == 0)
            paruseToBeSaved = false;
          if (paruseToBeSaved) {
            ValidationCoordinator.validate("PAGE", "ParameterUseValidation", this);
            parameterUseLabelControl(paruse, mod);
            verifyForDependencies(paruse);
          }

          ValidationCoordinator.validate("PAGE", "ParameterValidation", this);
          parameterLabelControl(parameter, mod);
           
          // if there are some validation errors into the errorHandler does not write into DB
          Collection errors = errorHandler.getErrors();
          if (errors != null && errors.size() > 0) {
            Iterator iterator = errors.iterator();
            while (iterator.hasNext()) {
              Object error = iterator.next();
              if (error instanceof EMFValidationError) {
                prepareParameterDetailPage(response, parameter, paruse, paruseIdInt.toString(),
                    ObjectsTreeConstants.DETAIL_MOD, false, false);
                return;
              }
            }
          }

          // it is requested to modify the Parameter
          DAOFactory.getParameterDAO().modifyParameter(parameter);
           
            if (paruseToBeSaved) {
            IParameterUseDAO paruseDAO = DAOFactory.getParameterUseDAO();
            SessionContainer permSess = getRequestContainer().getSessionContainer().getPermanentContainer();
            IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE)
            paruseDAO.setUserProfile(profile);
            if (paruseIdInt.intValue() == -1) {
              // it is requested to insert a new ParameterUse
              paruseDAO.insertParameterUse(paruse);
              // reload the paruse with the given label
              paruse = reloadParuse(parameter.getId(), paruse.getLabel());
            } else {
              // it is requested to modify a ParameterUse
              paruseDAO.modifyParameterUse(paruse);
            }
            selectedParuseIdStr = paruse.getUseID().toString();
            } else selectedParuseIdStr = "-1";
        }

        } else {
          ValidationCoordinator.validate("PAGE", "ParameterValidation", this);
          parameterLabelControl(parameter, mod);
          // if there are some errors, exits without writing into DB
          selectedParuseIdStr = "-1";
         
        // if there are some validation errors into the errorHandler does not write into DB
        Collection errors = errorHandler.getErrors();
        if (errors != null && errors.size() > 0) {
          Iterator iterator = errors.iterator();
          while (iterator.hasNext()) {
            Object error = iterator.next();
            if (error instanceof EMFValidationError) {
              prepareParameterDetailPage(response, parameter, null, selectedParuseIdStr,
                  ObjectsTreeConstants.DETAIL_INS, false, false);
              return;
            }
          }
        }

          // inserts into DB the new Parameter
        SessionContainer permSess = getRequestContainer().getSessionContainer().getPermanentContainer();
        IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE)
        IParameterDAO dao=DAOFactory.getParameterDAO();
        dao.setUserProfile(profile);
          dao.insertParameter(parameter);
          // reload the Parameter with the correct id
          parameter = reloadParameter(parameter.getLabel());
View Full Code Here

      if (folderID == null || folderID.equalsIgnoreCase(ROOT_NODE_ID))
        folderID = String.valueOf(rootFunct.getId());
           
      SessionContainer sessCont = getSessionContainer();
      SessionContainer permCont = sessCont.getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile)permCont.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
     
     
      //getting  documents
      List tmpObjects = DAOFactory.getBIObjectDAO().searchBIObjects(valueFilter, typeFilter, columnFilter, scope, Integer.valueOf(folderID), profile);
      objects = new ArrayList();
View Full Code Here

    //Start writing log in the DB
    Session aSession =null;
    try {
      aSession = HibernateUtil.currentSession();
      Connection jdbcConnection = aSession.connection();
      IEngUserProfile profile = UserUtilities.getUserProfile();
      AuditLogUtilities.updateAudit(jdbcConnection,  profile, "activity.DocumentsBrowserMenu", null);
    } catch (HibernateException he) {
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    } finally {
      if (aSession!=null){
View Full Code Here

    String objectIdStr = (String)request.getAttribute(ObjectsTreeConstants.OBJECT_ID);
    Integer objectId = new Integer(objectIdStr);
    String idSnapStr = (String)request.getAttribute(SpagoBIConstants.SNAPSHOT_ID);
    Integer idSnap = new Integer(idSnapStr);
    logger.debug("Required snapshot with id = " + idSnap + " of document with id = " + objectId);
    IEngUserProfile profile = (IEngUserProfile) this.getRequestContainer().getSessionContainer().getPermanentContainer().getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    BIObject obj = DAOFactory.getBIObjectDAO().loadBIObjectById(objectId);
    // check if the user is able to see the document
    // TODO check if the user is able to execute the document (even if it does no make sense to be able to see the document but not to execute it...)
    byte[] content = null;
    if (ObjectsAccessVerifier.canSee(obj, profile)) {
View Full Code Here

    //**********************************************************************
    RequestContainer reqCont = getRequestContainer();
    SessionContainer sessCont = reqCont.getSessionContainer();
    SessionContainer permSess = sessCont.getPermanentContainer();
    IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);

   
    Menu menu = recoverMenuDetails(request, mod);
    response.setAttribute(MENU, menu);
    response.setAttribute(AdmintoolsConstants.MODALITY, mod);
View Full Code Here

        response.setAttribute("checkObj", aCheck);
        response.setAttribute("modality", mod);
        return;
      }
      SessionContainer permSess = getRequestContainer().getSessionContainer().getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile)permSess.getAttribute(IEngUserProfile.ENG_USER_PROFILE);   
      ICheckDAO dao=DAOFactory.getChecksDAO();
      dao.setUserProfile(profile);
      if (mod.equalsIgnoreCase(AdmintoolsConstants.DETAIL_INS)) {
        dao.insertCheck(aCheck);
      } else {
View Full Code Here

    //Start writing log in the DB
    Session aSession =null;
    try {
      aSession = HibernateUtil.currentSession();
      Connection jdbcConnection = aSession.connection();
      IEngUserProfile profile = UserUtilities.getUserProfile();
      AuditLogUtilities.updateAudit(jdbcConnection,  profile, "activity.DocumentsBrowserMenu", null);
    } catch (HibernateException he) {
      throw new EMFUserError(EMFErrorSeverity.ERROR, 100);
    } finally {
      if (aSession!=null){
View Full Code Here

TOP

Related Classes of it.eng.spago.security.IEngUserProfile

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.