Package it.eng.spagobi.commons.metadata

Examples of it.eng.spagobi.commons.metadata.SbiExtRoles


      String hql = "from SbiExtRoles as roles " +
      "where roles.name = ?";

      Query hqlQuery = session.createQuery(hql);
      hqlQuery.setString(0, roleName);
      SbiExtRoles aHibRole = (SbiExtRoles) hqlQuery.uniqueResult();
      if (aHibRole == null) {
        logger.error("Role with name = '" + roleName + "' does not exist!!");
        continue;
      }
      SbiEventRoleId eventRoleId = new SbiEventRoleId();
View Full Code Here


    List roles = new ArrayList();
    Set rolesSet = hibEventLog.getRoles();
    Iterator rolesIt = rolesSet.iterator();
    while (rolesIt.hasNext()) {
      SbiEventRole hibEventRole = (SbiEventRole) rolesIt.next();
      SbiExtRoles hibRole = hibEventRole.getId().getRole();
      roles.add(hibRole.getName());
    }
    eventLog.setRoles(roles);
    logger.debug("OUT");
    return eventLog;
  }
View Full Code Here

      userBO.setUserId(sbiUser.getUserId());
     
      List userRoles = new ArrayList();
      Set roles = sbiUser.getSbiExtUserRoleses();
      for (Iterator it = roles.iterator(); it.hasNext(); ) {
        SbiExtRoles role = (SbiExtRoles) it.next();
        Integer roleId = role.getExtRoleId();
        userRoles.add(roleId);
      }
      userBO.setSbiExtUserRoleses(userRoles);

      HashMap<Integer, HashMap<String, String>> userAttributes = new HashMap<Integer, HashMap<String, String>>();
View Full Code Here

    Transaction tx = null;
    try{
      aSession = getSession();
      tx = aSession.beginTransaction();
   
      SbiExtRoles hibRole = (SbiExtRoles)aSession.load(SbiExtRoles.class,  roleID);
     
      toReturn = toRole(hibRole);
      tx.commit();
    }catch(HibernateException he){
      logException(he);
View Full Code Here

      Criterion aCriterion = Expression.eq("name", roleName);
      Criteria aCriteria = aSession.createCriteria(SbiExtRoles.class);
     
      aCriteria.add(aCriterion);
     
      SbiExtRoles hibRole = (SbiExtRoles)aCriteria.uniqueResult();
      if (hibRole == null) return null;
     
      toReturn = toRole(hibRole);
      tx.commit();
    }catch(HibernateException he){
View Full Code Here

    try {
      aSession = getSession();
      tx = aSession.beginTransaction();

   
      SbiExtRoles hibRole = new SbiExtRoles();
     
      hibRole.setCode(aRole.getCode());
      hibRole.setDescr(aRole.getDescription());
     
     
      hibRole.setName(aRole.getName());
     
      SbiDomains roleType = (SbiDomains)aSession.load(SbiDomains.class,  aRole.getRoleTypeID());
      hibRole.setRoleType(roleType);
     
      hibRole.setRoleTypeCode(aRole.getRoleTypeCD());
      updateSbiCommonInfo4Insert(hibRole);
      aSession.save(hibRole);
     
      tx.commit();
    } catch (HibernateException he) {
View Full Code Here

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
   
      SbiExtRoles hibRole = (SbiExtRoles) aSession.load(SbiExtRoles.class,  aRole.getId());
      // deletes associations with events (and events themselves, if they have no more associations)
      //Query hibQuery = aSession.createQuery(" from SbiEventRole ser where ser.id.role.extRoleId = " + hibRole.getExtRoleId().toString());
      Query hibQuery = aSession.createQuery(" from SbiEventRole ser where ser.id.role.extRoleId = ?" );
      hibQuery.setInteger(0, hibRole.getExtRoleId().intValue());
      List eventsRole = hibQuery.list();
      Iterator it = eventsRole.iterator();
      while (it.hasNext()) {
        SbiEventRole eventRole = (SbiEventRole) it.next();
        SbiEventsLog event = eventRole.getId().getEvent();
View Full Code Here

    Transaction tx = null;
    try {
      aSession = getSession();
      tx = aSession.beginTransaction();
   
      SbiExtRoles hibRole = (SbiExtRoles)aSession.load(SbiExtRoles.class,  aRole.getId());
     
      hibRole.setCode(aRole.getCode());
      hibRole.setDescr(aRole.getDescription());
      hibRole.setName(aRole.getName());
      hibRole.setIsAbleToSaveSubobjects(new Boolean(aRole.isAbleToSaveSubobjects()));
      hibRole.setIsAbleToSeeSubobjects(new Boolean(aRole.isAbleToSeeSubobjects()));
      hibRole.setIsAbleToSeeSnapshots(new Boolean(aRole.isAbleToSeeSnapshots()));
      hibRole.setIsAbleToSeeViewpoints(new Boolean(aRole.isAbleToSeeViewpoints()));
      hibRole.setIsAbleToSeeNotes(new Boolean(aRole.isAbleToSeeNotes()));
      hibRole.setIsAbleToSeeMetadata(new Boolean(aRole.isAbleToSeeMetadata()));
      hibRole.setIsAbleToSaveMetadata(new Boolean(aRole.isAbleToSaveMetadata()));
      hibRole.setIsAbleToSendMail(new Boolean(aRole.isAbleToSendMail()));
      hibRole.setIsAbleToSaveRememberMe(new Boolean(aRole.isAbleToSaveRememberMe()));
      hibRole.setIsAbleToSaveIntoPersonalFolder(new Boolean(aRole.isAbleToSaveIntoPersonalFolder()));
      hibRole.setIsAbleToBuildQbeQuery(new Boolean(aRole.isAbleToBuildQbeQuery()));
     
      SbiDomains roleType = (SbiDomains)aSession.load(SbiDomains.class,  aRole.getRoleTypeID());
      hibRole.setRoleType(roleType);
     
      hibRole.setRoleTypeCode(aRole.getRoleTypeCD());
      updateSbiCommonInfo4Update(hibRole);
      tx.commit();
    } catch (HibernateException he) {
      logException(he);
View Full Code Here

    try {
      aSession = getSession();
      tx = aSession.beginTransaction();

   
      SbiExtRoles hibRole = new SbiExtRoles();
     
      hibRole.setCode(role.getCode());
      hibRole.setDescr(role.getDescription());
      hibRole.setName(role.getName());     
      SbiDomains roleType = (SbiDomains)aSession.load(SbiDomains.class,  role.getRoleTypeID());
      hibRole.setRoleType(roleType);
     
      hibRole.setRoleTypeCode(role.getRoleTypeCD());
      //abilitations
      hibRole.setIsAbleToSaveSubobjects(new Boolean(role.isAbleToSaveSubobjects()));
      hibRole.setIsAbleToSeeSubobjects(new Boolean(role.isAbleToSeeSubobjects()));
      hibRole.setIsAbleToSeeSnapshots(new Boolean(role.isAbleToSeeSnapshots()));
      hibRole.setIsAbleToSeeViewpoints(new Boolean(role.isAbleToSeeViewpoints()));
      hibRole.setIsAbleToSeeNotes(new Boolean(role.isAbleToSeeNotes()));
      hibRole.setIsAbleToSeeMetadata(new Boolean(role.isAbleToSeeMetadata()));
      hibRole.setIsAbleToSaveMetadata(new Boolean(role.isAbleToSaveMetadata()));
      hibRole.setIsAbleToSendMail(new Boolean(role.isAbleToSendMail()));
      hibRole.setIsAbleToSaveRememberMe(new Boolean(role.isAbleToSaveRememberMe()));
      hibRole.setIsAbleToSaveIntoPersonalFolder(new Boolean(role.isAbleToSaveIntoPersonalFolder()));
      hibRole.setIsAbleToBuildQbeQuery(new Boolean(role.isAbleToBuildQbeQuery()));
      updateSbiCommonInfo4Insert(hibRole);
      roleId = (Integer)aSession.save(hibRole);
     
      tx.commit();
     
View Full Code Here

    for(int i=0; i<roles.length; i++) {
      Role role = roles[i];
      domainCdCriterrion = Expression.eq("name", role.getName());
      criteria = aSession.createCriteria(SbiExtRoles.class);
      criteria.add(domainCdCriterrion);
      SbiExtRoles hibRole = (SbiExtRoles)criteria.uniqueResult();
      SbiFuncRoleId sbifuncroleid = new SbiFuncRoleId();
      sbifuncroleid.setFunction(hibFunct);
      sbifuncroleid.setState(permissionDomain);
      sbifuncroleid.setRole(hibRole);
      SbiFuncRole sbifuncrole = new SbiFuncRole();
View Full Code Here

TOP

Related Classes of it.eng.spagobi.commons.metadata.SbiExtRoles

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.