Search in sources :

Example 1 with ServicesNoAttributeViewBean

use of com.sun.identity.console.realm.ServicesNoAttributeViewBean in project OpenAM by OpenRock.

the class SCConfigViewBean method forwardToProfile.

protected void forwardToProfile(String serviceName) {
    SCConfigModel model = (SCConfigModel) getModel();
    setPageSessionAttribute(AMServiceProfile.SERVICE_NAME, serviceName);
    unlockPageTrail();
    String url = model.getServicePropertiesViewBeanURL(serviceName);
    if ((url != null) && (url.length() != 0)) {
        AMPostViewBean vb = (AMPostViewBean) getViewBean(AMPostViewBean.class);
        passPgSessionMap(vb);
        vb.setTargetViewBeanURL(url);
        vb.forwardTo(getRequestContext());
    } else {
        // check if this service has any attributes to display.
        if (model.hasConfigAttributes(serviceName)) {
            SCServiceProfileViewBean vb = (SCServiceProfileViewBean) getViewBean(SCServiceProfileViewBean.class);
            passPgSessionMap(vb);
            vb.forwardTo(getRequestContext());
        } else {
            setPageSessionAttribute(AMAdminConstants.SAVE_VB_NAME, getClass().getName());
            ServicesNoAttributeViewBean vb = (ServicesNoAttributeViewBean) getViewBean(ServicesNoAttributeViewBean.class);
            passPgSessionMap(vb);
            vb.forwardTo(getRequestContext());
        }
    }
}
Also used : ServicesNoAttributeViewBean(com.sun.identity.console.realm.ServicesNoAttributeViewBean) SCConfigModel(com.sun.identity.console.service.model.SCConfigModel) AMPostViewBean(com.sun.identity.console.base.AMPostViewBean)

Aggregations

AMPostViewBean (com.sun.identity.console.base.AMPostViewBean)1 ServicesNoAttributeViewBean (com.sun.identity.console.realm.ServicesNoAttributeViewBean)1 SCConfigModel (com.sun.identity.console.service.model.SCConfigModel)1