"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "src/main/java/com/openkm/module/db/DbDocumentModule.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).

DbDocumentModule.java  (OpenKM-document-management-system-6.3.10):DbDocumentModule.java  (OpenKM-document-management-system-6.3.11)
skipping to change at line 486 skipping to change at line 486
if (token != null) { if (token != null) {
PrincipalUtils.setAuthentication(oldAuth); PrincipalUtils.setAuthentication(oldAuth);
} }
} }
log.debug("setProperties: void"); log.debug("setProperties: void");
} }
@Override @Override
public InputStream getContent(String token, String docId, boolean checkou t) throws PathNotFoundException, AccessDeniedException, public InputStream getContent(String token, String docId, boolean checkou t) throws PathNotFoundException, AccessDeniedException,
RepositoryException, IOException, DatabaseException { RepositoryException, IOException, DatabaseException, Lock Exception {
log.debug("getContent({}, {}, {})", token, docId, checkout); log.debug("getContent({}, {}, {})", token, docId, checkout);
return getContent(token, docId, checkout, true); return getContent(token, docId, checkout, true);
} }
/** /**
* Retrieve the content input stream from a document * Retrieve the content input stream from a document
* *
* @param token Authorization token. * @param token Authorization token.
* @param docId Path of the document to get the content or its UUID. * @param docId Path of the document to get the content or its UUID.
* @param checkout If the content is retrieved due to a checkout or not. * @param checkout If the content is retrieved due to a checkout or not.
* @param extendedSecurity If the extended security DOWNLOAD permission s hould be evaluated. * @param extendedSecurity If the extended security DOWNLOAD permission s hould be evaluated.
* This is used to enable the document preview. * This is used to enable the document preview.
*/ */
public InputStream getContent(String token, String docId, boolean checkou t, boolean extendedSecurity) throws PathNotFoundException, public InputStream getContent(String token, String docId, boolean checkou t, boolean extendedSecurity) throws PathNotFoundException,
AccessDeniedException, IOException, DatabaseException { AccessDeniedException, IOException, DatabaseException, Lo ckException {
log.debug("getContent({}, {}, {}, {})", token, docId, checkout, e xtendedSecurity); log.debug("getContent({}, {}, {}, {})", token, docId, checkout, e xtendedSecurity);
long begin = System.currentTimeMillis(); long begin = System.currentTimeMillis();
InputStream is;
Authentication auth = null, oldAuth = null; Authentication auth = null, oldAuth = null;
InputStream is;
String docPath; String docPath;
String docUuid; String docUuid;
try { try {
if (token == null) { if (token == null) {
auth = PrincipalUtils.getAuthentication(); auth = PrincipalUtils.getAuthentication();
} else { } else {
oldAuth = PrincipalUtils.getAuthentication(); oldAuth = PrincipalUtils.getAuthentication();
auth = PrincipalUtils.getAuthenticationByToken(to ken); auth = PrincipalUtils.getAuthenticationByToken(to ken);
} }
 End of changes. 4 change blocks. 
3 lines changed or deleted 3 lines changed or added

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