Package com.github.sardine.model

Examples of com.github.sardine.model.Principal


  }

  public Ace toModel()
  {
    Ace ace = new Ace();
    Principal p = new Principal();
    switch (principal.getPrincipalType())
    {
      case HREF:
        p.setHref(principal.getValue());
        break;
      case PROPERTY:
        p.setProperty(new Property());
        p.getProperty().setProperty(SardineUtil.createElement(principal.getProperty()));
        break;
      case KEY:
        if (DavPrincipal.KEY_ALL.equals(principal.getValue()))
        {
          p.setAll(new All());
        }
        else if (DavPrincipal.KEY_AUTHENTICATED.equals(principal.getValue()))
        {
          p.setAuthenticated(new Authenticated());
        }
        else if (DavPrincipal.KEY_UNAUTHENTICATED.equals(principal.getValue()))
        {
          p.setUnauthenticated(new Unauthenticated());
        }
        else if (DavPrincipal.KEY_SELF.equals(principal.getValue()))
        {
          p.setSelf(new Self());
        }
    }
    ace.setPrincipal(p);
    if (granted != null && granted.size() > 0)
    {
View Full Code Here

TOP

Related Classes of com.github.sardine.model.Principal

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.