Examples of PolicyStoreReader


Examples of org.wso2.carbon.identity.entitlement.policy.PolicyStoreReader

        PolicyFinder policyFinder = null;
        Set<PolicyFinderModule> policyModules = null;
        // Setup the PolicyFinder that the EntitlementEngine will use
        policyFinder = new PolicyFinder();

        registryModule = new RegistryBasedPolicyFinder(new PolicyStoreReader(new PolicyStore(
                registry)), tenantId);

        policyModules = new HashSet<PolicyFinderModule>();
        // Add all policy finders - we only have RegistryBasedPolicyFinder
        policyModules.add(registryModule);
View Full Code Here

Examples of org.wso2.carbon.identity.entitlement.policy.PolicyStoreReader

     * @throws org.wso2.carbon.identity.base.IdentityException
     *             throws
     */
    public PaginatedPolicySetDTO getAllPolicies(String policyTypeFilter, String policySearchString,
                                                int pageNumber) throws IdentityException {
        PolicyStoreReader policyReader;
        List<PolicyDTO>  policyDTOList = new ArrayList<PolicyDTO>();
        EntitlementEngine.getInstance(getGovernanceUserRegistry(), CarbonContext.getCurrentContext().getTenantId());       
        policyReader = new PolicyStoreReader(new PolicyStore(getGovernanceUserRegistry()));
        PolicyDTO[] policyDTOs = policyReader.readAllPolicyDTOs();

        for (PolicyDTO policyDTO : policyDTOs){
            // Filter out services based on service type
            if (!policyTypeFilter.equals("ALL") && !policyTypeFilter.equals(policyDTO.getPolicyType())) {
                continue;
View Full Code Here

Examples of org.wso2.carbon.identity.entitlement.policy.PolicyStoreReader

     * @return returns policy
     * @throws org.wso2.carbon.identity.base.IdentityException
     *             throws
     */
    public PolicyDTO getPolicy(String policyId) throws IdentityException {
        PolicyStoreReader policyReader = null;
        EntitlementEngine.getInstance(getGovernanceUserRegistry(), CarbonContext.getCurrentContext().getTenantId())
        if (TEMPLATE_POLICY.equals(policyId)) {
            PolicyDTO policy = new PolicyDTO();
            policy.setPolicy(EntitlementServiceComponent.getTemplatePolicy());
            policy.setPolicyId(policyId);
            return policy;
        }

        policyReader = new PolicyStoreReader(new PolicyStore(getGovernanceUserRegistry()));
        return policyReader.readPolicyDTO(policyId);
    }
View Full Code Here

Examples of org.wso2.carbon.identity.entitlement.policy.PolicyStoreReader

     * @return list of ids
     * @throws IdentityException throws
     */
    public String[] getAllPolicyIds() throws IdentityException {
        List<String> policyIds = new ArrayList<String>();
        PolicyStoreReader policyReader;
        EntitlementEngine.getInstance(getGovernanceUserRegistry(), CarbonContext.getCurrentContext().getTenantId());        
        policyReader = new PolicyStoreReader(new PolicyStore(getGovernanceUserRegistry()));

        for(PolicyDTO policyDTO : policyReader.readAllPolicyDTOs()){
            policyIds.add(policyDTO.getPolicyId());                   
        }
        return policyIds.toArray(new String[policyIds.size()]);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.