SAMLPropertyXMLBuilder.java revision 4a2f0f0be43dfd4c1b490cbf3cc48b6ba6084b1c
/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2007 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: SAMLPropertyXMLBuilder.java,v 1.7 2009/10/15 00:02:02 asyhuang Exp $
*
*/
public class SAMLPropertyXMLBuilder
implements PropertyTemplate {
private static SAMLPropertyXMLBuilder instance =
new SAMLPropertyXMLBuilder ();
private boolean allAttributesReadonly;
static {
};
};
}
static {
};
};
}
static {
};
};
}
static {
};
};
}
static {
};
};
}
/**
* get samlv1.x Instance.
*
* @return samlv1.x instance
*/
public static SAMLPropertyXMLBuilder getInstance() {
return instance;
}
/**
* get samlv1.x Property.
*
* @param name
* @return samlv1.x Property
*/
}
/**
* get samlv1.x attribute names
*
* @param samlProperties a list of saml properties
* @return Set a set of attributes
*/
}
return attributes;
}
/**
* get samlv1.x Properties
*
* @param values a Map of attribute values
* @return List a list of SAMLProperty
*/
// for upgrade case, the old value won't have PARTNERNAME
// if we don't add PARTNERNAME to attributeNames, this function
// will return empty List.
if (attributeNames.containsAll (
p.getMandatoryAttributeNames ())))
{
}
}
return list;
}
/**
* get samlv1.x Properties
*
* @param samlProperties a Map of attribute values.
* @return a set of SAMLProperty.
*/
}
return attributes;
}
/**
* get samlv1.x trusted partner properties sheet, xml format.
*
* @param samlProperties a List of samlv1.x Properties
* @param edit boolean for readonly or editable
* @return String a string of saml trusted partner properties
*/
if (edit && !allAttributesReadonly) {
}
}
}
}
private void addAttributeForEachProfile (
SAMLProperty p,
) {
boolean isEmpty = true;
isEmpty = false;
) {
} else {
}
}
}
if (isEmpty) {
}
}
private void appendAttributes (
) {
p.getBindMethod ()));
}
}
}
}
}
return selected;
}
private void getAttributes (
) {
if (allAttributes.isEmpty ()) {
} else {
}
}
}
} else {
}
}
}
}
/**
* Set all all attribute values read only.
*
* @param flag true if all attribute values are read only.
*/
public void setAllAttributeReadOnly (boolean flag) {
}
}