View Javadoc

1   /*
2   Copyright 2008 Members of the EGEE Collaboration.
3   Copyright 2008 University Corporation for Advanced Internet Development,
4   Inc.
5   
6   Licensed under the Apache License, Version 2.0 (the "License");
7   you may not use this file except in compliance with the License.
8   You may obtain a copy of the License at
9   
10      http://www.apache.org/licenses/LICENSE-2.0
11  
12  Unless required by applicable law or agreed to in writing, software
13  distributed under the License is distributed on an "AS IS" BASIS,
14  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  See the License for the specific language governing permissions and
16  limitations under the License.
17   */
18  
19  package org.opensaml.xacml.profile.saml;
20  
21  import javax.xml.namespace.QName;
22  
23  import org.opensaml.saml2.core.Statement;
24  import org.opensaml.xacml.XACMLObject;
25  import org.opensaml.xacml.ctx.RequestType;
26  import org.opensaml.xacml.ctx.ResponseType;
27  
28  /** A SAML XACML profile XACMLAuthzDecisionStatement schema type. */
29  public interface XACMLAuthzDecisionStatementType extends Statement, XACMLObject {
30  
31      /** Element local name. */
32      public static final String DEFAULT_ELEMENT_LOCAL_NAME = "XACMLAuthzDecisionStatement";
33  
34      /** Default element name for XACML 1.0. */
35      public static final QName DEFAULT_ELEMENT_NAME_XACML10 = new QName(SAMLProfileConstants.SAML20XACML10_NS,
36              DEFAULT_ELEMENT_LOCAL_NAME, SAMLProfileConstants.SAML20XACMLASSERTION_PREFIX);
37  
38      /** Default element name for XACML 1.1. */
39      public static final QName DEFAULT_ELEMENT_NAME_XACML11 = new QName(SAMLProfileConstants.SAML20XACML1_1_NS,
40              DEFAULT_ELEMENT_LOCAL_NAME, SAMLProfileConstants.SAML20XACMLASSERTION_PREFIX);
41  
42      /** Default element name for XACML 2.0. */
43      public static final QName DEFAULT_ELEMENT_NAME_XACML20 = new QName(SAMLProfileConstants.SAML20XACML20_NS,
44              DEFAULT_ELEMENT_LOCAL_NAME, SAMLProfileConstants.SAML20XACMLASSERTION_PREFIX);
45  
46      /** Default element name for XACML 3.0. */
47      public static final QName DEFAULT_ELEMENT_NAME_XACML30 = new QName(SAMLProfileConstants.SAML20XACML30_NS,
48              DEFAULT_ELEMENT_LOCAL_NAME, SAMLProfileConstants.SAML20XACMLASSERTION_PREFIX);
49  
50      /** Local name of the XSI type. */
51      public static final String TYPE_LOCAL_NAME = "XACMLAuthzDecisionStatementType";
52  
53      /** QName of the XSI type.XACML1.0. */
54      public static final QName TYPE_NAME_XACML10 = new QName(SAMLProfileConstants.SAML20XACML10_NS, TYPE_LOCAL_NAME,
55              SAMLProfileConstants.SAML20XACMLASSERTION_PREFIX);
56  
57      /** QName of the XSI type.XACML1.1. */
58      public static final QName TYPE_NAME_XACML11 = new QName(SAMLProfileConstants.SAML20XACML1_1_NS, TYPE_LOCAL_NAME,
59              SAMLProfileConstants.SAML20XACMLASSERTION_PREFIX);
60  
61      /** QName of the XSI type.XACML2.0. */
62      public static final QName TYPE_NAME_XACML20 = new QName(SAMLProfileConstants.SAML20XACML20_NS, TYPE_LOCAL_NAME,
63              SAMLProfileConstants.SAML20XACMLASSERTION_PREFIX);
64  
65      /** QName of the XSI type.XACML3.0 . */
66      public static final QName TYPE_NAME_XACML30 = new QName(SAMLProfileConstants.SAML20XACML30_NS, TYPE_LOCAL_NAME,
67              SAMLProfileConstants.SAML20XACMLASSERTION_PREFIX);
68  
69      /**
70       * Get's the {@link RequestType} from the <code>XACMLAuthzDecisionStatement</code>.
71       * 
72       * @return the {@link RequestType} inside the <code>XACMLAuthzDecisionStatement</code>
73       */
74      public RequestType getRequest();
75  
76      /**
77       * Get's the {@link ResponseType} from the <code>XACMLAuthzDecisionStatement</code>.
78       * 
79       * @return the {@link ResponseType} inside the <code>XACMLAuthzDecisionStatement</code>
80       */
81      public ResponseType getResponse();
82  
83      /**
84       * Sets a {@link ResponseType} to the <code>XACMLAuthzDecisionStatement</code>.
85       * 
86       * @param request {@link RequestType}
87       */
88      public void setRequest(RequestType request);
89  
90      /**
91       * Sets a {@link ResponseType} to the <code>XACMLAuthzDecisionStatement</code>.
92       * 
93       * @param response {@link ResponseType}
94       */
95      public void setResponse(ResponseType response);
96  }