001/** 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved 005 * 006 * The contents of this file are subject to the terms 007 * of the Common Development and Distribution License 008 * (the License). You may not use this file except in 009 * compliance with the License. 010 * 011 * You can obtain a copy of the License at 012 * https://opensso.dev.java.net/public/CDDLv1.0.html or 013 * opensso/legal/CDDLv1.0.txt 014 * See the License for the specific language governing 015 * permission and limitations under the License. 016 * 017 * When distributing Covered Code, include this CDDL 018 * Header Notice in each file and include the License file 019 * at opensso/legal/CDDLv1.0.txt. 020 * If applicable, add the following below the CDDL Header, 021 * with the fields enclosed by brackets [] replaced by 022 * your own identifying information: 023 * "Portions Copyrighted [year] [name of copyright owner]" 024 * 025 * $Id: Action.java,v 1.2 2008/06/25 05:47:39 qcheng Exp $ 026 * 027 */ 028 029package com.sun.identity.saml2.assertion; 030 031import com.sun.identity.saml2.common.SAML2Exception; 032 033/** 034 * The <code>Action</code> element specifies an action on the specified 035 * resource for which permission is sought. Its type is <code>ActionType</code>. 036 * <p> 037 * <pre> 038 * <complexType name="ActionType"> 039 * <simpleContent> 040 * <extension base="<http://www.w3.org/2001/XMLSchema>string"> 041 * <attribute name="Namespace" use="required" 042 * type="{http://www.w3.org/2001/XMLSchema}anyURI" /> 043 * </extension> 044 * </simpleContent> 045 * </complexType> 046 * </pre> 047 *@supported.all.api 048 */ 049public interface Action { 050 051 /** 052 * Makes the object immutable. 053 */ 054 public void makeImmutable(); 055 056 /** 057 * Returns the mutability of the object. 058 * 059 * @return <code>true</code> if the object is mutable; <code>false</code> 060 * otherwise. 061 */ 062 public boolean isMutable(); 063 064 /** 065 * Returns the value of the <code>Action</code>. 066 * 067 * @return the value of this <code>Action</code>. 068 * @see #setValue(String) 069 */ 070 public String getValue(); 071 072 /** 073 * Sets the value of this <code>Action</code>. 074 * 075 * @param value new <code>Action</code>. 076 * @throws SAML2Exception if the object is immutable. 077 * @see #getValue() 078 */ 079 public void setValue(String value) 080 throws SAML2Exception; 081 082 /** 083 * Returns the value of <code>Namespace</code> attribute. 084 * 085 * @return the value of <code>Namespace</code> attribute. 086 * @see #setNamespace(String) 087 */ 088 public String getNamespace(); 089 090 /** 091 * Sets the value of the <code>Namespace</code> attribute. 092 * 093 * @param value new value of <code>Namespace</code> attribute. 094 * @throws SAML2Exception if the object is immutable. 095 * @see #getNamespace() 096 */ 097 public void setNamespace(String value) 098 throws SAML2Exception; 099 100 /** 101 * Returns a String representation of the element. 102 * 103 * @return A string containing the valid XML for this element. 104 * By default name space name is prepended to the element name. 105 * @throws SAML2Exception if the object does not conform to the schema. 106 */ 107 public java.lang.String toXMLString() 108 throws SAML2Exception; 109 110 /** 111 * Returns a String representation of the element. 112 * 113 * @param includeNS Determines whether or not the namespace qualifier is 114 * prepended to the Element when converted 115 * @param declareNS Determines whether or not the namespace is declared 116 * within the Element. 117 * @return A string containing the valid XML for this element 118 * @throws SAML2Exception if the object does not conform to the schema. 119 */ 120 public java.lang.String toXMLString(boolean includeNS, boolean declareNS) 121 throws SAML2Exception; 122 123} 124