/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: ProxySubject.java,v 1.2 2008/06/25 05:47:20 qcheng Exp $
*
*/
/**
* The <code>ProxySubject</code> class represents the identity of a proxy,
* the confirmation key and confirmation obligation the proxy must posess and
* demonstrate for authentication purpose.
*
* @supported.all.api
*/
/**
* Constructs a <code>ProxySubject</code> object from a
* <code>NameIdentifier</code> object and a
* <code>SubjectConfirmation</code> object.
*
* @param nameIdentifier <code>NameIdentifier</code> object.
* @param subjectConfirmation <code>SubjectConfirmation</code> object.
* @throws SAMLException if <code>nameIdentifier</code> and
* <code>SubjectConfirmation</code> are null;
*/
subjectConfirmation) throws SAMLException {
super(nameIdentifier, subjectConfirmation);
}
/**
* Checks for equality between this object and the <code>ProxySubject</code>
* passed down as parameter.
*
* @param subject <code>ProxySubject</code> to be checked
* @return true if the two are EXACTLY equal.
*/
}
/**
* Constructs a <code>ProxySubject</code> object from a
* <code>NameIdentifier</code> object.
*
* @param nameIdentifier <code>NameIdentifier</code> object.
* @throws SAMLException if <code>nameIdentifier</code> is null.
*/
super(nameIdentifier);
}
/**
* Constructs a <code>ProxySubject</code> object from a DOM Element.
* which has already been built into a DOM.
*
* @param subjectElement An Element representing DOM tree for
* <code>ProxySubject</code> object.
* @throws SAMLException if it could not process the
* Element properly, implying that there is an error in the
* sender or in the element definition.
*/
throws SAMLException {
int elementCount=0;
}
("nullInput")) ;
}
}
"invalidElement")) ;
}
if (length == 0 ) {
}
"emptyElement")) ;
}
// TODO: sequence is not checked as yet
for (int n=0; n < length; n++) {
continue;
}
elementCount++;
elementCount++;
} else {
+ "encountered.");
}
"invalidElement")) ;
}
}
if (elementCount > 2 ) {
+ "passed");
}
"moreElement")) ;
}
}
/**
* Constructs a <code>ProxySubject</code> object from a
* <code>SubjectConfirmation</code> object.
*
* @param subjectConfirmation <code>SubjectConfirmation</code> object to be
* added to the object.
* @throws SAMLException if <code>subjectConfirmation</code> is null.
*/
throws SAMLException {
super(subjectConfirmation);
}
/**
* Creates a String representation of the element.
*
* @return A string containing the valid XML for this element.
* By default name space name is prepended to the element name
* example <code><saml:Subject></code>
*/
// call toString() with includeNS true by default and declareNS false
return xml;
}
/**
* Creates a String representation of the <code><Subject></code>
* element.
*
* @param includeNS if true prepends all elements by their Namespace
* name example <code><saml:Subject></code>.
* @param declareNS if true includes the namespace within the
* generated XML.
* @return String containing the valid XML for this element.
*/
if (includeNS) {
}
if (declareNS) {
}
if (getNameIdentifier() != null ) {
}
if (getSubjectConfirmation() != null) {
}
}
}