Package com.centraview.administration.authorization

Examples of com.centraview.administration.authorization.AuthorizationLocal


          }
        }
        // Save CustomFields ends here

        AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
        AuthorizationLocal authorizationLocal = authorizationHome.create();
        authorizationLocal.setDataSource(dataSource);
        authorizationLocal.saveCurrentDefaultPermission("Inventory", pKey, individualID);

      } catch(Exception e)
      {
        System.out.println("[Exception][InventoryEJB.insertInventory] Exception Thrown: "+e);
        throw new InventoryException(InventoryException.INSERT_FAILED,"Failed in inventory ejb while adding inventory");
View Full Code Here


        this.addPurchaseOrderItem(ele,purchaseorderID);
      }// end of while

      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(ds);
      authorizationLocal.saveCurrentDefaultPermission("PurchaseOrder", purchaseorderID, userID);
    }
    catch(Exception e)
    {
      System.out.println("[Exception][PurchaseOrderEJB.ejbCreate] Exception Thrown: "+e);
      e.printStackTrace();
View Full Code Here

        this.addApplyPayment(ele,paymentID);
      }

            InitialContext ic = CVUtility.getInitialContext();
            AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
            AuthorizationLocal authorizationLocal = authorizationHome.create();
            authorizationLocal.setDataSource(ds);
            authorizationLocal.saveCurrentDefaultPermission("Payment", paymentID, userID);

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

        this.addExpenseItem(ele,expenseID);
      }// end of while

      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(ds);
      authorizationLocal.saveCurrentDefaultPermission("Expense", expenseID, userID);

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

        this.addOrderItem(ele, orderID);
      }// end of while

      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(ds);
      authorizationLocal.saveCurrentDefaultPermission("OrderHistory", orderID, userID);

    } catch (Exception e) {
      logger.error("[ejbCreate]: Exception", e);
    } finally {
      dl.destroy();
View Full Code Here

    if (newListID != 0) {
      // Everything is created now apply the default permissions for this user.
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(this.dataSource);
      authorizationLocal.saveCurrentDefaultPermission("ListManager", newListID, userId);
      authorizationLocal.saveCurrentDefaultPermission("MarketingList", newListID, userId);
    }
    return newListID;
  }
View Full Code Here

      contactLocal.setDataSource(this.dataSource);
      contactLocal.deleteEntity(listID);
      contactLocal.deleteIndividual(listID);
     
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(this.dataSource);
      authorizationLocal.deleteMarketingMemberPublicRecords(listID);
      authorizationLocal.deleteRecordFromPublic("ListManager",listID);
      authorizationLocal.deleteRecordFromPublic("MarketingList",listID);
      authorizationLocal.deleteRecordsFromRecordAuthorization("ListManager",listID);
      authorizationLocal.deleteRecordsFromRecordAuthorization("MarketingList",listID);
     
      deleted = true;
    } catch (Exception e) {
      logger.error("[Exception] ListEJB.deleteList: ", e);
    } finally {
View Full Code Here

     
      // We collect a set of newly created individual and entity and then we will set permission on the Individual and Entity
      // on basis of the Marketing List's Member Permission
      if (newIndividualList.size() != 0 || newEntityList.size() != 0) {
        AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
        AuthorizationLocal remoteAuth = authorizationHome.create();
        remoteAuth.setDataSource(this.dataSource);
        remoteAuth.saveMarketingRecordPermission(newIndividualList, newEntityList, listid);
      }
    } catch (Exception e) {
      logger.error("[Exception] ListEJB.getImportList: ", e);
    }
    return messageList;
View Full Code Here

      }
      // call the authorization EJB to set the record public if warranted
      if (fdvo.getVisibility().equals("PUBLIC")) {
        InitialContext ic = CVUtility.getInitialContext();
        AuthorizationLocalHome home = (AuthorizationLocalHome)ic.lookup("local/Authorization");
        AuthorizationLocal remote = home.create();
        remote.setDataSource(dataSource);
        remote.setRecordToPublic("76", folderID)// 76 is the folder "module" id.
      }
    } catch (Exception e) {
      logger.error("[addFolder] Exception thrown.", e);
      throw new CvFileException(CvFileException.INSERT_FAILED, "Failed in file ejb while adding folder");
    }
View Full Code Here

      cvdl.executeUpdate();
      // call the authorization EJB to set the record public if warranted
      if (fdvo.getVisibility().equals("PUBLIC")) {
        InitialContext ic = CVUtility.getInitialContext();
        AuthorizationLocalHome home = (AuthorizationLocalHome)ic.lookup("local/Authorization");
        AuthorizationLocal remote = home.create();
        remote.setDataSource(dataSource);
        remote.setRecordToPublic("76", fdvo.getFolderId())// 76 is the folder "module" id.
      }
    } catch (CvFileException fe) {
      // just rethrow
      throw fe;
    } catch(Exception e) {
View Full Code Here

TOP

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

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.