use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class SCPolicyResourceComparatorEditViewBean 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/propertySCPolicyResourceComparator.xml" : "com/sun/identity/console/propertySCPolicyResourceComparator_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 WSAuthNServicesHandlersEditViewBean 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/propertyWSAuthNServicesHandlers.xml" : "com/sun/identity/console/propertyWSAuthNServicesHandlers_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 SMDiscoveryProviderResourceIdMapperEditViewBean 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/propertySMDiscoveryProviderResourceIdMapper.xml" : "com/sun/identity/console/propertySMDiscoveryProviderResourceIdMapper_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 SubSchemaModelImpl method getPropertySheetXML.
/**
* Returns XML for property sheet XML.
*
* @param parentId Sub config parent ID.
* @param viewBeanName Name of View Bean.
* @param viewBeanClassName Class Name of View Bean.
* @return XML for property sheet XML.
*/
public String getPropertySheetXML(String parentId, String viewBeanName, String viewBeanClassName) throws AMConsoleException {
DelegationConfig dConfig = DelegationConfig.getInstance();
boolean canModify = dConfig.hasPermission("/", serviceName, AMAdminConstants.PERMISSION_MODIFY, this, viewBeanClassName);
if (!canModify) {
xmlBuilder.setAllAttributeReadOnly(true);
}
subConfigMeta.setParentId(parentId);
xmlBuilder.setSupportSubConfig(subConfigMeta.hasGlobalSubSchema());
xmlBuilder.setViewBeanName(viewBeanName);
try {
return xmlBuilder.getXML();
} catch (SSOException e) {
throw new AMConsoleException(getErrorString(e));
} catch (SMSException e) {
throw new AMConsoleException(getErrorString(e));
}
}
use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class AMPrimaryMastHeadViewBean method handleRealmNameInTabSwitch.
protected boolean handleRealmNameInTabSwitch(RequestContext rc) {
boolean forwarded = false;
// Need to default realm name if it is not even set at this point.
String realmName = (String) getPageSessionAttribute(AMAdminConstants.CURRENT_PROFILE);
if (realmName == null) {
String startDN = AMModelBase.getStartDN(rc.getRequest());
setPageSessionAttribute(AMAdminConstants.CURRENT_PROFILE, startDN);
}
createTabModel();
DelegationConfig dConfig = DelegationConfig.getInstance();
//check to see if class is in the noneeddealwith bean
if (!dConfig.isUncontrolledViewBean(getClass().getName())) {
if ((tabModel == null) || (tabModel.getNodeCount() == 0)) {
EndUserViewBean vb = (EndUserViewBean) getViewBean(EndUserViewBean.class);
vb.forwardTo(rc);
forwarded = true;
}
}
return forwarded;
}
Aggregations