Package org.apache.jetspeed.components

Examples of org.apache.jetspeed.components.ComponentManager


    protected ClassLoader getClassLoader()
    {
        ClassLoader defaultClassLoader = super.getClassLoader();
        JetspeedContextAwareClassLoader jetspeedContextAwareClassLoader = null;
       
        ComponentManager componentManager = Jetspeed.getComponentManager();
           
        if (componentManager != null)
        {
            ClassLoader jetspeedContextClassLoader = null;
           
            try
            {
                jetspeedContextClassLoader = componentManager.getClass().getClassLoader();
            }
            catch (SecurityException e)
            {
                // The app server can disallow accessing the classloader.
                // We need to print information about this.
View Full Code Here


    private void testRegistryConnection()
    throws InitializationException
{
    try
    {
        ComponentManager cm = Jetspeed.getComponentManager();
        PortletRegistry registry = (PortletRegistry)cm.getComponent(PortletRegistry.class);
        if (registry == null)
        {
            System.err.println("Failed to get registry component!");
            return;
        }
View Full Code Here

    {
        // initialize
        super.init(config);

        // get jetspeed component manager configuration for decorations
        ComponentManager cm = Jetspeed.getComponentManager();
        int count =0;
        while(cm == null) {
            try {
                Thread.sleep(200);
            } catch(InterruptedException ie) {
               
            }
            cm = Jetspeed.getComponentManager();
            if( count > 5 ) {
                if (null == cm)
                    throw new ServletException("Could not get Jetspeed Component Manager after "+count+"tries");
            }
            count++;
       
        }
        decorationLocator = (TemplateLocator) cm.getComponent("DecorationLocator");

        // initialize thread safe velocity engine cache
        int cacheSize = (int) getLongInitParameter(config, CACHE_SIZE_PARAMETER, DEFAULT_CACHE_SIZE);
        velocityEngineConfigCache = new LRUMap(cacheSize);
        velocityEngineCache = new LRUMap(cacheSize/2);
View Full Code Here

        Jetspeed.engine = engine;
    }
   
    public static PortalConfiguration getConfiguration()
    {
        ComponentManager manager = getComponentManager();
        if (manager != null)
            return (PortalConfiguration)manager.getComponent("PortalConfiguration");
        return null;       
    }
View Full Code Here

    {
        // initialize
        super.init(config);

        // get jetspeed component manager configuration for decorations
        ComponentManager cm = Jetspeed.getComponentManager();
        int count =0;
        while(cm == null) {
            try {
                Thread.sleep(200);
            } catch(InterruptedException ie) {
               
            }
            cm = Jetspeed.getComponentManager();
            if( count > 5 ) {
                if (null == cm)
                    throw new ServletException("Could not get Jetspeed Component Manager after "+count+"tries");
            }
            count++;
       
        }
        decorationLocator = (TemplateLocator) cm.getComponent("DecorationLocator");

        // initialize thread safe velocity engine cache
        int cacheSize = (int) getLongInitParameter(config, CACHE_SIZE_PARAMETER, DEFAULT_CACHE_SIZE);
        velocityEngineConfigCache = new LRUMap(cacheSize);
        velocityEngineCache = new LRUMap(cacheSize/2);
View Full Code Here

    {
        // initialize
        super.init(config);

        // get jetspeed component manager configuration for decorations
        ComponentManager cm = Jetspeed.getComponentManager();
        int count =0;
        while(cm == null) {
            try {
                Thread.sleep(200);
            } catch(InterruptedException ie) {
               
            }
            cm = Jetspeed.getComponentManager();
            if( count > 5 ) {
                if (null == cm)
                    throw new ServletException("Could not get Jetspeed Component Manager after "+count+"tries");
            }
            count++;
       
        }
        decorationLocator = (TemplateLocator) cm.getComponent("DecorationLocator");

        // initialize thread safe velocity engine cache
        int cacheSize = (int) getLongInitParameter(config, CACHE_SIZE_PARAMETER, DEFAULT_CACHE_SIZE);
        velocityEngineConfigCache = new LRUMap(cacheSize);
        velocityEngineCache = new LRUMap(cacheSize/2);
View Full Code Here

                configs[i] = current0Offset;
               
            }         
        }
       
        ComponentManager cm = new SpringComponentManager(configs, null);
       
        return cm;
    }   
View Full Code Here

        }
    }

    protected void clientSetup(RequestContext requestContext)
    {       
        ComponentManager cm = Jetspeed.getComponentManager();
        templateLocator = (TemplateLocator) cm.getComponent("TemplateLocator");
        decorationLocator = (TemplateLocator) cm.getComponent("DecorationLocator");
        // By using null, we create a re-useable locator
        try
        {
            capabilityMap = requestContext.getCapabilityMap();
            locale = requestContext.getLocale();
View Full Code Here

    {
        // initialize
        super.init(config);

        // get jetspeed component manager configuration for decorations
        ComponentManager cm = Jetspeed.getComponentManager();
        decorationLocator = (TemplateLocator) cm.getComponent("DecorationLocator");

        // initialize thread safe velocity engine cache
        int cacheSize = (int) getLongInitParameter(config, CACHE_SIZE_PARAMETER, DEFAULT_CACHE_SIZE);
        velocityEngineConfigCache = new LRUMap(cacheSize);
        velocityEngineCache = new LRUMap(cacheSize/2);
View Full Code Here

    {
        // initialize
        super.init(config);

        // get jetspeed component manager configuration for decorations
        ComponentManager cm = Jetspeed.getComponentManager();
        int count =0;
        while(cm == null) {
            try {
                Thread.sleep(200);
            } catch(InterruptedException ie) {
               
            }
            cm = Jetspeed.getComponentManager();
            if( count > 5 ) {
                if (null == cm)
                    throw new ServletException("Could not get Jetspeed Component Manager after "+count+"tries");
            }
            count++;
       
        }
        decorationLocator = (TemplateLocator) cm.getComponent("DecorationLocator");

        // initialize thread safe velocity engine cache
        int cacheSize = (int) getLongInitParameter(config, CACHE_SIZE_PARAMETER, DEFAULT_CACHE_SIZE);
        velocityEngineConfigCache = new LRUMap(cacheSize);
        velocityEngineCache = new LRUMap(cacheSize/2);
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.components.ComponentManager

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.