Search in sources :

Example 6 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class AMViewBeanBase method performDelegationTasks.

/* Delegation *************************************************************/
protected void performDelegationTasks() {
    DelegationConfig config = DelegationConfig.getInstance();
    String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_PROFILE);
    config.configureButtonsAndTables(realmName, getServiceNameForAccessControl(), getModel(), this);
}
Also used : DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 7 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class FSAuthDomainsEditViewBean method createPropertyModel.

private void createPropertyModel() {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    String startDN = AMModelBase.getStartDN(getRequestContext().getRequest());
    boolean canModify = dConfig.hasPermission(startDN, null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
    // TBD: need to have one propertysheet which is read_only
    String xmlFile = (canModify) ? "com/sun/identity/console/propertyCOTEdit.xml" : "com/sun/identity/console/propertyCOTEdit.xml";
    propertySheetModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream(xmlFile));
    if (addRemoveModel == null)
        addRemoveModel = new CCAddRemoveModel();
    propertySheetModel.setModel(ADD_REMOVE_PROVIDERS, addRemoveModel);
    propertySheetModel.clear();
}
Also used : CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 8 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class FSSAMLSiteIDEditViewBean method createPropertyModel.

protected void createPropertyModel() {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    String startDN = AMModelBase.getStartDN(getRequestContext().getRequest());
    boolean canModify = dConfig.hasPermission(startDN, null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
    // TBD : add readonly xml back
    // "com/sun/identity/console/propertyFSSAMLSiteIDProfile_Readonly.xml";
    String xmlFile = (canModify) ? "com/sun/identity/console/propertyFSSAMLSiteIDProfile.xml" : "com/sun/identity/console/propertyFSSAMLSiteIDProfile.xml";
    propertySheetModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream(xmlFile));
    propertySheetModel.clear();
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 9 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class FSSAMLServiceViewBean method createPropertyModel.

private void createPropertyModel() {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    String startDN = AMModelBase.getStartDN(getRequestContext().getRequest());
    boolean canModify = dConfig.hasPermission(startDN, null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
    // TBD: add readonly xml back
    //"com/sun/identity/console/propertyFSSAMLProfile_Readonly.xml";
    String xmlFile = (canModify) ? "com/sun/identity/console/propertyFSSAMLProfile.xml" : "com/sun/identity/console/propertyFSSAMLProfile.xml";
    propertySheetModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream(xmlFile));
    propertySheetModel.setModel(TABLE_SITE_ID, tblSiteIdModel);
    propertySheetModel.setModel(TABLE_TARGET_URLS, tblTargetURLsModel);
    propertySheetModel.clear();
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 10 with DelegationConfig

use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.

the class ConditionOpViewBeanBase method createPropertyModel.

private boolean createPropertyModel() {
    boolean init = false;
    HttpServletRequest req = RequestManager.getRequestContext().getRequest();
    String condType = (String) getPageSessionAttribute(PG_SESSION_CONDITION_TYPE);
    if ((condType == null) || (condType.trim().length() == 0)) {
        condType = req.getParameter(getName() + "." + CONDITION_TYPE);
        if ((condType != null) && (condType.trim().length() > 0)) {
            setPageSessionAttribute(PG_SESSION_CONDITION_TYPE, condType);
        }
    }
    String curRealm = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    if ((curRealm == null) || (curRealm.trim().length() == 0)) {
        curRealm = req.getParameter(getName() + "." + REALM_NAME);
        if ((curRealm == null) || (curRealm.trim().length() == 0)) {
            setPageSessionAttribute(AMAdminConstants.CURRENT_REALM, curRealm);
        } else {
            realmName = curRealm;
        }
    } else {
        realmName = curRealm;
    }
    init = (curRealm != null) && (curRealm.trim().length() > 0) && (condType != null) && (condType.trim().length() > 0);
    if (init) {
        DelegationConfig dConfig = DelegationConfig.getInstance();
        canModify = dConfig.hasPermission(realmName, null, AMAdminConstants.PERMISSION_MODIFY, getModel(), getClass().getName());
        propertySheetModel = new AMPropertySheetModel(getConditionXML(curRealm, condType, !canModify));
        propertySheetModel.clear();
        if (canModify) {
            addRemoveModel = new CCAddRemoveModel();
            addRemoveModel.setShowMoveUpDownButtons("false");
            addRemoveModel.clear();
            propertySheetModel.setModel(VALUES_MULTIPLE_CHOICE_VALUE, addRemoveModel);
        }
    }
    return init;
}
Also used : HttpServletRequest(javax.servlet.http.HttpServletRequest) CCAddRemoveModel(com.sun.web.ui.model.CCAddRemoveModel) AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Aggregations

DelegationConfig (com.sun.identity.console.delegation.model.DelegationConfig)43 AMPropertySheetModel (com.sun.identity.console.base.model.AMPropertySheetModel)32 SSOException (com.iplanet.sso.SSOException)8 SMSException (com.sun.identity.sm.SMSException)8 AMConsoleException (com.sun.identity.console.base.model.AMConsoleException)7 PropertyXMLBuilder (com.sun.identity.console.property.PropertyXMLBuilder)4 CCAddRemoveModel (com.sun.web.ui.model.CCAddRemoveModel)4 InputStream (java.io.InputStream)4 ServiceSchema (com.sun.identity.sm.ServiceSchema)3 Set (java.util.Set)3 HashSet (java.util.HashSet)2 HttpServletRequest (javax.servlet.http.HttpServletRequest)2 SAMLPropertyXMLBuilder (com.sun.identity.console.federation.SAMLPropertyXMLBuilder)1 EndUserViewBean (com.sun.identity.console.idm.EndUserViewBean)1 SubConfigPropertyXMLBuilder (com.sun.identity.console.property.SubConfigPropertyXMLBuilder)1 IdRepoException (com.sun.identity.idm.IdRepoException)1 ServiceSchemaManager (com.sun.identity.sm.ServiceSchemaManager)1 List (java.util.List)1