Example #1
0
  /**
   * Returns collection of {@link ApplicationBean} objects. This method is used by Jasper report
   * designer to extract properties of application bean to help design a report.
   */
  public static java.util.Collection generateCollection() {
    java.util.Vector collection = new java.util.Vector();
    SysRegStatusBean bean = new SysRegStatusBean();
    collection.add(bean);
    return collection;
  }

  //      /** Passes from date and to date search criteria. */
  public void passParameter(SysRegManagementParamsBean params) {
    SysRegManagementParamsTO paramsTO =
        TypeConverters.BeanToTrasferObject(params, SysRegManagementParamsTO.class);

    List<SysRegStatusTO> statusViewTO =
        WSManager.getInstance().getAdministrative().getSysRegStatus(paramsTO);
    TypeConverters.TransferObjectListToBeanList(
        statusViewTO, SysRegStatusBean.class, (List) this.getStatusList());
  }
 public void loadYearList() {
   List<Integer> yearTO = WSManager.getInstance().getAdminService().getNepaliYear();
   getNepaliYears().clear();
   for (Integer year : yearTO) {
     if (year != null) {
       getNepaliYears().add(year);
     }
   }
 }
 public void search(RestrictionSearchParamsBean params) {
   searchResults.clear();
   TypeConverters.TransferObjectListToBeanList(
       WSManager.getInstance()
           .getSearchService()
           .searchRestrictions(
               TypeConverters.BeanToTrasferObject(params, RestrictionSearchParamsTO.class)),
       RestrictionSearchResultBean.class,
       (List) searchResults);
 }
Example #4
0
 /**
  * Opens document from the digital archive. This method will not check the local documents cache
  * before retrieving the document.
  *
  * @param Id The ID of the document to open.
  * @see #openDocument(java.lang.String, java.lang.String)
  */
 public static void openDocument(String Id) {
   if (Id != null) {
     DocumentBinaryTO documentBinary = WSManager.getInstance().getDigitalArchive().getDocument(Id);
     if (documentBinary != null) {
       FileUtility.openFile(documentBinary.getFileName());
     } else {
       throw new SOLAException(ClientMessage.SOURCE_NO_DOCUMENT);
     }
   }
 }
 /**
  * Saves the transaction into the database.
  *
  * @throws Exception
  */
 public List<ValidationResultBean> saveTransaction() {
   List<ValidationResultBean> result;
   TransactionUnitParcelsTO to =
       TypeConverters.BeanToTrasferObject(this, TransactionUnitParcelsTO.class);
   result =
       TypeConverters.TransferObjectListToBeanList(
           WSManager.getInstance().getCadastreService().saveUnitParcels(to),
           ValidationResultBean.class,
           null);
   return result;
 }
  /** Passes from date and to date search criteria. */
  public void passParameter(LodgementViewParamsBean params) {

    LodgementViewParamsTO paramsTO =
        TypeConverters.BeanToTrasferObject(params, LodgementViewParamsTO.class);

    List<MortgageStatsViewTO> mortgagestatsTO =
        WSManager.getInstance().getCaseManagementService().getMortgageStatsView(paramsTO);

    TypeConverters.TransferObjectListToBeanList(
        mortgagestatsTO, MortgageStatsBean.class, (List) mortgagestatsList);
  }
 /** Reloads transaction from the database. */
 public void reload() {
   TransactionUnitParcelsTO transactionTO =
       WSManager.getInstance()
           .getCadastreService()
           .getTransactionUnitParcels(this.getFromServiceId());
   TypeConverters.TransferObjectToBean(transactionTO, TransactionUnitParcelsBean.class, this);
   if (this.getUnitParcelGroup() == null) {
     this.setUnitParcelGroup(new UnitParcelGroupBean());
   } else {
     this.getUnitParcelGroup().getFilteredUnitParcelList();
   }
 }
Example #8
0
 /**
  * Creates digital archive document from the file in the remote folder.
  *
  * @param fileName The name of the file in the remote folder.
  */
 public static DocumentBean createDocumentFromServerFile(String fileName) {
   if (fileName != null && fileName.contains(".")) {
     DocumentTO document = new DocumentTO();
     document.setDescription("");
     document =
         WSManager.getInstance().getDigitalArchive().createDocumentFromServer(document, fileName);
     DocumentBean documentBean =
         TypeConverters.TransferObjectToBean(document, DocumentBean.class, null);
     return documentBean;
   }
   return null;
 }
Example #9
0
 /**
  * Creates digital archive document from the file in the local folder.
  *
  * @param file File object in the local folder.
  */
 public static DocumentBean createDocumentFromLocalFile(File file) {
   if (file != null && file.getName().contains(".")) {
     DocumentBinaryTO documentBinary = new DocumentBinaryTO();
     documentBinary.setDescription(file.getName());
     documentBinary.setFileName(file.getAbsolutePath());
     //            documentBinary.setBody(FileUtility.getFileBinary(file.getAbsolutePath()));
     documentBinary.setExtension(FileUtility.getFileExtension(file.getName()));
     DocumentTO document =
         WSManager.getInstance().getDigitalArchive().createDocument(documentBinary);
     DocumentBean documentBean =
         TypeConverters.TransferObjectToBean(document, DocumentBean.class, null);
     return documentBean;
   }
   return null;
 }
  private void btnSaveActionPerformed(
      java.awt.event.ActionEvent evt) { // GEN-FIRST:event_btnSaveActionPerformed
    // call save method.
    //        CadastreObjectSummaryTO cadTO=TypeConverters.BeanToTrasferObject(
    //                parcel, CadastreObjectSummaryTO.class);
    CadastreObjectTO cadTO = TypeConverters.BeanToTrasferObject(parcel, CadastreObjectTO.class);

    cadTO = WSManager.getInstance().getCadastreService().saveCadastreObject(cadTO);
    // converting back to bean again.
    parcel = TypeConverters.TransferObjectToBean(cadTO, CadastreObjectBean.class, parcel);

    try {
      search_Completed_Trigger.invoke(method_holder_object, new Object[] {parcel});
      this.dispose();
    } catch (Exception e) {
      JOptionPane.showMessageDialog(this, e.getMessage());
    }
  } // GEN-LAST:event_btnSaveActionPerformed
Example #11
0
 public void loadRrrLocs(String locId) {
   TypeConverters.TransferObjectListToBeanList(
       WSManager.getInstance().getAdministrative().getRrrLocs(locId),
       RrrLocBean.class,
       (List) getRrrLocs());
 }
 public void saveCertificatePrint() {
   CertificatePrintTO to = TypeConverters.BeanToTrasferObject(this, CertificatePrintTO.class);
   to = WSManager.getInstance().getAdministrative().saveCertificatePrint(to);
   TypeConverters.TransferObjectToBean(to, CertificatePrintBean.class, this);
 }