View Javadoc

1   /*
2    * Copyright 2001-2004 The Apache Software Foundation.
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  package org.apache.neethi;
17  
18  import javax.xml.namespace.QName;
19  
20  /**
21   * Constants contains the set of Constants that are used throughout the Neethi2
22   * framework.
23   * 
24   */
25  public class Constants {
26  
27      public static final String ATTR_NAME = "Name";
28  
29      public static final String ATTR_ID = "Id";
30  
31      public static final String ATTR_WSP = "wsp";
32  
33      public static final String ATTR_WSU = "wsu";
34      
35      public static final String ATTR_URI = "URI";
36  
37      public static final String URI_POLICY_NS = "http://schemas.xmlsoap.org/ws/2004/09/policy";
38  
39      public static final String URI_WSU_NS = "http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
40  
41      public static final String ELEM_POLICY = "Policy";
42  
43      public static final String ELEM_EXACTLYONE = "ExactlyOne";
44  
45      public static final String ELEM_ALL = "All";
46  
47      public static final String ELEM_POLICY_REF = "PolicyReference";
48  
49      public static final short TYPE_POLICY = 0x1;
50  
51      public static final short TYPE_EXACTLYONE = 0x2;
52  
53      public static final short TYPE_ALL = 0x3;
54  
55      public static final short TYPE_POLICY_REF = 0x4;
56  
57      public static final short TYPE_ASSERTION = 0x5;
58  
59      public static final QName Q_ELEM_POLICY = new QName(
60              Constants.URI_POLICY_NS, Constants.ELEM_POLICY, Constants.ATTR_WSP);
61  
62      public static final QName Q_ELEM_OPTIONAL_ATTR = new QName(
63              Constants.URI_POLICY_NS, "Optional", Constants.ATTR_WSP);
64  }