@Override protected String createPortletScopedId(String name) { return PORTLET_SCOPE_NAMESPACE + portletEntityId.getStringId() + ID_NAME_SEPARATOR + name; }
@Override protected String createPortletScopedId(String name) { return PORTLET_SCOPE_NAMESPACE + portletEntityId.getStringId() + ID_NAME_SEPARATOR + name; }
protected long getNativePortletEntityId(IPortletEntityId portletEntityId) { final long internalPortletEntityId = Long.parseLong(portletEntityId.getStringId()); return internalPortletEntityId; } }
@Override protected boolean isInCurrentPortletScope(String name) { // Portlet-scoped attribute names MUST start with "javax.portlet.p.", // and contain the ID-name separator '?'. if (name.startsWith(PORTLET_SCOPE_NAMESPACE) && name.indexOf(ID_NAME_SEPARATOR) > -1) { final String id = name.substring( PORTLET_SCOPE_NAMESPACE.length(), name.indexOf(ID_NAME_SEPARATOR)); return (id.equals(portletEntityId.getStringId())); } // Application-scoped attribute names are not in portlet scope. return false; }
@Override protected boolean isInCurrentPortletScope(String name) { // Portlet-scoped attribute names MUST start with "javax.portlet.p.", // and contain the ID-name separator '?'. if (name.startsWith(PORTLET_SCOPE_NAMESPACE) && name.indexOf(ID_NAME_SEPARATOR) > -1) { final String id = name.substring( PORTLET_SCOPE_NAMESPACE.length(), name.indexOf(ID_NAME_SEPARATOR)); return (id.equals(portletEntityId.getStringId())); } // Application-scoped attribute names are not in portlet scope. return false; }
public PortletWindowIdImpl(IPortletEntityId portletEntityId, String windowInstanceId) { Validate.notNull(portletEntityId, "portletEntityId can not be null"); this.portletEntityId = portletEntityId; this.windowInstanceId = windowInstanceId; this.compositeIdString = PortletWindowIdStringUtils.format(portletEntityId.getStringId(), windowInstanceId); }
@Before public void setup() throws Exception { MockitoAnnotations.initMocks(this); portletWindowCache = new PortletWindowCache(); when(portletEntityId.getStringId()).thenReturn("110_u18l1n1203_60"); when(portletWindowId.getStringId()).thenReturn("210_u18l1n1203_80"); when(portletWindowDescriptor.getPortletEntityId()).thenReturn(portletEntityId); when(portletWindowDescriptor.getPortletWindowId()).thenReturn(portletWindowId); }
@Before public void setup() throws Exception { MockitoAnnotations.initMocks(this); portletEntityCache = new PortletEntityCache(); when(portletEntityId.getStringId()).thenReturn("110_u18l1n1203_60"); when(portletDefinitionId.getLongId()).thenReturn(1010L); when(portletEntityDescriptor.getLayoutNodeId()).thenReturn("u18l1n1203"); when(portletEntityDescriptor.getPortletDefinitionId()).thenReturn(portletDefinitionId); when(portletEntityDescriptor.getPortletEntityId()).thenReturn(portletEntityId); when(portletEntityDescriptor.getUserId()).thenReturn(60); }