/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { String moduleName = getParamModule(); // check module CmsModule module = OpenCms.getModuleManager().getModule(moduleName); if (module == null) { throw new Exception(); } // check export point Iterator it = module.getExportPoints().iterator(); while (it.hasNext()) { CmsExportPoint ep = (CmsExportPoint)it.next(); if (ep.getUri().equals(getParamExportpoint())) { // export point found return; } } throw new Exception(); } }
/** * Initializes the list of export points from all configured modules.<p> */ private synchronized void initModuleExportPoints() { Set<CmsExportPoint> exportPoints = new HashSet<CmsExportPoint>(); Iterator<CmsModule> i = m_modules.values().iterator(); while (i.hasNext()) { CmsModule module = i.next(); List<CmsExportPoint> moduleExportPoints = module.getExportPoints(); for (int j = 0; j < moduleExportPoints.size(); j++) { CmsExportPoint point = moduleExportPoints.get(j); if (exportPoints.contains(point)) { if (LOG.isWarnEnabled()) { LOG.warn( Messages.get().getBundle().key( Messages.LOG_DUPLICATE_EXPORT_POINT_2, point, module.getName())); } } else { exportPoints.add(point); if (LOG.isDebugEnabled()) { LOG.debug( Messages.get().getBundle().key(Messages.LOG_ADD_EXPORT_POINT_2, point, module.getName())); } } } } m_moduleExportPoints = Collections.unmodifiableSet(exportPoints); }
while (i.hasNext()) { CmsModule module = (CmsModule)i.next(); List moduleExportPoints = module.getExportPoints(); for (int j = 0; j < moduleExportPoints.size(); j++) { CmsExportPoint point = (CmsExportPoint)moduleExportPoints.get(j);
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { String moduleName = getParamModule(); // check module CmsModule module = OpenCms.getModuleManager().getModule(moduleName); if (module == null) { throw new Exception(); } // check export point if (!isNewExportPoint()) { Iterator it = module.getExportPoints().iterator(); while (it.hasNext()) { CmsExportPoint ep = (CmsExportPoint)it.next(); if (ep.getUri().equals(getParamExportpoint())) { // export point found return; } } throw new Exception(); } }
CmsModule module = (CmsModule)OpenCms.getModuleManager().getModule(moduleName).clone(); List oldExportpoints = module.getExportPoints();
/** * Clones the export points of the module and adjusts its paths.<p> * * @param sourceModule the source module * @param targetModule the target module * @param sourcePathPart the source path part * @param targetPathPart the target path part */ private void cloneExportPoints( CmsModule sourceModule, CmsModule targetModule, String sourcePathPart, String targetPathPart) { for (CmsExportPoint exp : targetModule.getExportPoints()) { if (exp.getUri().contains(sourceModule.getName())) { exp.setUri(exp.getUri().replaceAll(sourceModule.getName(), targetModule.getName())); } if (exp.getUri().contains(sourcePathPart)) { exp.setUri(exp.getUri().replaceAll(sourcePathPart, targetPathPart)); } } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List getListItems() { List ret = new ArrayList(); String moduleName = getParamModule(); CmsModule module = OpenCms.getModuleManager().getModule(moduleName); // get exportpoints List exportpoints = module.getExportPoints(); Iterator i = exportpoints.iterator(); while (i.hasNext()) { CmsExportPoint exportpoint = (CmsExportPoint)i.next(); CmsListItem item = getList().newItem(exportpoint.getUri()); // name item.set(LIST_COLUMN_URI, exportpoint.getUri()); // destination item.set(LIST_COLUMN_DESTINATION, exportpoint.getConfiguredDestination()); // server item.set(LIST_COLUMN_SERVERDESTINATION, exportpoint.getDestinationPath()); ret.add(item); } return ret; }
List exportpoints = module.getExportPoints(); m_exportpoint = new CmsExportPoint(); if ((exportpoints != null) && (exportpoints.size() > 0)) {
List exportpoints = module.getExportPoints(); m_exportpoint = new CmsExportPoint(); if ((exportpoints != null) && (exportpoints.size() > 0)) {
List oldExportpoints = module.getExportPoints(); List newExportpoints = new ArrayList(); Iterator i = oldExportpoints.iterator();
if (getExportPoints() != null) { List<CmsExportPoint> exps = new ArrayList<CmsExportPoint>(); for (CmsExportPoint exp : getExportPoints()) { exps.add((CmsExportPoint)exp.clone());
for (int i = 0; i < module.getExportPoints().size(); i++) { CmsExportPoint point = (CmsExportPoint)module.getExportPoints().get(i); exportpointsElement.addElement(I_CmsXmlConfiguration.N_EXPORTPOINT).addAttribute( I_CmsXmlConfiguration.A_URI,
List<CmsExportPoint> exportPoints = module.getExportPoints(); List<String> resources = module.getResources();
for (int i = 0; i < module.getExportPoints().size(); i++) { CmsExportPoint point = module.getExportPoints().get(i); exportpointsElement.addElement(I_CmsXmlConfiguration.N_EXPORTPOINT).addAttribute( I_CmsXmlConfiguration.A_URI,