|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface SiteService
The Site Service is the interface providing site, user, role and start menu related services.
Although the user and role entities can exist independently, they make sense only when they are related in the context of a site. A user can gain access to a site only once roles are assigned to the user for that site. The roles assigned to the "site-user" in a site governs the aspects of the application which that user will have access to within the site.
A start menu item establishes the relationship between roles and asset types that have been enabled in a site. A site-user will be able to use a start menu only when it has at least one of those roles which apply to that start menu.
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 | |
---|---|
boolean |
addUserPreference(java.lang.String userid, java.lang.String siteid, java.lang.String name, java.lang.String value) add / update user preferences for login user |
boolean |
canPlacePage(long siteId) Checks if the logged in user is able to place pages in the specified site. |
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) Get available Locales for a given 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 specified user in the specified site. |
java.lang.String |
getUserPreference(java.lang.String userid, java.lang.String siteid, java.lang.String name) fetch user preference value for login user in specific site |
java.util.Map<java.lang.String,java.lang.String> |
getUserPreferences(java.lang.String userid, java.lang.String siteid) retrieve user preferences for login 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. |
boolean |
placePagesSPN(SitePlanNodeBean child, SitePlanNodeBean target, java.util.List<AssetId> children, SitePlanNodeBean previous) Places a Page asset under the specified parent Page asset at the specified index. |
boolean |
removeUserPreference(java.lang.String userid, java.lang.String siteid, java.lang.String name) add / update user preferences for login user |
java.lang.Boolean |
unPlacePagesSPN(SitePlanNodeBean child, SitePlanNodeBean previous, SitePlanNodeBean target, java.util.List<AssetId> children) Unplaces placed pages from a parent. |
Methods inherited from interface com.fatwire.services.Service |
---|
getManager, getResponse, setManager |
Method Detail |
---|
boolean isPreviewEnabled(long siteId) throws ServiceException
true
if preview is enabled in the specified site.ServiceException
- wraps any exception underlying the service call.java.util.List<java.lang.String> getEnabledTypes(long siteId) throws ServiceException
siteId
- id of the site in which the asset types are enabled.ServiceException
- wraps any exception underlying the service call.java.util.List<UserBean> getSiteUsers(long siteId) throws ServiceException
siteId
- id of the site in which the users have access.ServiceException
- wraps any exception underlying the service call.java.util.List<RoleBean> getAllRoles() throws ServiceException
ServiceException
- wraps any exception underlying the service call.java.util.List<RoleBean> getUserRoles(long siteId) throws ServiceException
ServiceException
- wraps any exception underlying the service call.java.util.List<StartMenuBean> getStartMenus(java.util.List<StartMenuBean.Type> types, long siteId) throws ServiceException
Returns the list of start menu items for the specified 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.types
- the list of start menu types.site
- the site for which the start menu is to be retrieved.ServiceException
- wraps any exception underlying the service call.StartMenuBean.Type
java.util.List<java.lang.String> getLocales(long siteId) throws ServiceException
siteId
- the site for which the locales are to be retrieved.ServiceException
- wraps any exception underlying the service call.boolean canPlacePage(long siteId) throws ServiceException
siteId
- the site in which the pages are to be placed.true
if the current user can place pages in the specified site.ServiceException
- wraps any exception underlying the service call.boolean placePagesSPN(SitePlanNodeBean child, SitePlanNodeBean target, java.util.List<AssetId> children, SitePlanNodeBean previous) throws ServiceException
Places a Page asset under the specified parent Page asset at the specified index.
If the parent page is null
, the service places the page asset as a top level page in the site. If the specified page is already placed, this method moves it according to the specified parent and index. In this process, it may modify the index of the other placed pages under the source and target parents which it has been moved.
For example, if P1 (top-level, rank=1) has child pages P11 (rank=1) and P12 (rank=2), and P2 has child pages P21 (rank=1), P22 (rank=2) and P23 (rank=3), then moving P23 to index 2 under P2 should change the rank of P22 to 3 and that of P23 to 2.
Now, if P21 is moved under P1 and index 2, then rank of P11 is not modified, but P21 has P1 as parent and rank 2, while P12 has rank 3. Also, P23 (which had moved to rank 2 with the prior operation) will now will now have rank 2.
page
- the Page asset to placeparentPage
- the parent Page asset under which to place page
, or null
if page
should be a top-level page.true
if the page could be successfully placed, false
otherwise.ServiceException
- wraps any exception underlying the service call.java.lang.Boolean unPlacePagesSPN(SitePlanNodeBean child, SitePlanNodeBean previous, SitePlanNodeBean target, java.util.List<AssetId> children) throws ServiceException
Unplaces placed pages from a parent.
This method quietly ignores the unplace operation if the specified pages is already unplaced. If it is a placed page, this method will unplace the page and re-index the ranks of the other siblings from the location where it is unplaced.
For example, if P1 (top-level, rank=1) has child pages P11 (rank=1), P12 (rank=2) and P13 (rank=3), then unplacing P12 should change the rank of P13 to 2.
parent
- the id of the parent from which pages are being unplaced.parentPage
- the parent Page asset under which to place page
, or null
if page
should be a top-level page.true
if the operation is successful, false
otherwiseServiceException
- wraps any exception underlying the service call.java.util.Map<java.lang.String,java.lang.String> getUserPreferences(java.lang.String userid, java.lang.String siteid) throws ServiceException
Map
where:
String
representing the attribute nameString
representing the tab idServiceException
- wraps any exception underlying the service call.boolean addUserPreference(java.lang.String userid, java.lang.String siteid, java.lang.String name, java.lang.String value) throws ServiceException
Map
where:
String
representing the attribute nameString
representing the tab idServiceException
- wraps any exception underlying the service call.java.lang.String getUserPreference(java.lang.String userid, java.lang.String siteid, java.lang.String name) throws ServiceException
Map
where:
String
representing the attribute nameString
representing the tab idServiceException
- wraps any exception underlying the service call.boolean removeUserPreference(java.lang.String userid, java.lang.String siteid, java.lang.String name) throws ServiceException
Map
where:
String
representing the attribute nameString
representing the tab idServiceException
- wraps any exception underlying the service call.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.