private List<ProfileTargetingExpression> getTargetProfiles() { return Arrays.asList(configuration.getProfileTargetingExpressions()); } }
private List<ProfileTargetingExpression> getTargetProfiles() { return Arrays.asList(configuration.getProfileTargetingExpressions()); } }
/** * Get all SmooksResourceConfiguration entries targeted at the specified profile set. * @param profileSet The profile set to searh against. * @return All SmooksResourceConfiguration entries targeted at the specified profile set. */ public SmooksResourceConfiguration[] getTargetConfigurations(ProfileSet profileSet) { Vector<SmooksResourceConfiguration> matchingSmooksResourceConfigurationsColl = new Vector<SmooksResourceConfiguration>(); SmooksResourceConfiguration[] matchingSmooksResourceConfigurations; // Iterate over the SmooksResourceConfigurations defined on this list. for(int i = 0; i < size(); i++) { SmooksResourceConfiguration resourceConfig = get(i); ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions(); for(int expIndex = 0; expIndex < profileTargetingExpressions.length; expIndex++) { ProfileTargetingExpression expression = profileTargetingExpressions[expIndex]; if(expression.isMatch(profileSet)) { matchingSmooksResourceConfigurationsColl.addElement(resourceConfig); break; } else { logger.debug("Resource [" + resourceConfig + "] not targeted at profile [" + profileSet.getBaseProfile() + "]. Sub Profiles: [" + profileSet + "]"); } } } matchingSmooksResourceConfigurations = new SmooksResourceConfiguration[matchingSmooksResourceConfigurationsColl.size()]; matchingSmooksResourceConfigurationsColl.toArray(matchingSmooksResourceConfigurations); return matchingSmooksResourceConfigurations; }
/** * Get all SmooksResourceConfiguration entries targeted at the specified profile set. * @param profileSet The profile set to searh against. * @return All SmooksResourceConfiguration entries targeted at the specified profile set. */ public SmooksResourceConfiguration[] getTargetConfigurations(ProfileSet profileSet) { Vector<SmooksResourceConfiguration> matchingSmooksResourceConfigurationsColl = new Vector<SmooksResourceConfiguration>(); SmooksResourceConfiguration[] matchingSmooksResourceConfigurations; // Iterate over the SmooksResourceConfigurations defined on this list. for(int i = 0; i < size(); i++) { SmooksResourceConfiguration resourceConfig = get(i); ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions(); for(int expIndex = 0; expIndex < profileTargetingExpressions.length; expIndex++) { ProfileTargetingExpression expression = profileTargetingExpressions[expIndex]; if(expression.isMatch(profileSet)) { matchingSmooksResourceConfigurationsColl.addElement(resourceConfig); break; } else { logger.debug("Resource [" + resourceConfig + "] not targeted at profile [" + profileSet.getBaseProfile() + "]. Sub Profiles: [" + profileSet + "]"); } } } matchingSmooksResourceConfigurations = new SmooksResourceConfiguration[matchingSmooksResourceConfigurationsColl.size()]; matchingSmooksResourceConfigurationsColl.toArray(matchingSmooksResourceConfigurations); return matchingSmooksResourceConfigurations; }
/** * Get all SmooksResourceConfiguration entries targeted at the specified profile set. * @param profileSet The profile set to searh against. * @return All SmooksResourceConfiguration entries targeted at the specified profile set. */ public SmooksResourceConfiguration[] getTargetConfigurations(ProfileSet profileSet) { Vector<SmooksResourceConfiguration> matchingSmooksResourceConfigurationsColl = new Vector<SmooksResourceConfiguration>(); SmooksResourceConfiguration[] matchingSmooksResourceConfigurations; // Iterate over the SmooksResourceConfigurations defined on this list. for(int i = 0; i < size(); i++) { SmooksResourceConfiguration resourceConfig = get(i); ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions(); for(int expIndex = 0; expIndex < profileTargetingExpressions.length; expIndex++) { ProfileTargetingExpression expression = profileTargetingExpressions[expIndex]; if(expression.isMatch(profileSet)) { matchingSmooksResourceConfigurationsColl.addElement(resourceConfig); break; } else { logger.debug("Resource [" + resourceConfig + "] not targeted at profile [" + profileSet.getBaseProfile() + "]. Sub Profiles: [" + profileSet + "]"); } } } matchingSmooksResourceConfigurations = new SmooksResourceConfiguration[matchingSmooksResourceConfigurationsColl.size()]; matchingSmooksResourceConfigurationsColl.toArray(matchingSmooksResourceConfigurations); return matchingSmooksResourceConfigurations; }
/** * Get all SmooksResourceConfiguration entries targeted at the specified profile set. * @param profileSet The profile set to searh against. * @return All SmooksResourceConfiguration entries targeted at the specified profile set. */ public SmooksResourceConfiguration[] getTargetConfigurations(ProfileSet profileSet) { Vector<SmooksResourceConfiguration> matchingSmooksResourceConfigurationsColl = new Vector<SmooksResourceConfiguration>(); SmooksResourceConfiguration[] matchingSmooksResourceConfigurations; // Iterate over the SmooksResourceConfigurations defined on this list. for(int i = 0; i < size(); i++) { SmooksResourceConfiguration resourceConfig = get(i); ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions(); for(int expIndex = 0; expIndex < profileTargetingExpressions.length; expIndex++) { ProfileTargetingExpression expression = profileTargetingExpressions[expIndex]; if(expression.isMatch(profileSet)) { matchingSmooksResourceConfigurationsColl.addElement(resourceConfig); break; } else { logger.debug("Resource [" + resourceConfig + "] not targeted at profile [" + profileSet.getBaseProfile() + "]. Sub Profiles: [" + profileSet + "]"); } } } matchingSmooksResourceConfigurations = new SmooksResourceConfiguration[matchingSmooksResourceConfigurationsColl.size()]; matchingSmooksResourceConfigurationsColl.toArray(matchingSmooksResourceConfigurations); return matchingSmooksResourceConfigurations; }
ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions(); for(int i = 0; i < profileTargetingExpressions.length; i++) { specificity += profileTargetingExpressions[i].getSpecificity(profileSet);
ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions(); for(int i = 0; i < profileTargetingExpressions.length; i++) { specificity += profileTargetingExpressions[i].getSpecificity(profileSet);
ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions(); for(int i = 0; i < profileTargetingExpressions.length; i++) { specificity += profileTargetingExpressions[i].getSpecificity(profileSet);
ProfileTargetingExpression[] profileTargetingExpressions = resourceConfig.getProfileTargetingExpressions(); for(int i = 0; i < profileTargetingExpressions.length; i++) { specificity += profileTargetingExpressions[i].getSpecificity(profileSet);