"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/com/openkm/extension/servlet/ZohoServlet.java" between
OpenKM-document-management-system-6.3.10.tar.gz and OpenKM-document-management-system-6.3.11.tar.gz

About: OpenKM (Knowledge Management) is a document management system that allows easy management of documents, users, roles and finding your enterprise documents and records. Community version (source code).

ZohoServlet.java  (OpenKM-document-management-system-6.3.10):ZohoServlet.java  (OpenKM-document-management-system-6.3.11)
skipping to change at line 138 skipping to change at line 138
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_Repository), throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_Repository),
e.getMessage()); e.getMessage());
} catch (DatabaseException e) { } catch (DatabaseException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_Database), throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_Database),
e.getMessage()); e.getMessage());
} catch (IOException e) { } catch (IOException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_IO), e.getMessage()); throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_IO), e.getMessage());
} } catch (LockException e) {
log.error(e.getMessage(), e);
throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKMZohoService
, ErrorCode.CAUSE_Lock), e.getMessage());
}
log.debug("getZohoWriterUrl: {}", result); log.debug("getZohoWriterUrl: {}", result);
return result; return result;
} }
@Override @Override
public Map<String, String> getZohoSheetUrl(String uuid, String lang) thro ws OKMException { public Map<String, String> getZohoSheetUrl(String uuid, String lang) thro ws OKMException {
log.debug("getZohoSheetUrl({}, {})", uuid, lang); log.debug("getZohoSheetUrl({}, {})", uuid, lang);
updateSessionManager(); updateSessionManager();
Map<String, String> result = new HashMap<String, String>(); Map<String, String> result = new HashMap<String, String>();
skipping to change at line 171 skipping to change at line 174
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_Repository), throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_Repository),
e.getMessage()); e.getMessage());
} catch (DatabaseException e) { } catch (DatabaseException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_Database), throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_Database),
e.getMessage()); e.getMessage());
} catch (IOException e) { } catch (IOException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_IO), e.getMessage()); throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKM ZohoService, ErrorCode.CAUSE_IO), e.getMessage());
} } catch (LockException e) {
log.error(e.getMessage(), e);
throw new OKMException(ErrorCode.get(ErrorCode.ORIGIN_OKMZohoService
, ErrorCode.CAUSE_Lock), e.getMessage());
}
log.debug("getZohoSheetUrl: {}", result); log.debug("getZohoSheetUrl: {}", result);
return result; return result;
} }
@Override @Override
public void closeZohoWriter(String id) { public void closeZohoWriter(String id) {
log.debug("closeZohoWriter({})", id); log.debug("closeZohoWriter({})", id);
try { try {
ZohoTokenDAO.delete(id); ZohoTokenDAO.delete(id);
} catch (DatabaseException e) { } catch (DatabaseException e) {
log.error(e.getMessage(), e); log.error(e.getMessage(), e);
} }
log.debug("closeZohoWriter: void"); log.debug("closeZohoWriter: void");
} }
/** /**
* * sendToZoho
*/ */
private Map<String, String> sendToZoho(String zohoUrl, String nodeUuid, S tring lang) throws PathNotFoundException, private Map<String, String> sendToZoho(String zohoUrl, String nodeUuid, S tring lang) throws PathNotFoundException,
AccessDeniedException, RepositoryException, DatabaseExcep tion, IOException, OKMException { AccessDeniedException, RepositoryException, DatabaseExcep tion, IOException, OKMException, LockException {
Map<String, String> result = new HashMap<String, String>(); Map<String, String> result = new HashMap<String, String>();
File tmp = null; File tmp = null;
try { try {
String path = OKMRepository.getInstance().getNodePath(nul l, nodeUuid); String path = OKMRepository.getInstance().getNodePath(nul l, nodeUuid);
String fileName = PathUtils.getName(path); String fileName = PathUtils.getName(path);
tmp = File.createTempFile("okm", ".tmp"); tmp = File.createTempFile("okm", ".tmp");
InputStream is = OKMDocument.getInstance().getContent(nul l, path, false); InputStream is = OKMDocument.getInstance().getContent(nul l, path, false);
Document doc = OKMDocument.getInstance().getProperties(nu ll, path); Document doc = OKMDocument.getInstance().getProperties(nu ll, path);
FileOutputStream fos = new FileOutputStream(tmp); FileOutputStream fos = new FileOutputStream(tmp);
 End of changes. 4 change blocks. 
4 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)