Examples of ComponentContext


Examples of com.cloud.utils.component.ComponentContext

    public static class CloudStackTestConfiguration {

        @Bean
        public ComponentContext componentContext() {
            return new ComponentContext();
        }
View Full Code Here

Examples of com.day.cq.wcm.api.components.ComponentContext

        }

        final SlingHttpServletRequest slingRequest = (SlingHttpServletRequest) request;
        final SlingHttpServletResponse slingResponse = (SlingHttpServletResponse) response;

        final ComponentContext componentContext = WCMUtils.getComponentContext(request);

        if (componentContext == null
                || componentContext.isRoot()) {
            chain.doFilter(request, response);
        } else if (editModeEnabled
                && (componentHelper.isEditMode(slingRequest)
                || componentHelper.isDesignMode(slingRequest)
                || WCMMode.ANALYTICS.equals(WCMMode.fromRequest(slingRequest)))) {
View Full Code Here

Examples of com.dotcms.repackage.org.apache.struts.tiles.ComponentContext

     *
     * @param scope the named context scope to put the attributes into.
     */
    public void importAttributes(String scope)
    {
        ComponentContext context = getCurrentContext();
        Iterator names = context.getAttributeNames();

        if (scope.equals(PAGE_SCOPE))
        {
            while (names.hasNext())
            {
                String name = (String)names.next();
                velocityContext.put(name, context.getAttribute(name));
            }
        }
        else if (scope.equals(REQUEST_SCOPE))
        {
            while (names.hasNext())
            {
                String name = (String)names.next();
                request.setAttribute(name, context.getAttribute(name));
            }
        }
        else if (scope.equals(SESSION_SCOPE))
        {
            HttpSession session = request.getSession();
            while (names.hasNext())
            {
                String name = (String)names.next();
                session.setAttribute(name, context.getAttribute(name));
            }
        }
        else if (scope.equals(APPLICATION_SCOPE))
        {
            while (names.hasNext())
            {
                String name = (String)names.next();
                application.setAttribute(name, context.getAttribute(name));
            }
        }
    }
View Full Code Here

Examples of com.noelios.restlet.component.ComponentContext

        // Add the WAR client
        component.getClients().add(
                createWarClient(component.getContext(), getServletConfig()));

        // Copy all the servlet parameters into the context
        final ComponentContext componentContext = (ComponentContext) component
                .getContext();
        String initParam;

        // Copy all the Servlet container initialization parameters
        final javax.servlet.ServletConfig servletConfig = getServletConfig();
        for (final Enumeration<String> enum1 = servletConfig
                .getInitParameterNames(); enum1.hasMoreElements();) {
            initParam = enum1.nextElement();
            componentContext.getParameters().add(initParam,
                    servletConfig.getInitParameter(initParam));
        }

        // Copy all the Servlet application initialization parameters
        for (final Enumeration<String> enum1 = getServletContext()
                .getInitParameterNames(); enum1.hasMoreElements();) {
            initParam = enum1.nextElement();
            componentContext.getParameters().add(initParam,
                    getServletContext().getInitParameter(initParam));
        }

        // Copy all Servlet's context attributes
        String attributeName;
        for (final Enumeration<String> namesEnum = getServletContext()
                .getAttributeNames(); namesEnum.hasMoreElements();) {
            attributeName = namesEnum.nextElement();
            componentContext.getAttributes().put(attributeName,
                    getServletContext().getAttribute(attributeName));
        }

        return component;
    }
View Full Code Here

Examples of com.sun.ejb.ComponentContext

                    ("Invocation cannot be null");

            int invType = inv.getInvocationType();
            if( invType == ComponentInvocation.EJB_INVOCATION ) {
                if ( inv instanceof Invocation ) {
                    ComponentContext context = ((Invocation) inv).context;
                    // Delegate check to EJB context.  Let any
                    // IllegalStateException bubble up.
                    context.checkTimerServiceMethodAccess();
                    allowed = true;
                } else {
                    // NOTE : There shouldn't be any cases where an EJB
                    // container uses com.sun.enterprise.ComponentInvocation
                    // instead of com.sun.ejb.Invocation and timer method
View Full Code Here

Examples of com.sun.enterprise.deployment.annotation.context.ComponentContext

        }

        if (!supportTypeInheritance() &&
                ElementType.TYPE.equals(ainfo.getElementType()) &&
                aeHandler instanceof ComponentContext) {
            ComponentContext context = (ComponentContext)aeHandler;
            Class clazz = (Class)ainfo.getAnnotatedElement();
            if (!clazz.getName().equals(context.getComponentClassName())) {
                if (logger.isLoggable(Level.WARNING)) {
                    log(Level.WARNING, ainfo,
                        localStrings.getLocalString(
                        "enterprise.deployment.annotation.handlers.typeinhernotsupp",
                        "The annotation symbol inheritance is not supported."));
View Full Code Here

Examples of com.sun.jersey.core.spi.component.ComponentContext

    @Override
    public InjectableScopePair getInjectableiWithScope(AccessibleObject ao, Parameter p, ComponentScope s) {
        if (p.getAnnotation() == null) return null;

        ComponentContext ic = new AnnotatedContext(ao, p.getAnnotations());

        if (s == ComponentScope.PerRequest) {
            // Find a per request injectable with Parameter
            Injectable i = getInjectable(
                    p.getAnnotation().annotationType(),
View Full Code Here

Examples of com.sun.star.comp.helper.ComponentContext

            XComponentContext xInitialContext = Bootstrap.createInitialComponentContext( table );
           
            table = new Hashtable();
            table.put( "bla2", new ComponentContextEntry( new Integer( 2 ) ) );
            table.put( "bla3", new Integer( 3 ) );
            XComponentContext xContext = new ComponentContext( table, xInitialContext );
           
            XMultiComponentFactory xSMgr = xContext.getServiceManager();
            Object o = xSMgr.createInstanceWithContext( "com.sun.star.loader.Java", xContext );
            if (o == null)
                System.err.println( "### failed raising service: 1!" );
            o = xSMgr.createInstanceWithContext( "com.sun.star.bridge.BridgeFactory", xContext );
            if (o == null)
                System.err.println( "### failed raising service: 2!" );
            o = xSMgr.createInstanceWithContext( "com.sun.star.bridge.UnoUrlResolver", xContext );
            if (o == null)
                System.err.println( "### failed raising service: 3!" );
            o = xSMgr.createInstanceWithContext( "com.sun.star.connection.Connector", xContext );
            if (o == null)
                System.err.println( "### failed raising service: 4!" );
            o = xSMgr.createInstanceWithContext( "com.sun.star.connection.Acceptor", xContext );
            if (o == null)
                System.err.println( "### failed raising service: 5!" );
            o = xSMgr.createInstanceWithContext( "com.sun.star.lang.ServiceManager", xContext );
            if (o == null)
                System.err.println( "### failed raising service: 6!" );
           
            if (xContext.getValueByName( "bla1" ) == null ||
                xContext.getValueByName( "bla2" ) == null ||
                xContext.getValueByName( "bla3" ) == null ||
                xInitialContext.getValueByName( "bla2" ) != null ||
                xInitialContext.getValueByName( "bla3" ) != null)
            {
                System.err.println( "### bootstrap context test failed: 1!" );
            }
            if (((Integer)xContext.getValueByName( "bla1" )).intValue() != 1 ||
                ((Integer)xContext.getValueByName( "bla2" )).intValue() != 2 ||
                ((Integer)xContext.getValueByName( "bla3" )).intValue() != 3 ||
                ((Integer)xInitialContext.getValueByName( "bla1" )).intValue() != 1)
            {
                System.err.println( "### bootstrap context test failed: 2!" );
            }
           
View Full Code Here

Examples of javax.jbi.component.ComponentContext

    private List helpers = new ArrayList();

    public void activate() throws Exception {
        logger = this.serviceUnit.getComponent().getLogger();
        ComponentContext ctx = getServiceUnit().getComponent().getComponentContext();
        channel = ctx.getDeliveryChannel();
        activated = ctx.activateEndpoint(service, endpoint);
        start();
    }
View Full Code Here

Examples of net.kuujo.vertigo.component.ComponentContext

      components.clear();
    } else {
      Iterator<Map.Entry<String, DefaultComponentContext<?>>> iter = components.entrySet().iterator();
      while (iter.hasNext()) {
        DefaultComponentContext component = iter.next().getValue();
        ComponentContext match = null;
        for (ComponentContext c : update.components()) {
          if (component.equals(c)) {
            match = c;
            break;
          }
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.