1 31 32 package org.opencms.workplace.tools.accounts; 33 34 import org.opencms.jsp.CmsJspActionElement; 35 import org.opencms.main.CmsException; 36 import org.opencms.security.CmsPrincipal; 37 import org.opencms.workplace.list.CmsListColumnDefinition; 38 import org.opencms.workplace.list.CmsListDirectAction; 39 40 import java.util.List ; 41 42 import javax.servlet.http.HttpServletRequest ; 43 import javax.servlet.http.HttpServletResponse ; 44 import javax.servlet.jsp.PageContext ; 45 46 55 public class CmsGroupsList extends A_CmsGroupsList { 56 57 58 public static final String LIST_ID = "lg"; 59 60 65 public CmsGroupsList(CmsJspActionElement jsp) { 66 67 super(jsp, LIST_ID, Messages.get().container(Messages.GUI_GROUPS_LIST_NAME_0)); 68 } 69 70 77 public CmsGroupsList(PageContext context, HttpServletRequest req, HttpServletResponse res) { 78 79 this(new CmsJspActionElement(context, req, res)); 80 } 81 82 85 protected List getGroups() throws CmsException { 86 87 return CmsPrincipal.filterCore(getCms().getGroups()); 88 } 89 90 93 protected void setDeleteAction(CmsListColumnDefinition deleteCol) { 94 95 CmsListDirectAction deleteAction = new CmsListDirectAction(LIST_ACTION_DELETE); 96 deleteAction.setName(Messages.get().container(Messages.GUI_GROUPS_LIST_ACTION_DELETE_NAME_0)); 97 deleteAction.setHelpText(Messages.get().container(Messages.GUI_GROUPS_LIST_ACTION_DELETE_HELP_0)); 98 deleteAction.setIconPath(ICON_DELETE); 99 deleteCol.addDirectAction(deleteAction); 100 } 101 102 105 protected void setEditAction(CmsListColumnDefinition editCol) { 106 107 CmsListDirectAction editAction = new CmsListDirectAction(LIST_ACTION_EDIT); 108 editAction.setName(Messages.get().container(Messages.GUI_GROUPS_LIST_ACTION_EDIT_NAME_0)); 109 editAction.setHelpText(Messages.get().container(Messages.GUI_GROUPS_LIST_ACTION_EDIT_HELP_0)); 110 editAction.setIconPath(A_CmsUsersList.PATH_BUTTONS + "group.png"); 111 editCol.addDirectAction(editAction); 112 } 113 } | Popular Tags |