Search in sources :

Example 31 with DelegationConfig

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

the class EntityDiscoveryDescriptionEditViewBean method createPropertyModel.

protected void createPropertyModel() {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    boolean canModify = dConfig.hasPermission("/", null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
    String xmlFile = (canModify) ? "com/sun/identity/console/propertySMDiscoveryDescription.xml" : "com/sun/identity/console/propertySMDiscoveryDescription_Readonly.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 32 with DelegationConfig

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

the class EntityMembersViewBean method createPropertySheetModel.

protected AMPropertySheetModel createPropertySheetModel(String type) {
    String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    DelegationConfig dConfig = DelegationConfig.getInstance();
    canModify = dConfig.hasPermission(realmName, null, AMAdminConstants.PERMISSION_MODIFY, getModel(), getClass().getName());
    String xmlFile = (!canModify) ? "com/sun/identity/console/propertyEntityMembers_Readonly.xml" : "com/sun/identity/console/propertyEntityMembers.xml";
    AMPropertySheetModel psModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream(xmlFile));
    if (canModify) {
        psModel.setModel(ADD_REMOVE_MEMBERS, createAddRemoveModel());
    }
    return psModel;
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 33 with DelegationConfig

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

the class EntityMembershipViewBean method createPropertySheetModel.

protected AMPropertySheetModel createPropertySheetModel(String type) {
    String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    DelegationConfig dConfig = DelegationConfig.getInstance();
    canModify = dConfig.hasPermission(realmName, null, AMAdminConstants.PERMISSION_MODIFY, getModel(), getClass().getName());
    String xmlFile = (!canModify) ? "com/sun/identity/console/propertyEntityMembership_Readonly.xml" : "com/sun/identity/console/propertyEntityMembership.xml";
    AMPropertySheetModel psModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream(xmlFile));
    if (canModify) {
        psModel.setModel(ADD_REMOVE_MEMBERS, createAddRemoveModel());
    }
    return psModel;
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 34 with DelegationConfig

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

the class PolicyOpViewBeanBase method createPropertyModel.

protected void createPropertyModel(String realmName) {
    DelegationConfig dConfig = DelegationConfig.getInstance();
    boolean canModify = dConfig.hasPermission(realmName, null, AMAdminConstants.PERMISSION_MODIFY, getModel(), getClass().getName());
    propertySheetModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream(getPropertyXMLFileName(!canModify)));
    propertySheetModel.clear();
}
Also used : AMPropertySheetModel(com.sun.identity.console.base.model.AMPropertySheetModel) DelegationConfig(com.sun.identity.console.delegation.model.DelegationConfig)

Example 35 with DelegationConfig

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

the class RuleOpViewBeanBase method createPropertyModel.

protected void createPropertyModel() {
    String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_REALM);
    DelegationConfig dConfig = DelegationConfig.getInstance();
    canModify = dConfig.hasPermission(realmName, null, AMAdminConstants.PERMISSION_MODIFY, getModel(), getClass().getName());
    propertySheetModel = new AMPropertySheetModel(getClass().getClassLoader().getResourceAsStream(getPropertyXMLFileName(!canModify)));
    propertySheetModel.clear();
}
Also used : 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