/** * @see org.opencms.security.CmsPrincipal#getDescription() */ @Override public String getDescription() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION); }
/** * Returns the address line of this user.<p> * * @return the address line of this user */ public String getAddress() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_ADDRESS); }
/** * Returns the institution information of this user.<p> * * This information is stored in the "additional information" storage map * using the key <code>{@link CmsUserSettings#ADDITIONAL_INFO_INSTITUTION}</code>.<p> * * @return the institution information of this user */ public String getInstitution() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_INSTITUTION); }
/** * Returns the city information of this user.<p> * * This information is stored in the "additional information" storage map * using the key <code>{@link CmsUserSettings#ADDITIONAL_INFO_CITY}</code>.<p> * * @return the city information of this user */ public String getCity() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_CITY); }
/** * Returns the country information of this user.<p> * * This information is stored in the "additional information" storage map * using the key <code>{@link CmsUserSettings#ADDITIONAL_INFO_COUNTRY}</code>.<p> * * @return the country information of this user */ public String getCountry() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_COUNTRY); }
/** * @see org.opencms.security.CmsPrincipal#getDescription() */ @Override public String getDescription() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION); }
/** * Returns the city information of this user.<p> * * This information is stored in the "additional information" storage map * using the key <code>{@link CmsUserSettings#ADDITIONAL_INFO_CITY}</code>.<p> * * @return the city information of this user */ public String getCity() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_CITY); }
/** * Returns the zip code information of this user.<p> * * This information is stored in the "additional information" storage map * using the key <code>{@link CmsUserSettings#ADDITIONAL_INFO_ZIPCODE}</code>.<p> * * @return the zip code information of this user */ public String getZipcode() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_ZIPCODE); }
/** * Returns the country information of this user.<p> * * This information is stored in the "additional information" storage map * using the key <code>{@link CmsUserSettings#ADDITIONAL_INFO_COUNTRY}</code>.<p> * * @return the country information of this user */ public String getCountry() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_COUNTRY); }
/** * Returns the address line of this user.<p> * * @return the address line of this user */ public String getAddress() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_ADDRESS); }
/** * Returns the zip code information of this user.<p> * * This information is stored in the "additional information" storage map * using the key <code>{@link CmsUserSettings#ADDITIONAL_INFO_ZIPCODE}</code>.<p> * * @return the zip code information of this user */ public String getZipcode() { return (String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_ZIPCODE); }
/** * Checks whether the given user has an individual user image.<p> * * @param user the user * * @return <code>true</code> if the given user has an individual user image */ public static boolean hasUserImage(CmsUser user) { return CmsStringUtil.isNotEmptyOrWhitespaceOnly((String)user.getAdditionalInfo(USER_IMAGE_INFO)); }
/** * Removes an authorization token from the user's additional information.<p> * * @param cms the CMS context * @param user the user * @throws CmsException if something goes wrong */ public static void clearToken(CmsObject cms, CmsUser user) throws CmsException { user.getAdditionalInfo().remove(ADDINFO_KEY); cms.writeUser(user); }
/** * Checks if small elements in a container page should be initially editable.<p> * * @param request the current request * @param cms the current CMS context * @return true if small elements should be initially editable */ private boolean isEditSmallElements(HttpServletRequest request, CmsObject cms) { CmsUser user = cms.getRequestContext().getCurrentUser(); String editSmallElementsStr = (String)(user.getAdditionalInfo().get(ADDINFO_EDIT_SMALL_ELEMENTS)); if (editSmallElementsStr == null) { return true; } else { return Boolean.valueOf(editSmallElementsStr).booleanValue(); } }
/** * Returns the show editor help flag.<p> * * @param cms the cms context * * @return the show editor help flag */ public boolean isShowEditorHelp(CmsObject cms) { CmsUser user = cms.getRequestContext().getCurrentUser(); String showHelp = (String)user.getAdditionalInfo(ADDINFO_ADE_SHOW_EDITOR_HELP); return CmsStringUtil.isEmptyOrWhitespaceOnly(showHelp) || Boolean.parseBoolean(showHelp); }
/** * Returns the id of the last used workflow for the current user.<p> * * @return the workflow id */ private String getLastWorkflowForUser() { CmsUser user = getCmsObject().getRequestContext().getCurrentUser(); return (String)user.getAdditionalInfo(PARAM_WORKFLOW_ID); }
/** * Reads the result view type from the current user.<p> * * @return the result view type */ private String readResultViewType() { return (String)getCmsObject().getRequestContext().getCurrentUser().getAdditionalInfo( RESULT_VIEW_TYPE_ADD_INFO_KEY); }
/** * @see org.opencms.ade.containerpage.shared.rpc.I_CmsContainerpageService#setEditSmallElements(boolean) */ public void setEditSmallElements(boolean editSmallElements) throws CmsRpcException { try { CmsObject cms = getCmsObject(); CmsUser user = cms.getRequestContext().getCurrentUser(); user.getAdditionalInfo().put(ADDINFO_EDIT_SMALL_ELEMENTS, "" + editSmallElements); cms.writeUser(user); } catch (Throwable t) { error(t); } }
/** * Returns the description of this organizational unit.<p> * * @param locale the locale * * @return the description of this organizational unit */ public String getDescription(Locale locale) { CmsMacroResolver macroResolver = new CmsMacroResolver(); macroResolver.setMessages(org.opencms.db.generic.Messages.get().getBundle(locale)); return macroResolver.resolveMacros((String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION)); }
/** * Returns the description of this organizational unit.<p> * * @param locale the locale * * @return the description of this organizational unit */ public String getDescription(Locale locale) { CmsMacroResolver macroResolver = new CmsMacroResolver(); macroResolver.setMessages(org.opencms.db.generic.Messages.get().getBundle(locale)); return macroResolver.resolveMacros((String)getAdditionalInfo(CmsUserSettings.ADDITIONAL_INFO_DESCRIPTION)); }