public interface Portal
PortalRequest object which can be
obtained from PortalRequest.getInstance().| Modifier and Type | Method and Description |
|---|---|
Page |
createPage(PageId pageId)
Creates a page for a site given the
PageId. |
Site |
createSite(SiteId siteId)
Creates a a site given the
SiteId. |
Site |
createSite(SiteId siteId,
String templateName)
Creates a a site given the
SiteId. |
List<Page> |
findPages(PageQuery query)
Finds pages given the
PageQuery |
List<Site> |
findSites(SiteQuery query)
Finds sites given the
SiteQuery |
Navigation |
getNavigation(SiteId siteId)
Returns the navigation of a site given the
SiteId. |
OAuthProvider |
getOAuthProvider(String oauthProviderKey)
Return
OAuthProvider for given key. |
Page |
getPage(PageId pageId)
Returns the page of a site given the
PageId. |
Site |
getSite(SiteId siteId)
Returns a site given the
SiteId. |
boolean |
hasPermission(User user,
Permission permission)
Returns true if the given user has the rights represented by the permission
|
boolean |
removePage(PageId pageId)
Removes a page
|
boolean |
removeSite(SiteId siteId)
Removes a site
|
void |
savePage(Page page)
Saves a page
|
void |
saveSite(Site site)
Saves a site
|
Site getSite(SiteId siteId)
SiteId. Can return null if the site does not exist.siteId - the siteIdIllegalArgumentException - if siteId is nullApiException - if something prevented this operation to succeedSite createSite(SiteId siteId)
SiteId. This site is not saved until
saveSite(org.gatein.api.site.Site) is called. Will use the default site template configured by
the portal.siteId - the site idIllegalArgumentException - if siteId is nullEntityAlreadyExistsException - if the site already existsApiException - if something prevented this operation to succeedSite createSite(SiteId siteId, String templateName)
SiteId. This site is not saved until
saveSite(org.gatein.api.site.Site) is called.siteId - the site idtemplateName - the name of the template to use to create the siteIllegalArgumentException - if siteId is nullEntityAlreadyExistsException - if the site already existsApiException - if something prevented this operation to succeedList<Site> findSites(SiteQuery query)
SiteQueryquery - the site queryIllegalArgumentException - if query is nullApiException - if something prevented this operation to succeedvoid saveSite(Site site)
site - the site to saveIllegalArgumentException - if site is nullApiException - if an exception occurred trying to save the siteboolean removeSite(SiteId siteId)
siteId - the id of the site to removeIllegalArgumentException - if siteId is nullApiException - if something prevented this operation to succeedNavigation getNavigation(SiteId siteId)
SiteId. Can return null if the navigation does not exist.siteId - the site idIllegalArgumentException - if siteId is nullApiException - if something prevented this operation to succeedPage getPage(PageId pageId)
PageId. Can return null if the page does not exist.pageId - the page idIllegalArgumentException - if pageId is nullApiException - if something prevented this operation to succeedPage createPage(PageId pageId)
PageId. This page is not saved until
savePage(org.gatein.api.page.Page) is called.pageId - the page idIllegalArgumentException - if pageId is nullEntityAlreadyExistsException - if the page already existsEntityNotFoundException - if the site does not existApiException - if something prevented this operation to succeedList<Page> findPages(PageQuery query)
PageQueryquery - the page queryIllegalArgumentException - if query is nullApiException - if something prevented this operation to succeedvoid savePage(Page page)
page - the page to saveIllegalArgumentException - if page is nullApiException - if something prevented this operation to succeedboolean removePage(PageId pageId)
pageId - the id of the page to removeIllegalArgumentException - if pageId is nullApiException - if something prevented this operation to succeedboolean hasPermission(User user, Permission permission)
user - the userpermission - the permissionApiException - if something prevented this operation to succeedOAuthProvider getOAuthProvider(String oauthProviderKey)
OAuthProvider for given key. Key could be OAuthProvider.FACEBOOK,
OAuthProvider.GOOGLE, OAuthProvider.TWITTER or other OAuth provider registered in Portal via OAuth SPIoauthProviderKey - Key of OAuth providerCopyright © 2013 JBoss by Red Hat. All Rights Reserved.