use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class RealmDiscoveryDescriptionEditViewBean 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();
}
use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class ResponseProviderOpViewBeanBase method createPropertyModel.
private boolean createPropertyModel() {
boolean init = false;
HttpServletRequest req = RequestManager.getRequestContext().getRequest();
String pType = (String) getPageSessionAttribute(PG_SESSION_PROVIDER_TYPE);
if ((pType == null) || (pType.trim().length() == 0)) {
pType = req.getParameter(getName() + "." + RESPONSEPROVIDER_TYPE);
if ((pType != null) && (pType.trim().length() > 0)) {
setPageSessionAttribute(PG_SESSION_PROVIDER_TYPE, pType);
}
}
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);
}
}
init = (curRealm != null) && (curRealm.trim().length() > 0) && (pType != null) && (pType.trim().length() > 0);
DelegationConfig dConfig = DelegationConfig.getInstance();
canModify = dConfig.hasPermission(curRealm, null, AMAdminConstants.PERMISSION_MODIFY, getModel(), getClass().getName());
if (init) {
propertySheetModel = new AMPropertySheetModel(getResponseProviderXML(curRealm, pType, !canModify));
propertySheetModel.clear();
if (canModify) {
addRemoveModel = new CCAddRemoveModel();
addRemoveModel.setShowMoveUpDownButtons("false");
addRemoveModel.clear();
propertySheetModel.setModel(VALUES_MULTIPLE_CHOICE_VALUE, addRemoveModel);
}
}
return init;
}
use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class AuthPropertiesViewBean method createPropertyModel.
private void createPropertyModel(String realmName) {
DelegationConfig dConfig = DelegationConfig.getInstance();
boolean canModify = dConfig.hasPermission(realmName, null, AMAdminConstants.PERMISSION_MODIFY, getModel(), getClass().getName());
String xmlFile = (canModify) ? "com/sun/identity/console/propertyRealmAuth.xml" : "com/sun/identity/console/propertyRealmAuth_Readonly.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 AbstractAuditModel method getPropertySheetXML.
@Override
public String getPropertySheetXML(String realmName, String viewBeanName, String viewBeanClassName) throws AMConsoleException {
DelegationConfig dc = DelegationConfig.getInstance();
boolean readOnly = !dc.hasPermission(realmName, serviceName, PERMISSION_MODIFY, this, viewBeanClassName);
xmlBuilder.setAllAttributeReadOnly(readOnly);
xmlBuilder.setSupportSubConfig(true);
xmlBuilder.setViewBeanName(viewBeanName);
try {
return xmlBuilder.getXML();
} catch (SSOException | SMSException e) {
throw new AMConsoleException(getErrorString(e));
}
}
use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class SMDiscoveryDescriptionEditViewBean 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();
}
Aggregations