Search in sources :

Example 21 with SMDiscoEntryData

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

the class SMDiscoveryBootstrapRefOffViewBeanBase method handleButton1Request.

public void handleButton1Request(RequestInvocationEvent event) throws ModelControlException {
    try {
        SMDiscoEntryData smData = getValues(true);
        handleButton1Request(smData);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        forwardTo();
    }
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 22 with SMDiscoEntryData

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

the class SMDiscoveryBootstrapRefOffViewBeanBase method handleTblSecurityMechIDButtonDeleteRequest.

/**
     * Handles remove security mechanism ID request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblSecurityMechIDButtonDeleteRequest(RequestInvocationEvent event) throws ModelControlException {
    try {
        SMDiscoEntryData smData = getValues(false);
        CCActionTable table = (CCActionTable) getChild(ATTRIBUTE_NAME_SECURITY_MECH_ID);
        table.restoreStateData();
        CCActionTableModel tblModel = (CCActionTableModel) propertySheetModel.getModel(ATTRIBUTE_NAME_SECURITY_MECH_ID);
        Integer[] selected = tblModel.getSelectedRows();
        if ((selected != null) && (selected.length > 0)) {
            for (int i = selected.length - 1; i >= 0; --i) {
                Integer index = selected[i];
                smData.descData.remove(index.intValue());
            }
            setValues(smData, getModel());
            populateDescriptionsTable(smData.descData);
        }
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    forwardTo();
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) CCActionTableModel(com.sun.web.ui.model.CCActionTableModel) CCActionTable(com.sun.web.ui.view.table.CCActionTable) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 23 with SMDiscoEntryData

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

the class EntityResourceOfferingAddViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    SMDiscoEntryData data = (SMDiscoEntryData) getPageSessionAttribute(PROPERTY_ATTRIBUTE);
    if (data != null) {
        populateDirectiveMechIDRefs(data);
    }
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData)

Example 24 with SMDiscoEntryData

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

the class EntityResourceOfferingEditViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    if (populateValues) {
        SMDiscoEntryData data = getCurrentServiceData();
        setValues(data);
    } else {
        SMDiscoEntryData data = (SMDiscoEntryData) getPageSessionAttribute(PROPERTY_ATTRIBUTE);
        if (data != null) {
            populateDirectiveMechIDRefs(data);
        }
    }
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData)

Example 25 with SMDiscoEntryData

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

the class EntityResourceOfferingViewBean method populateTableModel.

private void populateTableModel(SMDiscoveryServiceData data) {
    tblModel.clearAll();
    if (data != null) {
        int counter = 0;
        EntityResourceOfferingModel model = (EntityResourceOfferingModel) 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) EntityResourceOfferingModel(com.sun.identity.console.idm.model.EntityResourceOfferingModel) DiscoveryDataCache(com.sun.identity.console.service.model.DiscoveryDataCache)

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