de.mikromedia.webpages
public class WebpagePlugin extends de.deepamehta.thymeleaf.ThymeleafPlugin implements WebpageService
Modifier and Type | Field and Description |
---|---|
static de.deepamehta.core.service.accesscontrol.SharingMode |
WEBPAGES_SHARING_MODE |
static String |
WEBPAGES_WS_NAME |
static String |
WEBPAGES_WS_URI |
Constructor and Description |
---|
WebpagePlugin() |
Modifier and Type | Method and Description |
---|---|
void |
addTemplateResolverBundle(org.osgi.framework.Bundle bundle)
IMPORTANT: If you register your own bundle as a resource for thymeleaf templates you must call
reinitTemplateEngine afterwards.
|
String |
doRedirectToWebsite(long websiteId) |
List<MenuItemViewModel> |
getActiveMenuItems(de.deepamehta.core.Topic site)
Returns all topics of type
de.mikromedia.menu.item related to the given `Website` topic. |
com.sun.jersey.api.view.Viewable |
getFrontpageView()
The method managing the root resource / frontpage.
|
com.sun.jersey.api.view.Viewable |
getPageView(String webAlias)
The methode serving anything on the first resource level at best this resolves to
either a Webpage or a Webpage Redirect (301, 302) or 404.
|
com.sun.jersey.api.view.Viewable |
getPageView(String prefix,
String webAlias)
Serving a specific webpage assigned to the website related to its given prefix (currently "username").
|
List<WebpageViewModel> |
getPublishedWebpages(String username)
Lists all currently published webpages for the users website.
|
List<WebpageViewModel> |
getPublishedWebpages(de.deepamehta.core.Topic website)
Lists and prepares all currently published webpages of the given website.
|
de.deepamehta.core.Topic |
getWebsite() |
de.deepamehta.core.Topic |
getWebsiteByUsername(String username)
--------------------------------------------------------------------------------- REST API Resources -----
|
com.sun.jersey.api.view.Viewable |
getWebsiteFrontpage(String username) |
void |
init() |
void |
overrideFrontpageTemplate(String fileName) |
void |
reinitTemplateEngine() |
void |
removeTemplateResolverBundle(org.osgi.framework.Bundle bundle) |
com.sun.jersey.api.view.Viewable |
view(String fileName) |
void |
viewData(String key,
Object value) |
addTemplateResourceBundle, getTemplateEngine, initTemplateEngine, removeTemplateResourceBundle, serviceRequestFilter
public static final String WEBPAGES_WS_URI
public static final String WEBPAGES_WS_NAME
public static final de.deepamehta.core.service.accesscontrol.SharingMode WEBPAGES_SHARING_MODE
public void init()
init
in interface de.deepamehta.core.osgi.PluginContext
init
in class de.deepamehta.core.osgi.PluginActivator
public com.sun.jersey.api.view.Viewable getFrontpageView()
Viewable
).public com.sun.jersey.api.view.Viewable getPageView(String webAlias)
webAlias
- String URI compliant name of the resource without leading slash.Viewable
).public com.sun.jersey.api.view.Viewable getPageView(String prefix, String webAlias)
prefix
- pageAlias
- Viewable
).public void overrideFrontpageTemplate(String fileName)
overrideFrontpageTemplate
in interface WebpageService
public void viewData(String key, Object value)
viewData
in interface WebpageService
viewData
in class de.deepamehta.thymeleaf.ThymeleafPlugin
public com.sun.jersey.api.view.Viewable view(String fileName)
view
in interface WebpageService
view
in class de.deepamehta.thymeleaf.ThymeleafPlugin
public void reinitTemplateEngine()
reinitTemplateEngine
in interface WebpageService
public void addTemplateResolverBundle(org.osgi.framework.Bundle bundle)
WebpageService
addTemplateResolverBundle
in interface WebpageService
public void removeTemplateResolverBundle(org.osgi.framework.Bundle bundle)
removeTemplateResolverBundle
in interface WebpageService
public de.deepamehta.core.Topic getWebsiteByUsername(String username)
getWebsiteByUsername
in interface WebpageService
public de.deepamehta.core.Topic getWebsite()
public String doRedirectToWebsite(long websiteId) throws javax.ws.rs.WebApplicationException, URISyntaxException
javax.ws.rs.WebApplicationException
URISyntaxException
public List<WebpageViewModel> getPublishedWebpages(String username)
getPublishedWebpages
in interface WebpageService
public com.sun.jersey.api.view.Viewable getWebsiteFrontpage(String username)
public List<MenuItemViewModel> getActiveMenuItems(de.deepamehta.core.Topic site)
de.mikromedia.menu.item
related to the given `Website` topic.getActiveMenuItems
in interface WebpageService
site
- public List<WebpageViewModel> getPublishedWebpages(de.deepamehta.core.Topic website)
Copyright © 2016. All Rights Reserved.