use of com.sun.identity.entitlement.opensso.PolicyResponseProvider in project OpenAM by OpenRock.
the class XACMLSchemaFactoryTest method setup.
@BeforeMethod
public void setup() throws EntitlementException {
xacmlSchemaFactory = new XACMLSchemaFactory();
resourceAttributeUtil = new ResourceAttributeUtil();
PolicyResponseProvider rp1 = createPolicyResponseProvider(1);
PolicyResponseProvider rp2 = createPolicyResponseProvider(2);
PolicyResponseProvider rp3 = createPolicyResponseProvider(3);
PolicyResponseProvider rp4 = createPolicyResponseProvider(4);
rpSet = CollectionUtils.asSet(rp1, rp2, rp3, rp4);
AdviceExpression ae1 = createAdviceExpression(rp1);
AdviceExpression ae2 = createAdviceExpression(rp2);
AdviceExpression ae3 = createAdviceExpression(rp3);
AdviceExpression ae4 = createAdviceExpression(rp4);
aes = new AdviceExpressions();
aes.getAdviceExpression().addAll(Arrays.asList(ae1, ae2, ae3, ae4));
}
use of com.sun.identity.entitlement.opensso.PolicyResponseProvider in project OpenAM by OpenRock.
the class XACMLSchemaFactoryTest method createPolicyResponseProvider.
/**
* Create a PolicyResponseProvider object
* @param i Value to stick on the end of various strings
* @return the created PolicyResponseProvider object
*/
private PolicyResponseProvider createPolicyResponseProvider(int i) {
PolicyResponseProvider result = new PolicyResponseProvider();
result.setPResponseProviderName("responseProvider" + i);
result.setPropertyName("propertyName" + i);
Set<String> values = new HashSet<String>();
for (int j = 0; j < 5 * i; j++) {
values.add("value" + j);
}
result.setPropertyValues(values);
return result;
}
Aggregations