Examples of IDavItem


Examples of com.nirima.jenkins.webdav.interfaces.IDavItem

            ArrayList<String> ifNoneMatchTags = getETags("If-None-Match");

            Date ifModifiedSince = getHeaderDate("If-Modified-Since");
            Date ifUnmodifiedSince = getHeaderDate("If-Unmodified-Since");

            IDavItem item = getRepo().getItem(getDavContext(), this.getPath());

            if (item == null) {
                this.getResponse().setStatus(HttpServletResponse.SC_NOT_FOUND);
                return;
            }
View Full Code Here

Examples of com.nirima.jenkins.webdav.interfaces.IDavItem

            boolean created = false;

            String path = this.getPath();
            if (path.endsWith("/")) path = path.substring(0, path.length() - 1);

            IDavItem item = repo.getItem(getDavContext(), this.getPath());

            if (item == null) {
                // The item couldn't be found, so it is a creation.
                // Make the item in the parent path.
                int lastSlash = path.lastIndexOf("/");
View Full Code Here

Examples of com.nirima.jenkins.webdav.interfaces.IDavItem

    @Override
    public void invoke(IDavContext ctxt) throws MethodException {
        try {
            IDavRepo repo = getRepo();

            IDavItem item = repo.getItem(getDavContext(), this.getPath());

            if (item != null) {
                // Remove this option for now
                item.delete(getDavContext());
            }

            this.getResponse().setStatus(HttpServletResponse.SC_NO_CONTENT);

        } catch (Exception e) {
View Full Code Here

Examples of com.nirima.jenkins.webdav.interfaces.IDavItem

    @Override
    public void invoke(IDavContext ctxt) throws MethodException {
        try {
            IDavRepo repo = getRepo();

            IDavItem sourceItem = repo.getItem(getDavContext(), this.getPath());

            if (sourceItem != null) {
                String destination = URLDecoder.decode(this.getRequest().getHeader("Destination"), "UTF-8");
                // Can only move a file within this repository
                if (destination.startsWith(this.getBaseUrl())) {
                    // Remove the prefix (leaving leading slash)
                    destination = destination.substring(this.getBaseUrl().length());
                    // Check if there is already another file at this destination
                    IDavItem destinationItem = null;
                    try {
                        destinationItem = repo.getItem(getDavContext(), destination);
                    } catch (Exception e) {
                        // Item does not exist
                    }
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.