Package com.aesthete.swingobjects.fw.common

Examples of com.aesthete.swingobjects.fw.common.SwingObjectsException


            userDefaultProps=new java.util.Properties();
                userDefaultProps.load(new FileInputStream(userDefaultPropsFile));
          }

        }catch(Exception e){
            throw new SwingObjectsException("error.severe.SF001",ErrorSeverity.SEVERE,
                    "Error while parsing error.properties",e,Properties.class);
        }
    }
View Full Code Here


  public static void setAndSaveUserDefaults(String key,String params, File fileloc){
      try {
      userDefaultProps.setProperty(key, params);
      userDefaultProps.store(new FileOutputStream(fileloc), null);
    } catch (Exception e) {
      new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE,
          null,e, Properties.class);
    }
  }
View Full Code Here

        Object obj = null;
        try {
            Class clz = Class.forName(className);
            obj=ConstructorUtils.invokeConstructor(clz, paramObjects);
        catch (Exception e) {
            throw new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE,
                    "Error while getting "+className, e, BaseFactory.class);
        }
        return obj;
    }
View Full Code Here

//            component.putClientProperty(PropertyKey.BORDER,null);
        }

    }
    public static void setCommonErrorMessage(RequestScopeObject scopeObj) {
        scopeObj.setErrorObj(new SwingObjectsException("error.op.common", ErrorSeverity.ERROR, null,CommonUI.class));
    }
View Full Code Here

  public void openExcel(String fileLoc ,int worksheetNo) throws SwingObjectsException{
    try {
      openExcel(new FileInputStream(new File(fileLoc)), worksheetNo);
    } catch (FileNotFoundException e) {
      throw new SwingObjectsException("error.common.closefile", ErrorSeverity.ERROR, null, e, ExcelHelper.class,fileLoc);
    }
  }
View Full Code Here

  public void openExcel(String fileLoc ,String worksheetName) throws SwingObjectsException{
    try {
      openExcel(new FileInputStream(new File(fileLoc)), worksheetName);

    } catch (FileNotFoundException e) {
      throw new SwingObjectsException("error.common.closefile", ErrorSeverity.ERROR, null, e, ExcelHelper.class,fileLoc);
    }
  }
View Full Code Here

    try {
      POIFSFileSystem fs = new POIFSFileSystem(inputStream);
      workBook = new HSSFWorkbook(fs);
      sheet = workBook.getSheetAt(worksheetNo);
    }catch(FileNotFoundException e) {
      throw new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE, null, e, ExcelHelper.class);
    }catch (Exception e) {
      throw new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE, null, e, ExcelHelper.class);
    }
  }
View Full Code Here

    try {
      POIFSFileSystem fs = new POIFSFileSystem(inputStream);
      workBook = new HSSFWorkbook(fs);
      sheet = workBook.getSheet(worksheetName);
    } catch (Exception e) {
      throw new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE, null, e, ExcelHelper.class);
    }
  }
View Full Code Here

    FileOutputStream fos=null;
    try {
      fos=new FileOutputStream(fileLoc);
      workBook.write(fos);
    } catch(FileNotFoundException e){
      throw new SwingObjectsException("error.common.closefile", ErrorSeverity.ERROR, null,
          e, ExcelHelper.class,FileHelper.getFileNameFromPath(fileLoc));
    }catch (Exception e) {
      throw new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE, null, e, ExcelHelper.class);
    }finally{
      if(fos!=null){
        try {
          fos.close();
        } catch (Exception e) {
          throw new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE, null, e, ExcelHelper.class);
        }
      }
    }
  }
View Full Code Here

        cell.setCellType(HSSFCell.CELL_TYPE_NUMERIC);
        cell.setCellValue(Double.parseDouble(data));
        break;
      }
    } catch (Exception e) {
      throw new SwingObjectsException("error.severe.SF001", ErrorSeverity.SEVERE, null, e, ExcelHelper.class);
    }
  }
View Full Code Here

TOP

Related Classes of com.aesthete.swingobjects.fw.common.SwingObjectsException

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.