Package org.apache.jackrabbit.webdav.observation

Examples of org.apache.jackrabbit.webdav.observation.SubscriptionDiscovery


        if (id != null) {
            Header h = new CodedUrlHeader(ObservationConstants.HEADER_SUBSCRIPTIONID, id);
            httpResponse.setHeader(h.getHeaderName(), h.getHeaderValue());
        }
        DavPropertySet propSet = new DavPropertySet();
        propSet.add(new SubscriptionDiscovery(subscription));
        sendXmlResponse(propSet, SC_OK);
    }
View Full Code Here


     * @throws IOException
     * @see org.apache.jackrabbit.webdav.observation.ObservationDavServletResponse#sendSubscriptionResponse(org.apache.jackrabbit.webdav.observation.Subscription)
     */
    public void sendSubscriptionResponse(Subscription subscription) throws IOException {
  DavPropertySet propSet = new DavPropertySet();
        propSet.add(new SubscriptionDiscovery(subscription));
        sendXmlResponse(propSet, SC_OK);
    }
View Full Code Here

     * @param resource
     */
    public SubscriptionDiscovery getSubscriptionDiscovery(ObservationResource resource) {
        // todo: is it correct to return subscriptions made by another session?
        Subscription[] subsForResource = subscriptions.getByPath(resource.getLocator());
        return new SubscriptionDiscovery(subsForResource);
    }
View Full Code Here

        // set current lock information. If no lock is applied to this resource,
        // an empty lockdiscovery will be returned in the response.
        properties.add(new LockDiscovery(getLocks()));

        // observation resource
        SubscriptionDiscovery subsDiscovery = subsMgr.getSubscriptionDiscovery(this);
        properties.add(subsDiscovery);

        properties.add(new SupportedMethodSetProperty(getSupportedMethods().split(",\\s")));

  // DeltaV properties
View Full Code Here

                properties.add(new DefaultDavProperty<String>(JCR_ISMODIFIED, null, true));
            }
        }

        // observation resource
        SubscriptionDiscovery subsDiscovery = subsMgr.getSubscriptionDiscovery(this);
        properties.add(subsDiscovery);

        // TODO complete set of properties defined by RFC 3744
        Privilege[] allPrivs = new Privilege[] {PRIVILEGE_JCR_READ,
                                                PRIVILEGE_JCR_ADD_NODE,
View Full Code Here

     *
     * @param resource
     */
    public SubscriptionDiscovery getSubscriptionDiscovery(ObservationResource resource) {
        Subscription[] subsForResource = subscriptions.getByPath(resource.getLocator());
        return new SubscriptionDiscovery(subsForResource);
    }
View Full Code Here

     *
     * @param resource
     */
    public SubscriptionDiscovery getSubscriptionDiscovery(ObservationResource resource) {
        Subscription[] subsForResource = subscriptions.getByPath(resource.getLocator());
        return new SubscriptionDiscovery(subsForResource);
    }
View Full Code Here

        // set current lock information. If no lock is applied to this resource,
        // an empty lockdiscovery will be returned in the response.
        properties.add(new LockDiscovery(getLocks()));

        // observation resource
        SubscriptionDiscovery subsDiscovery = subsMgr.getSubscriptionDiscovery(this);
        properties.add(subsDiscovery);

        properties.add(new SupportedMethodSetProperty(getSupportedMethods().split(",\\s")));

  // DeltaV properties
View Full Code Here

        if (id != null) {
            Header h = new CodedUrlHeader(ObservationConstants.HEADER_SUBSCRIPTIONID, id);
            httpResponse.setHeader(h.getHeaderName(), h.getHeaderValue());
        }
        DavPropertySet propSet = new DavPropertySet();
        propSet.add(new SubscriptionDiscovery(subscription));
        sendXmlResponse(propSet, SC_OK);
    }
View Full Code Here

    private boolean buildDiscoveryFromRoot(Element root) {
        if (DomUtil.matches(root, XML_PROP, DavConstants.NAMESPACE) &&
            DomUtil.hasChildElement(root, SUBSCRIPTIONDISCOVERY.getName(), SUBSCRIPTIONDISCOVERY.getNamespace())) {
            Element sdElem = DomUtil.getChildElement(root, SUBSCRIPTIONDISCOVERY.getName(), SUBSCRIPTIONDISCOVERY.getNamespace());

            SubscriptionDiscovery sd = SubscriptionDiscovery.createFromXml(sdElem);
            if (!((List)sd.getValue()).isEmpty()) {
                subscriptionDiscovery = sd;
                return true;
            } else {
                log.debug("Missing 'subscription' elements in SUBSCRIBE response body. At least a single subscription must be present if SUBSCRIBE was successful.");
            }
View Full Code Here

TOP

Related Classes of org.apache.jackrabbit.webdav.observation.SubscriptionDiscovery

Copyright © 2018 www.massapicom. 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.