/** * @see org.opencms.workplace.list.A_CmsListResourceCollector#setAdditionalColumns(org.opencms.workplace.list.CmsListItem, org.opencms.workplace.explorer.CmsResourceUtil) */ @Override protected void setAdditionalColumns(CmsListItem item, CmsResourceUtil resUtil) { item.set(CmsSearchResultsList.LIST_COLUMN_SCORE, new Integer(getSearchResult(item.getId()).getScore())); }
/** * @see org.opencms.workplace.list.A_CmsListResourceCollector#setAdditionalColumns(org.opencms.workplace.list.CmsListItem, org.opencms.workplace.explorer.CmsResourceUtil) */ @Override protected void setAdditionalColumns(CmsListItem item, CmsResourceUtil resUtil) { item.set(CmsSearchResultsList.LIST_COLUMN_SCORE, new Integer(getSearchResult(item.getId()).getScore())); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#executeListSingleActions() */ @Override public void executeListSingleActions() throws IOException, ServletException { Map<String, String[]> params = new HashMap<String, String[]>(); params.put(A_CmsMessageDialog.PARAM_SESSIONIDS, new String[] {getSelectedItem().getId()}); // set action parameter to initial dialog call params.put(CmsDialog.PARAM_ACTION, new String[] {CmsDialog.DIALOG_INITIAL}); if (getParamListAction().equals(LIST_ACTION_MESSAGE) || getParamListAction().equals(LIST_DEFACTION_MESSAGE)) { getToolManager().jspForwardTool(this, "/workplace/broadcast/message", params); } else { throwListUnsupportedActionException(); } listSave(); }
/** * @see org.opencms.workplace.tools.accounts.A_CmsGroupsList#getListItems() */ @Override protected List<CmsListItem> getListItems() throws CmsException { List<CmsListItem> listItems = super.getListItems(); Iterator<CmsListItem> itListItems = listItems.iterator(); while (itListItems.hasNext()) { CmsListItem item = itListItems.next(); CmsGroup group = getCms().readGroup(new CmsUUID(item.getId())); item.set(LIST_COLUMN_ORGUNIT, CmsOrganizationalUnit.SEPARATOR + group.getOuFqn()); } return listItems; }
@Override protected String resolveOnClic(Locale locale) { String link = OpenCms.getLinkManager().substituteLink( getCms(), "/system/workplace/commons/publish.jsp?publishProjectId=" + getItem().getId()); return "window.location='" + link + "' + '&closelink='+encodeURI(window.location.href);"; } };
/** * @see org.opencms.workplace.list.CmsListResourceProjStateAction#getIconPath() */ @Override public String getIconPath() { if (((CmsResourceLinkRelationList)getWp()).getBrokenLinks() != null) { if (((CmsResourceLinkRelationList)getWp()).getBrokenLinks().contains(getItem().getId())) { return "buttons/deletecontent.png"; } } return super.getIconPath(); }
/** * @see org.opencms.workplace.list.CmsListResourceProjStateAction#getIconPath() */ @Override public String getIconPath() { if (((CmsResourceLinkRelationList)getWp()).getBrokenLinks() != null) { if (((CmsResourceLinkRelationList)getWp()).getBrokenLinks().contains(getItem().getId())) { return "buttons/deletecontent.png"; } } return super.getIconPath(); }
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#getIconPath() */ @Override public String getIconPath() { String userName = getItem().getId(); if (((((CmsUserDataImportList)getWp()).getReasons() != null) && ((CmsUserDataImportList)getWp()).getReasons().containsKey(userName)) || ((CmsUserDataImportList)getWp()).isAlreadyAvailable(userName)) { return ICON_MULTI_DELETE; } return ICON_MULTI_ACTIVATE; } };
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#getName() */ @Override public CmsMessageContainer getName() { if (((CmsResourceLinkRelationList)getWp()).getBrokenLinks() != null) { if (((CmsResourceLinkRelationList)getWp()).getBrokenLinks().contains(getItem().getId())) { return Messages.get().container(Messages.GUI_RELATION_LIST_BROKEN_HELP_0); } } return super.getName(); } };
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getItem() != null) { return OpenCms.getSessionManager().getBroadcastQueue(getItem().getId()).isEmpty(); } return super.isVisible(); } };
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getItem() != null) { return !OpenCms.getSessionManager().getBroadcastQueue(getItem().getId()).isEmpty(); } return super.isVisible(); } };
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#getName() */ @Override public CmsMessageContainer getName() { if (((CmsResourceLinkRelationList)getWp()).getBrokenLinks() != null) { if (((CmsResourceLinkRelationList)getWp()).getBrokenLinks().contains(getItem().getId())) { return Messages.get().container(Messages.GUI_RELATION_LIST_BROKEN_HELP_0); } } return super.getName(); } };
/** * Restores a backed up resource version.<p> * * @throws CmsException if something goes wrong */ protected void performRestoreOperation() throws CmsException { CmsUUID structureId = new CmsUUID(getSelectedItem().get(LIST_COLUMN_STRUCTURE_ID).toString()); int version = Integer.parseInt(getSelectedItems().get(0).getId()); if (version == CmsHistoryResourceHandler.PROJECT_OFFLINE_VERSION) { // it is not possible to restore the offline version return; } CmsResource res = getCms().readResource(structureId, CmsResourceFilter.IGNORE_EXPIRATION); checkLock(getCms().getSitePath(res)); getCms().restoreResourceVersion(res.getStructureId(), version); }
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getItem() != null) { try { return getCms().countLockedResources(new CmsUUID(getItem().getId())) == 0; } catch (CmsException e) { // noop } } return super.isVisible(); }
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getItem() != null) { try { return getCms().countLockedResources(new CmsUUID(getItem().getId())) == 0; } catch (CmsException e) { // noop } } return super.isVisible(); } };
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getItem() != null) { try { return getCms().countLockedResources(new CmsUUID(getItem().getId())) != 0; } catch (CmsException e) { // noop } } return super.isVisible(); } };
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getItem() != null) { try { return getCms().countLockedResources(new CmsUUID(getItem().getId())) != 0; } catch (CmsException e) { // noop } } return super.isVisible(); } };
/** * Restores a backed up resource version.<p> * * @throws CmsException if something goes wrong */ protected void performRestoreOperation() throws CmsException { CmsUUID structureId = new CmsUUID((String)getSelectedItem().get(LIST_COLUMN_STRUCTURE_ID)); int version = Integer.parseInt((getSelectedItems().get(0)).getId()); if (version == CmsHistoryResourceHandler.PROJECT_OFFLINE_VERSION) { // it is not possible to restore the offline version return; } CmsResource res = getCms().readResource(structureId, CmsResourceFilter.IGNORE_EXPIRATION); checkLock(getCms().getSitePath(res)); getCms().restoreResourceVersion(res.getStructureId(), version); }
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getItem() != null) { String groupId = getItem().getId(); try { return getCms().readGroup(new CmsUUID(groupId)).isEnabled(); } catch (CmsException e) { return false; } } return super.isVisible(); } };
/** * @see org.opencms.workplace.tools.A_CmsHtmlIconButton#isVisible() */ @Override public boolean isVisible() { if (getItem() != null) { String groupId = getItem().getId(); try { return !getCms().readGroup(new CmsUUID(groupId)).isEnabled(); } catch (CmsException e) { return false; } } return super.isVisible(); } };