Package it.eng.spagobi.commons.bo

Examples of it.eng.spagobi.commons.bo.UserProfile


      SpagoBIUserProfile user = null;
      try {
    user = supplier.createUserProfile(userId);
   
    user.setFunctions(readFunctionality(user.getRoles()));
    userProfile = new UserProfile(user);
      } catch (Exception e) {
        logger.error("An error occured while retrieving user profile for user[" + userId +"]");
        throw new SecurityException("An error occured while retrieving user profile for user[" + userId +"]", e);
      }
View Full Code Here


   
      ISecurityServiceSupplier supplier = SecurityServiceSupplierFactory.createISecurityServiceSupplier();
      try {
    SpagoBIUserProfile user = supplier.createUserProfile(userId);
    user.setFunctions(readFunctionality(user.getRoles()));
    return new UserProfile(user);
      } catch (Exception e) {
        logger.error("Exception while creating user profile",e);
      throw new SecurityException("Exception while creating user profile", e);
      }finally{
        logger.debug("OUT");
View Full Code Here

      ISecurityServiceSupplier supplier = SecurityServiceSupplierFactory.createISecurityServiceSupplier();
      try {
    SpagoBIUserProfile user = supplier.createUserProfile(userId);
    if (user==null) return null;
    user.setFunctions(readFunctionality(user.getRoles()));
    return new UserProfile(user);
      } catch (Exception e) {
        logger.error("Exception while creating user profile",e);
      throw new SecurityException("Exception while creating user profile", e);
      }finally{
        logger.debug("OUT");
View Full Code Here

  private UserProfile getProfile() {
    logger.debug("IN");
    SessionContainer session = requestContainer.getSessionContainer();
    SessionContainer permSession = session.getPermanentContainer();
    //IEngUserProfile profile = (IEngUserProfile) permSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
    UserProfile profile = (UserProfile) permSession.getAttribute(UserProfile.ENG_USER_PROFILE);
    logger.debug("OUT");
    return profile;
  }
View Full Code Here

   */
  public static String getDataSetResult(IEngUserProfile profile,IDataSet ds, Map parameters) throws Exception {
    logger.debug("IN");
   
    if (profile == null) {
      profile = new UserProfile("anonymous");
    }
   
    SourceBean rowsSourceBean = null;
    List colNames = new ArrayList();
   
View Full Code Here

    boolean toReturn = false;
        logger.debug("IN");
        try {
          IEngUserProfile profile = getUserProfile();
          if (profile != null) {
            UserProfile userProfile = (UserProfile) profile;
            logger.info("User recognized: " +
                "userUniqueIdentifier = [" + userProfile.getUserAttributeNames() + "]; " +
                    "userId = [" + userProfile.getUserId() + "]; " +
                        "userName = [" + userProfile.getUserName() + "]");
            toReturn = true;
          } else {
            logger.error("User not recognized.");
            toReturn = false;
          }
View Full Code Here

   
    try {
      BIObject obj = getRequiredBIObject();
      boolean documentFound = false;
      boolean canSeeDocument = false;
      UserProfile profile = (UserProfile) getUserProfile();
      documentFound = obj != null;
      if (obj != null) {
        canSeeDocument = ObjectsAccessVerifier.canSee(obj, profile);
      }
      HttpServletRequest httpRequest = getHttpRequest();
      MessageBuilder m = new MessageBuilder();
      Locale locale = m.getLocale(httpRequest);
      JSONObject result = new JSONObject();
      if (!documentFound) {
        result.put("documentFound", false);
      } else {
        result.put("documentFound", true);
        if (!canSeeDocument) {
          result.put("canSeeDocument", false);
        } else {
          JSONObject document = (JSONObject) SerializerFactory.getSerializer("application/json").serialize( obj ,locale);
          result.put("document", document);
          result.put("canSeeDocument", true);           
          SubObject subObject = getRequiredSubObject(obj);
          if (subObject != null) {
            if (profile.isAbleToExecuteAction(SpagoBIConstants.DOCUMENT_MANAGEMENT_ADMIN) ||
                (subObject.getIsPublic().booleanValue() || subObject.getOwner().equals(profile.getUserId()))) {
              JSONObject subObjectJSON = (JSONObject) SerializerFactory.getSerializer("application/json").serialize( subObject ,locale);
              result.put("subobject", subObjectJSON);
            } else {
              logger.warn("User cannot see subobject [" + subObject.getName() + "] of document with label [" + obj.getLabel() + "].");
              result.put("canSeeSubobject", false);
View Full Code Here

      String objId = "";
      String rating = "";
      RequestContainer requestContainer = this.getRequestContainer();   
        SessionContainer session = requestContainer.getSessionContainer();
        SessionContainer permanentSession = session.getPermanentContainer();
        UserProfile profile = (UserProfile) permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
        IEngUserProfile profile2 = (IEngUserProfile) permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
        String userId= (profile.getUserUniqueIdentifier()!=null ? profile.getUserUniqueIdentifier().toString():"");
      List params = request.getContainedAttributes();
        ListIterator it = params.listIterator();

        while (it.hasNext()) {
View Full Code Here

      String execIdentifier = "";
      String userId = "";
      RequestContainer requestContainer = this.getRequestContainer();   
        SessionContainer session = requestContainer.getSessionContainer();
        SessionContainer permanentSession = session.getPermanentContainer();
        UserProfile profile = (UserProfile) permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
        IEngUserProfile profile2 = (IEngUserProfile) permanentSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
        userId= (String) profile.getUserId();
      List params = request.getContainedAttributes();
        ListIterator it = params.listIterator();

        while (it.hasNext()) {
View Full Code Here

TOP

Related Classes of it.eng.spagobi.commons.bo.UserProfile

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.