use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class SubConfigModelImpl method getEditConfigPropertyXML.
/**
* Returns property sheet XML for editing sub configuration.
*
* @param viewbeanClassName Class name of view bean.
* @return property sheet XML for editing sub configuration.
*/
public String getEditConfigPropertyXML(String viewbeanClassName) throws AMConsoleException {
DelegationConfig dConfig = DelegationConfig.getInstance();
boolean canModify = dConfig.hasPermission("/", null, AMAdminConstants.PERMISSION_MODIFY, getUserSSOToken(), viewbeanClassName);
try {
xmlBuilder = new SubConfigPropertyXMLBuilder(serviceName, subConfigMeta.getServiceSchema(), this);
xmlBuilder.setSupportSubConfig(subConfigMeta.hasGlobalSubSchema());
xmlBuilder.setViewBeanName("SubConfigEdit");
if (!canModify) {
xmlBuilder.setAllAttributeReadOnly(true);
}
return xmlBuilder.getXML();
} catch (SMSException e) {
throw new AMConsoleException(getErrorString(e));
} catch (SSOException e) {
throw new AMConsoleException(getErrorString(e));
}
}
use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class SCSAML2SOAPBindingRequestHandlerListEditViewBean 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/propertySCSAML2SOAPBindingRequestHandlerList.xml" : "com/sun/identity/console/propertySCSAML2SOAPBindingRequestHandlerList_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 SCSOAPBindingRequestHandlerListEditViewBean 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/propertySCSOAPBindingRequestHandlerList.xml" : "com/sun/identity/console/propertySCSOAPBindingRequestHandlerList_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 EntityResourceOfferingEditViewBean method createPropertyModel.
protected void createPropertyModel() {
DelegationConfig dConfig = DelegationConfig.getInstance();
canModify = dConfig.hasPermission("/", null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
String xmlFile = (canModify) ? "com/sun/identity/console/propertyEntityResOffering.xml" : "com/sun/identity/console/propertyEntityResOffering_Readonly.xml";
InputStream is = getClass().getClassLoader().getResourceAsStream(xmlFile);
String xml = AMAdminUtils.getStringFromInputStream(is);
propertySheetModel = new AMPropertySheetModel(processPropertiesXML(xml));
propertySheetModel.clear();
createSecurityMechIDTable();
}
use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class UMUserResourceOfferingEditViewBean method createPropertyModel.
protected void createPropertyModel() {
DelegationConfig dConfig = DelegationConfig.getInstance();
canModify = dConfig.hasPermission("/", null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
String xmlFile = (canModify) ? "com/sun/identity/console/propertyUserResOffering.xml" : "com/sun/identity/console/propertyUserResOffering_Readonly.xml";
InputStream is = getClass().getClassLoader().getResourceAsStream(xmlFile);
String xml = AMAdminUtils.getStringFromInputStream(is);
propertySheetModel = new AMPropertySheetModel(processPropertiesXML(xml));
propertySheetModel.clear();
createSecurityMechIDTable();
}
Aggregations