use of org.apache.directory.fortress.core.model.Props in project directory-fortress-core by apache.
the class ConfigMgrRestImpl method delete.
/**
* {@inheritDoc}
*/
@Override
public void delete(String name, Properties inProperties) throws SecurityException {
VUtil.assertNotNull(name, GlobalErrIds.FT_CONFIG_NAME_NULL, CLS_NM + ".delete");
VUtil.assertNotNull(inProperties, GlobalErrIds.FT_CONFIG_PROPS_NULL, CLS_NM + ".delete");
FortRequest request = new FortRequest();
Props inProps = RestUtils.getProps(inProperties);
request.setEntity(inProps);
request.setValue(name);
String szRequest = RestUtils.marshal(request);
String szResponse = RestUtils.getInstance().post(szRequest, HttpIds.CFG_DELETE);
FortResponse response = RestUtils.unmarshall(szResponse);
if (response.getErrorCode() != 0) {
throw new SecurityException(response.getErrorCode(), response.getErrorMessage());
}
}
Aggregations