Package org.apache.webdav.lib.properties

Examples of org.apache.webdav.lib.properties.ResourceTypeProperty


                    } else {
                        workingResource.setGetContentLength(getContentLength);
                    }
                } else
                if (property.getLocalName().equals(RESOURCETYPE)) {
                    ResourceTypeProperty resourceType =
                        (ResourceTypeProperty) property;
                    if (itself) {
                        setResourceType(resourceType);
                    } else {
                        workingResource.setResourceType(resourceType);
View Full Code Here


                long length = currentResource.getGetContentLength();
                // getcontentlength
                longFormat[1] = new Long(length).toString();
                // resourcetype
                ResourceTypeProperty resourceTypeProperty =
                    currentResource.getResourceType();
                // getcontenttype
                String getContentType =
                    currentResource.getGetContentType();
                longFormat[2] = resourceTypeProperty.isCollection() ?
                    "COLLECTION" : getContentType ;
                Date date = new Date(currentResource.getGetLastModified());
                // getlastmodified
                // Save the dummy what if failed.
                longFormat[3] = (date == null) ? "-- -- ----" :
View Full Code Here

                  propFindMethod.getProperty("current-user-privilege-set");
        boolean readAccess = userPrivilege.hasReadAccess();
        boolean writeAccess = userPrivilege.hasWriteAccess();

  SPProperty p = propFindMethod.getProperty("resourcetype");
  ResourceTypeProperty resourceType = (ResourceTypeProperty)
      p.getPropertyHandle();

        LockdiscoveryProperty lockdiscoveryProp =
      (LockdiscoveryProperty)
       propFindMethod.getProperty("lockdiscovery");

        boolean readOnly=false;
        if (lockdiscoveryProp != null)  { //is being locked
      String userName = client.getCredentials().getUserName();
      if (lockdiscoveryProp.getLockToken(userName) == null)  {
        // is locked by others
        readOnly = true;
      }
        }


        if (! resourceType.isCollection())  {
              theSPResourceNode = new SPWebFile(client, resourceUrlPath);
        } else  {
        theSPResourceNode = new SPWebFolder(client, resourceUrlPath);
  }
View Full Code Here

                for (Enumeration properties =
                        propFind.getResponseProperties(href);
                     properties.hasMoreElements(); ) {

                    try {
                        ResourceTypeProperty property =
                            (ResourceTypeProperty) properties.nextElement();
                        addResource(href, property.isCollection());
                    } catch (ClassCastException exception) {
                    }
                }
            }
View Full Code Here

                    } else {
                        workingResource.setGetContentLength(getContentLength);
                    }
                } else
                if (property.getLocalName().equals(RESOURCETYPE)) {
                    ResourceTypeProperty resourceType =
                        (ResourceTypeProperty) property;
                    if (itself) {
                        setResourceType(resourceType);
                    } else {
                        workingResource.setResourceType(resourceType);
View Full Code Here

                long length = currentResource.getGetContentLength();
                // getcontentlength
                longFormat[1] = new Long(length).toString();
                // resourcetype
                ResourceTypeProperty resourceTypeProperty =
                    currentResource.getResourceType();
                // getcontenttype
                String getContentType =
                    currentResource.getGetContentType();
                longFormat[2] = resourceTypeProperty.isCollection() ?
                    "COLLECTION" : getContentType ;
                Date date = new Date(currentResource.getGetLastModified());
                // getlastmodified
                // Save the dummy what if failed.
                longFormat[3] = (date == null) ? "-- -- ----" :
View Full Code Here

        if (namespace != null && namespace.equals("DAV:")) {

            String localName = DOMUtils.getElementLocalName(element);

            if (ResourceTypeProperty.TAG_NAME.equals(localName)) {
                property = new ResourceTypeProperty(response, element);
            } else if (GetLastModifiedProperty.TAG_NAME.equals(localName)) {
                property = new GetLastModifiedProperty(response, element);
            } else if (CurrentUserPrivilegeSetProperty.TAG_NAME.equals
                       (localName)) {
                property =
View Full Code Here

                  propFindMethod.getProperty("current-user-privilege-set");
        boolean readAccess = userPrivilege.hasReadAccess();
        boolean writeAccess = userPrivilege.hasWriteAccess();

  SPProperty p = propFindMethod.getProperty("resourcetype");
  ResourceTypeProperty resourceType = (ResourceTypeProperty)
      p.getPropertyHandle();

        LockdiscoveryProperty lockdiscoveryProp =
      (LockdiscoveryProperty)
       propFindMethod.getProperty("lockdiscovery");

        boolean readOnly=false;
        if (lockdiscoveryProp != null)  { //is being locked
      String userName = client.getCredentials().getUserName();
      if (lockdiscoveryProp.getLockToken(userName) == null)  {
        // is locked by others
        readOnly = true;
      }
        }


        if (! resourceType.isCollection())  {
              theSPResourceNode = new SPWebFile(client, resourceUrlPath);
        } else  {
        theSPResourceNode = new SPWebFolder(client, resourceUrlPath);
  }
View Full Code Here

                for (Enumeration properties =
                        propFind.getResponseProperties(href);
                     properties.hasMoreElements(); ) {

                    try {
                        ResourceTypeProperty property =
                            (ResourceTypeProperty) properties.nextElement();
                        addResource(href, property.isCollection());
                    } catch (ClassCastException exception) {
                    }
                }
            }
View Full Code Here

                    } else {
                        workingResource.setGetContentLength(getContentLength);
                    }
                } else
                if (property.getLocalName().equals(RESOURCETYPE)) {
                    ResourceTypeProperty resourceType =
                        (ResourceTypeProperty) property;
                    if (itself) {
                        setResourceType(resourceType);
                    } else {
                        workingResource.setResourceType(resourceType);
View Full Code Here

TOP

Related Classes of org.apache.webdav.lib.properties.ResourceTypeProperty

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.