Package com.centraview.administration.authorization

Examples of com.centraview.administration.authorization.AuthorizationLocalHome.create()


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


        cvdl.executeUpdate();
      }
      this.addFileLink(fileId, flvo, cvdl);
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(dataSource);
      authorizationLocal.saveCurrentDefaultPermission("File", fileId, individualId);
    } catch (Exception e) {
      logger.error("[addFile] Exception thrown.", e);
    } finally {
View Full Code Here

      cvdal.clearParameters();
      cvdal.destroy();

      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic
          .lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(dataSource);
      authorizationLocal.saveCurrentDefaultPermission("Opportunities", opportunityID, userId);

      // update the forcast amount
      this.updateForcastAmount(oVO.getActualAmount(), opportunityID);
View Full Code Here

      dl.setInt(1, folderId);
      dl.executeUpdate();
      // call the authorization EJB to set the record public if warranted
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome home = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal remote = home.create();
      remote.setDataSource(dataSource);
      remote.deleteRecordFromPublic("76", folderId);
    } catch (Exception e) {
      logger.error("[deleteFolder] Exception thrown.", e);
      throw new EJBException(e);
View Full Code Here

        this.addInvoiceItem(ele,invoiceID);
      }// end of while

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

    }
    catch(Exception e)
View Full Code Here

            cvdal.clearParameters();
          }//end of strId != null && !strId.equals("")
        }//end of while(stid.hasMoreTokens())
      }//end of if(strLiteratureId != null)
            AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
            AuthorizationLocal authorizationLocal = authorizationHome.create();
            authorizationLocal.setDataSource(dataSource);
            authorizationLocal.saveCurrentDefaultPermission("LiteratureFulfilment", deliveryid, individualid);
    }
    catch(Exception e)
    {
View Full Code Here

      this.updateSyncNotes(noteVO, cvdal);

      // set default permissions on the new note
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome) ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(dataSource);

      authorizationLocal.saveCurrentDefaultPermission("Notes", noteID, individualID);
    } catch (Exception e) {
      logger.error("[addNote]: Exception", e);
View Full Code Here

        custRemote.addCustomField(custFieldVO);
      }

      // Everything is created now apply the default permissions for this user.
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(dataSource);
      authorizationLocal.saveCurrentDefaultPermission("Entity", newEntityID, individualID);
    }catch(Exception e){
      logger.error("[ejbCreate] Exception thrown.", e);
    }finally{
View Full Code Here

        custFieldVO.setRecordID(individualID);
        custRemote.addCustomField(custFieldVO);
      }
      // Everything is created now apply the default permissions for this user.
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(ds);
      authorizationLocal.saveCurrentDefaultPermission("Individual", individualID, userID);
    } catch (Exception e) {
      logger.error("[ejbCreate] Exception thrown.", e);
    } finally {
View Full Code Here

      dl.executeUpdate();
      timeSheetId = dl.getAutoGeneratedKey();

      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(dataSource);
      // TODO I don't know if acouting is right.
      authorizationLocal.saveCurrentDefaultPermission("Accounting", timeSheetId, indvId);
    }
    catch(Exception e)
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.