Package com.centraview.administration.authorization

Examples of com.centraview.administration.authorization.AuthorizationLocal


        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 {
      cvdl.destroy();
      cvdl = null;
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);
    } finally {
      dl.destroy();
View Full Code Here

      faqId  = cvdl.getAutoGeneratedKey();

      // Apply default permissions to the record.
      InitialContext ic = CVUtility.getInitialContext();
      AuthorizationLocalHome authorizationHome = (AuthorizationLocalHome)ic.lookup("local/Authorization");
      AuthorizationLocal authorizationLocal = authorizationHome.create();
      authorizationLocal.setDataSource(dataSource);
      authorizationLocal.saveCurrentDefaultPermission("FAQ", faqId, userId);

    } catch(Exception e)
    {
      e.printStackTrace();
      throw new FaqException(NoteException.INSERT_FAILED,"Failed in faq ejb while adding note");
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);
    } catch (Exception exe) {
      logger.error("[addOpportunity]: Exception", exe);
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)
    {
      System.out.println("[Exception][InvoiceEJB.ejbCreate] Exception Thrown: "+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)
    {
      logger.error("[execute] Exception thrown.", e);
      result = 1;
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);
      throw new NoteException(NoteException.INSERT_FAILED, "Failed in note ejb while adding note");
    } finally {
      cvdal.destroy();
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{
      dl.destroy();
      dl = null;
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 {
      dl.destroy();
    }
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)
    {
      System.out.println("[Exception][TimeSheetEJB.addTimeSheet] Exception Thrown: "+e);
      e.printStackTrace();
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.