import org.xml.sax.SAXParseException;
import org.xml.sax.XMLReader;
+import com.att.research.xacml.api.pap.PAPException;
import com.att.research.xacml.std.IdentifierImpl;
public class ConfigPolicy extends Policy {
XMLReader reader = parser.getXMLReader();
reader.setErrorHandler(new XMLErrorHandler());
reader.parse(new InputSource(new StringReader(data)));
- } catch (ParserConfigurationException e) {
- return false;
- } catch (SAXException e) {
- return false;
- } catch (IOException e) {
+ } catch (ParserConfigurationException | SAXException | IOException e) {
+ LOGGER.debug(e);
return false;
}
return true;
}
@Override
- public Map<String, String> savePolicies() throws Exception {
+ public Map<String, String> savePolicies() throws PAPException {
Map<String, String> successMap = new HashMap<>();
if(isPolicyExists()){
//This is the method for preparing the policy for saving. We have broken it out
//separately because the fully configured policy is used for multiple things
@Override
- public boolean prepareToSave() throws Exception{
+ public boolean prepareToSave() throws PAPException{
if(isPreparedToSave()){
return true;