public PortletTuple(IPortletDefinition pdef) { this.id = pdef.getPortletDefinitionId().getStringId(); this.name = pdef.getName(); this.fname = pdef.getFName(); this.description = pdef.getDescription(); this.type = pdef.getType().getName(); this.lifecycleState = pdef.getLifecycleState().toString(); this.categories = getPortletCategories(pdef); }
@Override public String[] apply(IPortletPreference input) { return input.getValues(); } });
protected String getPersistentLayoutNodeId(IPortletDefinitionId portletDefinitionId) { return TransientUserLayoutManagerWrapper.SUBSCRIBE_PREFIX + "." + portletDefinitionId.getStringId(); }
protected IPortletEntityId createConsistentPortletEntityId(IPortletEntity portletEntity) { final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); final IPortletDefinitionId portletDefinitionId = portletDefinition.getPortletDefinitionId(); final String layoutNodeId = portletEntity.getLayoutNodeId(); final int userId = portletEntity.getUserId(); return this.createConsistentPortletEntityId(portletDefinitionId, layoutNodeId, userId); }
protected String getPortletFname(HttpServletRequest request, IPortletWindowId portletWindowId) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); final IPortletEntity portletEntity = portletWindow.getPortletEntity(); final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition(); return portletDefinition.getFName(); } }
protected IPortletDefinition getPortletDefinition( IPortletWindowId portletWindowId, HttpServletRequest request) { final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId); final IPortletEntity parentPortletEntity = portletWindow.getPortletEntity(); return parentPortletEntity.getPortletDefinition(); }
@Override protected void loadTargetPortletPreferences( IPortletDefinition portletDefinition, Map<String, IPortletPreference> targetPortletPreferences) { final List<IPortletPreference> entityPreferences = portletDefinition.getPortletPreferences(); for (final IPortletPreference preference : entityPreferences) { targetPortletPreferences.put(preference.getName(), preference); } }
@Override protected void loadTargetPortletPreferences( IPortletEntity portletEntity, Map<String, IPortletPreference> targetPortletPreferences) { final List<IPortletPreference> entityPreferences = portletEntity.getPortletPreferences(); for (final IPortletPreference preference : entityPreferences) { targetPortletPreferences.put(preference.getName(), preference); } }
private PortletCategoryBean( PortletCategory category, Set<PortletCategoryBean> subcategories, Set<PortletDefinitionBean> portlets) { this( category.getId(), category.getName(), category.getDescription(), subcategories, portlets); }
@Override public int compareTo(IPortletLifecycleEntry o) { int rslt = date.compareTo(o.getDate()); if (rslt == 0) { rslt = state.getOrder() - o.getLifecycleState().getOrder(); } return rslt; } },
@Override public String getLayoutNodeId() { return this.persistentEntity.getLayoutNodeId(); }
@Override public void updateLifecycleState( PortletLifecycleState lifecycleState, IPerson user, Date timestamp) { portletDefinition.updateLifecycleState(lifecycleState, user, timestamp); }
@Override public int getUserId() { return this.persistentEntity.getUserId(); }
/** * @see org.apache.pluto.container.PortletRequestContext#getPortletWindow() * @see org.apache.pluto.container.PortletResponseContext#getPortletWindow() */ public PortletWindow getPortletWindow() { return this.portletWindow.getPlutoPortletWindow(); }
/** @see java.lang.Object#toString() */ @Override public String toString() { return this.getStringId(); } }
@Override protected void loadTargetPortletPreferences( IPortletEntity portletEntity, Map<String, IPortletPreference> targetPortletPreferences) { final List<IPortletPreference> entityPreferences = portletEntity.getPortletPreferences(); for (final IPortletPreference preference : entityPreferences) { targetPortletPreferences.put(preference.getName(), preference); } }
@Override public int compareTo(IPortletLifecycleEntry o) { int rslt = date.compareTo(o.getDate()); if (rslt == 0) { rslt = lifecycleStateId - o.getLifecycleState().getOrder(); } return rslt; }
@Override public void updateLifecycleState( PortletLifecycleState lifecycleState, IPerson user, Date timestamp) { portletDefinition.updateLifecycleState(lifecycleState, user, timestamp); }