Skip to content

Commit eef6bb3

Browse files
SR20290919SR20290919
authored andcommitted
removed commented code
1 parent 95be768 commit eef6bb3

2 files changed

Lines changed: 0 additions & 93 deletions

File tree

src/main/java/com/iemr/common/service/kmfilemanager/KMFileManagerServiceImpl.java

Lines changed: 0 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -125,77 +125,6 @@ public String addKMFile(String request) throws IOException, NoSuchAlgorithmExcep
125125
return kmFileManagers.toString();
126126
}
127127

128-
// private ArrayList<KMFileManager> addKMFile(Iterable<KMFileManager> kmFileManagers)
129-
// throws IOException, NoSuchAlgorithmException {
130-
// ArrayList<KMFileManager> savedFileManagers = new ArrayList<KMFileManager>();
131-
// FileOutputStream newFile = null;
132-
// FileInputStream fis = null;
133-
// try
134-
// {
135-
// for (KMFileManager kmFileManager : kmFileManagers) {
136-
// if (kmFileManager.getFileName() != null && kmFileManager.getProviderServiceMapID() != null
137-
// && kmFileManager.getFileContent() != null) {
138-
// kmFileManager.setFileName(kmFileManager.getFileName().replace("`", "").replace("'", "").replace("$", "")
139-
// .replace("\\", "").replace("/", "").replace("~", "").replace("`", "").replace("!", "")
140-
// .replace("@", "").replace("#", "").replace("$", "").replace("%", "").replace("^", "")
141-
// .replace("&", "").replace("*", "").replace("(", "").replace(")", "").replace("{", "")
142-
// .replace("}", "").replace("[", "").replace("]", "").replace("|", "").replace("\\", "")
143-
// .replace(":", "").replace(";", "").replace("-", "").replace("_", "").replace("+", "")
144-
// .replace("=", "").replace("\"", "").replace("'", ""));
145-
// String tempFilePath = ConfigProperties.getPropertyByName("tempFilePath");
146-
// newFile = new FileOutputStream(tempFilePath + "/" + kmFileManager.getFileName());
147-
// newFile.write(Base64.getDecoder().decode(kmFileManager.getFileContent()));
148-
// newFile.flush();
149-
// newFile.close();
150-
// fis = new FileInputStream(tempFilePath + "/" + kmFileManager.getFileName());
151-
// String checksum = DigestUtils.md5DigestAsHex(fis);
152-
// fis.close();
153-
// logger.info("File is " + kmFileManager.getFileName());
154-
// logger.info("File size is " + new File(tempFilePath + "/" + kmFileManager.getFileName()).length());
155-
// logger.info("File checksum is " + checksum);
156-
// logger.info("File checksum length is " + checksum.length());
157-
// kmFileManager.setFileCheckSum(checksum);
158-
// kmFileManager.setKmUploadStatus(KM_UPLOADSTATUS_PENDING);
159-
// String version = getFileVersion(kmFileManager);
160-
// kmFileManager.setVersionNo(version);
161-
// String documentPath = kmFileManager.getProviderServiceMapID() + "/";
162-
// if (kmFileManager.getCategoryID() != null) {
163-
// documentPath += kmFileManager.getCategoryID() + "/";
164-
// }
165-
// if (kmFileManager.getSubCategoryID() != null) {
166-
// documentPath += kmFileManager.getSubCategoryID() + "/";
167-
// }
168-
// if (kmFileManager.getVanID() != null)
169-
// documentPath += kmFileManager.getVanID() + "/";
170-
//
171-
// documentPath += version + "/";
172-
// documentPath += kmFileManager.getFileName();
173-
// kmFileManager.setKmUploadStatus(KM_UPLOADSTATUS_STARTED);
174-
// String uuid = kmService.createDocument(documentPath, tempFilePath + "/" + kmFileManager.getFileName());
175-
// if (uuid != null) {
176-
// kmFileManager.setKmUploadStatus(KM_UPLOADSTATUS_COMPLETED);
177-
// kmFileManager.setFileUID(uuid);
178-
// savedFileManagers.add(kmFileManagerRepository.save(kmFileManager));
179-
// if (kmFileManager.getSubCategoryID() != null) {
180-
// updateSubcategoryFilePath(kmFileManager);
181-
// }
182-
// }
183-
// }
184-
// }
185-
// }
186-
// catch(Exception e)
187-
// {
188-
// logger.error("error " + e.getMessage());
189-
// }
190-
// finally
191-
// {
192-
// if(newFile !=null)
193-
// newFile.close();
194-
// if(fis !=null)
195-
// fis.close();
196-
// }
197-
// return savedFileManagers;
198-
// }
199128

200129
private ArrayList<KMFileManager> addKMFile(Iterable<KMFileManager> kmFileManagers)
201130
throws IOException, NoSuchAlgorithmException {

src/main/java/com/iemr/common/service/services/CommonServiceImpl.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -134,28 +134,6 @@ public Iterable<CategoryDetails> getCategories() {
134134
return categoriesList;
135135
}
136136

137-
// @Override
138-
// public Iterable<SubCategoryDetails> getSubCategories(String request) throws IEMRException, JsonMappingException, JsonProcessingException {
139-
// ObjectMapper objectMapper = new ObjectMapper();
140-
// SubCategoryDetails subCategoryDetails = objectMapper.readValue(request, SubCategoryDetails.class);
141-
// List<SubCategoryDetails> subCategoriesList = new ArrayList<SubCategoryDetails>();
142-
// ArrayList<Object[]> lists = subCategoryRepository.findByCategoryID(subCategoryDetails.getCategoryID());
143-
// for (Object[] objects : lists) {
144-
// if (objects != null && objects.length > 1) {
145-
// String SubCatFilePath = (String) objects[2];
146-
// String fileUIDAsURI = null;
147-
// String fileNameWithExtension = null;
148-
// if(SubCatFilePath!=null) {
149-
// fileUIDAsURI=getFilePath(SubCatFilePath);
150-
// List<Object[]> fileNameList = kmFileManagerRepository.getFileNameByUID(SubCatFilePath);
151-
// Object[] fileobjects = fileNameList.get(0);
152-
// fileNameWithExtension= (String)fileobjects[0]+ (String) fileobjects[1];
153-
// }
154-
// subCategoriesList.add(new SubCategoryDetails((Integer) objects[0], (String) objects[1], SubCatFilePath, fileUIDAsURI, fileNameWithExtension));
155-
// }
156-
// }
157-
// return subCategoriesList;
158-
// }
159137

160138
//newChange
161139
@Override

0 commit comments

Comments
 (0)