Search in sources :

Example 41 with SMDiscoEntryData

use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.

the class UMUserResourceOfferingViewBean method populateTableModel.

private void populateTableModel(SMDiscoveryServiceData data) {
    tblModel.clearAll();
    if (data != null) {
        int counter = 0;
        UMUserResourceOfferingModel model = (UMUserResourceOfferingModel) getModel();
        for (Iterator i = data.getResourceData().iterator(); i.hasNext(); counter++) {
            if (counter > 0) {
                tblModel.appendRow();
            }
            SMDiscoEntryData entry = (SMDiscoEntryData) i.next();
            tblModel.setValue(TBL_DATA_SERVICE_TYPE, entry.serviceType);
            tblModel.setValue(TBL_DATA_ABSTRACT, entry.abstractValue);
            tblModel.setValue(TBL_DATA_ACTION_HREF, Integer.toString(counter));
        }
        DiscoveryDataCache cache = DiscoveryDataCache.getInstance();
        String id = cache.cacheData(model.getUserSSOToken(), data);
        setPageSessionAttribute(DATA_ID, id);
    }
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) Iterator(java.util.Iterator) UMUserResourceOfferingModel(com.sun.identity.console.user.model.UMUserResourceOfferingModel) DiscoveryDataCache(com.sun.identity.console.service.model.DiscoveryDataCache)

Example 42 with SMDiscoEntryData

use of com.sun.identity.console.service.model.SMDiscoEntryData in project OpenAM by OpenRock.

the class UMUserResourceOfferingEditViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    if (populateValues) {
        SMDiscoEntryData data = getCurrentServiceData();
        setValues(data, getModel());
    } else {
        SMDiscoEntryData data = (SMDiscoEntryData) getPageSessionAttribute(PROPERTY_ATTRIBUTE);
        if (data != null) {
            populateDirectiveMechIDRefs(data);
        }
    }
    if (getPageSessionAttribute(PG_SESSION_MODIFIED) != null) {
        setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
    }
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData)

Aggregations

SMDiscoEntryData (com.sun.identity.console.service.model.SMDiscoEntryData)42 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)10 List (java.util.List)7 DiscoveryDataCache (com.sun.identity.console.service.model.DiscoveryDataCache)6 SMDescriptionData (com.sun.identity.console.service.model.SMDescriptionData)6 SMDiscoveryServiceData (com.sun.identity.console.service.model.SMDiscoveryServiceData)5 Iterator (java.util.Iterator)5 ArrayList (java.util.ArrayList)3 CCActionTableModel (com.sun.web.ui.model.CCActionTableModel)2 OptionList (com.iplanet.jato.view.html.OptionList)1 EntityResourceOfferingModel (com.sun.identity.console.idm.model.EntityResourceOfferingModel)1 RealmResourceOfferingModel (com.sun.identity.console.realm.model.RealmResourceOfferingModel)1 UMUserResourceOfferingModel (com.sun.identity.console.user.model.UMUserResourceOfferingModel)1 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)1 CCEditableListModel (com.sun.web.ui.model.CCEditableListModel)1 CCEditableList (com.sun.web.ui.view.editablelist.CCEditableList)1 CCSelectableList (com.sun.web.ui.view.html.CCSelectableList)1 CCActionTable (com.sun.web.ui.view.table.CCActionTable)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1