Package com.centraview.administration.authorization

Examples of com.centraview.administration.authorization.AuthorizationLocalHome


      }
      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.setRealTimestamp(3, flvo.getTo());
        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.executeUpdate();

      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.setSql("file.deletefolder");
      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

        ItemElement ele  = ( ItemElement)itemLines.get( str );
        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.executeUpdate();
            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

      // one record in the "syncnote" table;
      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

        custFieldVO.setRecordID(newEntityID);
        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

        CustomFieldVO custFieldVO = (CustomFieldVO)custfieldVec.get(i);
        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.setInt(9,tsvo.getReportingToId());
      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

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.