If the targetedPortletWindowId is not null {@link
IPortalRequestInfo#getPortletRequestInfo(IPortletWindowId)} is called and that value is
returned. If targetedPortletWindowId is null targetedPortletRequestInfo is returned.
341484
protected PortletRequestInfoImpl getTargetedPortletRequestInfo(
            final PortalRequestInfoImpl portalRequestInfo,
            final PortletRequestInfoImpl targetedPortletRequestInfo,
            final IPortletWindowId targetedPortletWindowId) {

        if (targetedPortletWindowId == null) {
            return targetedPortletRequestInfo;
        }

        return portalRequestInfo.getPortletRequestInfo(targetedPortletWindowId);
    }
1318430
@RequestMapping(
            headers = {"org.apereo.portal.url.UrlType=ACTION"},
            method = RequestMethod.POST)
    public void actionRequest(HttpServletRequest request, HttpServletResponse response)
            throws IOException {

        final IPortalRequestInfo portalRequestInfo =
                this.urlSyntaxProvider.getPortalRequestInfo(request);
        final IPortletRequestInfo portletRequestInfo =
                portalRequestInfo.getTargetedPortletRequestInfo();

        final IPortalUrlBuilder actionRedirectUrl;
        if (portletRequestInfo != null) {
            final IPortletWindowId targetWindowId = portletRequestInfo.getPortletWindowId();
            actionRedirectUrl =
                    this.portalUrlProvider.getPortalUrlBuilderByPortletWindow(
                            request, targetWindowId, UrlType.RENDER);
        } else {
            final String targetedLayoutNodeId = portalRequestInfo.getTargetedLayoutNodeId();

            if (targetedLayoutNodeId != null) {
                actionRedirectUrl =
                        this.portalUrlProvider.getPortalUrlBuilderByLayoutNode(
                                request, targetedLayoutNodeId, UrlType.RENDER);
            } else {
                actionRedirectUrl = this.portalUrlProvider.getDefaultUrl(request);
            }
        }

        // Stuff the action-redirect URL builder into the request so other code can use it during
        // request processing
        this.portalUrlProvider.convertToPortalActionUrlBuilder(request, actionRedirectUrl);

        if (portletRequestInfo != null) {
            final IPortletWindowId targetWindowId = portletRequestInfo.getPortletWindowId();

            try {
                this.portletExecutionManager.doPortletAction(targetWindowId, request, response);
            } catch (RuntimeException e) {
                this.logger.error(
                        "Exception thrown while executing portlet action for: "
                                + portletRequestInfo,
                        e);

                // TODO this should be a constant right?
                actionRedirectUrl.setParameter("portletActionError", targetWindowId.toString());
            }
        }

        sendRedirect(actionRedirectUrl, response);
    }
28209
@Override
    public IPortletEntity getPortletEntity(IPortletEntityId portletEntityId) {
        final IPortletEntity portletEntity =
                this.delegatePortletEntityDao.getPortletEntity(portletEntityId);
        return this.wrapEntity(portletEntity);
    }
678493
protected String getResultUrl(
            HttpServletRequest httpServletRequest,
            SearchResult result,
            IPortletWindowId portletWindowId) {
        final String externalUrl = result.getExternalUrl();
        if (externalUrl != null) {
            return externalUrl;
        }

        UrlType urlType = UrlType.RENDER;

        final PortletUrl portletUrl = result.getPortletUrl();
        if (portletUrl != null) {
            final PortletUrlType type = portletUrl.getType();
            if (type != null) {
                switch (type) {
                    case ACTION:
                        {
                            urlType = UrlType.ACTION;
                            break;
                        }
                    default:
                    case RENDER:
                        {
                            urlType = UrlType.RENDER;
                            break;
                        }
                    case RESOURCE:
                        {
                            urlType = UrlType.RESOURCE;
                            break;
                        }
                }
            }
        }

        final IPortalUrlBuilder portalUrlBuilder =
                this.portalUrlProvider.getPortalUrlBuilderByPortletWindow(
                        httpServletRequest, portletWindowId, urlType);
        final IPortletUrlBuilder portletUrlBuilder =
                portalUrlBuilder.getTargetedPortletUrlBuilder();

        if (portletUrl != null) {
            final String portletMode = portletUrl.getPortletMode();
            if (portletMode != null) {
                portletUrlBuilder.setPortletMode(PortletUtils.getPortletMode(portletMode));
            }
            final String windowState = portletUrl.getWindowState();
            if (windowState != null) {
                portletUrlBuilder.setWindowState(PortletUtils.getWindowState(windowState));
            }
            for (final PortletUrlParameter param : portletUrl.getParam()) {
                final String name = param.getName();
                final List<String> values = param.getValue();
                portletUrlBuilder.addParameter(name, values.toArray(new String[values.size()]));
            }
        }

        return portalUrlBuilder.getUrlString();
    }
435503
@Override
    public String getPortletTitle(
            IPortletWindowId portletWindowId,
            HttpServletRequest request,
            HttpServletResponse response) {
        final IPortletDefinition portletDefinition = getPortletDefinition(portletWindowId, request);
        final IPortletDefinitionParameter disableDynamicTitle =
                portletDefinition.getParameter("disableDynamicTitle");

        if (disableDynamicTitle == null || !Boolean.parseBoolean(disableDynamicTitle.getValue())) {
            try {
                final PortletRenderResult portletRenderResult =
                        getPortletRenderResult(portletWindowId, request, response);
                if (portletRenderResult != null) {
                    final String title = portletRenderResult.getTitle();
                    if (title != null) {
                        return title;
                    }
                }
            } catch (Exception e) {
                logger.warn(
                        "unable to get portlet title, falling back to title defined in channel definition for portletWindowId "
                                + portletWindowId);
            }
        }

        // we assume that response locale has been set to correct value
        String locale = response.getLocale().toString();

        // return portlet title from channel definition
        return portletDefinition.getTitle(locale);
    }
923098
@Trivial
    public static Tracer getTracer() {
        String methodName = "getTracer";
        if ( TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled() ) {
            Tr.entry(tc, methodName);
        }

        OpentracingContext tracerContext = getOpentracingContext();
        // Should never be null.  The thread local variable provides
        // a non-null initial value.

        String appName = tracerContext.getAppName();
        Tracer tracer = tracerContext.getTracer();
        String tracerCase;

        // The app name and tracer should always be null when requesting
        // the tracer from a container filter, and should never be null
        // when requesting the tracer from a client filter.

        if ( tracer != null ) {
            tracerCase = "previously stored for " + appName;

        } else {
            appName = OpentracingUtils.lookupAppName();
            tracer = ensureTracer(appName);
            tracerContext.setTracer(appName, tracer);

            tracerCase = "newly stored for " + appName;
        }

        if ( TraceComponent.isAnyTracingEnabled() && tc.isEntryEnabled() ) {
            Thread currentThread = Thread.currentThread();
            String threadName = currentThread.getName();
            long threadId = currentThread.getId();
            Tr.exit(tc,
                methodName + " (" + tracerCase + ") in (" + threadName + ":" + Long.toString(threadId) + ")",
                OpentracingUtils.getTracerText(tracer));
        }
        return tracer;
    }
260074
@Override
	public Object getDraggableObjectAtPoint(final PointInfo pt) {
		if (this.isAnimating()) {
			// Zoom animations use the mMultiTouchScale variables to perform their animations so we
			// don't want to step on that.
			return null;
		} else {
			setMultiTouchScaleInitPoint(pt.getX(), pt.getY());
			return this;
		}
	}
971491
@Override
    public IPortalUrlBuilder getPortalUrlBuilderByPortletWindow(
            HttpServletRequest request, IPortletWindowId portletWindowId, UrlType urlType) {
        final IPortletWindow portletWindow =
                this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
        return getPortalUrlBuilderByPortletWindow(request, portletWindow, urlType);
    }
1164319
@Nullable
    public SharedElementCallback getExitTransitionCallback(@NonNull ViewGroup container, @Nullable View from, @Nullable View to, boolean isPush) {
        return null;
    }
777559
T unsafeGetIfOpened() {

        if (innerObject != null && innerObject.getState() == IOObject.IOObjectState.OPENED) {
            return innerObject;
        }
        return null;
    }
10567
private Integer getPortFromProjectOrSystemProperty(String var) {
        String sysProp = System.getProperty(var);
        if (sysProp != null) {
            return getAsIntOrNull(sysProp);
        }
        if (projProperties.containsKey(var)) {
            return getAsIntOrNull(projProperties.getProperty(var));
        }
        return null;
    }
378909
public StatisticImpl getStatistic() {
        if (enabled) {
            if (proxy == null) {
                System.out.println("[SpdStatisticExternal] null proxy");
                return null;
            }

            proxy.updateStatisticOnRequest(dataId);

            // onReqStatistic will be updated by the component
            // the reference is kept in this class
            return onReqStatistic;
        } else
            return null;
    }
779490
@Override
    public void startPortletRender(
            IPortletWindowId portletWindowId,
            HttpServletRequest request,
            HttpServletResponse response) {
        this.startPortletRenderInternal(portletWindowId, request, response);
    }
1136358
@Override
    public Long getTrackingPoint() {
        if (underlyingDataBuffer() != this)
            return underlyingDataBuffer() == null ? trackingPoint : underlyingDataBuffer().getTrackingPoint();
        return trackingPoint;
    }
47236
@Override
    public String getPortletHeadOutput(
            IPortletWindowId portletWindowId,
            HttpServletRequest request,
            HttpServletResponse response) {
        if (doesPortletNeedHeaderWorker(portletWindowId, request)) {
            final IPortletRenderExecutionWorker tracker =
                    getRenderedPortletHeaderWorker(portletWindowId, request, response);
            final long timeout = getPortletRenderTimeout(portletWindowId, request);
            try {
                final String output = tracker.getOutput(timeout);
                return output == null ? "" : output;
            } catch (Exception e) {
                logger.error("failed to render header output for " + portletWindowId, e);
                return "";
            }
        }

        logger.debug(portletWindowId + " does not produce output for header");
        return "";
    }
326363
@Override
    public Map<String, String> getUserInfo(PortletRequest request, PortletWindow plutoPortletWindow)
            throws PortletContainerException {
        // Get the remote user
        final String remoteUser = request.getRemoteUser();
        if (remoteUser == null) {
            return null;
        }

        final HttpServletRequest httpServletRequest =
                this.portalRequestUtils.getPortletHttpRequest(request);
        final IPortletWindow portletWindow =
                this.portletWindowRegistry.convertPortletWindow(
                        httpServletRequest, plutoPortletWindow);

        return this.getUserInfo(remoteUser, httpServletRequest, portletWindow);
    }
49555
@Override
    public int getVirtualPort() {
        if (HeaderStorage.NOTSET != this.iUrlPort) {
            // use the port from the parsed URL
            return this.iUrlPort;
        }
        if (NOT_PRESENT <= this.iHdrPort) {
            // already searched the header value and either found it or not,
            // either way, return what we saved
            return this.iHdrPort;
        }

        // need to extract the value from the header
        byte[] host = getHeader(HttpHeaderKeys.HDR_HOST).asBytes();
        if (null == host || host.length == 0) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "getVirtualPort: No/empty host header");
            }
            return -1;
        }
        // default to not_present now
        this.iHdrPort = NOT_PRESENT;
        int start = -1;
        if (LEFT_BRACKET == host[0]) {
            // IPV6 IP address
            start = GenericUtils.byteIndexOf(host, RIGHT_BRACKET, 0);
            if (-1 == start) {
                // invalid IP
                if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                    Tr.debug(tc, "getVirtualPort: Invalid IPV6 ip in host header");
                }
                return -1;
            }
            start++; // skip past the bracket
        } else {
            // everything but an IPV6 IP
            start = GenericUtils.byteIndexOf(host, BNFHeaders.COLON, 0);
        }
        if (-1 == start || host.length <= start || BNFHeaders.COLON != host[start]) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "getVirtualPort: No port in host header");
            }
            return -1;
        }
        start++; // skip past the colon
        int length = host.length - start;
        if (0 >= length) {
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "getVirtualPort: No port after colon");
            }
            return -1;
        }
        try {
            // PK14634 - cache the parsed port
            this.iHdrPort = GenericUtils.asIntValue(host, start, length);
        } catch (NumberFormatException nfe) {
            // no FFDC required
            if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
                Tr.debug(tc, "getVirtualPort: Invalid port value: " + HttpChannelUtils.getEnglishString(host, start, length));
            }
            return -1;
        }

        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "getVirtualPort: returning " + this.iHdrPort);
        }
        return this.iHdrPort;
    }