throw new FactoryException("Provider " + className + " not found", ex); } catch (Exception ex) { throw new FactoryException("Provider " + className + " could not be instantiated: " + ex.getMessage(), ex);
throw new FactoryException("Provider " + className + " not found", ex); } catch (Exception ex) { throw new FactoryException("Provider " + className + " could not be instantiated: " + ex.getMessage(), ex);
@Override public PDPEngine newEngine() throws FactoryException { EvaluationContextFactory evaluationContextFactory = EvaluationContextFactory.newInstance(); if (evaluationContextFactory == null) { this.logger.error("Null EvaluationContextFactory"); throw new FactoryException("Null EvaluationContextFactory"); } return new ATTPDPEngine(evaluationContextFactory, this.getDefaultBehavior(), this.getScopeResolver()); }
@Override public PDPEngine newEngine(Properties properties) throws FactoryException { EvaluationContextFactory evaluationContextFactory = EvaluationContextFactory.newInstance(properties); if (evaluationContextFactory == null) { this.logger.error("Null EvaluationContextFactory"); throw new FactoryException("Null EvaluationContextFactory"); } return new ATTPDPEngine(evaluationContextFactory, this.getDefaultBehavior(), this.getScopeResolver(), properties); } }
@Override public PDPEngine newEngine(Properties properties) throws FactoryException { EvaluationContextFactory evaluationContextFactory = EvaluationContextFactory.newInstance(properties); if (evaluationContextFactory == null) { this.logger.error("Null EvaluationContextFactory"); throw new FactoryException("Null EvaluationContextFactory"); } return new ATTPDPEngine(evaluationContextFactory, this.getDefaultBehavior(), this.getScopeResolver(), properties); } }
@Override public PolicyFinder getPolicyFinder() throws FactoryException { try { this.init(XACMLProperties.getProperties()); } catch (IOException e) { throw new FactoryException(e); } return new StdPolicyFinder(this.rootPolicies, this.referencedPolicies); }
throw new FactoryException("Provider for " + factoryId + " cannot be found", null);
throw new FactoryException("Provider for " + factoryId + " cannot be found", null);
@Override public PDPEngine newEngine() throws FactoryException { EvaluationContextFactory evaluationContextFactory = EvaluationContextFactory.newInstance(); if (evaluationContextFactory == null) { this.logger.error("Null EvaluationContextFactory"); throw new FactoryException("Null EvaluationContextFactory"); } return new ATTPDPEngine(evaluationContextFactory, this.getDefaultBehavior(), this.getScopeResolver()); }
@Override public PolicyFinder getPolicyFinder() throws FactoryException { try { this.init(XACMLProperties.getProperties()); } catch (IOException e) { throw new FactoryException(e); } return new StdPolicyFinder(this.rootPolicies, this.referencedPolicies); }
public static synchronized void validatePipConfiguration(Properties properties, StdPDPStatus status) throws PAPException { try { PIPFinderFactory factory = PIPFinderFactory.newInstance(properties); if (factory == null) { throw new FactoryException("Could not create PIP Finder Factory: " + properties.getProperty(XACMLProperties.PROP_PIPFINDERFACTORY)); } PIPFinder finder = factory.getFinder(properties); // // Check for this, although it should always return something // if (finder == null) { logger.error("pip finder factory returned a null engine."); throw new PIPException("Could not create PIP Finder"); } else { logger.info("Loaded PIP finder"); } for (PIPEngine engine : finder.getPIPEngines()) { logger.info("Configured PIP Engine: " + engine.getName()); StdPDPPIPConfig config = new StdPDPPIPConfig(); config.setName(engine.getName()); status.addLoadedPipConfig(config); } } catch (FactoryException | PIPException e) { logger.error("validate PIP configuration failed: " + e.getLocalizedMessage()); status.addLoadError(e.getLocalizedMessage()); status.setStatus(Status.LOAD_ERRORS); throw new PAPException(e); } }
protected void store(String[] fields) throws FactoryException { DataTypeFactory thisDataTypeFactory = this.getDataTypeFactory(); Identifier identifierCategory = new IdentifierImpl(fields[0]); Identifier identifierAttribute = new IdentifierImpl(fields[1]); Identifier identifierDataType = new IdentifierImpl(fields[2]); String issuer = (fields.length == 5 ? fields[3] : null); String value = fields[fields.length - 1]; DataType<?> dataType = thisDataTypeFactory.getDataType(identifierDataType); if (dataType == null) { logger.error("Unknown data type " + identifierDataType.stringValue()); return; } AttributeValue<?> attributeValue = null; try { attributeValue = dataType.createAttributeValue(value); } catch (DataTypeException ex) { throw new FactoryException("DataTypeException creating AttributeValue", ex); } Attribute attribute = new StdMutableAttribute(identifierCategory, identifierAttribute, attributeValue, issuer, false); this.listAttributes.add(attribute); }
protected void store(String[] fields) throws FactoryException { DataTypeFactory thisDataTypeFactory = this.getDataTypeFactory(); Identifier identifierCategory = new IdentifierImpl(fields[0]); Identifier identifierAttribute = new IdentifierImpl(fields[1]); Identifier identifierDataType = new IdentifierImpl(fields[2]); String issuer = (fields.length == 5 ? fields[3] : null); String value = fields[fields.length - 1]; DataType<?> dataType = thisDataTypeFactory.getDataType(identifierDataType); if (dataType == null) { logger.error("Unknown data type " + identifierDataType.stringValue()); return; } AttributeValue<?> attributeValue = null; try { attributeValue = dataType.createAttributeValue(value); } catch (DataTypeException ex) { throw new FactoryException("DataTypeException creating AttributeValue", ex); } Attribute attribute = new StdMutableAttribute(identifierCategory, identifierAttribute, attributeValue, issuer, false); this.listAttributes.add(attribute); }