use of net.sf.acegisecurity.ConfigAttribute in project records-management by Alfresco.
the class RMEntryVoterUnitTest method createConfigDefinition.
/**
* Helper method to create configuration object
*/
@SuppressWarnings("rawtypes")
private net.sf.acegisecurity.ConfigAttributeDefinition createConfigDefinition(String value) {
net.sf.acegisecurity.ConfigAttributeDefinition mockedConfig = mock(net.sf.acegisecurity.ConfigAttributeDefinition.class);
ConfigAttribute mockedConfigAttr = mock(ConfigAttribute.class);
when(mockedConfigAttr.getAttribute()).thenReturn(value);
Iterator mockedIter = mock(Iterator.class);
when(mockedIter.hasNext()).thenReturn(true).thenReturn(false);
when(mockedIter.next()).thenReturn(mockedConfigAttr);
when(mockedConfig.getConfigAttributes()).thenReturn(mockedIter);
return mockedConfig;
}
use of net.sf.acegisecurity.ConfigAttribute in project records-management by Alfresco.
the class RMAfterInvocationProvider method extractSupportedDefinitions.
@SuppressWarnings("rawtypes")
private List<ConfigAttributeDefintion> extractSupportedDefinitions(ConfigAttributeDefinition config) {
List<ConfigAttributeDefintion> definitions = new ArrayList<>();
Iterator iter = config.getConfigAttributes();
while (iter.hasNext()) {
ConfigAttribute attr = (ConfigAttribute) iter.next();
if (this.supports(attr)) {
definitions.add(new ConfigAttributeDefintion(attr));
}
}
return definitions;
}
use of net.sf.acegisecurity.ConfigAttribute in project records-management by Alfresco.
the class RMEntryVoter method extractSupportedDefinitions.
/**
* @param config
* @return
*/
@SuppressWarnings("rawtypes")
private List<ConfigAttributeDefinition> extractSupportedDefinitions(net.sf.acegisecurity.ConfigAttributeDefinition config) {
List<ConfigAttributeDefinition> definitions = new ArrayList<ConfigAttributeDefinition>(2);
Iterator iter = config.getConfigAttributes();
while (iter.hasNext()) {
ConfigAttribute attr = (ConfigAttribute) iter.next();
if (this.supports(attr)) {
definitions.add(new ConfigAttributeDefinition(attr, nspr));
}
}
return definitions;
}
Aggregations