001/** 002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. 003 * 004 * Copyright (c) 2007 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:48:10 qcheng Exp $ 026 * 027 */ 028 029package com.sun.identity.xacml.context; 030 031import com.sun.identity.xacml.common.XACMLException; 032 033import java.util.List; 034 035/** 036 * The <code>Action</code> element specifies information about the 037 * action requested in the <code>Request</code> context by listing a 038 * sequence of <code>Attribute</code> elements associated with the 039 * action. 040 * <p> 041 * <pre> 042 * <xs:element name="Action" type="xacml-context:ActionType"/> 043 * <xs:complexType name="ActionType"> 044 * <xs:sequence> 045 * <xs:element ref="xacml-context:Attribute" minOccurs="0" 046 * maxOccurs="unbounded"/> 047 * <xs:sequence> 048 * <xs:complexType> 049 * </pre> 050 *@supported.all.api 051 */ 052public interface Action { 053 /** 054 * Returns zero to many <code>Attribute</code> elements of this object 055 * If no attributes and present, empty <code>List</code> will be returned. 056 * 057 * @return the <code>Attribute</code> elements of this object 058 */ 059 public List getAttributes(); 060 061 /** 062 * Sets the <code>Attribute</code> elements of this object 063 * 064 * @param attributes <code>Attribute</code> elements of this object 065 * attributes could be an empty <code>List</code>, if no attributes 066 * are present. 067 * 068 * @exception XACMLException if the object is immutable 069 * An object is considered <code>immutable</code> if <code> 070 * makeImmutable()</code> has been invoked on it. It can 071 * be determined by calling <code>isMutable</code> on the object. 072 */ 073 public void setAttributes(List attributes) throws XACMLException; 074 075 /** 076 * Returns a <code>String</code> representation of this object 077 * @param includeNSPrefix Determines whether or not the namespace qualifier 078 * is prepended to the Element when converted 079 * @param declareNS Determines whether or not the namespace is declared 080 * within the Element. 081 * @return a string representation of this object 082 * @exception XACMLException if conversion fails for any reason 083 */ 084 public String toXMLString(boolean includeNSPrefix, boolean declareNS) 085 throws XACMLException; 086 087 /** 088 * Returns a string representation of this object 089 * 090 * @return a string representation of this object 091 * @exception XACMLException if conversion fails for any reason 092 */ 093 public String toXMLString() throws XACMLException; 094 095 /** 096 * Makes the object immutable 097 */ 098 public void makeImmutable(); 099 100 /** 101 * Checks if the object is mutable 102 * 103 * @return <code>true</code> if the object is mutable, 104 * <code>false</code> otherwise 105 */ 106 public boolean isMutable(); 107 108}
Copyright © 2010-2017, ForgeRock All Rights Reserved.