@Override
public void serveResource(StrutsPortletAction originalStrutsPortletAction,
PortletConfig portletConfig, ResourceRequest resourceRequest,
ResourceResponse resourceResponse) throws Exception {
resourceResponse.setContentType("image/png");
resourceResponse.addProperty(HttpHeaders.CACHE_CONTROL,
"max-age=5, must-revalidate");
OutputStream out = resourceResponse.getPortletOutputStream();
InputStream is=getClass().getClassLoader().getResourceAsStream("asposeicon/aspose.png");
byte[] bytes = IOUtils.toByteArray(is);
out.write(bytes, 0, bytes.length);
out.close();
}
java类javax.portlet.PortletConfig的实例源码
AsposeIconAction.java 文件源码
项目:Aspose_for_Liferay
阅读 17
收藏 0
点赞 0
评论 0
SimpleRSSPortlet.java 文件源码
项目:sakai
阅读 18
收藏 0
点赞 0
评论 0
public void init(PortletConfig config) throws PortletException {
super.init(config);
log.info("Simple RSS Portlet init()");
//pages
viewUrl = config.getInitParameter("viewUrl");
editUrl = config.getInitParameter("editUrl");
errorUrl = config.getInitParameter("errorUrl");
noContentUrl = config.getInitParameter("noContentUrl");
//setup cache
memoryService = ComponentManager.get(MemoryService.class);
feedCache = memoryService.getCache(FEED_CACHE_NAME);
mediaCache = memoryService.getCache(MEDIA_CACHE_NAME);
}
MySitesCustomAction.java 文件源码
项目:liferay-microsite-manager
阅读 14
收藏 0
点赞 0
评论 0
@Override
public void processAction(StrutsPortletAction originalStrutsPortletAction, PortletConfig portletConfig,
ActionRequest actionRequest, ActionResponse actionResponse) throws Exception {
if(actionRequest.getParameter("add_site") != null) {
ServiceContext serviceContext = ServiceContextFactory.getInstance(MySitesCustomAction.class.getName(), actionRequest);
ThemeDisplay themeDisplay = (ThemeDisplay) actionRequest.getAttribute(WebKeys.THEME_DISPLAY);
SiteRequestLocalServiceUtil.add(
themeDisplay.getCompanyGroupId(),
themeDisplay.getScopeGroupId(),
themeDisplay.getUserId(),
actionRequest.getParameter(MicroSiteConstants.SITE_REQUEST_NAME),
actionRequest.getParameter(MicroSiteConstants.SITE_REQUEST_DESCRIPTION),
serviceContext
);
}
if(originalStrutsPortletAction != null) {
originalStrutsPortletAction.processAction(portletConfig, actionRequest, actionResponse);
} else {
actionResponse.sendRedirect(actionRequest.getParameter("redirect"));
}
}
TimetrackerConfigurationAction.java 文件源码
项目:ch-inofix-timetracker
阅读 16
收藏 0
点赞 0
评论 0
@Override
public void include(PortletConfig portletConfig, HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) throws Exception {
httpServletRequest.setAttribute(TimetrackerConfiguration.class.getName(), _timetrackerConfiguration);
super.include(portletConfig, httpServletRequest, httpServletResponse);
}
ContactManagerConfigurationAction.java 文件源码
项目:ch-inofix-contact-manager
阅读 14
收藏 0
点赞 0
评论 0
@Override
public void include(PortletConfig portletConfig, HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) throws Exception {
httpServletRequest.setAttribute(ContactManagerConfiguration.class.getName(), _contactManagerConfiguration);
super.include(portletConfig, httpServletRequest, httpServletResponse);
}
DummyFactoryConfigurationAction.java 文件源码
项目:liferay-dummy-factory
阅读 18
收藏 0
点赞 0
评论 0
@Override
public void include(PortletConfig portletConfig, HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) throws Exception {
if (_log.isDebugEnabled()) {
_log.debug("Dummy Factory Portlet configuration include");
}
httpServletRequest.setAttribute(DummyFactoryConfiguration.class.getName(), _DummyFactoryConfiguration);
super.include(portletConfig, httpServletRequest, httpServletResponse);
}
DataManagerConfigurationAction.java 文件源码
项目:ch-inofix-data-manager
阅读 17
收藏 0
点赞 0
评论 0
@Override
public void include(PortletConfig portletConfig, HttpServletRequest httpServletRequest,
HttpServletResponse httpServletResponse) throws Exception {
httpServletRequest.setAttribute(DataManagerConfiguration.class.getName(), _dataManagerConfiguration);
super.include(portletConfig, httpServletRequest, httpServletResponse);
}
StagingCheckerPortlet.java 文件源码
项目:staging-checker
阅读 17
收藏 0
点赞 0
评论 0
public void serveResource(
ResourceRequest request, ResourceResponse response)
throws IOException, PortletException {
PortletConfig portletConfig =
(PortletConfig)request.getAttribute(
JavaConstants.JAVAX_PORTLET_CONFIG);
String resourceId = request.getResourceID();
String portletId = portletConfig.getPortletName();
OutputUtils.servePortletFileEntry(portletId, resourceId, response);
}
PortletContextAwareProcessor.java 文件源码
项目:spring4-understanding
阅读 18
收藏 0
点赞 0
评论 0
/**
* Create a new PortletContextAwareProcessor for the given context and config.
*/
public PortletContextAwareProcessor(PortletContext portletContext, PortletConfig portletConfig) {
this.portletContext = portletContext;
this.portletConfig = portletConfig;
if (portletContext == null && portletConfig != null) {
this.portletContext = portletConfig.getPortletContext();
}
}
StaticPortletApplicationContext.java 文件源码
项目:spring4-understanding
阅读 20
收藏 0
点赞 0
评论 0
@Override
public void setPortletConfig(PortletConfig portletConfig) {
this.portletConfig = portletConfig;
if (portletConfig != null && this.portletContext == null) {
this.portletContext = portletConfig.getPortletContext();
}
}