org.wso2.balana.finder.impl.CurrentEnvModule Java Examples

The following examples show how to use org.wso2.balana.finder.impl.CurrentEnvModule. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntitlementEngine.java    From carbon-identity-framework with Apache License 2.0 6 votes vote down vote up
/**
 * Helper method to init engine
 */
private void setUpAttributeFinders() {

    // Creates carbon attribute finder instance  and init it
    carbonAttributeFinder = new CarbonAttributeFinder(tenantId);
    carbonAttributeFinder.init();

    // Now setup attribute finder modules for the current date/time and
    // AttributeSelectors (selectors are optional, but this project does
    // support a basic implementation)
    CurrentEnvModule envAttributeModule = new CurrentEnvModule();
    SelectorModule selectorAttributeModule = new SelectorModule();

    attributeModules.add(carbonAttributeFinder);
    attributeModules.add(envAttributeModule);
    attributeModules.add(selectorAttributeModule);

    for (AttributeFinderModule module : balana.getPdpConfig().getAttributeFinder().getModules()) {
        if (module instanceof CurrentEnvModule || module instanceof SelectorModule) {
            continue;
        }
        attributeModules.add(module);
    }
}
 
Example #2
Source File: EntitlementEngine.java    From carbon-identity with Apache License 2.0 6 votes vote down vote up
/**
 * Helper method to init engine
 */
private void setUpAttributeFinders() {

    // Creates carbon attribute finder instance  and init it
    carbonAttributeFinder = new CarbonAttributeFinder(tenantId);
    carbonAttributeFinder.init();

    // Now setup attribute finder modules for the current date/time and
    // AttributeSelectors (selectors are optional, but this project does
    // support a basic implementation)
    CurrentEnvModule envAttributeModule = new CurrentEnvModule();
    SelectorModule selectorAttributeModule = new SelectorModule();

    attributeModules.add(carbonAttributeFinder);
    attributeModules.add(envAttributeModule);
    attributeModules.add(selectorAttributeModule);

    for (AttributeFinderModule module : balana.getPdpConfig().getAttributeFinder().getModules()) {
        if (module instanceof CurrentEnvModule || module instanceof SelectorModule) {
            continue;
        }
        attributeModules.add(module);
    }
}