use of com.sun.web.ui.view.editablelist.CCEditableList in project OpenAM by OpenRock.
the class AMPropertySheet method restoreStateData.
/**
* Automates the restoring of store data in some children. This is required
* for some special children such as <code>CCAddRemvoe</code>.
*
* @throws ModelControlException if cannot get model of property sheet.
*/
public void restoreStateData(Collection participatingChildren) throws ModelControlException {
ViewBean parent = getParentViewBean();
String[] names = parent == null ? null : parent.getChildNames();
if ((names != null) && (names.length > 0)) {
for (int i = 0; i < names.length; i++) {
String name = names[i];
if (participatingChildren.contains(name)) {
View child = parent.getChild(name);
if (CCAddRemove.class.isInstance(child)) {
((CCAddRemove) child).restoreStateData();
} else if (CCUnOrderedList.class.isInstance(child)) {
((CCUnOrderedList) child).restoreStateData();
} else if (CCMapList.class.isInstance(child)) {
((CCMapList) child).restoreStateData();
} else if (CCEditableList.class.isInstance(child)) {
((CCEditableList) child).restoreStateData();
} else if (CCOrderedList.class.isInstance(child)) {
((CCOrderedList) child).restoreStateData();
} else if (CCActionTable.class.isInstance(child)) {
((CCActionTable) child).restoreStateData();
}
}
}
}
}
use of com.sun.web.ui.view.editablelist.CCEditableList in project OpenAM by OpenRock.
the class CreateSAML2MetaDataViewBean method getWorkflowParamMap.
private Map getWorkflowParamMap(String realm, CreateMetaDataModel model) throws AMConsoleException {
Map map = new HashMap();
boolean hasRole = false;
hasRole |= addStringToMap(map, MetaTemplateParameters.P_IDP, "tfidentityprovider", realm);
addStringToMap(map, MetaTemplateParameters.P_IDP_S_CERT, "tfidpscertalias");
addStringToMap(map, MetaTemplateParameters.P_IDP_E_CERT, "tfidpecertalias");
hasRole |= addStringToMap(map, MetaTemplateParameters.P_SP, "tfserviceprovider", realm);
addStringToMap(map, MetaTemplateParameters.P_SP_S_CERT, "tfspscertalias");
addStringToMap(map, MetaTemplateParameters.P_SP_E_CERT, "tfspecertalias");
if ((protocol.equals(PROTO_SAMLv2))) {
hasRole |= addStringToMap(map, MetaTemplateParameters.P_ATTR_QUERY_PROVIDER, "tfattrqueryprovider", realm);
addStringToMap(map, MetaTemplateParameters.P_ATTR_QUERY_PROVIDER_S_CERT, "tfattrqscertalias");
addStringToMap(map, MetaTemplateParameters.P_ATTR_QUERY_PROVIDER_E_CERT, "tfattrqecertalias");
hasRole |= addStringToMap(map, MetaTemplateParameters.P_ATTR_AUTHORITY, "tfattrauthority", realm);
addStringToMap(map, MetaTemplateParameters.P_ATTR_AUTHORITY_S_CERT, "tfattrascertalias");
addStringToMap(map, MetaTemplateParameters.P_ATTR_AUTHORITY_E_CERT, "tfattraecertalias");
hasRole |= addStringToMap(map, MetaTemplateParameters.P_AUTHN_AUTHORITY, "tfauthnauthority", realm);
addStringToMap(map, MetaTemplateParameters.P_AUTHN_AUTHORITY_S_CERT, "tfauthnascertalias");
addStringToMap(map, MetaTemplateParameters.P_AUTHN_AUTHORITY_E_CERT, "tfauthnaecertalias");
hasRole |= addStringToMap(map, MetaTemplateParameters.P_PEP, "tfxacmlpep", realm);
addStringToMap(map, MetaTemplateParameters.P_PEP_S_CERT, "tfxacmlpepscertalias");
addStringToMap(map, MetaTemplateParameters.P_PEP_E_CERT, "tfxacmlpepecertalias");
hasRole |= addStringToMap(map, MetaTemplateParameters.P_PDP, "tfxacmlpdp", realm);
addStringToMap(map, MetaTemplateParameters.P_PDP_S_CERT, "tfxacmlpdpscertalias");
addStringToMap(map, MetaTemplateParameters.P_PDP_E_CERT, "tfxacmlpdpecertalias");
boolean bAffiliation = addStringToMap(map, MetaTemplateParameters.P_AFFILIATION, "tfaffiliation", realm);
hasRole |= bAffiliation;
addStringToMap(map, MetaTemplateParameters.P_AFFI_S_CERT, "tfaffiscertalias");
addStringToMap(map, MetaTemplateParameters.P_AFFI_E_CERT, "tfaffiecertalias");
String owner = this.getDisplayFieldStringValue(MetaTemplateParameters.P_AFFI_OWNERID);
if (owner != null && owner.length() > 0) {
addStringToMap(map, MetaTemplateParameters.P_AFFI_OWNERID, "affiOwnerID");
} else if (bAffiliation) {
throw new AMConsoleException(model.getLocalizedString("samlv2.create.provider.missing.affiliation.owner"));
}
CCEditableList eList = (CCEditableList) getChild(AFFI_MEMBERS);
eList.restoreStateData();
Set affiMembers = getValues(eList.getModel().getOptionList());
if ((affiMembers != null) && !affiMembers.isEmpty()) {
List list = new ArrayList();
list.addAll(affiMembers);
map.put(MetaTemplateParameters.P_AFFI_MEMBERS, list);
} else if (bAffiliation) {
throw new AMConsoleException(model.getLocalizedString("samlv2.create.provider.missing.affiliation.members"));
}
} else if (protocol.equals(PROTO_IDFF)) {
boolean bAffiliation = addStringToMap(map, MetaTemplateParameters.P_AFFILIATION, "tfaffiliation", realm);
hasRole |= bAffiliation;
addStringToMap(map, MetaTemplateParameters.P_AFFI_S_CERT, "tfaffiscertalias");
addStringToMap(map, MetaTemplateParameters.P_AFFI_E_CERT, "tfaffiecertalias");
String owner = this.getDisplayFieldStringValue(MetaTemplateParameters.P_AFFI_OWNERID);
if (owner != null && owner.length() > 0) {
addStringToMap(map, MetaTemplateParameters.P_AFFI_OWNERID, "affiOwnerID");
} else if (bAffiliation) {
throw new AMConsoleException(model.getLocalizedString("samlv2.create.provider.missing.affiliation.owner"));
}
CCEditableList eList = (CCEditableList) getChild(AFFI_MEMBERS);
eList.restoreStateData();
Set affiMembers = getValues(eList.getModel().getOptionList());
if ((affiMembers != null) && !affiMembers.isEmpty()) {
List list = new ArrayList();
list.addAll(affiMembers);
map.put(MetaTemplateParameters.P_AFFI_MEMBERS, list);
} else if (bAffiliation) {
throw new AMConsoleException(model.getLocalizedString("samlv2.create.provider.missing.affiliation.members"));
}
}
if (!hasRole) {
throw new AMConsoleException(model.getLocalizedString("samlv2.create.provider.missing.roles"));
}
return map;
}
Aggregations