Package com.centraview.common

Examples of com.centraview.common.AuthorizationFailedException


   */
  public ItemVO getItem(int userId, int itemId) throws ItemException,AuthorizationFailedException
  {
    if (! CVUtility.isModuleVisible("Item",userId, this.dataSource))
    {
      throw new AuthorizationFailedException("Item- getItem");
    }

    ItemVO itemVO;
    CVDal cvdl = new CVDal(dataSource);

View Full Code Here


   * @exception ItemException
   */
  public void updateItem(int userId, ItemVO itemVO) throws ItemException,AuthorizationFailedException
  {
    if(!CVUtility.isModuleVisible("Item",userId, this.dataSource))
      throw new AuthorizationFailedException("Item- updateItem");
    CVDal cvdl = new CVDal(dataSource);
    try
    {
      // begin :: adding for fieldlevel rights...
      ItemVO itemDBVO = getItem(userId,itemVO.getItemId());
View Full Code Here

   * @exception   InventoryException
   */
    public InventoryVO insertInventory (int individualID, InventoryVO inventoryVO) throws InventoryException,AuthorizationFailedException
    {
    if(!CVUtility.isModuleVisible("Inventory",individualID, this.dataSource))
      throw new AuthorizationFailedException("Inventory- insertInventory");
    int pKey  = 0 ;
        CVDal cvdl = new CVDal(dataSource);
      try
      {
        if (inventoryVO == null)
View Full Code Here

   * @exception   InventoryException
   */
    public InventoryVO getInventory(int individualID, int inventoryID) throws InventoryException,AuthorizationFailedException
    {
      if(!CVUtility.isModuleVisible("Inventory",individualID, this.dataSource))
        throw new AuthorizationFailedException("Inventory- getInventory");
      InventoryVO inventoryVO;
        CVDal cvdl = new CVDal(dataSource);

      try
      {
View Full Code Here

   * @exception   InventoryException
   */
    public void updateInventory(int individualID, InventoryVO inventoryVO) throws InventoryException,AuthorizationFailedException
    {
    if(!CVUtility.isModuleVisible("Inventory",individualID, this.dataSource))
      throw new AuthorizationFailedException("Inventory- updateInventory");
        CVDal cvdl = new CVDal(dataSource);
      try
      {
        // begin :: adding for fieldlevel rights...
        InventoryVO inventoryDBVO = getInventory(individualID,inventoryVO.getInventoryID());
View Full Code Here

   * @param   inventoryID
   */
  public void deleteInventory(int individualID, int inventoryID) throws InventoryException,AuthorizationFailedException
  {
    if(!CVUtility.isModuleVisible("Inventory",individualID, this.dataSource))
      throw new AuthorizationFailedException("Inventory- deleteInventory");
      CVDal cvdl = new CVDal(dataSource);
    try
    {

      cvdl.setSql("account.inventory.deleteinventory");
View Full Code Here

   */
  public int addNote(int individualID, NoteVO noteVO)throws AuthorizationFailedException
  {
    if (! CVUtility.isModuleVisible("Notes", individualID, this.dataSource))
    {
      throw new AuthorizationFailedException("[SyncFacadeEJB]: User cannot create new Notes.");
    }

    int newNoteID = 0;
    try
    {
View Full Code Here

    if (noteID != 0 && individualID != 0)
    {
      // check to see if the user has the privilege to delete this record
      if (! CVUtility.canPerformRecordOperation(individualID, "Notes", noteID, 10, this.dataSource))
      {
        throw new AuthorizationFailedException("Fail-Permision: User cannot delete this Note.");
      }

      CVDal cvdl = new CVDal(dataSource);
      cvdl.setSqlQuery("DELETE FROM note WHERE NoteID=? AND Owner=?");
      cvdl.setInt(1, noteID);
View Full Code Here

    // can create and order.
    boolean flagProposal = CVUtility.isModuleVisible("Proposals", userID, this.dataSource);
    boolean flagOrder = CVUtility.isModuleVisible("OrderHistory", userID, this.dataSource);

    if (!flagProposal && !flagOrder) {
      throw new AuthorizationFailedException(
          "We didn't have privilege for viewing either Proposal or Order module ");
    }

    OrderForm returnForm = null;
    try {
View Full Code Here

  public void deleteOrder(int orderId, int userID) throws NamingException,
      AuthorizationFailedException
  {
    if (!CVUtility.isModuleVisible("OrderHistory", userID, this.dataSource))
      throw new AuthorizationFailedException("Order- deleteOrder");
    try {
      InitialContext ic = CVUtility.getInitialContext();
      OrderLocalHome home = (OrderLocalHome) ic.lookup("local/Order");
      OrderLocal order = home.findByPrimaryKey(new OrderPK(orderId, this.dataSource));
      order.setDataSource(this.dataSource);
View Full Code Here

TOP

Related Classes of com.centraview.common.AuthorizationFailedException

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.