}
public static IRegisteredProfile getRegisteredProfile(String name, String path) {
Assert.isNotNull(name);
List<IRegisteredProfile> profiles = Registry.getRegisteredProfiles();
for(int i = 0; i < profiles.size(); i++) {
IRegisteredProfile profile = profiles.get(i);
// name corresponds. is path equal?
if(name.equals(profile.getName())) {
// no path indicated => first name that corresponds => profile returned
if(path == null) {
return profile;
} else if(path.equals(profile.getPath())) {
return profile;
}
}
}
return null;