Search in sources :

Example 16 with SMDiscoEntryData

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

the class SMDiscoveryDescriptionAddViewBean method handleButton1Request.

protected void handleButton1Request(SMDescriptionData smData) {
    SMDiscoveryBootstrapRefOffViewBeanBase vb = (SMDiscoveryBootstrapRefOffViewBeanBase) getReturnToViewBean();
    SMDiscoEntryData data = (SMDiscoEntryData) removePageSessionAttribute(PG_SESSION_DISCO_ENTRY_DATA);
    data.descData.add(smData);
    setPageSessionAttribute(SMDiscoveryBootstrapRefOffViewBeanBase.PROPERTY_ATTRIBUTE, data);
    backTrail();
    passPgSessionMap(vb);
    vb.forwardTo(getRequestContext());
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData)

Example 17 with SMDiscoEntryData

use of com.sun.identity.console.service.model.SMDiscoEntryData 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);
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) SMDescriptionData(com.sun.identity.console.service.model.SMDescriptionData)

Example 18 with SMDiscoEntryData

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

the class SMDiscoveryBootstrapRefOffEditViewBean 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);
        }
    }
}
Also used : SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData)

Example 19 with SMDiscoEntryData

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

the class SMDiscoveryBootstrapRefOffEditViewBean method getCurrentServiceData.

protected SMDiscoEntryData getCurrentServiceData() {
    SMDiscoEntryData curData = null;
    int currentIdx = Integer.parseInt((String) getPageSessionAttribute(PGATTR_INDEX));
    Map mapAttrs = (Map) getPageSessionAttribute(SMDiscoveryServiceViewBean.PROPERTY_ATTRIBUTE);
    OrderedSet set = (OrderedSet) mapAttrs.get(AMAdminConstants.DISCOVERY_SERVICE_NAME_BOOTSTRAP_RES_OFF);
    try {
        SMDiscoveryServiceData smEntry = SMDiscoveryServiceData.getEntries(set);
        List resourceData = smEntry.getResourceData();
        curData = (SMDiscoEntryData) resourceData.get(currentIdx);
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return curData;
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) SMDiscoEntryData(com.sun.identity.console.service.model.SMDiscoEntryData) SMDiscoveryServiceData(com.sun.identity.console.service.model.SMDiscoveryServiceData) List(java.util.List) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException) HashMap(java.util.HashMap) Map(java.util.Map)

Example 20 with SMDiscoEntryData

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

the class SMDiscoveryBootstrapRefOffViewBeanBase method handleTblSecurityMechIDHrefActionRequest.

/**
     * Handles edit security mechanism ID request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblSecurityMechIDHrefActionRequest(RequestInvocationEvent event) throws ModelControlException {
    SMDiscoEntryData smData = (SMDiscoEntryData) getPageSessionAttribute(PROPERTY_ATTRIBUTE);
    ;
    setPageSessionAttribute(SMDiscoveryDescriptionViewBeanBase.PG_SESSION_DISCO_ENTRY_DATA, smData);
    setPageSessionAttribute(SMDiscoveryDescriptionViewBeanBase.PG_SESSION_RETURN_VIEW_BEAN_CLASSNAME, getClass().getName());
    SMDiscoveryDescriptionEditViewBean vb = (SMDiscoveryDescriptionEditViewBean) getViewBean(SMDiscoveryDescriptionEditViewBean.class);
    unlockPageTrail();
    passPgSessionMap(vb);
    vb.populateValues((String) getDisplayFieldValue(TBL_SECURITY_MECH_ID_HREF_ACTION));
    vb.forwardTo(getRequestContext());
}
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