/** * Sets all needed data of the user into the list item object.<p> * * @param user the user to set the data for * @param item the list item object to set the data into */ protected void setUserData(CmsUser user, CmsListItem item) { item.set(LIST_COLUMN_LOGIN, user.getName()); item.set(LIST_COLUMN_NAME, user.getSimpleName()); item.set(LIST_COLUMN_ORGUNIT, CmsOrganizationalUnit.SEPARATOR + user.getOuFqn()); item.set(LIST_COLUMN_FULLNAME, user.getFullName()); }
/** * Sets all needed data of the user into the list item object.<p> * * @param user the user to set the data for * @param item the list item object to set the data into */ protected void setUserData(CmsUser user, CmsListItem item) { item.set(LIST_COLUMN_LOGIN, user.getName()); item.set(LIST_COLUMN_NAME, user.getFullName()); item.set(LIST_COLUMN_EMAIL, user.getEmail()); item.set(LIST_COLUMN_LASTLOGIN, new Date(user.getLastlogin())); }
/** * Sets all needed data of the user into the list item object.<p> * * @param user the user to set the data for * @param item the list item object to set the data into */ protected void setUserData(CmsUser user, CmsListItem item) { item.set(LIST_COLUMN_LOGIN, user.getName()); item.set(LIST_COLUMN_DISPLAY, user.getSimpleName()); item.set(LIST_COLUMN_NAME, user.getFullName()); item.set(LIST_COLUMN_EMAIL, user.getEmail()); item.set(LIST_COLUMN_LASTLOGIN, new Date(user.getLastlogin())); item.set(LIST_COLUMN_ENABLED, new Boolean(user.isEnabled())); }
/** * @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( CmsLockedResourcesList.LIST_COLUMN_IS_RELATED, Boolean.valueOf((resUtil.getResource().getFlags() & FLAG_RELATED_RESOURCE) == FLAG_RELATED_RESOURCE)); } }
/** * @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( CmsLockedResourcesList.LIST_COLUMN_IS_RELATED, Boolean.valueOf((resUtil.getResource().getFlags() & FLAG_RELATED_RESOURCE) == FLAG_RELATED_RESOURCE)); } }
/** * @see org.opencms.workplace.tools.accounts.A_CmsUsersList#setUserData(org.opencms.file.CmsUser, org.opencms.workplace.list.CmsListItem) */ @Override protected void setUserData(CmsUser user, CmsListItem item) { super.setUserData(user, item); item.set(LIST_COLUMN_ORGUNIT, CmsOrganizationalUnit.SEPARATOR + user.getOuFqn()); }
/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() { List<CmsListItem> result = new ArrayList<CmsListItem>(); // get content List<String> resources = resources(); Iterator<String> itResources = resources.iterator(); String path; while (itResources.hasNext()) { path = itResources.next(); CmsListItem item = getList().newItem(path); item.set(LIST_COLUMN_PATH, path); result.add(item); } return result; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() { List<CmsListItem> result = new ArrayList<CmsListItem>(); // get content List<CmsSearchIndexSource> sources = searchIndexSources(); Iterator<CmsSearchIndexSource> itSources = sources.iterator(); CmsSearchIndexSource source; while (itSources.hasNext()) { source = itSources.next(); CmsListItem item = getList().newItem(source.getName()); // use "null" String to avoid exception if name is empty item.set(LIST_COLUMN_NAME, String.valueOf(source.getName())); item.set(LIST_COLUMN_INDEXER, source.getIndexer().getClass()); result.add(item); } return result; }
/** * @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())); }
/** * Makes a list item from a user.<p> * * @param user the user * * @return the list item */ protected CmsListItem makeUserItem(CmsUser user) { CmsListItem item = getList().newItem(user.getId().toString()); item.set(LIST_COLUMN_LOGIN, user.getName()); item.set(LIST_COLUMN_NAME, user.getSimpleName()); item.set(LIST_COLUMN_ORGUNIT, CmsOrganizationalUnit.SEPARATOR + user.getOuFqn()); item.set(LIST_COLUMN_FULLNAME, user.getFullName()); return item; }
/** * @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( LIST_COLUMN_IS_RELATED, Boolean.valueOf( !getSettings().getPublishList().getAllResources().contains(resUtil.getResource()))); } };
/** * @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( LIST_COLUMN_IS_RELATED, Boolean.valueOf(!getSettings().getPublishList().getAllResources().contains( resUtil.getResource()))); } };
/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List getListItems() throws CmsException { List ret = new ArrayList(); // get content List users = getUsers(); Iterator itUsers = users.iterator(); while (itUsers.hasNext()) { CmsUser user = (CmsUser)itUsers.next(); CmsListItem item = getList().newItem(user.getId().toString()); item.set(LIST_COLUMN_LOGIN, user.getName()); item.set(LIST_COLUMN_FULLNAME, user.getFullName()); ret.add(item); } return ret; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() throws CmsException { List<CmsListItem> ret = new ArrayList<CmsListItem>(); Iterator<CmsOrganizationalUnit> itOrgUnits = getOrgUnits().iterator(); while (itOrgUnits.hasNext()) { CmsOrganizationalUnit orgUnit = itOrgUnits.next(); CmsListItem item = getList().newItem(orgUnit.getName()); item.set(LIST_COLUMN_DESCRIPTION, orgUnit.getDescription(getLocale())); item.set(LIST_COLUMN_PATH, CmsOrganizationalUnit.SEPARATOR + orgUnit.getName()); ret.add(item); } return ret; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() throws CmsException { List<CmsListItem> ret = new ArrayList<CmsListItem>(); List<CmsOrganizationalUnit> orgUnits = getOrgUnits(); Iterator<CmsOrganizationalUnit> itOrgUnits = orgUnits.iterator(); while (itOrgUnits.hasNext()) { CmsOrganizationalUnit childOrgUnit = itOrgUnits.next(); CmsListItem item = getList().newItem(childOrgUnit.getName()); item.set(LIST_COLUMN_NAME, CmsOrganizationalUnit.SEPARATOR + childOrgUnit.getName()); item.set(LIST_COLUMN_DESCRIPTION, childOrgUnit.getDescription(getLocale())); item.set(LIST_COLUMN_ADMIN, Boolean.valueOf( OpenCms.getRoleManager().hasRole(getCms(), CmsRole.ADMINISTRATOR.forOrgUnit(childOrgUnit.getName())))); item.set(LIST_COLUMN_WEBUSER, Boolean.valueOf(childOrgUnit.hasFlagWebuser())); ret.add(item); } return ret; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List getListItems() throws CmsException { List ret = new ArrayList(); // get content List groups = getGroups(); Iterator itGroups = groups.iterator(); while (itGroups.hasNext()) { CmsGroup group = (CmsGroup)itGroups.next(); CmsListItem item = getList().newItem(group.getId().toString()); item.set(LIST_COLUMN_NAME, group.getName()); ret.add(item); } return ret; }
/** * Makes a list item from a user.<p> * * @param user the user * * @return the list item */ protected CmsListItem makeListItem(CmsUser user) { CmsListItem item = getList().newItem(user.getId().toString()); item.set(LIST_COLUMN_LOGIN, user.getName()); item.set(LIST_COLUMN_FULLNAME, user.getFullName()); return item; }
/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() throws CmsException { List<CmsListItem> ret = new ArrayList<CmsListItem>(); // get content List<CmsGroup> groups = getGroups(); Iterator<CmsGroup> itGroups = groups.iterator(); while (itGroups.hasNext()) { CmsGroup group = itGroups.next(); CmsListItem item = getList().newItem(group.getId().toString()); item.set(LIST_COLUMN_NAME, group.getName()); item.set(LIST_COLUMN_DISPLAY, OpenCms.getWorkplaceManager().translateGroupName(group.getName(), true)); ret.add(item); } return ret; }
/** * @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; }