Search in sources :

Example 1 with SoapSTSInstanceModel

use of com.sun.identity.console.sts.model.SoapSTSInstanceModel in project OpenAM by OpenRock.

the class STSEditViewBeanBase method getModelInternal.

protected AMModel getModelInternal() {
    RequestContext rc = RequestManager.getRequestContext();
    HttpServletRequest req = rc.getRequest();
    try {
        if (stsType.isRestSTS()) {
            return new RestSTSInstanceModel(req, getPageSessionAttributes());
        } else {
            return new SoapSTSInstanceModel(req, getPageSessionAttributes());
        }
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        throw new IllegalStateException("Exception getting model in STSEditViewBeanBase: " + e.getMessage(), e);
    }
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) SoapSTSInstanceModel(com.sun.identity.console.sts.model.SoapSTSInstanceModel) RequestContext(com.iplanet.jato.RequestContext) RestSTSInstanceModel(com.sun.identity.console.sts.model.RestSTSInstanceModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Example 2 with SoapSTSInstanceModel

use of com.sun.identity.console.sts.model.SoapSTSInstanceModel in project OpenAM by OpenRock.

the class STSAddViewBeanBase method getModelInternal.

protected AMModel getModelInternal() {
    RequestContext rc = RequestManager.getRequestContext();
    HttpServletRequest req = rc.getRequest();
    try {
        if (stsType.isRestSTS()) {
            return new RestSTSInstanceModel(req, getPageSessionAttributes());
        } else {
            return new SoapSTSInstanceModel(req, getPageSessionAttributes());
        }
    } catch (AMConsoleException e) {
        setInlineAlertMessage(CCAlert.TYPE_ERROR, "message.error", e.getMessage());
        throw new IllegalStateException("Exception getting model in STSAddViewBeanBase: " + e.getMessage(), e);
    }
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) SoapSTSInstanceModel(com.sun.identity.console.sts.model.SoapSTSInstanceModel) RequestContext(com.iplanet.jato.RequestContext) RestSTSInstanceModel(com.sun.identity.console.sts.model.RestSTSInstanceModel) AMConsoleException(com.sun.identity.console.base.model.AMConsoleException)

Aggregations

RequestContext (com.iplanet.jato.RequestContext)2 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)2 RestSTSInstanceModel (com.sun.identity.console.sts.model.RestSTSInstanceModel)2 SoapSTSInstanceModel (com.sun.identity.console.sts.model.SoapSTSInstanceModel)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)2