/** * Returns the html code for component selection.<p> * * @return html code */ public String htmlComponents() { StringBuffer html = new StringBuffer(1024); Iterator<CmsSetupComponent> itComponents = CmsCollectionsGenericWrapper.<CmsSetupComponent> list( m_components.elementList()).iterator(); while (itComponents.hasNext()) { CmsSetupComponent component = itComponents.next(); html.append(htmlComponent(component)); } return html.toString(); }
/** * Returns js code with array definition for the component modules.<p> * * @return js code */ public String jsComponentModules() { List<CmsSetupComponent> components = CmsCollectionsGenericWrapper.list(m_components.elementList()); StringBuffer jsCode = new StringBuffer(1024); jsCode.append("\t// an array holding the components modules\n"); jsCode.append("\tvar componentModules = new Array("); jsCode.append(components.size()); jsCode.append(");\n"); for (int i = 0; i < components.size(); i++) { CmsSetupComponent component = components.get(i); jsCode.append("\tcomponentModules[" + i + "] = \""); List<String> modules = getComponentModules(component); for (int j = 0; j < modules.size(); j++) { jsCode.append(modules.get(j)); if (j < (modules.size() - 1)) { jsCode.append("|"); } } jsCode.append("\";\n"); } jsCode.append("\n\n"); return jsCode.toString(); }
/** * Returns js code with array definition for the available component dependencies.<p> * * @return js code */ public String jsComponentDependencies() { List<CmsSetupComponent> components = CmsCollectionsGenericWrapper.list(m_components.elementList()); Map<String, List<String>> componentDependencies = buildDepsForAllComponents(); StringBuffer jsCode = new StringBuffer(1024); jsCode.append("\t// an array holding the dependent components for the n-th component\n"); jsCode.append("\tvar componentDependencies = new Array("); jsCode.append(components.size()); jsCode.append(");\n"); for (int i = 0; i < components.size(); i++) { CmsSetupComponent component = components.get(i); List<String> dependencies = componentDependencies.get(component.getId()); jsCode.append("\tcomponentDependencies[" + i + "] = new Array("); if (dependencies != null) { for (int j = 0; j < dependencies.size(); j++) { jsCode.append("\"" + dependencies.get(j) + "\""); if (j < (dependencies.size() - 1)) { jsCode.append(", "); } } } jsCode.append(");\n"); } jsCode.append("\n\n"); return jsCode.toString(); }
/** * Returns the text which should be written to the configuration file for a given property value.<p> * * @param obj the property value * * @return the text to write for that property value */ private String getPropertyValueToWrite(Object obj) { String value; String valueToWrite = null; if (obj instanceof List<?>) { String[] values = {}; values = CmsCollectionsGenericWrapper.list(obj).toArray(values); // write it valueToWrite = "\\\n" + createValueString(values); } else { value = String.valueOf(obj).trim(); // escape commas and equals in value value = CmsStringUtil.substitute(value, ",", "\\,"); // value = CmsStringUtil.substitute(value, "=", "\\="); // write it valueToWrite = value; } return valueToWrite; }
Iterator<CmsSetupComponent> itComponents = CmsCollectionsGenericWrapper.<CmsSetupComponent> list( m_components.elementList()).iterator(); while (itComponents.hasNext()) { itComponents = CmsCollectionsGenericWrapper.<CmsSetupComponent> list(m_components.elementList()).iterator(); while (itComponents.hasNext()) { CmsSetupComponent component = itComponents.next();
/** * Returns a pipe separated list of module names for the given list of components.<p> * * @param componentIds the list of component IDs to get the modules for * * @return a pipe separated list of module names for the given list of components */ protected String getComponentModules(List<String> componentIds) { Set<String> comps = new HashSet<String>(); List<CmsSetupComponent> components = CmsCollectionsGenericWrapper.list(m_components.elementList()); for (CmsSetupComponent comp : components) { if (componentIds.contains(comp.getId())) { comps.addAll(getComponentModules(comp)); } } StringBuffer buf = new StringBuffer(); List<String> moduleNames = sortModules(getAvailableModules().values()); boolean first = true; for (String moduleName : moduleNames) { if (!first) { buf.append("|"); } if (comps.contains(moduleName)) { buf.append(moduleName); } first = false; } return buf.toString(); }
List<FileItem> result = new ArrayList<FileItem>(); try { List<FileItem> items = CmsCollectionsGenericWrapper.list(fu.parseRequest(request)); if (items != null) { result = items;
resources = CmsCollectionsGenericWrapper.list(event.getData().get(I_CmsEventListener.KEY_RESOURCES)); uncacheResources(resources); break; case I_CmsEventListener.EVENT_RESOURCES_MODIFIED: resources = CmsCollectionsGenericWrapper.list(event.getData().get(I_CmsEventListener.KEY_RESOURCES)); uncacheResources(resources); break;
case I_CmsEventListener.EVENT_RESOURCE_DELETED: case I_CmsEventListener.EVENT_RESOURCE_MOVED: List<CmsResource> resources = CmsCollectionsGenericWrapper.list( event.getData().get(I_CmsEventListener.KEY_RESOURCES)); for (int i = 0; i < resources.size(); i++) {
resources = CmsCollectionsGenericWrapper.list(event.getData().get(I_CmsEventListener.KEY_RESOURCES)); uncacheResources(resources); break; case I_CmsEventListener.EVENT_RESOURCES_MODIFIED: resources = CmsCollectionsGenericWrapper.list(event.getData().get(I_CmsEventListener.KEY_RESOURCES)); uncacheResources(resources); break;
resources = CmsCollectionsGenericWrapper.list(event.getData().get(I_CmsEventListener.KEY_RESOURCES)); for (CmsResource res : resources) { offlineCacheUpdate(res); resources = CmsCollectionsGenericWrapper.list(event.getData().get(I_CmsEventListener.KEY_RESOURCES)); resources = CmsCollectionsGenericWrapper.list(event.getData().get(I_CmsEventListener.KEY_RESOURCES)); for (CmsResource res : resources) { offlineCacheRemove(res); resources = CmsCollectionsGenericWrapper.list(event.getData().get(I_CmsEventListener.KEY_RESOURCES)); for (CmsResource res : resources) { offlineCacheUpdate(res);
while (itRemove.hasNext()) { String xpath = itRemove.next(); Iterator<Node> it = CmsCollectionsGenericWrapper.<Node> list(doc.selectNodes(xpath)).iterator(); while (it.hasNext()) { Node node = it.next();
CmsCollectionsGenericWrapper.<CmsSetupComponent> list(m_components.elementList())).iterator(); while (itGroups.hasNext()) { CmsSetupComponent component = itGroups.next();
return CmsCollectionsGenericWrapper.list(fu.parseRequest(getRequest())); } catch (SizeLimitExceededException e) {
List<String> ouResources = CmsCollectionsGenericWrapper.list(m_orgUnitResources.get(m_orgUnitName)); if (ouResources != null) { Iterator<String> itResNames = ouResources.iterator();
List<String> ouResources = CmsCollectionsGenericWrapper.list(m_orgUnitResources.get(m_orgUnitName)); if (ouResources != null) { Iterator<String> itResNames = ouResources.iterator();