View Javadoc

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