View Javadoc

1   /*
2    * Copyright [2005] [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 org.opensaml.saml2.core;
18  
19  import javax.xml.namespace.QName;
20  
21  import org.opensaml.common.SAMLObject;
22  import org.opensaml.common.xml.SAMLConstants;
23  
24  /**
25   * SAML 2.0 Core Action.
26   */
27  public interface Action extends SAMLObject {
28  
29      /** Element local name. */
30      public static final String DEFAULT_ELEMENT_LOCAL_NAME = "Action";
31  
32      /** Default element name. */
33      public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20_NS, DEFAULT_ELEMENT_LOCAL_NAME,
34              SAMLConstants.SAML20_PREFIX);
35  
36      /** Local name of the XSI type. */
37      public static final String TYPE_LOCAL_NAME = "ActionType";
38  
39      /** QName of the XSI type. */
40      public static final QName TYPE_NAME = new QName(SAMLConstants.SAML20_NS, TYPE_LOCAL_NAME,
41              SAMLConstants.SAML20_PREFIX);
42  
43      /** Name of the Namespace attribute. */
44      public static final String NAMEPSACE_ATTRIB_NAME = "Namespace";
45  
46      /** Read/Write/Execute/Delete/Control action namespace. */
47      public static final String RWEDC_NS_URI = "urn:oasis:names:tc:SAML:1.0:action:rwedc";
48  
49      /** Read/Write/Execute/Delete/Control negation action namespace. */
50      public static final String RWEDC_NEGATION_NS_URI = "urn:oasis:names:tc:SAML:1.0:action:rwedc-negation";
51  
52      /** Get/Head/Put/Post action namespace. */
53      public static final String GHPP_NS_URI = "urn:oasis:names:tc:SAML:1.0:action:ghpp";
54  
55      /** UNIX file permission action namespace. */
56      public static final String UNIX_NS_URI = "urn:oasis:names:tc:SAML:1.0:action:unix";
57  
58      /** Read action. */
59      public static final String READ_ACTION = "Read";
60  
61      /** Write action. */
62      public static final String WRITE_ACTION = "Write";
63  
64      /** Execute action. */
65      public static final String EXECUTE_ACTION = "Execute";
66  
67      /** Delete action. */
68      public static final String DELETE_ACTION = "Delete";
69  
70      /** Control action. */
71      public static final String CONTROL_ACTION = "Control";
72  
73      /** Negated Read action. */
74      public static final String NEG_READ_ACTION = "~Read";
75  
76      /** Negated Write action. */
77      public static final String NEG_WRITE_ACTION = "~Write";
78  
79      /** Negated Execute action. */
80      public static final String NEG_EXECUTE_ACTION = "~Execute";
81  
82      /** Negated Delete action. */
83      public static final String NEG_DELETE_ACTION = "~Delete";
84  
85      /** Negated Control action. */
86      public static final String NEG_CONTROL_ACTION = "~Control";
87  
88      /** HTTP GET action. */
89      public static final String HTTP_GET_ACTION = "GET";
90  
91      /** HTTP HEAD action. */
92      public static final String HTTP_HEAD_ACTION = "HEAD";
93  
94      /** HTTP PUT action. */
95      public static final String HTTP_PUT_ACTION = "PUT";
96  
97      /** HTTP POST action. */
98      public static final String HTTP_POST_ACTION = "POST";
99  
100     /**
101      * Gets the namespace scope of the specified action.
102      * 
103      * @return the namespace scope of the specified action
104      */
105     public String getNamespace();
106 
107     /**
108      * Sets the namespace scope of the specified action.
109      * 
110      * @param newNamespace the namespace scope of the specified action
111      */
112     public void setNamespace(String newNamespace);
113 
114     /**
115      * Gets the URI of the action to be performed.
116      * 
117      * @return the URI of the action to be performed
118      */
119     public String getAction();
120 
121     /**
122      * Sets the URI of the action to be performed.
123      * 
124      * @param newAction the URI of the action to be performed
125      */
126     public void setAction(String newAction);
127 }