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);
}
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();
}
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();
}
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();
}
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;
}
Aggregations