Update of /var/cvs/contributions/CMSContainer/cmsc/servicemanagement/src/java/com/finalist/cmsc/services In directory james.mmbase.org:/tmp/cvs-serv2329/CMSContainer/cmsc/servicemanagement/src/java/com/finalist/cmsc/services
Modified Files: ServiceUtil.java Log Message: CMSC-1243 List Summary for "All content" should contain the proper content types See also: http://cvs.mmbase.org/viewcvs/contributions/CMSContainer/cmsc/servicemanagement/src/java/com/finalist/cmsc/services See also: http://www.mmbase.org/jira/browse/CMSC-1243 Index: ServiceUtil.java =================================================================== RCS file: /var/cvs/contributions/CMSContainer/cmsc/servicemanagement/src/java/com/finalist/cmsc/services/ServiceUtil.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -b -r1.1 -r1.2 --- ServiceUtil.java 19 Jan 2009 12:30:40 -0000 1.1 +++ ServiceUtil.java 20 Jan 2009 05:51:25 -0000 1.2 @@ -6,8 +6,6 @@ import java.util.Iterator; import java.util.List; -import net.sf.mmapps.modules.cloudprovider.CloudProviderFactory; - import org.apache.struts.util.LabelValueBean; import org.mmbase.bridge.Cloud; import org.mmbase.bridge.NodeManager; @@ -20,15 +18,14 @@ */ public class ServiceUtil { - private static Cloud cloud = CloudProviderFactory.getCloudProvider().getCloud(); - public static List<LabelValueBean> getDirectChildTypes(String parent) { + public static List<LabelValueBean> getDirectChildTypes(Cloud cloud,String parent) { List<NodeManager> resultManager = new ArrayList<NodeManager>(); NodeManagerList nml = cloud.getNodeManagers(); Iterator<NodeManager> v = nml.iterator(); while (v.hasNext()) { NodeManager child = v.next(); - if (isDirectChildType(child.getName(), parent)) { + if (isDirectChildType(cloud,child.getName(), parent)) { resultManager.add(child); } } @@ -47,13 +44,13 @@ return result; } - public static List<String> getAllChildTypes(String parent) { + public static List<String> getAllChildTypes(Cloud cloud,String parent) { List<String> result = new ArrayList<String>(); NodeManagerList nml = cloud.getNodeManagers(); Iterator<NodeManager> v = nml.iterator(); while (v.hasNext()) { String child = v.next().getName(); - if (isChildType(child, parent)) { + if (isChildType(cloud,child, parent)) { result.add(child); } } @@ -61,7 +58,7 @@ return result; } - private static boolean isDirectChildType(String child, String parent) { + private static boolean isDirectChildType(Cloud cloud,String child, String parent) { if (parent.equals(child)) { // parent manager is not a parent type return false; @@ -79,7 +76,7 @@ return false; } - private static boolean isChildType(String child, String parent) { + private static boolean isChildType(Cloud cloud,String child, String parent) { if (parent.equals(child)) { // parent manager is not a parent type return false; _______________________________________________ Cvs mailing list Cvs@lists.mmbase.org http://lists.mmbase.org/mailman/listinfo/cvs