コード例 #1
0
ファイル: PDP.java プロジェクト: ki1795/enterprise-java-xacml
 protected void loadConfigurations(ConfigElement config) throws XMLGeneralException {
   domain = (String) config.getAttributeValueByName(ATTR_DOMAINNAME);
   multiPoliciesCombineAlg = (URI) config.getAttributeValueByName(ATTR_MULTIPOLICYCOMBALG);
   supportMustBePresent = (Boolean) config.getAttributeValueByName(ATTR_MUSTBEPRESENT);
   // FIXME should we remove support inner expression option?
   supportInnerExpression = (Boolean) config.getAttributeValueByName(ATTR_INNEREXPRESSION);
   resolveReferencedPoliciesOnLoad = (Boolean) config.getAttributeValueByName(ATTR_RESOLVEPOLICY);
   dsConfig = (ConfigElement) config.getSingleXMLElementByType(ELEMTYPE_DATASTORE);
   ctxConfig = (ConfigElement) config.getSingleXMLElementByType(ELEMTYPE_CONTEXT_FACTORY);
   cacheConfig = (ConfigElement) config.getSingleXMLElementByName(ELEM_CACHE_MANAGER);
   policyResConfig = (ConfigElement) config.getSingleXMLElementByName(ELEM_POLICY_RESOLVER);
   attrRtrConfig = (ConfigElement) config.getSingleXMLElementByName(ELEM_ATTRIBUTE_FACTORY);
 }
コード例 #2
0
ファイル: LogFactory.java プロジェクト: vishalishere/iotsys
  private static Logger createLogger(String tag)
      throws ConfigurationException, LogInitializationException {
    if (!hasInitialized) {
      throw new LogInitializationException("LogFactory has NOT been initialized.");
    }

    try {
      String loggerClassName = (String) config.getAttributeValueByName(ATTR_LOGGER_CLASSNAME);
      Class<?> loggerClass = Class.forName(loggerClassName);
      Constructor<?> loggerCons =
          loggerClass.getDeclaredConstructor(new Class[] {config.getClass(), String.class});
      Logger logger = (Logger) loggerCons.newInstance(config, tag);

      return logger;
    } catch (Exception e) {
      throw new ConfigurationException("Error occurs when initialize the Logger.", e);
    }
  }
コード例 #3
0
ファイル: PDP.java プロジェクト: ki1795/enterprise-java-xacml
  public static synchronized PDP getInstance(ConfigElement config) throws PDPInitializeException {
    String domainName = (String) config.getAttributeValueByName(ATTR_DOMAINNAME);
    PDP pdp = pdpRegistry.get(domainName);
    if (pdp == null) {
      pdp = new PDP(config);
      pdpRegistry.put(domainName, pdp);
    }

    return pdp;
  }
コード例 #4
0
 protected void loadConfigurations(ConfigElement config) {
   path = (String) config.getAttributeValueByName(ATTR_POLICY_PATH);
   pattern = (String) config.getAttributeValueByName(ATTR_FILENAME_PATTERN);
 }