Examples of MkColMethod


Examples of org.apache.webdav.lib.methods.MkcolMethod

      Value userExists = getResource(new URIValue(domain+roles+rolename), credentials);
      if ( userExists == NullValue.NULL || userExists != null ) {
            throw new RoleExistsException(new ErrorMessage("roleExists", new String[] { rolename }));
        } else {
          URI roleUri = new URIValue(roles+rolename);
          MkcolMethod mkcolMethod = new MkcolMethod(domain+roleUri.toString());
          mkcolMethod.setDoAuthentication(true);
            HttpState httpState = new HttpState();
            httpState.setCredentials(null, host, credentials);
            int state = mkcolMethod.execute(httpState, new HttpConnection(host, port, protocol));
            if ( state == HttpStatus.SC_CREATED ) {
              return roleUri;
            }
            return null;
        }
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.