Search in sources :

Example 11 with AMModel

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

the class SubConfigAddViewBean method getModelInternal.

protected AMModel getModelInternal() {
    AMModel model = null;
    HttpServletRequest req = RequestManager.getRequestContext().getRequest();
    String serviceName = (String) getPageSessionAttribute(AMServiceProfile.SERVICE_NAME);
    List parentIds = (List) getPageSessionAttribute(AMServiceProfile.PG_SESSION_SUB_CONFIG_IDS);
    String parentId = AMAdminUtils.getString(parentIds, "/", true);
    try {
        model = new SubConfigModelImpl(req, serviceName, parentId, getPageSessionAttributes());
    } catch (AMConsoleException e) {
        debug.error("SubConfigAddViewBean.getModelInternal", e);
    }
    return model;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) AMModel(com.sun.identity.console.base.model.AMModel) SubConfigModelImpl(com.sun.identity.console.service.model.SubConfigModelImpl) OptionList(com.iplanet.jato.view.html.OptionList) List(java.util.List) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 12 with AMModel

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

the class SubSchemaTypeSelectViewBean method getModelInternal.

protected AMModel getModelInternal() {
    AMModel model = null;
    HttpServletRequest req = RequestManager.getRequestContext().getRequest();
    try {
        model = new SubConfigModelImpl(req, serviceName, parentId, getPageSessionAttributes());
    } catch (AMConsoleException e) {
        debug.error("SubSchemaTypeSelectViewBean.getModelInternal", e);
    }
    return model;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) AMModel(com.sun.identity.console.base.model.AMModel) SubConfigModelImpl(com.sun.identity.console.service.model.SubConfigModelImpl) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 13 with AMModel

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

the class RealmPropertiesBase method getBreadCrumbDisplayName.

protected String getBreadCrumbDisplayName() {
    String realm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    AMModel model = (AMModel) getModel();
    String path = null;
    if ((realm != null) && (realm.trim().length() > 0)) {
        int idx = realm.lastIndexOf('/');
        if ((idx != -1) && (idx < (realm.length() - 1))) {
            path = realm.substring(idx + 1);
        }
    }
    if (path == null) {
        model.getStartDSDN();
        path = AMFormatUtils.DNToName(model, model.getStartDSDN());
    }
    // unescape the value to display '/' character
    String[] arg = { SMSSchema.unescapeName(path) };
    return MessageFormat.format(model.getLocalizedString("breadcrumbs.editRealm"), (Object[]) arg);
}
Also used : AMModel(com.sun.identity.console.base.model.AMModel)

Example 14 with AMModel

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

the class EditAuthTypeViewBean method getBreadCrumbDisplayName.

protected String getBreadCrumbDisplayName() {
    AMModel model = (AMModel) getModel();
    String serviceName = (String) getPageSessionAttribute(AMServiceProfile.SERVICE_NAME);
    Object[] arg = { model.getLocalizedServiceName(serviceName) };
    return MessageFormat.format(model.getLocalizedString("breadcrumbs.services.edit"), arg);
}
Also used : AMModel(com.sun.identity.console.base.model.AMModel)

Example 15 with AMModel

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

the class SMDiscoveryDescriptionViewBeanBase method getModelInternal.

protected AMModel getModelInternal() {
    AMModel model = null;
    HttpServletRequest req = RequestManager.getRequestContext().getRequest();
    try {
        model = new SMDiscoveryServiceModelImpl(req, getPageSessionAttributes());
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
    }
    return model;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) AMModel(com.sun.identity.console.base.model.AMModel) SMDiscoveryServiceModelImpl(com.sun.identity.console.service.model.SMDiscoveryServiceModelImpl) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Aggregations

AMModel (com.sun.identity.console.base.model.AMModel)33 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)14 HttpServletRequest (javax.servlet.http.HttpServletRequest)13 Iterator (java.util.Iterator)4 SMDiscoveryServiceModelImpl (com.sun.identity.console.service.model.SMDiscoveryServiceModelImpl)3 SubConfigModelImpl (com.sun.identity.console.service.model.SubConfigModelImpl)3 List (java.util.List)3 Set (java.util.Set)3 SMG11NModelImpl (com.sun.identity.console.service.model.SMG11NModelImpl)2 WSPersonalProfileServiceModelImpl (com.sun.identity.console.webservices.model.WSPersonalProfileServiceModelImpl)2 CCBreadCrumbsModel (com.sun.web.ui.model.CCBreadCrumbsModel)2 CCBreadCrumbs (com.sun.web.ui.view.breadcrumb.CCBreadCrumbs)2 CCSelect (com.sun.web.ui.view.html.CCSelect)2 ArrayList (java.util.ArrayList)2 Locale (java.util.Locale)2 RequestContext (com.iplanet.jato.RequestContext)1 OptionList (com.iplanet.jato.view.html.OptionList)1 AMCommonNameGenerator (com.sun.identity.console.base.model.AMCommonNameGenerator)1 SCSAML2SOAPBindingModelImpl (com.sun.identity.console.service.model.SCSAML2SOAPBindingModelImpl)1 SCSOAPBindingModelImpl (com.sun.identity.console.service.model.SCSOAPBindingModelImpl)1