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: Condition.java,v 1.2 2008/06/25 05:47:32 qcheng Exp $
026 *
027 */
028
029package com.sun.identity.saml.assertion;
030
031/**
032 *This is an abstract class which servers as an extension point for new 
033 *conditions.  This is one of the element within the <code>Conditions</code> 
034 *object.  Extension elements based on this class MUST use xsi:type attribute 
035 *to indicate the derived type.
036 *
037 *@supported.all.api
038 */
039
040public abstract class Condition {
041
042
043    /**
044     * The Condition is invalid.
045     */
046    public static int INVALID = -1;
047
048    /**
049     * The Condition is indeterminate.
050     */
051    public static int INDETERMINATE = 0;
052
053    /**
054     * The Condition is valid.
055     */
056    public static int VALID = 1;
057
058    /**  
059     * Returns a String representation of the
060     * <code>&lt;saml:Conditions&gt;</code> element.
061     *
062     * @param IncludeNS Determines whether or not the namespace qualifier is 
063     *        prepended to the Element when converted
064     * @param DeclareNS Determines whether or not the namespace is declared 
065     *        within the Element.
066     * @return A string containing the valid XML for this element
067    */                       
068    public abstract String toString(boolean IncludeNS, boolean DeclareNS) ;
069
070    /** 
071     * Evaluates this condition 
072     * An abstract method which can be implemented by any condition extending
073     * this Condition object, to provide means of evaluating the condition.
074     *
075     * @return evaluation state.
076     */
077    public abstract int  evaluate() ;
078
079}
080




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.