Package com.centraview.administration.authorization

Examples of com.centraview.administration.authorization.Authorization


      Collection coldelete = new ArrayList();

      int uid = Integer.parseInt(request.getParameter("contactID").toString());
      request.setAttribute("userID",new Integer(uid));

      Authorization authRemote = (Authorization)authHome.create();

      hm = authRemote.getDefaultPermissions(uid);

      if (! authRemote.getUserDefaultPermission(uid).equalsIgnoreCase("Yes")) {
        if (hm != null) {
          vecview = (Vector)hm.get("VIEW");
          vecmodify = (Vector)hm.get("UPDATE");
          vecdelete = (Vector)hm.get("DELETE");
        }
View Full Code Here


        String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(this.pageContext.getServletContext())).getDataSource();
        try
        {
          InitialContext ic = CVUtility.getInitialContext();
        AuthorizationHome authorizationHome = (AuthorizationHome)CVUtility.getHomeObject("com.centraview.administration.authorization.AuthorizationHome", "Authorization");
          Authorization authorization = authorizationHome.create();
        authorization.setDataSource(dataSource);
        buttonOperationFlag = authorization.canPerformRecordOperation(individualID, this.modulename, this.recordID, this.buttonoperationtype);
        }// end of try block
        catch (Exception e)
        {
        logger.error("[EXCEPTION] CVButtonTag.CLASS doEndTag() Method "+e);
        }// end of catch block
View Full Code Here

        // "UserPrefererences" - make sure you spell it wrong intentionally
        UserPrefererences userPrefs = userObject.getUserPref();

        AuthorizationHome authHome = (AuthorizationHome)CVUtility.getHomeObject(
            "com.centraview.administration.authorization.AuthorizationHome", "Authorization");
        Authorization authRemote = authHome.create();
        authRemote.setDataSource(this.dataSource);

        ModuleFieldRightMatrix rightsMatrix = authRemote.getUserSecurityProfileMatrix(userObject
            .getIndividualID());

        if (!rightsMatrix.isModuleVisible("Synchronize")) {
          return (false);
        }
View Full Code Here

        "com.centraview.activity.activityfacade.ActivityFacadeHome", "ActivityFacade");
    try {
      int activityID = Integer.parseInt(activityIDString);
      AuthorizationHome authHome = (AuthorizationHome)CVUtility.getHomeObject(
          "com.centraview.administration.authorization.AuthorizationHome", "Authorization");
      Authorization authorizationLocal = authHome.create();
      authorizationLocal.setDataSource(dataSource);
      HashMap ownerInfo = authorizationLocal.getOwner("Activities", activityID);
      String ownerIDString = ownerInfo.get("id").toString();
      int ownerID = -1;
      if (ownerIDString != null && !ownerIDString.equals("")) {
        ownerID = Integer.parseInt(ownerIDString);
      }
View Full Code Here

        int rowId = remote.addActivity(activityVO, IndividualId);

        AuthorizationHome authHome = (AuthorizationHome)CVUtility.getHomeObject(
            "com.centraview.administration.authorization.AuthorizationHome", "Authorization");
        Authorization authRemote = authHome.create();
        authRemote.setDataSource(dataSource);

        Vector vectOptional = ((ActivityForm)form).getActivityAttendeeOptionalVector();
        Vector vectRequired = ((ActivityForm)form).getActivityAttendeeRequiredVector();
        Iterator iterOptional = null;
        Iterator iterRequired = null;

        int l1 = 0, l2 = 0, arrIndex = 0;
        if (vectOptional != null) {
          iterOptional = vectOptional.iterator();
          l1 = vectOptional.size();
        }

        if (vectRequired != null) {
          iterRequired = vectRequired.iterator();
          l2 = vectRequired.size();
        }

        int arrView[] = new int[l1 + l2];
        int arrBlank[] = {};
        if (iterRequired != null) {
          while (iterRequired.hasNext()) {
            DDNameValue nvalue = (DDNameValue)iterRequired.next();
            String strID = nvalue.getStrid();
            String arrStrings[] = strID.split("#");
            strID = arrStrings[0].trim();
            int id = Integer.parseInt(strID);
            arrView[arrIndex++] = id;
          }// end of while (iterRequired.hasNext())
        }// end of if (iterRequired != null)

        if (iterOptional != null) {
          while (iterOptional.hasNext()) {
            DDNameValue nvalue = (DDNameValue)iterOptional.next();
            String strID = nvalue.getStrid();
            String arrStrings[] = strID.split("#");
            strID = arrStrings[0].trim();
            int id = Integer.parseInt(strID);
            arrView[arrIndex++] = id;
          }// end of while (iterOptional.hasNext())
        }// end of if (iterOptional != null)

        request.setAttribute(ConstantKeys.TYPEOFOPERATION, ConstantKeys.EDIT);
        String activityVisibility = ((ActivityForm)form).getActivityVisibility();
        if (activityVisibility != null && activityVisibility.equals("PRIVATE")) {
          authRemote.saveRecordPermission(IndividualId, 0, "Activities", rowId, arrView, arrBlank,
              arrBlank);
        }
        if (activityVisibility != null && activityVisibility.equals("PUBLIC")) {
          authRemote.saveRecordPermission(IndividualId, -1, "Activities", rowId, arrView, arrBlank,
              arrBlank);
        }

      }// end of try Block
      catch (Exception e) {
View Full Code Here

          }
        }
      }
     
      AuthorizationHome authHome = (AuthorizationHome)CVUtility.getHomeObject("com.centraview.administration.authorization.AuthorizationHome","Authorization");
      Authorization authRemote = (Authorization)authHome.create();
     
      int flag = 0;
     
      if (request.getParameter("isPublic") != null) {
        flag = -1;
      }
     
      authRemote.saveDefaultPermissions(flag,uid,arrView,arrModify,arrDelete);
    } catch(Exception e) {
      System.out.println("Error in SaveDefaultPreferencesHandler: " + e);
      e.printStackTrace();
    }
    return mapping.findForward(".forward.administration.user_list");
View Full Code Here

  {
    int retVal = 0;
    try {
      AuthorizationHome home = (AuthorizationHome) CVUtility.getHomeObject("com.centraview.administration.authorization.AuthorizationHome",
          "Authorization");
      Authorization local = home.create();
      local.setDataSource(dataSource);
      retVal = local.getRecordPermission(indId, moduleName, recordId);
    } catch (Exception e) {
      logger.error("[getRecordPermission]: Exception", e);
    }
    return retVal;
  }
View Full Code Here

      String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(this.pageContext.getServletContext())).getDataSource();
      try
      {
        InitialContext ic = CVUtility.getInitialContext();
        AuthorizationHome authorizationHome = (AuthorizationHome)CVUtility.getHomeObject("com.centraview.administration.authorization.AuthorizationHome", "Authorization");
        Authorization authorization = authorizationHome.create();
        authorization.setDataSource(dataSource);
        buttonOperationFlag = authorization.canPerformRecordOperation(individualID, this.modulename, this.recordID, this.buttonoperationtype);
      }// end of try block
      catch (Exception e)
      {
        logger.error("[EXCEPTION] CVButtonTag.CLASS doEndTag() Method "+e);
      }// end of catch block
View Full Code Here

        remote.updateActivity(activityVO, IndividualId);

        AuthorizationHome authHome = (AuthorizationHome)CVUtility.getHomeObject(
            "com.centraview.administration.authorization.AuthorizationHome", "Authorization");
        Authorization authRemote = authHome.create();
        authRemote.setDataSource(dataSource);

        Vector vectOptional = ((ActivityForm)form).getActivityAttendeeOptionalVector();
        Vector vectRequired = ((ActivityForm)form).getActivityAttendeeRequiredVector();
        Iterator iterOptional = null;
        Iterator iterRequired = null;

        int l1 = 0, l2 = 0, arrIndex = 0;
        if (vectOptional != null) {
          iterOptional = vectOptional.iterator();
          l1 = vectOptional.size();
        }

        if (vectRequired != null) {
          iterRequired = vectRequired.iterator();
          l2 = vectRequired.size();
        }

        int arrView[] = new int[l1 + l2];
        int arrBlank[] = {};

        if (iterRequired != null) {
          while (iterRequired.hasNext()) {
            DDNameValue nvalue = (DDNameValue)iterRequired.next();
            String strID = nvalue.getStrid();
            String arrStrings[] = strID.split("#");
            strID = arrStrings[0].trim();
            int id = Integer.parseInt(strID);
            arrView[arrIndex++] = id;
          }
        }

        if (iterOptional != null) {
          while (iterOptional.hasNext()) {
            DDNameValue nvalue = (DDNameValue)iterOptional.next();
            String strID = nvalue.getStrid();
            String arrStrings[] = strID.split("#");
            strID = arrStrings[0].trim();
            int id = Integer.parseInt(strID);
            arrView[arrIndex++] = id;
          }
        }

        request.setAttribute(ConstantKeys.TYPEOFOPERATION, ConstantKeys.EDIT);
        String activityVisibility = ((ActivityForm)form).getActivityVisibility();

        if (activityVisibility != null && activityVisibility.equals("PRIVATE")) {
          authRemote.saveRecordPermission(IndividualId, 0, "Activities", activityID, arrView,
              arrBlank, arrBlank);
        }

        if (activityVisibility != null && activityVisibility.equals("PUBLIC")) {
          authRemote.saveRecordPermission(IndividualId, -1, "Activities", activityID, arrView,
              arrBlank, arrBlank);
        }
      } catch (Exception e) {
        logger.error("[Exception] EditActivityHandler.Execute Handler ", e);
      }
View Full Code Here

        // thats why we will disable the Edit button
        boolean editFlag = false;
        if(fVO.getStatus() != null && fVO.getStatus().equals("PUBLISH")){
          AuthorizationHome homeAuthorization = (AuthorizationHome)CVUtility.getHomeObject("com.centraview.administration.authorization.AuthorizationHome", "Authorization");
          try{
            Authorization remoteAuthorization = homeAuthorization.create();
            remoteAuthorization.setDataSource(dataSource);
            editFlag = remoteAuthorization.canPerformRecordOperation(individualID, "FAQ", faqId, ModuleFieldRightMatrix.UPDATE_RIGHT);
          }
          catch (Exception e)
          {
            logger.error("[Exception] [ViewFaqHandler.execute Calling Authorization]  ", e);
            FORWARD_final = GLOBAL_FORWARD_failure;
View Full Code Here

TOP

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

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.