Examples of ResourceDependency


Examples of javax.faces.application.ResourceDependency

            isCachedList = true;    // else annotations were found in the cache
        }
       
        if(dependencyList == null//not in production or the class hasn't been inspected yet
        {  
            ResourceDependency dependency = inspectedClass.getAnnotation(ResourceDependency.class);
            ResourceDependencies dependencies = inspectedClass.getAnnotation(ResourceDependencies.class);
            if(dependency != null || dependencies != null)
            {
                //resource dependencies were found using one or both annotations, create and build a new list
                dependencyList = new ArrayList<ResourceDependency>();
               
                if(dependency != null)
                {
                    dependencyList.add(dependency);
                }
               
                if(dependencies != null)
                {
                    dependencyList.addAll(Arrays.asList(dependencies.value()));
                }
            }
            else
            {
                dependencyList = Collections.emptyList();
            }
        }       
        // resource dependencies were found through inspection or from cache, handle them
        if (dependencyList != null && !dependencyList.isEmpty())
        {
            for (int i = 0, size = dependencyList.size(); i < size; i++)
            {
                ResourceDependency dependency = dependencyList.get(i);
                if (!rvc.isResourceDependencyAlreadyProcessed(dependency))
                {
                    _handleResourceDependency(context, component, dependency);
                    rvc.setResourceDependencyAsProcessed(dependency);
                }
View Full Code Here

Examples of javax.faces.application.ResourceDependency

    {
        if (inspected == null) {
            return;
        }
       
        ResourceDependency annotation = inspected.getClass().getAnnotation(ResourceDependency.class);
       
        if (annotation == null)
        {
            // If the ResourceDependency annotation is not present, the argument must be inspected for the presence
            // of the ResourceDependencies annotation.
View Full Code Here

Examples of javax.faces.application.ResourceDependency

            isCachedList = true;    // else annotations were found in the cache
        }
       
        if(dependencyList == null//not in production or the class hasn't been inspected yet
        {  
            ResourceDependency dependency = inspectedClass.getAnnotation(ResourceDependency.class);
            ResourceDependencies dependencies = inspectedClass.getAnnotation(ResourceDependencies.class);
            if(dependency != null || dependencies != null)
            {
                //resource dependencies were found using one or both annotations, create and build a new list
                dependencyList = new ArrayList<ResourceDependency>();
               
                if(dependency != null)
                    dependencyList.add(dependency);
               
                if(dependencies != null)
                    dependencyList.addAll(Arrays.asList(dependencies.value()));
            }
        }       
        if (dependencyList != null) //resource dependencies were found through inspection or from cache, handle them
        {
            for (int i = 0, size = dependencyList.size(); i < size; i++)
            {
                ResourceDependency dependency = dependencyList.get(i);
                if (!rvc.isResourceDependencyAlreadyProcessed(dependency))
                {
                    _handleResourceDependency(context, component, dependency);
                    rvc.setResourceDependencyAsProcessed(dependency);
                }
View Full Code Here

Examples of javax.faces.application.ResourceDependency

            isCachedList = true;    // else annotations were found in the cache
        }
       
        if(dependencyList == null//not in production or the class hasn't been inspected yet
        {  
            ResourceDependency dependency = inspectedClass.getAnnotation(ResourceDependency.class);
            ResourceDependencies dependencies = inspectedClass.getAnnotation(ResourceDependencies.class);
            if(dependency != null || dependencies != null)
            {
                //resource dependencies were found using one or both annotations, create and build a new list
                dependencyList = new ArrayList<ResourceDependency>();
               
                if(dependency != null)
                {
                    dependencyList.add(dependency);
                }
               
                if(dependencies != null)
                {
                    dependencyList.addAll(Arrays.asList(dependencies.value()));
                }
            }
            else
            {
                dependencyList = Collections.emptyList();
            }
        }

        //resource dependencies were found through inspection or from cache, handle them
        if (dependencyList != null && !dependencyList.isEmpty())
        {
            for (int i = 0, size = dependencyList.size(); i < size; i++)
            {
                ResourceDependency dependency = dependencyList.get(i);
                if (!rvc.isResourceDependencyAlreadyProcessed(dependency))
                {
                    _handleAttachedResourceDependency(context, dependency);
                    rvc.setResourceDependencyAsProcessed(dependency);
                }
View Full Code Here

Examples of javax.faces.application.ResourceDependency

            isCachedList = true;    // else annotations were found in the cache
        }
       
        if(dependencyList == null//not in production or the class hasn't been inspected yet
        {  
            ResourceDependency dependency = inspectedClass.getAnnotation(ResourceDependency.class);
            ResourceDependencies dependencies = inspectedClass.getAnnotation(ResourceDependencies.class);
            if(dependency != null || dependencies != null)
            {
                //resource dependencies were found using one or both annotations, create and build a new list
                dependencyList = new ArrayList<ResourceDependency>();
               
                if(dependency != null)
                {
                    dependencyList.add(dependency);
                }
               
                if(dependencies != null)
                {
                    dependencyList.addAll(Arrays.asList(dependencies.value()));
                }
            }
            else
            {
                dependencyList = Collections.emptyList();
            }
        }       
        // resource dependencies were found through inspection or from cache, handle them
        if (dependencyList != null && !dependencyList.isEmpty())
        {
            for (int i = 0, size = dependencyList.size(); i < size; i++)
            {
                ResourceDependency dependency = dependencyList.get(i);
                if (!rvc.isResourceDependencyAlreadyProcessed(dependency))
                {
                    _handleResourceDependency(context, component, dependency);
                    rvc.setResourceDependencyAsProcessed(dependency);
                }
View Full Code Here

Examples of javax.faces.application.ResourceDependency

            isCachedList = true;    // else annotations were found in the cache
        }
       
        if(dependencyList == null//not in production or the class hasn't been inspected yet
        {  
            ResourceDependency dependency = inspectedClass.getAnnotation(ResourceDependency.class);
            ResourceDependencies dependencies = inspectedClass.getAnnotation(ResourceDependencies.class);
            if(dependency != null || dependencies != null)
            {
                //resource dependencies were found using one or both annotations, create and build a new list
                dependencyList = new ArrayList<ResourceDependency>();
               
                if(dependency != null)
                {
                    dependencyList.add(dependency);
                }
               
                if(dependencies != null)
                {
                    dependencyList.addAll(Arrays.asList(dependencies.value()));
                }
            }
            else
            {
                dependencyList = Collections.emptyList();
            }
        }

        //resource dependencies were found through inspection or from cache, handle them
        if (dependencyList != null && !dependencyList.isEmpty())
        {
            for (int i = 0, size = dependencyList.size(); i < size; i++)
            {
                ResourceDependency dependency = dependencyList.get(i);
                if (!rvc.isResourceDependencyAlreadyProcessed(dependency))
                {
                    _handleAttachedResourceDependency(context, dependency);
                    rvc.setResourceDependencyAsProcessed(dependency);
                }
View Full Code Here

Examples of javax.faces.application.ResourceDependency

            isCachedList = true;    // else annotations were found in the cache
        }
       
        if(dependencyList == null//not in production or the class hasn't been inspected yet
        {  
            ResourceDependency dependency = inspectedClass.getAnnotation(ResourceDependency.class);
            ResourceDependencies dependencies = inspectedClass.getAnnotation(ResourceDependencies.class);
            if(dependency != null || dependencies != null)
            {
                //resource dependencies were found using one or both annotations, create and build a new list
                dependencyList = new ArrayList<ResourceDependency>();
               
                if(dependency != null)
                {
                    dependencyList.add(dependency);
                }
               
                if(dependencies != null)
                {
                    dependencyList.addAll(Arrays.asList(dependencies.value()));
                }
            }
            else
            {
                dependencyList = Collections.emptyList();
            }
        }       
        // resource dependencies were found through inspection or from cache, handle them
        if (dependencyList != null && !dependencyList.isEmpty())
        {
            for (int i = 0, size = dependencyList.size(); i < size; i++)
            {
                ResourceDependency dependency = dependencyList.get(i);
                if (!rvc.isResourceDependencyAlreadyProcessed(dependency))
                {
                    _handleResourceDependency(context, component, dependency);
                    rvc.setResourceDependencyAsProcessed(dependency);
                }
View Full Code Here

Examples of javax.faces.application.ResourceDependency

    {
        if (inspected == null) {
            return;
        }
       
        ResourceDependency annotation = inspected.getClass().getAnnotation(ResourceDependency.class);
       
        if (annotation == null)
        {
            // If the ResourceDependency annotation is not present, the argument must be inspected for the presence
            // of the ResourceDependencies annotation.
View Full Code Here

Examples of org.apache.felix.dm.ResourceDependency

    public void testShareResourceDependencyWithMultipleServices() throws Exception {
        DependencyManager m = new DependencyManager(context);
        // helper class that ensures certain steps get executed in sequence
        Ensure e = new Ensure();
        // create a service provider and consumer
        ResourceDependency dependency = m.createResourceDependency().setFilter("(" + ResourceHandler.HOST + "=localhost)").setRequired(true);
        Component consumer1 = m.createComponent().setImplementation(new ResourceConsumer(e, 1)).add(dependency);
        Component consumer2 = m.createComponent().setImplementation(new ResourceConsumer(e, 2)).add(dependency);
        Component resourceProvider = m.createComponent().setImplementation(new ResourceProvider()).add(m.createServiceDependency().setService(ResourceHandler.class).setCallbacks("add", "remove"));;
        m.add(resourceProvider);
        m.add(consumer1);
View Full Code Here

Examples of org.apache.felix.dm.ResourceDependency

            }
            List dependencies = m_component.getDependencies();
            // the first dependency is always the dependency on the resource, which
            // will be replaced with a more specific dependency below
            dependencies.remove(0);
            ResourceDependency resourceDependency = m_manager.createResourceDependency()
                 .setResource(resource)
                 .setCallbacks(m_callbackInstance, m_callbackAdded, m_callbackChanged, null)
                 .setAutoConfig(m_callbackAdded == null)
                 .setRequired(true);
            if (m_propagateCallbackInstance != null && m_propagateCallbackMethod != null) {
                resourceDependency.setPropagate(m_propagateCallbackInstance, m_propagateCallbackMethod);
            } else {
                resourceDependency.setPropagate(m_propagate);
            }
            Component service = m_manager.createComponent()
                .setInterface(m_serviceInterfaces, props)
                .setImplementation(m_serviceImpl)
                .setFactory(m_factory, m_factoryCreateMethod) // if not set, no effect
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.