Package org.fao.geonet.services.resources.handlers

Examples of org.fao.geonet.services.resources.handlers.IResourceRemoveHandler.onDelete()


        if ("".equals(filename))
            throw new OperationAbortedEx("Empty filename. Unable to delete resource.");

        // Remove the file and update the file upload/downloads tables
        IResourceRemoveHandler removeHook = (IResourceRemoveHandler) context.getApplicationContext().getBean("resourceRemoveHandler");
        removeHook.onDelete(context, request, Integer.parseInt(id), filename, access);

        // Set parameter and process metadata to remove reference to the uploaded file
        request.getParameterMap().put("name", new String[]{filename});
        request.getParameterMap().put("protocol", new String[]{"WWW:DOWNLOAD-1.0-http--download"});
View Full Code Here


    String fname = elem.getText();

        // Remove the file and update the file upload/downloads tables
        IResourceRemoveHandler removeHook = (IResourceRemoveHandler) context.getApplicationContext().getBean("resourceRemoveHandler");
        removeHook.onDelete(context, params, Integer.parseInt(id), fname, access);

    // update the metadata
    params.addContent(new Element("_" + ref));
    Element version = params.getChild("version");
    version.setText((Integer.parseInt(version.getText()) + 1+ "");
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.