Skip navigation links


com.fatwire.services.dao
Interface SiteDao

All Superinterfaces:
DataAccessObject

public interface SiteDao
extends DataAccessObject

The Site Data Access Object provides access to site, user, role and start menu related data.

The site service depends on the SiteDao to provide the access it requires to pull up this data. For the methods in this service which accept a site id, if the value of the site id is less than or equal to 0, then that method throws an IllegalArgumentException.


Method Summary
 java.util.List<RoleBean> getAllRoles()
          Returns a list of all roles in the system.
 java.util.List<java.lang.String> getEnabledTypes(long siteId)
          Returns the list of asset types enabled in the specified site.
 java.util.List<java.lang.String> getLocales(long siteId)
          Returns available locales for the specified site.
 java.util.List<UserBean> getSiteUsers(long siteId)
          Returns the list of those users who have access to the specified site through one or more roles.
 java.util.List<StartMenuBean> getStartMenus(java.util.List<StartMenuBean.Type> types, long siteId)
           Returns the list of start menu items for the logged in user in the specified site.
 java.util.List<RoleBean> getUserRoles(long siteId)
          Returns a list of all roles for the logged in user in the specified site.
 boolean isPreviewEnabled(long siteId)
          Checks whether preview is enabled for assets in the specified site.

 

Methods inherited from interface com.fatwire.services.dao.DataAccessObject
getResponse, getService, setService

 

Method Detail

isPreviewEnabled

boolean isPreviewEnabled(long siteId)
                         throws DataAccessException
Checks whether preview is enabled for assets in the specified site.
Returns:
true if preview is enabled in the specified site.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getEnabledTypes

java.util.List<java.lang.String> getEnabledTypes(long siteId)
                                                 throws DataAccessException
Returns the list of asset types enabled in the specified site.
Parameters:
siteId - id of the site in which the asset types are enabled.
Returns:
list of asset types.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getSiteUsers

java.util.List<UserBean> getSiteUsers(long siteId)
                                      throws DataAccessException
Returns the list of those users who have access to the specified site through one or more roles.
Parameters:
siteId - id of the site in which the users have access.
Returns:
list of users.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getAllRoles

java.util.List<RoleBean> getAllRoles()
                                     throws DataAccessException
Returns a list of all roles in the system.
Returns:
list of roles.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getUserRoles

java.util.List<RoleBean> getUserRoles(long siteId)
                                      throws DataAccessException
Returns a list of all roles for the logged in user in the specified site. If the logged in user does not have any roles in the specified site, the list returned is empty.
Returns:
list of roles.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getStartMenus

java.util.List<StartMenuBean> getStartMenus(java.util.List<StartMenuBean.Type> types,
                                            long siteId)
                                            throws DataAccessException

Returns the list of start menu items for the logged in user in the specified site.

The start menu items available to a user in a site are based on the roles assigned to the user in that site. The returned list will contain a union of start menu items for each start menu type specified.
Parameters:
types - the list of start menu types.
site - the site for which the start menu is to be retrieved.
Returns:
the start menu which is a list containing start menu items for each start menu type specified.
Throws:
DataAccessException - wraps any underlying exception caused during data access.
See Also:
StartMenuBean.Type

getLocales

java.util.List<java.lang.String> getLocales(long siteId)
                                            throws DataAccessException
Returns available locales for the specified site.
Parameters:
site - the site for which the locales are to be retrieved.
Returns:
list of locales available for the site.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

Skip navigation links


Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.