/** * Returns the last saved gallery for the given gallery key.<p> * * @param galleryKey the key for which to look up the gallery * @return the last saved gallery for the given gallery key **/ public String getLastUsedGallery(String galleryKey) { String result = m_lastUsedGalleries.get(galleryKey); LOG.info("user=" + m_user.getName() + ": getLastUsedGallery " + galleryKey + " : returning " + result); return result; }
/** * Saves the last gallery for a given key.<p> * * @param galleryKey the gallery key * @param gallerypath the resourcepath of the gallery */ public void setLastUsedGallery(String galleryKey, String gallerypath) { m_lastUsedGalleries.put(galleryKey, gallerypath); LOG.info("user=" + m_user.getName() + ": setLastUsedGallery " + galleryKey + " -> " + gallerypath); }
/** * Returns the user.<p> * * @return the user */ public String getUser() { return m_context.getCurrentUser().getName(); } }
/** * Caches the given user under its id AND the fully qualified name.<p> * * @param user the user to cache */ public void cacheUser(CmsUser user) { if (m_disabled.get(CacheType.USER) != null) { return; } m_cacheUser.put(user.getId().toString(), user); m_cacheUser.put(user.getName(), user); }
/** * Caches the given user under its id AND the fully qualified name.<p> * * @param user the user to cache */ public void cacheUser(CmsUser user) { if (m_disabled.get(CacheType.USER) != null) { return; } m_cacheUser.put(user.getId().toString(), user); m_cacheUser.put(user.getName(), user); }
/** * Removes the given user from the cache.<p> * * The user is removed by name AND also by uuid.<p> * * @param user the user to remove from cache */ public void uncacheUser(CmsUser user) { m_cacheUser.remove(user.getId().toString()); m_cacheUser.remove(user.getName()); }
/** * Removes the given user from the cache.<p> * * The user is removed by name AND also by uuid.<p> * * @param user the user to remove from cache */ public void uncacheUser(CmsUser user) { m_cacheUser.remove(user.getId().toString()); m_cacheUser.remove(user.getName()); }
/** * Returns the user name of the currently logged in user.<p> * * @return the user name of the currently logged in user */ public String getUserName() { return getRequestContext().getCurrentUser().getName(); }
/** * Returns the name of the current user for initializing the explorer view.<p> * * @return the name of the user */ public String getUserName() { return getSettings().getUser().getName(); }
/** * Returns the user name of the currently logged in user.<p> * * @return the user name of the currently logged in user */ public String getUserName() { return getRequestContext().currentUser().getName(); }
/** * Returns the set of permissions of the current user for a given resource.<p> * * @param resourceName the name of the resource * * @return the bit set of the permissions of the current user * * @throws CmsException if something goes wrong */ public CmsPermissionSet getPermissions(String resourceName) throws CmsException { return getPermissions(resourceName, m_context.currentUser().getName()); }
/** * Checks if this user is the default guest user.<p> * * @return <code>true</code> if this user is the default guest user */ public boolean isGuestUser() { return OpenCms.getDefaultUsers().isUserGuest(getName()); }
/** * Returns the current users name.<p> * * @return the current users name */ public String userName() { return m_cms.getRequestContext().getCurrentUser().getName(); }
/** * Returns the set of permissions of the current user for a given resource.<p> * * @param resourceName the name of the resource * * @return the bit set of the permissions of the current user * * @throws CmsException if something goes wrong */ public CmsPermissionSet getPermissions(String resourceName) throws CmsException { return getPermissions(resourceName, m_context.getCurrentUser().getName()); }
/** * Checks if this user is the default guest user.<p> * * @return <code>true</code> if this user is the default guest user */ public boolean isGuestUser() { return OpenCms.getDefaultUsers().isUserGuest(getName()); }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters getCms().readUser(new CmsUUID(getParamUserid())).getName(); }
/** * @see org.opencms.workplace.CmsWidgetDialog#validateParamaters() */ @Override protected void validateParamaters() throws Exception { // test the needed parameters getCms().readUser(new CmsUUID(getParamUserid())).getName(); } }
/** * 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())); }
/** * @see org.opencms.workplace.CmsWorkplace#checkRole() */ @Override protected void checkRole() throws CmsRoleViolationException { // needed since these pages are static exported if (!OpenCms.getDefaultUsers().isUserExport(getCms().getRequestContext().getCurrentUser().getName())) { // only for users that are not the export user OpenCms.getRoleManager().checkRole(getCms(), CmsRole.WORKPLACE_USER); } }
/** * @see org.opencms.workplace.CmsWorkplace#checkRole() */ @Override protected void checkRole() throws CmsRoleViolationException { // needed since these pages are static exported if (!OpenCms.getDefaultUsers().isUserExport(getCms().getRequestContext().currentUser().getName())) { // only for users that are not the export user OpenCms.getRoleManager().checkRole(getCms(), CmsRole.WORKPLACE_USER); } }