com.fatwire.services.dao
Interface SiteDao

All Superinterfaces:
DataAccessObject

public interface SiteDao
extends DataAccessObject

The Site Data Access Object is the interface providing access to site, user and role related data.


Method Summary
 java.util.Map<java.lang.String,java.lang.String> getComplexAssetClass(java.util.List<java.lang.String> assetTypes)
           
 java.util.List<java.lang.String> getEnabledTypes(java.lang.Long site)
          Returns the asset types which are enabled in the specified site.
 java.util.List<java.lang.String> getLocales(java.lang.Long site)
          Returns available Locales for a given site.
 java.util.List<RoleBean> getRoles()
          Return the list of roles available for the site
 java.util.List<SiteBean> getSites(UserBean user)
           Returns the mapping of sites and roles for given user.
 java.util.List<StartMenuBean> getStartMenu(java.util.List<StartMenuBean.Type> types, java.lang.Long site)
           Returns the list of start menu items for a specified user.
 
Methods inherited from interface com.fatwire.services.dao.DataAccessObject
getResponse, getService, setService
 

Method Detail

getSites

java.util.List<SiteBean> getSites(UserBean user)
                                  throws DataAccessException

Returns the mapping of sites and roles for given user.

The returned map has sites as the key and the list of roles for the specified user in that site as the value.

Parameters:
user - the user whose site access and roles are to be retrieved.
Returns:
site-role mapping for the specified user.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getEnabledTypes

java.util.List<java.lang.String> getEnabledTypes(java.lang.Long site)
                                                 throws DataAccessException
Returns the asset types which are enabled in the specified site.

Parameters:
site - the site for which the types are to be retrieved.
Returns:
the list of asset types enabled in the site.
Throws:
DataAccessException - wraps any underlying exception caused during data access.

getStartMenu

java.util.List<StartMenuBean> getStartMenu(java.util.List<StartMenuBean.Type> types,
                                           java.lang.Long site)
                                           throws DataAccessException

Returns the list of start menu items for a specified user.

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.
user - the user 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(java.lang.Long site)
                                            throws DataAccessException
Returns available Locales for a given site. If site is null, return all Locales in system

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.

getComplexAssetClass

java.util.Map<java.lang.String,java.lang.String> getComplexAssetClass(java.util.List<java.lang.String> assetTypes)
                                                                      throws DataAccessException
Throws:
DataAccessException

getRoles

java.util.List<RoleBean> getRoles()
                                  throws DataAccessException
Return the list of roles available for the site

Returns:
a list of roles.
Throws:
ServiceException - wraps any exception underlying the service call.
DataAccessException


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