Package com.centraview.administration.authorization

Examples of com.centraview.administration.authorization.AuthorizationLocalHome


  public static boolean isModuleVisible(String moduleName, int individualId, String dataSource)
  {
    boolean retVal = false;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome home = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal local = home.create();
      local.setDataSource(dataSource);
      retVal = local.isModuleVisible(moduleName, individualId);
    } catch (Exception e) {
      logger.error("[isModuleVisible]: Exception", e);
    }
View Full Code Here


  public static Object replaceVO(Object objDBVO, Object objUIVO, String moduleName, int individualId, String dataSource)
  {
    HashMap hm = new HashMap();
    try {
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome home = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal local = home.create();
      local.setDataSource(dataSource);

      hm = local.getNoneRightFieldMethod(moduleName, individualId);
      if (hm != null) {
        Collection col = hm.values();
View Full Code Here

  public static ModuleFieldRightMatrix getUserModuleRight(String moduleName, int individualId, boolean byListCol, String dataSource)
  {
    ModuleFieldRightMatrix retVal = null;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome home = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal local = home.create();
      local.setDataSource(dataSource);
      retVal = local.getUserSecurityProfileMatrix(moduleName, individualId, byListCol);
    } catch (Exception e) {
      logger.error("[getUserModuleRight]: Exception", e);
    }
View Full Code Here

  public static boolean canPerformRecordOperation(int indId, String moduleName, int recordId, int privilegeLevel, String dataSource)
  {
    boolean retVal = false;
    try {
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome home = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal local = home.create();
      local.setDataSource(dataSource);
      retVal = local.canPerformRecordOperation(indId, moduleName, recordId, privilegeLevel);
    } catch (Exception e) {
      logger.error("[canPerformRecordOperation]: Exception", e);
    }
View Full Code Here

          }
        }
      }

      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(dataSource);
      authorizationLocal.saveCurrentDefaultPermission("Projects", projectId, userId);
    }catch (Exception e){
      System.out.println("[Exception][ProjectEJB.addProject] Exception Thrown: " + e);
      e.printStackTrace();
View Full Code Here

          }
        }
      }

      // TODO: we may not need to do this as tasks are activites and activites don't seem to use recordauth.
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(dataSource);
      authorizationLocal.saveCurrentDefaultPermission("Tasks", activityId, userId);
    }catch (Exception e){
      System.out.println("[Exception][TaskEJB.addTask] Exception Thrown: " + e);
      e.printStackTrace();
View Full Code Here

      dl.executeUpdate();

      timeSlipId = dl.getAutoGeneratedKey();

            InitialContext ic = CVUtility.getInitialContext();
            AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
            AuthorizationLocal authorizationLocal = authorizationHome.create();
            authorizationLocal.setDataSource(dataSource);
            authorizationLocal.saveCurrentDefaultPermission("Time Slips", timeSlipId, userId);
    }
    catch(Exception e)
    {
View Full Code Here

      ContactHelperLocalHome contactHelperHome = (ContactHelperLocalHome)ic.lookup("local/ContactHelper");
      ContactHelperLocal contactHelperRemote =  contactHelperHome.create();
      contactHelperRemote.setDataSource(this.dataSource);

      // Setting the Record Permission for newly Created record.
      AuthorizationLocalHome authHome=(AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authRemote=(AuthorizationLocal)authHome.create();
      authRemote.setDataSource(this.dataSource);

      // get the Default Error Message Template for the Support replying emails
      EmailSettingsLocalHome emailSettingsHome=(EmailSettingsLocalHome)ic.lookup("local/EmailSettings");
      EmailSettingsLocal emailSettingsRemote=(EmailSettingsLocal)emailSettingsHome.create();
View Full Code Here

        } //end of while loop(itt.hasNext())
      } //end of if statement ((attchmentids != null) && (attchmentids.size() != 0))

            InitialContext ic = CVUtility.getInitialContext();
            AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
            AuthorizationLocal authorizationLocal = authorizationHome.create();
            authorizationLocal.setDataSource(dataSource);
            authorizationLocal.saveCurrentDefaultPermission("Events", eventid, userID);

    }
    catch(Exception exe)
View Full Code Here

      cvdl.executeUpdate();

      itemID = cvdl.getAutoGeneratedKey();

      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(dataSource);
      authorizationLocal.saveCurrentDefaultPermission("Item", itemID, individualID);

    }catch(Exception e){
      System.out.println("[Exception][ItemEJB.addItem] Exception Thrown: " + e);
View Full Code Here

TOP

Related Classes of com.centraview.administration.authorization.AuthorizationLocalHome

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.