Package org.jasig.portal.portlet.om

Examples of org.jasig.portal.portlet.om.IPortletDescriptorKey


                    portletDescriptor.getWebAppName(),
                    portletDescriptor.getPortletName(),
                    isFramework != null ? isFramework : false);
        }
        else {
            final IPortletDescriptorKey portletDescriptorKey = def.getPortletDescriptorKey();
            portletDescriptorKey.setPortletName(portletDescriptor.getPortletName());
            if (isFramework != null && isFramework) {
                portletDescriptorKey.setFrameworkPortlet(true);
                portletDescriptorKey.setWebAppName(null);
            }
            else {
                portletDescriptorKey.setFrameworkPortlet(false);
                portletDescriptorKey.setWebAppName(portletDescriptor.getWebAppName());
            }
        }
       
        def.setName(portletRep.getName());
        def.setTitle(portletRep.getTitle());
View Full Code Here


        rep.setTitle(def.getTitle());
        rep.setType(def.getType().getName());
        
        
        final org.jasig.portal.xml.PortletDescriptor portletDescriptor = new org.jasig.portal.xml.PortletDescriptor();
        final IPortletDescriptorKey portletDescriptorKey = def.getPortletDescriptorKey();
        if (portletDescriptorKey.isFrameworkPortlet()) {
            portletDescriptor.setIsFramework(true);
        }
        else {
            portletDescriptor.setWebAppName(portletDescriptorKey.getWebAppName());
        }
        portletDescriptor.setPortletName(portletDescriptorKey.getPortletName());
        rep.setPortletDescriptor(portletDescriptor);
        
        
        final List<ExternalPortletParameter> parameterList = rep.getParameters();
        for (IPortletDefinitionParameter param : def.getParameters()) {
View Full Code Here

            return true;
        if (obj == null)
            return false;
        if (!IPortletDescriptorKey.class.isAssignableFrom(obj.getClass()))
            return false;
        IPortletDescriptorKey other = (IPortletDescriptorKey) obj;
        if (this.frameworkPortlet != other.isFrameworkPortlet())
            return false;
        if (this.portletName == null) {
            if (other.getPortletName() != null)
                return false;
        }
        else if (!this.portletName.equals(other.getPortletName()))
            return false;
        if (this.webAppName == null) {
            if (other.getWebAppName() != null)
                return false;
        }
        else if (!this.webAppName.equals(other.getWebAppName()))
            return false;
        return true;
    }
View Full Code Here

    @Override
    public Map<String, Integer> getPortletExecutionCounts() {
        final Map<String, Integer> counts = new TreeMap<String, Integer>();
       
        for (final Map.Entry<IPortletDescriptorKey, AtomicInteger> entry : this.executionCount.entrySet()) {
            final IPortletDescriptorKey key = entry.getKey();
            final AtomicInteger value = entry.getValue();
            counts.put(key.getWebAppName() + "/" + key.getPortletName(), value.get());
        }
       
        return counts;
    }
View Full Code Here

    public void postExecution(HttpServletRequest request, HttpServletResponse response, IPortletExecutionContext context, Exception e) {
        final IPortletWindowId portletWindowId = context.getPortletWindowId();
        final IPortletWindow portletWindow = this.portletWindowRegistry.getPortletWindow(request, portletWindowId);
        final IPortletEntity portletEntity = portletWindow.getPortletEntity();
        final IPortletDefinition portletDefinition = portletEntity.getPortletDefinition();
        final IPortletDescriptorKey portletDescriptorKey = portletDefinition.getPortletDescriptorKey();
       
        final AtomicInteger counter = this.executionCount.get(portletDescriptorKey);
        counter.incrementAndGet();
    }
View Full Code Here

     * @param request
     * @param timeout
     * @return
     */
    protected final long getModifiedTimeout(IPortletDefinition portletDefinition, HttpServletRequest request, long timeout) {
        final IPortletDescriptorKey portletDescriptorKey = portletDefinition.getPortletDescriptorKey();
        final AtomicInteger counter = this.executionCount.get(portletDescriptorKey);
        final int executionCount = counter.get();
       
        if (executionCount > extendedTimeoutExecutions) {
            return timeout;
        }

        if (logger.isDebugEnabled()) {
            logger.debug(String.format("Modifying timeout for %40s from %7s to %8s on execution %2s\n", portletDescriptorKey.toString(), timeout, timeout * extendedTimeoutMultiplier, executionCount));
        }
        return timeout * extendedTimeoutMultiplier;
    }
View Full Code Here

TOP

Related Classes of org.jasig.portal.portlet.om.IPortletDescriptorKey

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.