Package com.centraview.administration.authorization

Examples of com.centraview.administration.authorization.AuthorizationHome


  public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException, CommunicationException, NamingException
  {
    String dataSource = Settings.getInstance().getSiteInfo(CVUtility.getHostName(super.getServlet().getServletContext())).getDataSource();

    AuthorizationHome authHome = (AuthorizationHome)CVUtility.getHomeObject("com.centraview.administration.authorization.AuthorizationHome", "Authorization");
    try {
      HttpSession session = request.getSession(false);

      HashMap hm = new HashMap();

      RecordPermissionForm permissionForm = (RecordPermissionForm)form;

      if (permissionForm == null) {
        permissionForm = new RecordPermissionForm();
      }
      permissionForm.setModify("");
      permissionForm.setDeleten("");
      permissionForm.setView("");

      Vector vecview = new Vector();
      Vector vecmodify = new Vector();
      Vector vecdelete = new Vector();

      Collection colview = new ArrayList();
      Collection colmodify = new ArrayList();
      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) {
View Full Code Here


        //Setting the DataSource
        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)
        {
View Full Code Here

        // The class name was mis-spelled when it was created, and it was
        // never fixed. So please be careful when trying to use the class
        // "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());
View Full Code Here

  {
    ActivityFacadeHome aa = (ActivityFacadeHome)CVUtility.getHomeObject(
        "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("")) {
View Full Code Here

        ActivityFacade remote = activityFacade.create();
        remote.setDataSource(dataSource);

        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;
View Full Code Here

            j = j + 1;
          }
        }
      }
     
      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;
View Full Code Here

  public static int getRecordPermission(int indId, String moduleName, int recordId, String dataSource)
  {
    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);
    }
View Full Code Here

      boolean buttonOperationFlag = false;
      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)
      {
View Full Code Here

            .toLowerCase()));
        activityVO.setActivityID(activityID); // to be removed

        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;
View Full Code Here

        // Condition if the record status is Publish then Only Owner can update it.
        // Other user can't update it.
        // 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)
          {
View Full Code Here

TOP

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

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.