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.ctx;
20  
21  import javax.xml.namespace.QName;
22  
23  import org.opensaml.xacml.XACMLConstants;
24  import org.opensaml.xacml.XACMLObject;
25  
26  /** XACML context StatusCode schema type. */
27  public interface StatusCodeType extends XACMLObject {
28  
29      /** Local name of the StatusCode element. */
30      public static final String DEFAULT_ELEMENT_LOCAL_NAME = "StatusCode";
31  
32      /** Default element name. */
33      public static final QName DEFAULT_ELEMENT_NAME = new QName(XACMLConstants.XACML20CTX_NS,
34              DEFAULT_ELEMENT_LOCAL_NAME, XACMLConstants.XACMLCONTEXT_PREFIX);
35  
36      /** Local name of the XSI type. */
37      public static final String TYPE_LOCAL_NAME = "StatusCodeType";
38  
39      /** QName of the XSI type XACML20. */
40      public static final QName TYPE_NAME = new QName(XACMLConstants.XACML20CTX_NS, TYPE_LOCAL_NAME,
41              XACMLConstants.XACMLCONTEXT_PREFIX);
42  
43      /** Name of the Value attribute. */
44      public static final String VALUE_ATTTRIB_NAME = "Value";
45  
46      /** Missing attribute status code. */
47      public static final String SC_MISSING_ATTRIBUTE = "urn:oasis:names:tc:xacml:1.0:status:missing-attribute";
48  
49      /** Ok status code. */
50      public static final String SC_OK = "urn:oasis:names:tc:xacml:1.0:status:ok";
51  
52      /** Processing error status code. */
53      public static final String SC_PROCESSING_ERROR = "urn:oasis:names:tc:xacml:1.0:status:processing-error";
54  
55      /** Syntax error status code. */
56      public static final String SC_SYNTAX_ERROR = "urn:oasis:names:tc:xacml:1.0:status:syntax-error";
57  
58      /**
59       * Gets the status code.
60       * 
61       * @return status code
62       */
63      public StatusCodeType getStatusCode();
64  
65      /**
66       * Sets the status code.
67       * 
68       * @param code status code
69       */
70      public void setStatusCode(StatusCodeType code);
71  
72      /**
73       * Gets the value of the attribute named value of the status element.
74       * 
75       * @return The value of the attribute named value for the status element
76       */
77      public String getValue();
78  
79      /**
80       * Sets the attribute named value of the status elements.
81       * 
82       * @param value The wanted value for the attribute value
83       */
84      public void setValue(String value);
85  }