/** * @see org.opencms.workplace.list.A_CmsListExplorerDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() throws CmsException { List<CmsListItem> newItems = new ArrayList<CmsListItem>(); List<CmsListItem> items = super.getListItems(); Iterator<CmsListItem> itItems = items.iterator(); while (itItems.hasNext()) { CmsListItem item = itItems.next(); CmsResource resource = getResourceUtil(item).getResource(); CmsRelationType relationType = getRelationTypes().get(resource).remove(0); String localizedRelationType = relationType.getLocalizedName(getMessages()); Map<String, Object> itemValues = item.getValues(); CmsListItem newItem = getList().newItem(localizedRelationType + "_" + resource.getStructureId().toString()); Iterator<Entry<String, Object>> itItemValuesKeys = itemValues.entrySet().iterator(); while (itItemValuesKeys.hasNext()) { Entry<String, Object> e = itItemValuesKeys.next(); String currentKey = e.getKey(); newItem.set(currentKey, e.getValue()); } newItem.set(LIST_COLUMN_RELATION_TYPE, localizedRelationType); newItems.add(newItem); } return newItems; }
/** * @see org.opencms.workplace.list.A_CmsListExplorerDialog#getListItems() */ @Override protected List getListItems() throws CmsException { List newItems = new ArrayList(); List items = super.getListItems(); Iterator itItems = items.iterator(); while (itItems.hasNext()) { CmsListItem item = (CmsListItem)itItems.next(); CmsResource resource = getResourceUtil(item).getResource(); CmsRelationType relationType = (CmsRelationType)((List)getRelationTypes().get(resource)).remove(0); String localizedRelationType = relationType.getLocalizedName(getMessages()); Map itemValues = item.getValues(); CmsListItem newItem = getList().newItem(localizedRelationType + "_" + resource.getStructureId().toString()); Iterator itItemValuesKeys = itemValues.entrySet().iterator(); while (itItemValuesKeys.hasNext()) { Map.Entry e = (Map.Entry)itItemValuesKeys.next(); String currentKey = (String)e.getKey(); newItem.set(currentKey, e.getValue()); } newItem.set(LIST_COLUMN_RELATION_TYPE, localizedRelationType); newItems.add(newItem); } return newItems; }
/** * @see org.opencms.workplace.list.A_CmsListExplorerDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() throws CmsException { String storedSiteRoot = getCms().getRequestContext().getSiteRoot(); try { getCms().getRequestContext().setSiteRoot(""); return super.getListItems(); } finally { getCms().getRequestContext().setSiteRoot(storedSiteRoot); } }
/** * @see org.opencms.workplace.list.A_CmsListExplorerDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() throws CmsException { String oldSite = getCms().getRequestContext().getSiteRoot(); try { getCms().getRequestContext().setSiteRoot(""); return super.getListItems(); } finally { getCms().getRequestContext().setSiteRoot(oldSite); } }
/** * @see org.opencms.workplace.list.A_CmsListExplorerDialog#getListItems() */ @Override protected List getListItems() throws CmsException { String oldSite = getCms().getRequestContext().getSiteRoot(); try { getCms().getRequestContext().setSiteRoot(""); return super.getListItems(); } finally { getCms().getRequestContext().setSiteRoot(oldSite); } }
/** * @see org.opencms.workplace.list.A_CmsListExplorerDialog#getListItems() */ @Override protected List getListItems() throws CmsException { String storedSiteRoot = getCms().getRequestContext().getSiteRoot(); try { getCms().getRequestContext().setSiteRoot(""); return super.getListItems(); } finally { getCms().getRequestContext().setSiteRoot(storedSiteRoot); } }
/** * @see org.opencms.workplace.list.A_CmsListExplorerDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() throws CmsException { String storedSiteRoot = getCms().getRequestContext().getSiteRoot(); try { getCms().getRequestContext().setSiteRoot(""); return super.getListItems(); } finally { getCms().getRequestContext().setSiteRoot(storedSiteRoot); } }