private void getData() { query = new QueryGenerator(); query.setQueryType(queryTypeList.get(0)); query.setReturnType("ObjectRef"); query.setParameter(new FindDocuments()); setView("XDS.b/ITI-18/" + query.getQueryType().getKey() + ".zul"); }
@Command @NotifyChange({"ITI_18", "view", "total", "timestamp"}) public void submit() { timestamp = System.currentTimeMillis(); DocumentConsumerVM.total = 0; if (query.getCompanyRegistry() == null) { logger.warn("Choice Registry ."); return; } boolean isBuild = query.build(); logger.info("RSQ is build : " + isBuild); if (isBuild) { // setView(""); CertificateDetails cert = CertificateDetails.getInstance(); cert.setCertificate(); ITI_18 = new Response_ITI_18(); ITI_18.clean(); consumer = new XDSDocumentConsumer(); QueryBuilder builder = null; NonBlockCallBack callback = new NonBlockCallBack(); OMElement response = consumer.registryStoredQuery(builder, callback); ITI_18.parser(callback.getContext()); DocumentConsumerVM.total = ((Response_ITI_18) ITI_18).getList().size(); logger.info(DocumentConsumerVM.total + ""); } StoredQuery p; if (query != null) { p = query.getParameter(); if (p != null) { List<OMElement> plist = p.getParameters(); if (plist != null) { plist.clear(); } } } System.gc(); timestamp = System.currentTimeMillis() - timestamp; timestamp /= 1000; }
@Command @NotifyChange({"view", "query"}) public void SelectQueryType() { // 選擇 Query 型態 String key = query.getQueryType().getKey(); logger.info(key); if (key.equals("FindDocuments")) { query.setParameter(new FindDocuments()); } if (key.equals("FindFolders")) { query.setParameter(new FindFolders()); } if (key.equals("FindSubmissionSets")) { query.setParameter(new FindSubmissionSets()); } if (key.equals("GetAll")) { query.setParameter(new GetAll()); } if (key.equals("GetDocuments")) { query.setParameter(new GetDocuments()); } if (key.equals("GetDocumentsAndAssociations")) { query.setParameter(new GetDocumentsAndAssociations()); } if (key.equals("GetFolders")) { query.setParameter(new GetFolders()); } if (key.equals("GetFolderAndContents")) { query.setParameter(new GetFolderAndContents()); } if (key.equals("GetFoldersForDocument")) { query.setParameter(new GetFoldersForDocument()); } if (key.equals("GetSubmissionSets")) { query.setParameter(new GetSubmissionSets()); } if (key.equals("GetSubmissionsetAndContents")) { query.setParameter(new GetSubmissionsetAndContents()); } if (key.equals("GetAssociations")) { query.setParameter(new GetAssociations()); } if (key.equals("GetRelatedDocuments")) { query.setParameter(new GetRelatedDocuments()); } setView("XDS.b/ITI-18/" + key + ".zul"); }