1 17 package org.alfresco.filesys.server.auth.acl; 18 19 import org.alfresco.config.ConfigElement; 20 21 24 public class ProtocolAccessControlParser extends AccessControlParser 25 { 26 29 public ProtocolAccessControlParser() 30 { 31 } 32 33 38 public String getType() 39 { 40 return "protocol"; 41 } 42 43 50 public AccessControl createAccessControl(ConfigElement params) throws ACLParseException 51 { 52 53 55 int access = parseAccessType(params); 56 57 59 String protos = params.getAttribute("type"); 60 if (protos == null || protos.length() == 0) 61 throw new ACLParseException("Protocol type not specified"); 62 63 65 if (ProtocolAccessControl.validateProtocolList(protos) == false) 66 throw new ACLParseException("Invalid protocol type"); 67 68 70 return new ProtocolAccessControl(protos, getType(), access); 71 } 72 } 73 | Popular Tags |