- Timestamp:
- 2012-01-26T11:50:17+13:00 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/ArchiveIO.java
r24393 r24993 28 28 import org.greenstone.gsdl3.util.GSXML; 29 29 import org.greenstone.gsdl3.util.SimpleCollectionDatabase; 30 import org.greenstone.gsdl3.util.UserContext; 30 31 31 32 import org.w3c.dom.Element; … … 108 109 result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS); 109 110 110 String lang = request.getAttribute(GSXML.LANG_ATT); 111 String uid = request.getAttribute(GSXML.USER_ID_ATT); 111 UserContext userContext = new UserContext(request); 112 112 113 113 // Get the parameters of the request … … 123 123 String collection = (String) params.get(GSXML.COLLECTION_ATT); 124 124 125 String filePath = _GSDM.archiveGetDocumentFilePath(oid, collection, lang, uid);125 String filePath = _GSDM.archiveGetDocumentFilePath(oid, collection, userContext); 126 126 127 127 Element metadataList = this.doc.createElement(GSXML.METADATA_ELEM + GSXML.LIST_MODIFIER); … … 139 139 result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS); 140 140 141 String lang = request.getAttribute(GSXML.LANG_ATT); 142 String uid = request.getAttribute(GSXML.USER_ID_ATT); 141 UserContext userContext = new UserContext(request); 143 142 144 143 // Get the parameters of the request … … 154 153 String collection = (String) params.get(GSXML.COLLECTION_ATT); 155 154 156 String oid = _GSDM.archiveGetSourceFileOID(srcFile, collection, lang, uid);155 String oid = _GSDM.archiveGetSourceFileOID(srcFile, collection, userContext); 157 156 if(_GSDM.checkError(result, ARCHIVE_GET_SOURCE_FILE_OID)) 158 157 { … … 174 173 result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS); 175 174 176 String lang = request.getAttribute(GSXML.LANG_ATT); 177 String uid = request.getAttribute(GSXML.USER_ID_ATT); 175 UserContext userContext = new UserContext(request); 178 176 179 177 // Get the parameters of the request … … 189 187 String collection = (String) params.get(GSXML.COLLECTION_ATT); 190 188 191 boolean exists = _GSDM.archiveCheckDocumentOrSectionExists(oid, collection, lang, uid);189 boolean exists = _GSDM.archiveCheckDocumentOrSectionExists(oid, collection, userContext); 192 190 if(_GSDM.checkError(result, ARCHIVE_CHECK_DOCUMENT_OR_SECTION_EXISTS)) 193 191 { … … 207 205 result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS); 208 206 209 String lang = request.getAttribute(GSXML.LANG_ATT); 210 String uid = request.getAttribute(GSXML.USER_ID_ATT); 207 UserContext userContext = new UserContext(request); 211 208 212 209 // Get the parameters of the request … … 255 252 } 256 253 257 _GSDM.archiveWriteEntryToDatabase(oid, collection, info, lang, uid);254 _GSDM.archiveWriteEntryToDatabase(oid, collection, info, userContext); 258 255 _GSDM.checkError(result, ARCHIVE_WRITE_ENTRY_TO_DATABASE); 259 256 … … 268 265 result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS); 269 266 270 String lang = request.getAttribute(GSXML.LANG_ATT); 271 String uid = request.getAttribute(GSXML.USER_ID_ATT); 267 UserContext userContext = new UserContext(request); 272 268 273 269 // Get the parameters of the request … … 299 295 } 300 296 301 _GSDM.archiveRemoveEntryFromDatabase(oid, collection, lang, uid);297 _GSDM.archiveRemoveEntryFromDatabase(oid, collection, userContext); 302 298 _GSDM.checkError(result, ARCHIVE_REMOVE_ENTRY_FROM_DATABASE); 303 299 … … 312 308 result.setAttribute(GSXML.TYPE_ATT, GSXML.REQUEST_TYPE_PROCESS); 313 309 314 String lang = request.getAttribute(GSXML.LANG_ATT); 315 String uid = request.getAttribute(GSXML.USER_ID_ATT); 310 UserContext userContext = new UserContext(request); 316 311 317 312 // Get the parameters of the request … … 327 322 String collection = (String) params.get(GSXML.COLLECTION_ATT); 328 323 329 ArrayList<String> assocFiles = _GSDM.archiveGetAssociatedImportFiles(oid, collection, lang, uid);324 ArrayList<String> assocFiles = _GSDM.archiveGetAssociatedImportFiles(oid, collection, userContext); 330 325 if(_GSDM.checkError(result, ARCHIVE_GET_ASSOCIATED_IMPORT_FILES)) 331 326 {
Note:
See TracChangeset
for help on using the changeset viewer.