1 /* 2 * Licensed to the University Corporation for Advanced Internet Development, 3 * Inc. (UCAID) under one or more contributor license agreements. See the 4 * NOTICE file distributed with this work for additional information regarding 5 * copyright ownership. The UCAID licenses this file to You under the Apache 6 * License, Version 2.0 (the "License"); you may not use this file except in 7 * compliance with the License. You may obtain a copy of the License at 8 * 9 * http://www.apache.org/licenses/LICENSE-2.0 10 * 11 * Unless required by applicable law or agreed to in writing, software 12 * distributed under the License is distributed on an "AS IS" BASIS, 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 14 * See the License for the specific language governing permissions and 15 * limitations under the License. 16 */ 17 18 package edu.internet2.middleware.shibboleth.common.xmlobject; 19 20 import java.util.regex.Pattern; 21 22 import javax.xml.namespace.QName; 23 24 import org.opensaml.xml.schema.XSBooleanValue; 25 import org.opensaml.xml.schema.XSString; 26 import org.opensaml.xml.validation.ValidatingXMLObject; 27 28 import edu.internet2.middleware.shibboleth.common.ShibbolethConstants; 29 30 /** 31 * Shibboleth SAML metadata extension Scope element. 32 */ 33 public interface ShibbolethMetadataScope extends ValidatingXMLObject, XSString { 34 35 /** Element local name. */ 36 public static final String DEFAULT_ELEMENT_LOCAL_NAME = "Scope"; 37 38 /** Default element name. */ 39 public static final QName DEFAULT_ELEMENT_NAME = new QName(ShibbolethConstants.SHIB_MDEXT10_NS, 40 DEFAULT_ELEMENT_LOCAL_NAME, ShibbolethConstants.SHIB_MDEXT10_PREFIX); 41 42 /** regexp attribute name. */ 43 public static final String REGEXP_ATTRIB_NAME = "regexp"; 44 45 /** 46 * Get the regexp attribute value. 47 * 48 * @return the regexp attribute value 49 */ 50 public Boolean getRegexp(); 51 52 /** 53 * Get the regexp attribute value. 54 * 55 * @return the regexp attribute value 56 */ 57 public XSBooleanValue getRegexpXSBoolean(); 58 59 /** 60 * Set the regexp attribute value. 61 * 62 * @param newRegexp the new regexp attribute value 63 */ 64 public void setRegexp(Boolean newRegexp); 65 66 /** 67 * Set the regexp attribute value. 68 * 69 * @param newRegexp the new regexp attribute value 70 */ 71 public void setRegexp(XSBooleanValue newRegexp); 72 73 /** 74 * Gets the match pattern used to evaluate if a scope matches the scope criteria given by this extension. If regular 75 * expressions are not used in the scope criteria then this pattern must simply perform a direct match of the 76 * string. 77 * 78 * @return match pattern used to evaluate if a scope matches the scope criteria 79 */ 80 public Pattern getMatchPattern(); 81 }