Search in sources :

Example 6 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class SCPolicyViewBean method handleTblResourceComparatorHrefActionRequest.

/**
     * Handles edit resource comparator request.
     *
     * @param event Request Invocation Event.
     */
public void handleTblResourceComparatorHrefActionRequest(RequestInvocationEvent event) throws ModelControlException {
    AMServiceProfileModel model = (AMServiceProfileModel) getModel();
    Map values = model.getAttributeValues();
    onBeforeDisplayProfile(values);
    setPageSessionAttribute(PROPERTY_ATTRIBUTE, (HashMap) values);
    SCPolicyResourceComparatorEditViewBean vb = (SCPolicyResourceComparatorEditViewBean) getViewBean(SCPolicyResourceComparatorEditViewBean.class);
    unlockPageTrail();
    passPgSessionMap(vb);
    vb.populateValues((String) getDisplayFieldValue(TBL_RESOURCE_COMPARATOR_HREF_ACTION));
    vb.forwardTo(getRequestContext());
}
Also used : AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel) HashMap(java.util.HashMap) Map(java.util.Map)

Example 7 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class WSAuthNServicesViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    resetButtonState(TBL_HANDLERS_DELETE_BTN);
    if (!tablePopulated) {
        if (!isSubmitCycle()) {
            AMServiceProfileModel model = (AMServiceProfileModel) getModel();
            if (model != null) {
                Set handlers = new OrderedSet();
                handlers.addAll(model.getAttributeValues(WSAuthNServicesModelImpl.ATTRIBUTE_NAME_HANDLERS));
                populateHandlersTable(handlers);
            }
        }
    }
    if (!isInlineAlertMessageSet()) {
        String flag = (String) getPageSessionAttribute(PAGE_MODIFIED);
        if ((flag != null) && flag.equals("1")) {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
        }
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel)

Example 8 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class WSPersonalProfileServiceViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    if (!tablePopulated) {
        if (!isSubmitCycle()) {
            AMServiceProfileModel model = (AMServiceProfileModel) getModel();
            if (model != null) {
                Set supportedContainers = new OrderedSet();
                supportedContainers.addAll(model.getAttributeValues(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_SUPPPORTED_CONTAINERS));
                populateSupportedContainersTable(supportedContainers);
                Set dsAttributeMapList = new OrderedSet();
                dsAttributeMapList.addAll(model.getAttributeValues(WSPersonalProfileServiceModelImpl.ATTRIBUTE_NAME_DS_ATTRIBUTE_MAP_LIST));
                populateDSAttributeMapListTable(dsAttributeMapList);
            }
        }
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel)

Example 9 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class SCPolicyViewBean method beginDisplay.

public void beginDisplay(DisplayEvent event) throws ModelControlException {
    super.beginDisplay(event);
    resetButtonState(TBL_RESOURCE_COMPARATOR_DELETE_BTN);
    if (!tablePopulated && !submitCycle) {
        AMServiceProfileModel model = (AMServiceProfileModel) getModel();
        Set resourceComp = new OrderedSet();
        Map values = model.getAttributeValues();
        resourceComp.addAll((Set) values.get(SCPolicyModel.ATTRIBUTE_NAME_RESOURCE_COMPARATOR));
        populateResourceComparatorTable(resourceComp);
    }
    if (!isInlineAlertMessageSet()) {
        String flag = (String) getPageSessionAttribute(PAGE_MODIFIED);
        if ((flag != null) && flag.equals("1")) {
            setInlineAlertMessage(CCAlert.TYPE_INFO, "message.information", "message.profile.modified");
        }
    }
}
Also used : OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) Set(java.util.Set) OrderedSet(com.sun.identity.shared.datastruct.OrderedSet) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel) HashMap(java.util.HashMap) Map(java.util.Map)

Example 10 with AMServiceProfileModel

use of com.sun.identity.console.base.model.AMServiceProfileModel in project OpenAM by OpenRock.

the class STSAddViewBeanBase method getAttributeSettings.

/*
    Returns a map of all settings, including those not changed from the default values in the model.
    AMConsoleException will be thrown if passwords are mis-matched.
     */
private Map getAttributeSettings() throws ModelControlException, AMConsoleException {
    Map values = null;
    AMServiceProfileModel model = (AMServiceProfileModel) getModel();
    if (model != null) {
        AMPropertySheet ps = (AMPropertySheet) getChild(PROPERTY_ATTRIBUTE);
        values = ps.getAttributeValues(model.getAttributeValues(), false, model);
    }
    return values;
}
Also used : AMPropertySheet(com.sun.identity.console.base.AMPropertySheet) Map(java.util.Map) AMServiceProfileModel(com.sun.identity.console.base.model.AMServiceProfileModel)

Aggregations

AMServiceProfileModel (com.sun.identity.console.base.model.AMServiceProfileModel)16 OrderedSet (com.sun.identity.shared.datastruct.OrderedSet)6 Map (java.util.Map)6 Set (java.util.Set)6 HashMap (java.util.HashMap)5 AMPropertySheet (com.sun.identity.console.base.AMPropertySheet)2 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)2 CCPageTitleModel (com.sun.web.ui.model.CCPageTitleModel)2 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)1 HttpServletRequest (javax.servlet.http.HttpServletRequest)1