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: Obligations.java,v 1.3 2008/11/10 22:57:05 veiming Exp $ 026 * 027 */ 028 029package com.sun.identity.xacml.policy; 030 031import com.sun.identity.xacml.common.XACMLException; 032 033import java.net.URI; 034import java.util.List; 035 036/** 037 * The <code>Obligations</code> element is a container of 038 * one or more <code>Obligation</code>s issuded by 039 * authorization authority. 040 * @supported.all.api 041 */ 042public interface Obligations { 043 044 /* schema 045 <xs:element name="Obligations" type="xacml:ObligationsType"/> 046 <xs:complexType name="ObligationsType"> 047 <xs:sequence> 048 <xs:element ref="xacml:Obligation" maxOccurs="unbounded"/> 049 </xs:sequence> 050 </xs:complexType> 051 */ 052 053 public static final String OBLIGATIONS_ELEMENT = "Obligations"; 054 055 /** 056 * Returns the <code>Obligation</code> objects set in this 057 * <code>Obligations</code> 058 * @return the <code>Obligation</code> objects set in this 059 * <code>Obligations</code> 060 */ 061 public List getObligations(); 062 063 /** 064 * Sets the <code>Obligation</code> objects of this 065 * <code>Obligations</code> 066 * @param obligations the <code>Obligation</code> objects to set in this 067 * <code>Obligations</code> 068 */ 069 public void setObligations(List obligations) throws XACMLException; 070 071 public void addObligation(Obligation obligation) throws XACMLException; 072 073 /** 074 * Returns a string representation of this object 075 * @param includeNSPrefix Determines whether or not the namespace qualifier 076 * is prepended to the Element when converted 077 * @param declareNS Determines whether or not the namespace is declared 078 * within the Element. 079 * @return a string representation 080 * @exception XACMLException if conversion fails for any reason 081 */ 082 public String toXMLString(boolean includeNSPrefix, boolean declareNS) 083 throws XACMLException; 084 085 /** 086 * Returns a string representation of this object 087 * 088 * @return a string representation 089 * @exception XACMLException if conversion fails for any reason 090 */ 091 public String toXMLString() throws XACMLException; 092 093 /** 094 * Makes this object immutable 095 */ 096 public void makeImmutable(); 097 098 /** 099 * Checks if this object is mutable 100 * 101 * @return <code>true</code> if the object is mutable, 102 * <code>false</code> otherwise 103 */ 104 public boolean isMutable(); 105 106}