throw new FactoryException("Provider " + className + " not found", ex); } catch (Exception ex) { throw new FactoryException("Provider " + className + " could not be instantiated: " + ex.getMessage(), ex);
protected static synchronized DataTypeFactory getDataTypeFactory() { try { if (dataTypeFactory != null) { return dataTypeFactory; } dataTypeFactory = DataTypeFactory.newInstance(); if (dataTypeFactory == null) { logger.error("Could not create data type factory"); } } catch (FactoryException e) { logger.error("Can't get Data type Factory: " + e.getLocalizedMessage()); } return dataTypeFactory; }
protected TraceEngine getTraceEngine() { if (this.traceEngine == null) { synchronized(this) { if (this.traceEngine == null) { try { this.traceEngine = TraceEngineFactory.newInstance().getTraceEngine(); } catch (FactoryException ex) { this.logger.error("FactoryException creating TraceEngine instance: " + ex.toString(), ex); throw new IllegalStateException("FactoryException creating TraceEngine instance", ex); } } } } return this.traceEngine; }
public static boolean repair(Node nodeAttributeAssignment) throws DOMStructureException { Element elementAttributeAssignment = DOMUtil.getElement(nodeAttributeAssignment); boolean result = false; result = DOMUtil.repairIdentifierAttribute(elementAttributeAssignment, XACML3.ATTRIBUTE_ATTRIBUTEID, logger) || result; result = DOMUtil.repairIdentifierAttribute(elementAttributeAssignment, XACML3.ATTRIBUTE_DATATYPE, logger) || result; DataTypeFactory dataTypeFactory = null; try { dataTypeFactory = DataTypeFactory.newInstance(); if (dataTypeFactory == null) { throw new DOMStructureException("Failed to get DataTypeFactory"); } } catch (FactoryException ex) { throw new DOMStructureException("FactoryException loading DataTypeFactory: " + ex.getMessage(), ex); } Identifier identifierDataType = DOMUtil.getIdentifierAttribute(elementAttributeAssignment, XACML3.ATTRIBUTE_DATATYPE); DataType<?> dataType = dataTypeFactory.getDataType(identifierDataType); if (dataType == null) { logger.warn("Changing unknown DataType " + identifierDataType.stringValue() + " to " + XACML3.ID_DATATYPE_STRING.stringValue()); elementAttributeAssignment.setAttribute(XACML3.ATTRIBUTE_DATATYPE, XACML3.ID_DATATYPE_STRING.stringValue()); result = true; } return result; }
public static boolean repair(Node nodeAttributeAssignment) throws DOMStructureException { Element elementAttributeAssignment = DOMUtil.getElement(nodeAttributeAssignment); boolean result = false; result = DOMUtil.repairIdentifierAttribute(elementAttributeAssignment, XACML3.ATTRIBUTE_ATTRIBUTEID, logger) || result; result = DOMUtil.repairIdentifierAttribute(elementAttributeAssignment, XACML3.ATTRIBUTE_DATATYPE, logger) || result; DataTypeFactory dataTypeFactory = null; try { dataTypeFactory = DataTypeFactory.newInstance(); if (dataTypeFactory == null) { throw new DOMStructureException("Failed to get DataTypeFactory"); } } catch (FactoryException ex) { throw new DOMStructureException("FactoryException loading DataTypeFactory: " + ex.getMessage(), ex); } Identifier identifierDataType = DOMUtil.getIdentifierAttribute(elementAttributeAssignment, XACML3.ATTRIBUTE_DATATYPE); DataType<?> dataType = dataTypeFactory.getDataType(identifierDataType); if (dataType == null) { logger.warn("Changing unknown DataType " + identifierDataType.stringValue() + " to " + XACML3.ID_DATATYPE_STRING.stringValue()); elementAttributeAssignment.setAttribute(XACML3.ATTRIBUTE_DATATYPE, XACML3.ID_DATATYPE_STRING.stringValue()); result = true; } return result; }
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 DOMStructureException("FactoryException loading DataTypeFactory: " + ex.getMessage(), ex);
protected TraceEngine getTraceEngine() { if (this.traceEngine == null) { synchronized(this) { if (this.traceEngine == null) { try { this.traceEngine = TraceEngineFactory.newInstance().getTraceEngine(); } catch (FactoryException ex) { this.logger.error("FactoryException creating TraceEngine instance: " + ex.toString(), ex); throw new IllegalStateException("FactoryException creating TraceEngine instance", ex); } } } } return this.traceEngine; }
protected static synchronized DataTypeFactory getDataTypeFactory() { try { if (dataTypeFactory != null) { return dataTypeFactory; } dataTypeFactory = DataTypeFactory.newInstance(); if (dataTypeFactory == null) { logger.error("Could not create data type factory"); } } catch (FactoryException e) { logger.error("Can't get Data type Factory: " + e.getLocalizedMessage()); } return dataTypeFactory; }
@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()); }
throw new DOMStructureException("FactoryException loading DataTypeFactory: " + ex.getMessage(), ex);
this.logger.error("FactoryException creating TraceEngine: " + ex.toString(), ex);
@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); } }
throw new DOMStructureException("FactoryException loading DataTypeFactory: " + ex.getMessage(), ex);
this.logger.error("FactoryException creating TraceEngine: " + ex.toString(), ex);
@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); } }
throw new DOMStructureException("FactoryException loading DataTypeFactory: " + ex.getMessage(), ex);
@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); }
@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); }