Examples of queryProperties()


Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

        IWebDavClient webdav = WebDavServerCache.getWebDavClient(rep.getLocation());
        if (webdav == null) {
            webdav = WebDavClientFactory.createClient(new URL(rep.getLocation()));
            WebDavServerCache.cacheWebDavClient(rep.getLocation(), webdav);
        }
        ResourceProperties props  = webdav.queryProperties(node.getFullPath());
        return new GuvnorMetadataProps(node.getName(),
                                      node.getGuvnorRepository().getLocation(),
                                      node.getFullPath(),
                                      props.getLastModifiedDate(),
                                      props.getRevision());
View Full Code Here

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

            // to choose resources. Therefore, we should have a cached repository connection
            // that is authenticated already. If not, something is really strange.
            assert(webdav != null);
            for (String oneResource:model.getResources()) {
                // Get the metadata properties
                ResourceProperties resprops = webdav.queryProperties(oneResource);
                if (resprops == null) {
                    throw new Exception("Null resource properties for " + oneResource); //$NON-NLS-1$
                }
                String contents = webdav.getResourceContents(oneResource);
                IPath targetLocation = new Path(model.getTargetLocation());
View Full Code Here

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

                }
            }
            if (ins != null) {
                selectedFile.setContents(ins, true, true, null);
                GuvnorMetadataUtils.markCurrentGuvnorResource(selectedFile);
                ResourceProperties resProps = client.queryProperties(props.getFullpath());
                GuvnorMetadataProps mdProps = GuvnorMetadataUtils.getGuvnorMetadata(selectedFile);
                mdProps.setVersion(resProps.getLastModifiedDate());
                mdProps.setRevision(resProps.getRevision());
                GuvnorMetadataUtils.setGuvnorMetadataProps(selectedFile.getFullPath(), mdProps);
            }
View Full Code Here

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

            if (client == null) {
                client = WebDavClientFactory.createClient(new URL(localProps.getRepository()));
                WebDavServerCache.cacheWebDavClient(localProps.getRepository(), client);
            }
            try {
                remoteProps = client.queryProperties(localProps.getFullpath());
            } catch (WebDavException wde) {
                if (wde.getErrorCode() != IResponse.SC_UNAUTHORIZED) {
                    // If not an authentication failure, we don't know what to do with it
                    throw wde;
                }
View Full Code Here

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

                    throw wde;
                }
                boolean retry = PlatformUtils.getInstance().
                                    authenticateForServer(localProps.getRepository(), client);
                if (retry) {
                    remoteProps = client.queryProperties(localProps.getFullpath());
                }
            }
        } catch (Exception e) {
            Activator.getDefault().writeLog(IStatus.ERROR, e.getMessage(), e);
        }
View Full Code Here

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

        IWebDavClient webdav = WebDavServerCache.getWebDavClient(rep.getLocation());
        if (webdav == null) {
            webdav = WebDavClientFactory.createClient(new URL(rep.getLocation()));
            WebDavServerCache.cacheWebDavClient(rep.getLocation(), webdav);
        }
        ResourceProperties props  = webdav.queryProperties(node.getFullPath());
        return new GuvnorMetadataProps(node.getName(),
                                      node.getGuvnorRepository().getLocation(),
                                      node.getFullPath(),
                                      props.getLastModifiedDate(),
                                      props.getRevision());
View Full Code Here

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

                    }
                }
            }
            if (res) {
                GuvnorMetadataUtils.markCurrentGuvnorResource(selectedFile);
                ResourceProperties resProps = client.queryProperties(fullPath);
                GuvnorMetadataProps mdProps =
                        new GuvnorMetadataProps(selectedFile.getName(),
                                               repLoc,
                                               fullPath, resProps.getLastModifiedDate(),
                                               resProps.getRevision());
View Full Code Here

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

                client = WebDavClientFactory.createClient(new URL(props.getRepository()));
                WebDavServerCache.cacheWebDavClient(props.getRepository(), client);
            }
            ResourceProperties remoteProps = null;
            try {
                remoteProps = client.queryProperties(props.getFullpath());
            } catch (WebDavException wde) {
                if (wde.getErrorCode() != IResponse.SC_UNAUTHORIZED) {
                    // If not an authentication failure, we don't know what to do with it
                    throw wde;
                }
View Full Code Here

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

                    throw wde;
                }
                boolean retry = PlatformUtils.getInstance().
                                    authenticateForServer(props.getRepository(), client);
                if (retry) {
                    remoteProps = client.queryProperties(props.getFullpath());
                }
            }
            if (remoteProps == null) {
                throw new Exception("Could not retrieve server version of " + props.getFullpath()); //$NON-NLS-1$
            }
View Full Code Here

Examples of org.guvnor.tools.utils.webdav.IWebDavClient.queryProperties()

            }
            if (proceed) {
                client.putResource(props.getFullpath(), selectedFile.getContents());
                GuvnorMetadataUtils.markCurrentGuvnorResource(selectedFile);
                ResourceProperties resProps = client.queryProperties(props.getFullpath());
                GuvnorMetadataProps mdProps = GuvnorMetadataUtils.getGuvnorMetadata(selectedFile);
                mdProps.setVersion(resProps.getLastModifiedDate());
                mdProps.setRevision(resProps.getRevision());
                GuvnorMetadataUtils.setGuvnorMetadataProps(selectedFile.getFullPath(), mdProps);
            }
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.