use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class SMDiscoveryBootstrapRefOffEditViewBean 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/propertySMDiscoveryBootstrapResOff.xml" : "com/sun/identity/console/propertySMDiscoveryBootstrapResOff_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 FSSAMLTrustedPartnersEditViewBean method createPropertyModel.
protected boolean createPropertyModel() {
List profiles = (List) getPageSessionAttribute(PROFILES);
if (profiles != null) {
DelegationConfig dConfig = DelegationConfig.getInstance();
String startDN = AMModelBase.getStartDN(getRequestContext().getRequest());
boolean canModify = dConfig.hasPermission(startDN, null, AMAdminConstants.PERMISSION_MODIFY, getRequestContext().getRequest(), getClass().getName());
SAMLPropertyXMLBuilder builder = SAMLPropertyXMLBuilder.getInstance();
// TBD : change to set flag to Readonly (true)
if (!canModify) {
builder.setAllAttributeReadOnly(false);
}
propertySheetModel = new AMPropertySheetModel(builder.getXML(profiles, !isCreateViewBean()));
propertySheetModel.clear();
return true;
}
return false;
}
use of com.sun.identity.console.delegation.model.DelegationConfig in project OpenAM by OpenRock.
the class WSPPServiceDSAttributeMapListEditViewBean 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/propertyWSPersonalProfileDSAttributeMapList.xml" : "com/sun/identity/console/propertyWSPersonalProfileDSAttributeMapList_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 WSPPServiceSupportedContainerEditViewBean 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/propertyWSPersonalProfileSupportedContainers.xml" : "com/sun/identity/console/propertyWSPersonalProfileSupportedContainers_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 RMRealmModelImpl method getRealmProfilePropertyXML.
/**
* Returns realm profile property XML.
*
* @param realmName Name of Realm.
* @param viewbeanClassName Class name of View Bean
* @throws AMConsoleException if there are no attributes to display.
* @return realm profile property XML.
*/
public String getRealmProfilePropertyXML(String realmName, String viewbeanClassName) throws AMConsoleException {
DelegationConfig dConfig = DelegationConfig.getInstance();
boolean canModify = dConfig.hasPermission(realmName, null, AMAdminConstants.PERMISSION_MODIFY, this, viewbeanClassName);
StringBuffer buff = new StringBuffer(2000);
buff.append(PropertyXMLBuilderBase.getXMLDefinitionHeader()).append(PropertyTemplate.START_TAG);
getPropertyXML(buff, !canModify);
buff.append(PropertyTemplate.END_TAG);
return buff.toString();
}
Aggregations