@Override public MarketplacePortletDefinition getOrCreateMarketplacePortletDefinitionIfTheFnameExists( String fname) { IPortletDefinition portletDefinition = portletDefinitionRegistry.getPortletDefinitionByFname(fname); if (portletDefinition != null) { return getOrCreateMarketplacePortletDefinition(portletDefinition); } return null; }
@Override public PortletDelegationDispatcher createRequestDispatcher( PortletRequest portletRequest, String fName) { final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinitionByFname(fName); final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId(); return this.createRequestDispatcher(portletRequest, portletDefinitionId); }
/** * Given a subscribe Id, return a ChannelDefinition. * * @param subId the subscribe id for the ChannelDefinition. * @return a <code>ChannelDefinition</code> */ protected IPortletDefinition getChannelDefinition(String subId) throws PortalException { IPortletDefinition chanDef = mChanMap.get(subId); if (null == chanDef) { String fname = getFname(subId); if (log.isDebugEnabled()) log.debug( "TransientUserLayoutManagerWrapper>>getChannelDefinition, " + "attempting to get a channel definition using functional name: " + fname); try { chanDef = PortletDefinitionRegistryLocator.getPortletDefinitionRegistry() .getPortletDefinitionByFname(fname); } catch (Exception e) { throw new PortalException( "Failed to get channel information " + "for subscribeId: " + subId); } mChanMap.put(subId, chanDef); } return chanDef; }
/** * Provides information about a single portlet in the registry. NOTE: Access to this API enpoint * requires only <code>IPermission.PORTAL_SUBSCRIBE</code> permission. */ @RequestMapping(value = "/portlet/{fname}.json", method = RequestMethod.GET) public ModelAndView getPortlet( HttpServletRequest request, HttpServletResponse response, @PathVariable String fname) throws Exception { IAuthorizationPrincipal ap = getAuthorizationPrincipal(request); IPortletDefinition portletDef = portletDefinitionRegistry.getPortletDefinitionByFname(fname); if (portletDef != null && ap.canRender(portletDef.getPortletDefinitionId().getStringId())) { LayoutPortlet portlet = new LayoutPortlet(portletDef); return new ModelAndView("json", "portlet", portlet); } else { response.setStatus(HttpServletResponse.SC_FORBIDDEN); return new ModelAndView("json"); } }
IPortletDefinition chanDef = PortletDefinitionRegistryLocator.getPortletDefinitionRegistry() .getPortletDefinitionByFname(fname); if (chanDef != null) {
portletDefinition = this.portletDefinitionRegistry.getPortletDefinitionByFname(fname); } catch (Exception e) { this.logger.warn(
portletDefinition = this.portletDefinitionRegistry.getPortletDefinitionByFname(fname); } catch (Exception e) { this.logger.warn(
/** * Return an IUserLayoutChannelDescription by way of nodeId * * @param nodeId the node (subscribe) id to get the channel for. * @return a <code>IUserLayoutNodeDescription</code> */ private IUserLayoutChannelDescription getTransientNode(String nodeId) throws PortalException { // get fname from subscribe id final String fname = getFname(nodeId); if (null == fname || fname.equals("")) { return null; } try { // check cache first IPortletDefinition chanDef = mChanMap.get(nodeId); if (null == chanDef) { chanDef = PortletDefinitionRegistryLocator.getPortletDefinitionRegistry() .getPortletDefinitionByFname(fname); mChanMap.put(nodeId, chanDef); } return createUserLayoutChannelDescription(nodeId, chanDef); } catch (Exception e) { throw new PortalException("Failed to obtain channel definition using fname: " + fname); } }
try { final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinitionByFname(fname); if (portletDefinition == null) { if (this.logger.isInfoEnabled()) {
try { final IPortletDefinition portletDefinition = this.portletDefinitionRegistry.getPortletDefinitionByFname(fname); if (portletDefinition == null) { if (this.logger.isInfoEnabled()) {
IPortletDefinition def = PortletDefinitionRegistryLocator.getPortletDefinitionRegistry() .getPortletDefinitionByFname(memberValue); return String.valueOf(def.getPortletDefinitionId().getStringId());
for (int i = 0; i < channelFNames.getLength(); i++) { String fname = channelFNames.item(i).getTextContent(); IPortletDefinition pDef = portletRegistry.getPortletDefinitionByFname(fname);
portletDefinitionRegistry.getPortletDefinitionByFname(fname); if (portletDef == null) { res.setStatus(HttpServletResponse.SC_NOT_FOUND);
if (sourceId != null) definition = portletDefinitionRegistry.getPortletDefinition(sourceId); else if (fname != null) definition = portletDefinitionRegistry.getPortletDefinitionByFname(fname); else { logger.error("SourceId or fname invalid when adding a portlet");
private IPortletEntity getPortletEntity(String fName, String layoutNodeId, int userId) { // Try getting the entity final IPortletEntity portletEntity = this.portletEntityDao.getPortletEntity(layoutNodeId, userId); if (portletEntity != null) { return portletEntity; } // Load the portlet definition final IPortletDefinition portletDefinition; try { portletDefinition = this.portletDefinitionRegistry.getPortletDefinitionByFname(fName); } catch (Exception e) { throw new DataRetrievalFailureException( "Failed to retrieve ChannelDefinition for fName='" + fName + "'", e); } // The channel definition for the fName MUST exist for this class to function if (portletDefinition == null) { throw new EmptyResultDataAccessException( "No ChannelDefinition exists for fName='" + fName + "'", 1); } // create the portlet entity final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId(); return this.portletEntityDao.createPortletEntity(portletDefinitionId, layoutNodeId, userId); }
Model model) { IPortletDefinition result = this.portletDefinitionRegistry.getPortletDefinitionByFname( portletRequest.getParameter("fName"));
portletDefinitionRegistry.getPortletDefinitionByFname( PERMISSIONS_ADMIN_PORTLET_FNAME); if (permissionsAdminPortlet == null) {
final String fname = c.valueOf("@fname"); final IPortletDefinition cd = this.portletDefinitionRegistry.getPortletDefinitionByFname(fname); if (cd == null) { final String msg =
new MessageBuilder().error().source("fName").code("fname.invalid").build()); } else if (def.getId() == null && portletDefinitionRegistry.getPortletDefinitionByFname(def.getFname()) != null) {