|
|||||||||
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 user in a site governs the aspects of the application 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 user will be able to access a start menu only when it has at least one of those roles assigned which apply to that start menu.
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()
Returns the list of enabled asset types. |
java.util.List<java.lang.String> |
getLocales(java.lang.Long site)
Get available Locales for a given site, or for the whole system if site is null . |
java.util.List<RoleBean> |
getRoles()
Return the list of roles available for the site |
java.util.Map<RoleBean,java.util.List<UserBean>> |
getRoleUserMapping(SiteBean site)
Return a map containing the users to role mapping for the specified site. |
java.util.List<UserBean> |
getSiteUsers(java.lang.Long site)
|
java.util.List<UserBean> |
getSiteUsers(java.lang.Long site,
RoleBean role)
Return the list of users in the specified site who have the specified role. |
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. |
boolean |
placePages(AssetId parent,
java.util.List<AssetId> children)
Places a Page asset under the specified parent Page asset at the specified index. |
java.lang.Boolean |
unPlacePages(AssetId page,
java.util.List<AssetId> childPages)
Unplaces a specified page. |
Methods inherited from interface com.fatwire.services.Service |
---|
getManager, getResponse, setManager |
Method Detail |
---|
java.util.List<java.lang.String> getEnabledTypes() throws ServiceException
ServiceException
- wraps any exception underlying the service call.java.util.List<UserBean> getSiteUsers(java.lang.Long site, RoleBean role) throws ServiceException
site
- the site in which the user must have access.role
- one of the roles which must be assigned to the user.
ServiceException
- wraps any exception underlying the service call.java.util.Map<RoleBean,java.util.List<UserBean>> getRoleUserMapping(SiteBean site) throws ServiceException
Return a map containing the users to role mapping for the specified site.
In the returned map, the keys are the roles, and the values are list of users.
site
- the site in which the users will have access assigned with the roles.
ServiceException
- wraps any exception underlying the service call.java.util.List<StartMenuBean> getStartMenu(java.util.List<StartMenuBean.Type> types, java.lang.Long site) throws ServiceException
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.
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.
ServiceException
- wraps any exception underlying the service call.StartMenuBean.Type
boolean placePages(AssetId parent, java.util.List<AssetId> children) 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.index
- 1-based index of the placed Page asset.
true
if the page could be successfully placed,
false
otherwise.
ServiceException
- wraps any exception underlying the service call.java.lang.Boolean unPlacePages(AssetId page, java.util.List<AssetId> childPages) throws ServiceException
Unplaces a specified page.
This method quietly ignores the unplace operation if the specified page 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.
page
- the id of the Page asset being unplacedparentPage
- 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
otherwise
ServiceException
- wraps any exception underlying the service call.java.util.List<java.lang.String> getLocales(java.lang.Long site) throws ServiceException
null
.
site
- the site for which the locales are to be retrieved.
ServiceException
- wraps any exception underlying the service call.java.util.List<UserBean> getSiteUsers(java.lang.Long site) throws ServiceException
ServiceException
java.util.Map<java.lang.String,java.lang.String> getComplexAssetClass(java.util.List<java.lang.String> assetTypes) throws ServiceException
ServiceException
java.util.List<RoleBean> getRoles() throws ServiceException
ServiceException
- wraps any exception underlying the service call.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |