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: SessionIndex.java,v 1.2 2008/06/25 05:47:58 qcheng Exp $ 026 * 027 * Portions Copyrighted 2016 ForgeRock AS. 028 */ 029 030 031package com.sun.identity.saml2.protocol; 032 033import com.fasterxml.jackson.annotation.JsonTypeInfo; 034import com.sun.identity.saml2.common.SAML2Exception; 035import com.sun.identity.saml2.protocol.impl.SessionIndexImpl; 036 037/** 038 * This class represents the <code>SessionIndex</code> element in 039 * SAML protocol schema. 040 * The <code>SessionIndex</code> element specifies a session index value 041 * of a authenticated principal. 042 * 043 * <pre> 044 * <element name="SessionIndex" type="{http://www.w3.org/2001/XMLSchema}string"/> 045 * </pre> 046 * 047 * @supported.all.api 048 */ 049 050@JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.CLASS, 051 defaultImpl = SessionIndexImpl.class) 052public interface SessionIndex { 053 054 /** 055 * Returns the <code>SessionIndex</code> value. 056 * 057 * @return A String value of the <code>SessionIndex</code> 058 * 059 */ 060 public java.lang.String getValue(); 061 062 /** 063 * Returns the <code>SessionIndex</code> in an XML document String format 064 * based on the <code>SessionIndex</code> schema described above. 065 * 066 * @return A XML String representing the <code>SessionIndex</code>. 067 * @throws SAML2Exception if some error occurs during conversion to 068 * <code>String</code>. 069 */ 070 public String toXMLString() throws SAML2Exception; 071 072 /** 073 * Returns the <code>SessionIndex</code> in an XML document String format 074 * based on the <code>SessionIndex</code> schema described above. 075 * @param includeNSPrefix Determines whether or not the namespace qualifier 076 * is prepended to the Element when converted 077 * 078 * @param declareNS Determines whether or not the namespace is declared 079 * within the Element. 080 * @return A XML String representing the <code>SessionIndex</code>. 081 * @throws SAML2Exception if some error occurs during conversion to 082 * <code>String</code>. 083 */ 084 public String toXMLString(boolean includeNSPrefix, boolean declareNS) 085 throws SAML2Exception; 086}