use of com.sun.identity.console.service.model.SMDescriptionData in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionEditViewBean method getCurrentData.
protected SMDescriptionData getCurrentData() {
int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
SMDiscoEntryData data = (SMDiscoEntryData) getPageSessionAttribute(PG_SESSION_DISCO_ENTRY_DATA);
return (SMDescriptionData) data.descData.get(currentIdx);
}
use of com.sun.identity.console.service.model.SMDescriptionData in project OpenAM by OpenRock.
the class SMDiscoveryBootstrapRefOffViewBeanBase method populateDescriptionsTable.
private void populateDescriptionsTable(List descData) {
tablePopulated = true;
CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(ATTRIBUTE_NAME_SECURITY_MECH_ID);
tblModel.clearAll();
if (descData != null) {
boolean firstEntry = true;
int counter = 0;
if ((descData != null) && !descData.isEmpty()) {
for (Iterator iter = descData.iterator(); iter.hasNext(); ) {
SMDescriptionData smDesc = (SMDescriptionData) iter.next();
if (!firstEntry) {
tblModel.appendRow();
} else {
firstEntry = false;
}
tblModel.setValue(TBL_SECURITY_MECH_ID_DATA_ID, smDesc.getFirstSecurityMechId());
tblModel.setValue(TBL_SECURITY_MECH_ID_HREF_ACTION, Integer.toString(counter));
tblModel.setValue(TBL_SECURITY_MECH_ID_LABEL_ACTION, "discovery.service.table.bootstrapResOff.action.edit.label");
counter++;
}
}
}
setPageSessionAttribute(ATTR_SECURITY_MECH_ID, (ArrayList) descData);
}
use of com.sun.identity.console.service.model.SMDescriptionData in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionViewBeanBase method getValues.
private SMDescriptionData getValues() throws AMConsoleException {
SMDescriptionData smData = new SMDescriptionData();
smData.descriptionID = (String) getDisplayFieldValue(TF_DESCRIPTION_ID);
if (smData.descriptionID.length() == 0) {
smData.descriptionID = SAMLUtils.generateID();
}
CCAddRemove mechIdChild = (CCAddRemove) getChild(ATTR_NAME_SECURITY_MECH_ID);
mechIdChild.restoreStateData();
CCAddRemoveModel mechIdModel = (CCAddRemoveModel) propertySheetModel.getModel(ATTR_NAME_SECURITY_MECH_ID);
smData.securityMechId = getList(mechIdModel.getSelectedOptionList());
smData.endPointUrl = ((String) propertySheetModel.getValue(ATTR_NAME_SOAP_HTTP_END_POINT)).trim();
smData.soapAction = ((String) propertySheetModel.getValue(ATTR_NAME_SOAP_HTTP_ACTION)).trim();
if (smData.securityMechId.isEmpty()) {
throw new AMConsoleException("discovery.service.description.missing.securityMechId.message");
}
if (smData.endPointUrl.length() == 0) {
throw new AMConsoleException("discovery.service.description.missing.endPointUrl.message");
}
return smData;
}
use of com.sun.identity.console.service.model.SMDescriptionData in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionViewBeanBase method setMechID.
private void setMechID(CCAddRemoveModel model) {
SMDiscoEntryData data = (SMDiscoEntryData) getPageSessionAttribute(PG_SESSION_DISCO_ENTRY_DATA);
Set availableMechIds = getSecurityMechanisms();
Set assignedMechIds = data.getAllAssignedMechIDs();
availableMechIds.removeAll(assignedMechIds);
model.setAvailableOptionList(createOptionList(availableMechIds));
SMDescriptionData descData = getCurrentData();
if (descData != null) {
model.setSelectedOptionList(createOptionList(descData.securityMechId));
}
}
use of com.sun.identity.console.service.model.SMDescriptionData in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionEditViewBean method beginDisplay.
public void beginDisplay(DisplayEvent event) throws ModelControlException {
super.beginDisplay(event);
if (populateValues) {
SMDescriptionData data = getCurrentData();
setValues(data);
}
}
Aggregations