Package it.eng.spago.security

Examples of it.eng.spago.security.IEngUserProfile


  private static Logger logger = Logger.getLogger(PrintNotesAction.class);
  InputSource inputSource;

  public void doService() {
    logger.debug("IN");
    IEngUserProfile profile = (IEngUserProfile) this.getUserProfile();
    ExecutionInstance executionInstance;
    executionInstance = getContext().getExecutionInstance( ExecutionInstance.class.getName() );
    String executionIdentifier=new BIObjectNotesManager().getExecutionIdentifier(executionInstance.getBIObject());
    Integer biobjectId = executionInstance.getBIObject().getId();
    List objNoteList=null;
View Full Code Here


 
 
  public void doService() {
   
    ExecutionInstance executionInstance;
    IEngUserProfile userProfile;
    Integer biobjectId;
   
    String viewpointName;
    String viewpointDescription;
    String viewpointScope;
    String viewpointOwner;
    JSONObject viewpointJSON;
    String viewpointString;
   
    IViewpointDAO viewpointDAO;
    Viewpoint viewpoint;

   
   
   
    logger.debug("IN");
   
    try{
     
      viewpointName = getAttributeAsString(NAME);
      viewpointDescription = getAttributeAsString(DESCRIPTION);
      viewpointScope = getAttributeAsString(SCOPE);
      viewpointJSON = getAttributeAsJSONObject( VIEWPOINT );
     
      logger.debug("Parameter [" + NAME + "] is equals to [" + viewpointName + "]");
      logger.debug("Parameter [" + DESCRIPTION + "] is equals to [" + viewpointDescription + "]");
      logger.debug("Parameter [" + SCOPE + "] is equals to [" + viewpointScope + "]");
      logger.debug("Parameter [" + viewpointScope + "] is equals to [" + viewpointJSON + "]");
     
      Assert.assertTrue(!StringUtilities.isEmpty(viewpointScope), "Viewpoint's name cannot be null or empty");
      Assert.assertNotNull(!StringUtilities.isEmpty(viewpointDescription), "Viewpoint's description cannot be null or empty");
      Assert.assertNotNull(!StringUtilities.isEmpty(viewpointScope), "Viewpoint's scope cannot be null or empty");
      Assert.assertNotNull(viewpointJSON, "Viewpoint's content cannot be null");
     
      executionInstance = getContext().getExecutionInstance( ExecutionInstance.class.getName() );
      Assert.assertNotNull(executionInstance, "Execution instance cannot be null");
     
      userProfile = this.getUserProfile();
      Assert.assertNotNull(userProfile, "Impossible to retrive user profile");
     
      biobjectId = executionInstance.getBIObject().getId();
      Assert.assertNotNull(executionInstance, "Impossible to retrive analytical document id");
     
      logger.debug("User: [" + userProfile.getUserUniqueIdentifier() + "]");
      logger.debug("Document Id:  [" + biobjectId + "]");
     
      viewpointOwner = (String) ((UserProfile)userProfile).getUserId();
     
      Iterator it = viewpointJSON.keys();
View Full Code Here

  throws Exception {

    logger.debug("IN");

    // get the current user profile
    IEngUserProfile profile = getUserProfile();
    BIObject obj = getRequiredBIObject(request);
    // get the list of the subObjects
    List subObjects = getSubObjectsList(obj, profile);
    // get the list of snapshots
    List snapshots = getSnapshotList(obj);
View Full Code Here

          2002, params));
      return;
    }

    // GET USER PROFILE
    IEngUserProfile profile = getUserProfile();

    // IF USER CAN'T EXECUTE THE OBJECT RETURN
    if (!canExecute(profile, obj))
      return;
View Full Code Here

  private List getViewpointList(BIObject obj) {
    logger.debug("IN");
    List viewpoints = new ArrayList();
    try {
      IViewpointDAO biVPDAO = DAOFactory.getViewpointDAO();
      IEngUserProfile profile = getUserProfile();
      viewpoints = biVPDAO.loadAccessibleViewpointsByObjId(obj.getId(), profile);
    } catch (Exception e) {
      logger.error("Error retriving the viewpoint list", e);
    } finally {
      logger.debug("OUT");
View Full Code Here

  public void saveViewPoint(SourceBean request, SourceBean response)
  throws Exception {
    logger.debug("IN");
    ExecutionInstance instance = getExecutionInstance();
    // get the current user profile
    IEngUserProfile profile = getUserProfile();
    String nameVP = (String) request.getAttribute("tmp_nameVP");
    String descVP = (String) request.getAttribute("tmp_descVP");
    String scopeVP = (String) request.getAttribute("tmp_scopeVP");
    if (scopeVP != null && scopeVP.equalsIgnoreCase("Public")) {
      scopeVP = "Public";
View Full Code Here

    try {
      // retrieving execution instance from session, no need to check if user is able to execute the required document
      executionInstance = getContext().getExecutionInstance( ExecutionInstance.class.getName() );
      Integer biobjectId = executionInstance.getBIObject().getId();
      List subObjectsList = null;
      IEngUserProfile userProfile = this.getUserProfile();
      try {
        if (userProfile.isAbleToExecuteAction(SpagoBIConstants.DOCUMENT_MANAGEMENT_ADMIN)) {
          subObjectsList = DAOFactory.getSubObjectDAO().getSubObjects(biobjectId);
        } else {
          subObjectsList = DAOFactory.getSubObjectDAO().getAccessibleSubObjects(biobjectId, userProfile);
        }
      } catch (EMFUserError e) {
View Full Code Here

    HttpServletResponse response = getHttpResponse();

    try {
      SessionContainer permSession = this.getRequestContainer().getSessionContainer().getPermanentContainer();
      IEngUserProfile profile = (IEngUserProfile) permSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
      if (profile == null) {
        logger.error("User profile not found");
        throw new Exception("User profile not found");
      }
      String userId = ((UserProfile)profile).getUserId().toString();
View Full Code Here

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

    try{
      //Getting Containers
      SessionContainer session = getRequestContainer().getSessionContainer();
      SessionContainer permSession = session.getPermanentContainer();
      //ApplicationContainer application = ApplicationContainer.getInstance();
      IEngUserProfile userProfile = (IEngUserProfile)permSession.getAttribute(IEngUserProfile.ENG_USER_PROFILE);
      //Getting Jbpm context
      JbpmConfiguration jbpmConfiguration = JbpmConfiguration.getInstance();
      jbpmContext = jbpmConfiguration.createJbpmContext();
      //Getting user roles
      Collection roles = 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.