1 17 18 package org.alfresco.repo.webdav.auth; 19 20 import org.alfresco.service.cmr.repository.NodeRef; 21 22 29 public class WebDAVUser 30 { 31 33 private String m_userName; 34 35 37 private String m_ticket; 38 39 41 private NodeRef m_homeNode; 42 43 50 public WebDAVUser(String user, String ticket, NodeRef homeNode) 51 { 52 m_userName = user; 53 m_ticket = ticket; 54 m_homeNode = homeNode; 55 } 56 57 62 public final String getUserName() 63 { 64 return m_userName; 65 } 66 67 72 public final String getTicket() 73 { 74 return m_ticket; 75 } 76 77 82 public final boolean hasHomeNode() 83 { 84 return m_homeNode != null ? true : false; 85 } 86 87 92 public final NodeRef getHomeNode() 93 { 94 return m_homeNode; 95 } 96 97 102 protected final void setHomeNode(NodeRef homeNode) 103 { 104 m_homeNode = homeNode; 105 } 106 107 112 public String toString() 113 { 114 StringBuilder str = new StringBuilder (); 115 116 str.append("["); 117 str.append(getUserName()); 118 str.append(":"); 119 str.append(getTicket()); 120 121 if ( hasHomeNode()) 122 { 123 str.append(",Home="); 124 str.append(getHomeNode()); 125 } 126 str.append("]"); 127 128 return str.toString(); 129 } 130 } 131 | Popular Tags |