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: Obligation.java,v 1.2 2008/06/25 05:48:13 qcheng 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>Obligation</code> element is a container of 
038 * one or more <code>AttributeAssignment</code>s issuded by 
039 * authorization authority.
040 * @supported.all.api
041 */
042public interface Obligation {
043
044    /* schema
045        <xs:element name="Obligation" type="xacml:ObligationType"/>
046        <xs:complexType name="ObligationType">
047            <xs:sequence>
048                <xs:element ref="xacml:AttributeAssignment" minOccurs="0" 
049                        maxOccurs="unbounded"/>
050            </xs:sequence>
051            <xs:attribute name="ObligationId" type="xs:anyURI" 
052                    use="required"/>
053            <xs:attribute name="FulfillOn" type="xacml:EffectType" 
054                    use="required"/>
055        </xs:complexType>
056    */
057
058    /**
059     * Returns the ObligationId of this <code>Obligation</code>
060     * @return the <code>URI</code> representing ObligationId of this 
061     * <code>Obligation</code>
062     */
063    public URI getObligationId();
064
065    /**
066     * Sets the ObligationId of the <code>Obligation</code>
067     * @param obligationId <code>URI</code> representing the ObligationId.
068     * @exception XACMLException if the object is immutable
069     */
070    public void setObligationId(URI obligationId) 
071            throws XACMLException;
072
073    /**
074     * Returns the FullFillOn effect type of this obligation
075     * @return the FullFillOn effect type of this obligation
076     */
077    public String getFulfillOn();
078
079    /**
080     * Sets the FullFillOn effect type of this obligation
081     * @param fulfillOn FullFillOn effect type of this obligation
082     */
083    public void setFulfillOn(String fulfillOn) 
084            throws XACMLException;
085
086
087
088    /**
089     * Returns XML elements corresponding to 
090     * <code>AttributeAssignment</code> elements for  this obligation.
091     *
092     * @return the XML elements corresponding to 
093     * <code>AttributeAssignment</code> elements for  this obligation.
094     */
095    public List getAttributeAssignments();
096
097    /**
098     * Sets XML elements corresponding to 
099     * <code>AttributeAssignment</code> elements for  this obligation.
100     *
101     * @param attributeAssignments XML elements corresponding to 
102     * <code>AttributeAssignment</code> elements for  this obligation.
103     */
104    public void setAttributeAssignments(List attributeAssignments) 
105            throws XACMLException;
106
107   /**
108    * Returns a string representation of this object
109    * @param includeNSPrefix Determines whether or not the namespace qualifier
110    *        is prepended to the Element when converted
111    * @param declareNS Determines whether or not the namespace is declared
112    *        within the Element.
113    * @return a string representation
114    * @exception XACMLException if conversion fails for any reason
115     */
116    public String toXMLString(boolean includeNSPrefix, boolean declareNS)
117            throws XACMLException;
118
119   /**
120    * Returns a string representation of this object
121    *
122    * @return a string representation
123    * @exception XACMLException if conversion fails for any reason
124    */
125    public String toXMLString() throws XACMLException;
126
127   /**
128    * Makes this object immutable
129    */
130    public void makeImmutable();
131
132   /**
133    * Checks if this object is mutable
134    *
135    * @return <code>true</code> if the object is mutable,
136    *         <code>false</code> otherwise
137    */
138    public boolean isMutable();
139    
140}




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.