use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class ValidationErrorHandler method getAttributeValuePair.
/**
* Method to get Values within AttributeValuePair as a java.util.Set
* If <class>unescape<class> is set to false, xml escaped chars will not
* be unescaped.
*/
public static Set getAttributeValuePair(Node node, boolean unescape) {
if (!node.getNodeName().equals(ATTR_VALUE_PAIR_NODE)) {
return (null);
}
Set retVal = new OrderedSet();
NodeList children = node.getChildNodes();
for (int i = 0; i < children.getLength(); i++) {
Node n = children.item(i);
if (n.getNodeName().equalsIgnoreCase(VALUE_NODE)) {
retVal.add(getValueOfValueNode(n, unescape));
}
}
return (retVal);
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class AMPropertySheet method getValues.
private static Set getValues(OptionList optList) {
OrderedSet values = null;
if ((optList != null) && (optList.size() > 0)) {
int sz = optList.size();
values = new OrderedSet();
for (int i = 0; i < sz; i++) {
Option opt = optList.get(i);
values.add(opt.getValue());
}
}
return (values == null) ? Collections.EMPTY_SET : values;
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class AMViewBeanBase method getValues.
/**
* Returns a set of string from a option list items.
*
* @param optList Option list that contains the items.
* @return Set of string from a option list items.
*/
public static Set getValues(OptionList optList) {
Set set = null;
if ((optList != null) && (optList.size() > 0)) {
int sz = optList.size();
set = new OrderedSet();
for (int i = 0; i < sz; i++) {
set.add(optList.getValue(i));
}
}
return (set != null) ? set : Collections.EMPTY_SET;
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingViewBean method prePopulateRequestHandlerListTable.
private void prePopulateRequestHandlerListTable(Map attributeValues) {
Set handlers = null;
if (attributeValues != null) {
handlers = new OrderedSet();
Set set = (Set) attributeValues.get(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
if ((set != null) && !set.isEmpty()) {
handlers.addAll(set);
}
} else {
handlers = (Set) removePageSessionAttribute(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST);
}
if (handlers != null) {
populateRequestHandlerListTable(handlers);
}
}
use of com.sun.identity.shared.datastruct.OrderedSet in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
resetButtonState(TBL_REQUEST_HANDLER_LIST_DELETE_BTN);
if (!tablePopulated) {
if (!isSubmitCycle()) {
AMServiceProfileModel model = (AMServiceProfileModel) getModel();
if (model != null) {
Set handlers = new OrderedSet();
handlers.addAll(model.getAttributeValues(SCSAML2SOAPBindingModelImpl.ATTRIBUTE_NAME_REQUEST_HANDLER_LIST));
populateRequestHandlerListTable(handlers);
}
}
}
if (!isInlineAlertMessageSet()) {
String flag = (String) getPageSessionAttribute(PAGE_MODIFIED);
if ((flag != null) && flag.equals("1")) {
setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
}
}
}
Aggregations