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.main.CmsRuntimeException; 37 import org.opencms.workplace.list.CmsListColumnDefinition; 38 import org.opencms.workplace.list.CmsListDirectAction; 39 import org.opencms.workplace.list.CmsListItemActionIconComparator; 40 import org.opencms.workplace.list.CmsListMetadata; 41 42 import java.util.List ; 43 44 import javax.servlet.http.HttpServletRequest ; 45 import javax.servlet.http.HttpServletResponse ; 46 import javax.servlet.jsp.PageContext ; 47 48 57 public class CmsShowUserGroupsList extends A_CmsUserGroupsList { 58 59 60 public static final String LIST_ID = "lsug"; 61 62 67 public CmsShowUserGroupsList(CmsJspActionElement jsp) { 68 69 this(jsp, LIST_ID); 70 } 71 72 78 public CmsShowUserGroupsList(CmsJspActionElement jsp, String listId) { 79 80 super(jsp, listId, Messages.get().container(Messages.GUI_USERGROUPS_LIST_NAME_0), false); 81 } 82 83 90 public CmsShowUserGroupsList(PageContext context, HttpServletRequest req, HttpServletResponse res) { 91 92 this(new CmsJspActionElement(context, req, res)); 93 } 94 95 98 public void executeListMultiActions() throws CmsRuntimeException { 99 100 throwListUnsupportedActionException(); 101 } 102 103 106 public void executeListSingleActions() throws CmsRuntimeException { 107 108 throwListUnsupportedActionException(); 109 } 110 111 114 protected String defaultActionHtmlStart() { 115 116 return getList().listJs(getLocale()) + dialogContentStart(getParamTitle()); 117 } 118 119 122 protected List getGroups() throws CmsException { 123 124 return getCms().getGroupsOfUser(getParamUsername()); 125 } 126 127 130 protected void setDefaultAction(CmsListColumnDefinition nameCol) { 131 132 } 134 135 138 protected void setIconAction(CmsListColumnDefinition iconCol) { 139 140 CmsListDirectAction dirAction = new CmsGroupStateAction(LIST_ACTION_ICON_DIRECT, getCms(), true); 142 dirAction.setName(Messages.get().container(Messages.GUI_GROUPS_LIST_DIRECT_NAME_0)); 143 dirAction.setHelpText(Messages.get().container(Messages.GUI_GROUPS_LIST_DIRECT_HELP_0)); 144 dirAction.setIconPath(A_CmsUsersList.PATH_BUTTONS + "group.png"); 145 dirAction.setEnabled(false); 146 iconCol.addDirectAction(dirAction); 147 148 CmsListDirectAction indirAction = new CmsGroupStateAction(LIST_ACTION_ICON_INDIRECT, getCms(), false); 150 indirAction.setName(Messages.get().container(Messages.GUI_GROUPS_LIST_INDIRECT_NAME_0)); 151 indirAction.setHelpText(Messages.get().container(Messages.GUI_GROUPS_LIST_INDIRECT_HELP_0)); 152 indirAction.setIconPath(A_CmsUsersList.PATH_BUTTONS + "group_indirect.png"); 153 indirAction.setEnabled(false); 154 iconCol.addDirectAction(indirAction); 155 156 iconCol.setListItemComparator(new CmsListItemActionIconComparator()); 157 } 158 159 162 protected void setMultiActions(CmsListMetadata metadata) { 163 164 } 166 167 170 protected void setStateActionCol(CmsListMetadata metadata) { 171 172 } 174 } 175 | Popular Tags |