- Timestamp:
- 2016-07-22T19:41:17+12:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone3/src/java/org/greenstone/gsdl3/service/GS2Construct.java
r30616 r30617 67 67 private static final String DELETE_SERVICE = "DeleteCollection"; 68 68 private static final String RELOAD_SERVICE = "ReloadCollection"; 69 private static final String SET_METADATA_SERVICE = "SetMetadata"; 69 private static final String MODIFY_METADATA_SERVICE = "ModifyMetadata"; // set or remove metadata 70 70 71 71 72 // params used … … 128 129 param_list.appendChild(param); 129 130 } 130 else if (service.equals(ACTIVATE_SERVICE) || service.equals(IMPORT_SERVICE) || service.equals(BUILD_SERVICE) || service.equals(RELOAD_SERVICE) || service.equals(DELETE_SERVICE) || service.equals( SET_METADATA_SERVICE))131 else if (service.equals(ACTIVATE_SERVICE) || service.equals(IMPORT_SERVICE) || service.equals(BUILD_SERVICE) || service.equals(RELOAD_SERVICE) || service.equals(DELETE_SERVICE) || service.equals(MODIFY_METADATA_SERVICE)) 131 132 { 132 133 … … 185 186 { 186 187 // check permissions 187 188 if (!userHasCollectionEditPermissions(request)) { 188 189 Document result_doc = XMLConverter.newDOM(); 189 190 Element result = GSXML.createBasicResponse(result_doc, "processBuildAndActivateCollection"); 190 191 GSXML.addError(result, "This user does not have the required permissions to perform this action."); 191 192 return result; 192 } 193 193 } 194 195 194 196 waitUntilReady(request); 195 197 Element buildResponse = processBuildCollection(request); … … 305 307 } 306 308 307 protected Element processSetMetadata(Element request)309 protected Element processModifyMetadata(Element request) 308 310 { 309 311 if (!userHasCollectionEditPermissions(request)) { 310 312 Document result_doc = XMLConverter.newDOM(); 311 Element result = GSXML.createBasicResponse(result_doc, "process SetMetadata");313 Element result = GSXML.createBasicResponse(result_doc, "processModifyMetadata"); 312 314 GSXML.addError(result, "This user does not have the required permissions to perform this action."); 313 315 return result; 314 316 } 315 317 316 return runCommand(request, GS2PerlConstructor. SET_METADATA_SERVER);318 return runCommand(request, GS2PerlConstructor.MODIFY_METADATA_SERVER); 317 319 } 318 320 … … 619 621 e = this.desc_doc.createElement(GSXML.SERVICE_ELEM); 620 622 e.setAttribute(GSXML.TYPE_ATT, GSXML.SERVICE_TYPE_PROCESS); 621 e.setAttribute(GSXML.NAME_ATT, SET_METADATA_SERVICE);623 e.setAttribute(GSXML.NAME_ATT, MODIFY_METADATA_SERVICE); 622 624 this.short_service_info.appendChild(e); 623 625 … … 708 710 constructor.setManifestFile(this.site_home + File.separator + "collect" + File.separator + params.get(COL_PARAM) + File.separator + "manifests" + File.separator + "tempManifest.xml"); 709 711 } 710 else if (type == GS2PerlConstructor. SET_METADATA_SERVER) {712 else if (type == GS2PerlConstructor.MODIFY_METADATA_SERVER) { 711 713 StringBuffer querystring = new StringBuffer(); 712 714 … … 977 979 if (!coll_db.openDatabase(coll_db_file, SimpleCollectionDatabase.READ)) 978 980 { 979 logger.error("Could not open collection archives database. Database doesn't exist or else somebody is already using it?");981 logger.error("Could not open collection archives database. Database doesn't exist or else somebody's already using it?"); 980 982 return; 981 983 } … … 988 990 { 989 991 logger.error("Could not open collection archives database. Somebody already using this database!"); 992 return; 990 993 } 991 994 coll_db.setValue(oid, new_value);
Note:
See TracChangeset
for help on using the changeset viewer.