/** * Returns the display name for this organizational unit.<p> * * @param locale the locale * * @return the display name for this organizational unit */ public String getDisplayName(Locale locale) { if (getParentFqn() == null) { // for the root ou return getDescription(locale); } return Messages.get().getBundle(locale).key( Messages.GUI_ORGUNIT_DISPLAY_NAME_2, getDescription(locale), CmsOrganizationalUnit.SEPARATOR + getName()); }
/** * Returns the display name for this organizational unit.<p> * * @param locale the locale * * @return the display name for this organizational unit */ public String getDisplayName(Locale locale) { if (getParentFqn() == null) { // for the root ou return getDescription(locale); } return Messages.get().getBundle(locale).key( Messages.GUI_ORGUNIT_DISPLAY_NAME_2, getDescription(locale), CmsOrganizationalUnit.SEPARATOR + getName()); }
/** * @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 getListItems() throws CmsException { List ret = new ArrayList(); // get content List orgUnits = getOrgUnits(); Iterator itOrgUnits = orgUnits.iterator(); while (itOrgUnits.hasNext()) { CmsOrganizationalUnit orgUnit = (CmsOrganizationalUnit)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; }
result += value + ":" + (CmsStringUtil.isNotEmptyOrWhitespaceOnly(unit.getDescription(messages.getLocale())) ? (unit.getDescription(messages.getLocale()) + ": ") : "") + value;
/** * @see org.opencms.workplace.tools.accounts.A_CmsUsersList#fillDetails(java.lang.String) */ @Override protected void fillDetails(String detailId) { super.fillDetails(detailId); List users = getList().getAllContent(); Iterator itUsers = users.iterator(); while (itUsers.hasNext()) { CmsListItem item = (CmsListItem)itUsers.next(); String userName = item.get(LIST_COLUMN_LOGIN).toString(); StringBuffer html = new StringBuffer(512); try { if (detailId.equals(LIST_DETAIL_ORGUNIT_DESC)) { CmsUser user = readUser(userName); html.append( OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), user.getOuFqn()).getDescription( getLocale())); } else { continue; } } catch (Exception e) { // noop } item.set(detailId, html.toString()); } }
/** * @see org.opencms.workplace.tools.accounts.A_CmsGroupsList#fillDetails(java.lang.String) */ @Override protected void fillDetails(String detailId) { super.fillDetails(detailId); // get content List<CmsListItem> groups = getList().getAllContent(); Iterator<CmsListItem> itGroups = groups.iterator(); while (itGroups.hasNext()) { CmsListItem item = itGroups.next(); String groupName = item.get(LIST_COLUMN_NAME).toString(); StringBuffer html = new StringBuffer(512); try { if (detailId.equals(LIST_DETAIL_ORGUNIT_DESC)) { CmsGroup group = getCms().readGroup(groupName); html.append( OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), group.getOuFqn()).getDescription( getLocale())); } else { continue; } } catch (Exception e) { // ignore } item.set(detailId, html.toString()); } }
/** * @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; }
html.append(Messages.get().getBundle(m_locale).key( Messages.GUI_LOGIN_HEADLINE_SELECTED_ORGUNIT_1, m_ou.getDescription(getCmsObject().getRequestContext().getLocale()))); html.append("</div>\n"); } else if (m_action == ACTION_LOGIN) {
/** * Returns the description of the parent ou.<p> * * @return the description of the parent ou */ public String getAssignedOu() { try { return OpenCms.getOrgUnitManager().readOrganizationalUnit(getCms(), getParamOufqn()).getDescription( getLocale()) + " (" + CmsOrganizationalUnit.SEPARATOR + getParamOufqn() + ")"; } catch (CmsException e) { return null; } }
/** * @see org.opencms.workplace.list.A_CmsListDialog#getListItems() */ @Override protected List<CmsListItem> getListItems() throws CmsException { List<CmsListItem> ret = new ArrayList<CmsListItem>(); List<CmsOrganizationalUnit> orgUnits = OpenCms.getOrgUnitManager().getOrganizationalUnits( getCms(), m_paramOufqn, true); 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.db.I_CmsUserDriver#fillDefaults(org.opencms.db.CmsDbContext) */ public void fillDefaults(CmsDbContext dbc) throws CmsInitException { try { CmsOrganizationalUnit ou = (CmsOrganizationalUnit)(dbc.getAttribute(CmsDriverManager.ATTR_INIT_OU)); if (ou == null) { internalCreateDefaultGroups(dbc, "", "", false); } else { internalCreateDefaultGroups(dbc, ou.getName(), ou.getDescription(), ou.hasFlagWebuser()); } } catch (CmsException e) { if (CmsLog.INIT.isErrorEnabled()) { CmsLog.INIT.error(Messages.get().getBundle().key(Messages.INIT_DEFAULT_USERS_CREATION_FAILED_0), e); } throw new CmsInitException(Messages.get().container(Messages.ERR_INITIALIZING_USER_DRIVER_0), e); } }
jsonObj.put("description", ou.getDescription(m_locale));
/** * Initializes the organizational unit object to work with depending on the dialog state and request parameters.<p> * */ @Override protected void initOrgUnitObject() { try { CmsOrganizationalUnit orgunit = OpenCms.getOrgUnitManager().readOrganizationalUnit( getCms(), getParamOufqn()); m_orgUnitBean = new CmsOrgUnitBean(); m_orgUnitBean.setDescription(orgunit.getDescription(getLocale())); m_orgUnitBean.setName(orgunit.getName()); if (!orgunit.getName().equals("")) { m_orgUnitBean.setParentOu(orgunit.getParentFqn()); } m_orgUnitBean.setFqn(orgunit.getName()); setResourcesInBean( m_orgUnitBean, OpenCms.getOrgUnitManager().getResourcesForOrganizationalUnit(getCms(), orgunit.getName())); } catch (Exception e) { // noop } } }
if (!isNewOrgUnit()) { m_orgUnitBean.setName(orgunit.getName()); m_orgUnitBean.setDescription(orgunit.getDescription(getLocale())); m_orgUnitBean.setParentOu(orgunit.getParentFqn()); m_orgUnitBean.setFqn(orgunit.getName()); OpenCms.getOrgUnitManager().readOrganizationalUnit( getCms(), orgunit.getParentFqn()).getDescription(getLocale()) + " (" + CmsOrganizationalUnit.SEPARATOR m_orgUnitBean.setParentOu(orgunit.getName()); m_orgUnitBean.setParentOuDesc( orgunit.getDescription(getLocale()) + " (" + CmsOrganizationalUnit.SEPARATOR
orgunit.getDescription()); digestElement(orgunitElement, description);
orgunit.getDescription()); digestElement(orgunitElement, description);
organizationalUnit.getDescription(), null));
dbc, resource, new CmsProperty(ORGUNIT_PROPERTY_DESCRIPTION, organizationalUnit.getDescription(), null));
dbc, resource, new CmsProperty(ORGUNIT_PROPERTY_DESCRIPTION, organizationalUnit.getDescription(), null));