| org.apache.roller.business.UserManager
All known Subclasses: org.apache.roller.business.hibernate.HibernateUserManagerImpl,
UserManager | public interface UserManager (Code) | | Manages users, weblogs, permissions, and weblog pages.
|
Method Summary | |
public void | addUser(UserData newUser) Add new user object to Roller. | public void | addWebsite(WebsiteData newWebsite) Add new website, give creator admin permission, creates blogroll,
creates categories and other objects required for new website. | public List | getAllPermissions(WebsiteData website) | public List | getAllPermissions(UserData user) | public List | getMostCommentedWebsites(Date startDate, Date endDate, int offset, int length) Get websites ordered by descending number of comments. | public WeblogTemplate | getPage(String id) Get page by id. | public WeblogTemplate | getPageByLink(WebsiteData w, String p) Get website's page by link. | public WeblogTemplate | getPageByName(WebsiteData w, String p) Get user's page by name. | public List | getPages(WebsiteData w) | public List | getPendingPermissions(UserData user) Get pending permissions for user. | public List | getPendingPermissions(WebsiteData user) Get pending permissions for website. | public PermissionsData | getPermissions(String id) Get permissions object by id. | public PermissionsData | getPermissions(WebsiteData website, UserData user) Get permissions of user in website. | public UserData | getUser(String id) Get user by id. | public UserData | getUserByUserName(String userName) | public UserData | getUserByUserName(String userName, Boolean enabled) | public Map | getUserNameLetterMap() Get map with 26 entries, one for each letter A-Z and
containing integers reflecting the number of users whose
names start with each letter. | public List | getUsers(int offset, int length) | public List | getUsers(Boolean enabled, Date startDate, Date endDate, int offset, int length) Get all users, optionally include dis-enabled users. | public List | getUsers(WebsiteData website, Boolean enabled, int offset, int length) Get all users or a website. | public List | getUsersByLetter(char letter, int offset, int length) | public List | getUsersStartingWith(String startsWith, Boolean enabled, int offset, int length) Returns users whose usernames or email addresses start with a string. | public Map | getWeblogHandleLetterMap() Get map with 26 entries, one for each letter A-Z and
containing integers reflecting the number of weblogs whose
names start with each letter. | public List | getWeblogsByLetter(char letter, int offset, int length) | public WebsiteData | getWebsite(String id) Get website object by name. | public WebsiteData | getWebsiteByHandle(String handle) Get website specified by handle (or null if enabled website not found). | public WebsiteData | getWebsiteByHandle(String handle, Boolean enabled) Get website specified by handle with option to return only enabled websites. | public List | getWebsites(UserData user, Boolean enabled, Boolean active, Date startDate, Date endDate, int offset, int length) Get websites optionally restricted by user, enabled and active status. | public PermissionsData | inviteUser(WebsiteData website, UserData user, short perms) | public void | release() Release any resources held by manager. | public void | removePage(WeblogTemplate page) Remove page. | public void | removePermissions(PermissionsData perms) Remove permissions object. | public void | removeUser(UserData user) Remove user. | public void | removeWebsite(WebsiteData website) Remove website object. | public void | retireUser(WebsiteData website, UserData user) | public void | savePage(WeblogTemplate data) Store page. | public void | savePermissions(PermissionsData perms) Save permissions object. | public void | saveUser(UserData data) Store a single user. | public void | saveWebsite(WebsiteData data) Store a single weblog. |
addUser | public void addUser(UserData newUser) throws RollerException(Code) | | Add new user object to Roller. User will be given the global editor role,
unless it's the first user, who will get the global admin role.
Parameters: user - User object to be added, initialized with name, password, etc. |
addWebsite | public void addWebsite(WebsiteData newWebsite) throws RollerException(Code) | | Add new website, give creator admin permission, creates blogroll,
creates categories and other objects required for new website.
Parameters: newWebsite - New website to be created, must have creator. |
getAllPermissions | public List getAllPermissions(WebsiteData website) throws RollerException(Code) | | Get all permissions in website
Parameters: website - Website (not null) PermissionsData object |
getAllPermissions | public List getAllPermissions(UserData user) throws RollerException(Code) | | Get all permissions of user
Parameters: user - User (not null) PermissionsData object |
getMostCommentedWebsites | public List getMostCommentedWebsites(Date startDate, Date endDate, int offset, int length) throws RollerException(Code) | | Get websites ordered by descending number of comments.
Parameters: startDate - Restrict to those created after (or null for all) Parameters: endDate - Restrict to those created before (or null for all) Parameters: offset - Offset into results (for paging) Parameters: len - Maximum number of results to return (for paging) |
getPendingPermissions | public List getPendingPermissions(UserData user) throws RollerException(Code) | | Get pending permissions for user.
Parameters: user - User (not null) |
getUserNameLetterMap | public Map getUserNameLetterMap() throws RollerException(Code) | | Get map with 26 entries, one for each letter A-Z and
containing integers reflecting the number of users whose
names start with each letter.
|
getUsers | public List getUsers(Boolean enabled, Date startDate, Date endDate, int offset, int length) throws RollerException(Code) | | Get all users, optionally include dis-enabled users.
Parameters: enabled - True for enabled only, false for disabled only, null for all Parameters: startDate - Restrict to those created after (or null for all) Parameters: endDate - Restrict to those created before (or null for all) |
getUsers | public List getUsers(WebsiteData website, Boolean enabled, int offset, int length) throws RollerException(Code) | | Get all users or a website.
Parameters: website - Get all users of this website (or null for all) |
getUsersByLetter | public List getUsersByLetter(char letter, int offset, int length) throws RollerException(Code) | | Get collection of users whose names begin with specified letter
|
getUsersStartingWith | public List getUsersStartingWith(String startsWith, Boolean enabled, int offset, int length) throws RollerException(Code) | | Returns users whose usernames or email addresses start with a string.
Parameters: startsWith - String to match userNames and emailAddresses against Parameters: offset - Offset into results (for paging) Parameters: length - Max to return (for paging) Parameters: enabled - True for only enalbed, false for disabled, null for all List of (up to length) users that match startsWith string |
getWeblogHandleLetterMap | public Map getWeblogHandleLetterMap() throws RollerException(Code) | | Get map with 26 entries, one for each letter A-Z and
containing integers reflecting the number of weblogs whose
names start with each letter.
|
getWeblogsByLetter | public List getWeblogsByLetter(char letter, int offset, int length) throws RollerException(Code) | | Get collection of weblogs whose handles begin with specified letter
|
getWebsiteByHandle | public WebsiteData getWebsiteByHandle(String handle) throws RollerException(Code) | | Get website specified by handle (or null if enabled website not found).
Parameters: handle - Handle of website |
getWebsiteByHandle | public WebsiteData getWebsiteByHandle(String handle, Boolean enabled) throws RollerException(Code) | | Get website specified by handle with option to return only enabled websites.
Parameters: handle - Handle of website |
getWebsites | public List getWebsites(UserData user, Boolean enabled, Boolean active, Date startDate, Date endDate, int offset, int length) throws RollerException(Code) | | Get websites optionally restricted by user, enabled and active status.
Parameters: user - Get all websites for this user (or null for all) Parameters: offset - Offset into results (for paging) Parameters: len - Maximum number of results to return (for paging) Parameters: enabled - Get all with this enabled state (or null or all) Parameters: active - Get all with this active state (or null or all) Parameters: startDate - Restrict to those created after (or null for all) Parameters: endDate - Restrict to those created before (or null for all) |
inviteUser | public PermissionsData inviteUser(WebsiteData website, UserData user, short perms) throws RollerException(Code) | | Invite user to join a website with specific permissions
Parameters: website - Website to be joined (persistent instance) Parameters: user - User to be invited (persistent instance) Parameters: perms - Permissions mask (see statics in PermissionsData) New PermissionsData object, with pending=true |
release | public void release()(Code) | | Release any resources held by manager.
|
retireUser | public void retireUser(WebsiteData website, UserData user) throws RollerException(Code) | | Retire user from a website
Parameters: website - Website to be retired from (persistent instance) Parameters: user - User to be retired (persistent instance) |
|
|