Package org.apache.avalon.framework.context

Examples of org.apache.avalon.framework.context.Context


        Map objectModel = new HashMap();
        FlowHelper.setContextObject(objectModel, flowContextObject);
        objectModel.put(ObjectModelHelper.REQUEST_OBJECT, request);
        Map contextObjectModel = new HashMap();
        contextObjectModel.put(ContextHelper.CONTEXT_OBJECT_MODEL, objectModel);
        Context context = new DefaultContext(contextObjectModel);
        Source sampleSource = new ResourceSource("resource://org/apache/cocoon/forms/datatype/FlowJXPathSelectionListTestCase.source.xml");
        Document sample = this.parser.parse(sampleSource.getInputStream());
        Element datatypeElement = (Element) sample.getElementsByTagNameNS(FormsConstants.DEFINITION_NS, "datatype").item(0);
        Datatype datatype = this.datatypeManager.createDatatype(datatypeElement, false);
        FlowJXPathSelectionList list = new FlowJXPathSelectionList
View Full Code Here


        if( ( null != annotation ) && !( "".equals( annotation ) ) )
        {
            m_logger.info( annotation );
        }

        Context context = setupContext( conf.getChild( "context" ) );

        setupManagers( conf.getChild( "components" ),
                       conf.getChild( "roles" ),
                       conf.getChild( "logkit" ),
                       context );
View Full Code Here

        }

        final DefaultConfigurationBuilder builder = new DefaultConfigurationBuilder();
        final Configuration conf = builder.build(testconf);

        Context context = this.setupContext(conf.getChild("context"));

        setupManagers(conf.getChild("components"),
                      conf.getChild("roles"),
                      context);
    }
View Full Code Here

     * Get the Context object
     */
    public void contextualize( Context context )
        throws ContextException
    {
        Context currentContext = context;
       
        try {
            String projectHome = ForrestConfUtils.getProjectHome();

            if(!projectHome.startsWith(ForrestConfUtils.defaultHome)){
View Full Code Here

        request.setAttribute(FlowHelper.CONTEXT_OBJECT, flowContextObject);
        Map objectModel = new HashMap();
        objectModel.put(ObjectModelHelper.REQUEST_OBJECT, request);
        Map contextObjectModel = new HashMap();
        contextObjectModel.put(ContextHelper.CONTEXT_OBJECT_MODEL, objectModel);
        Context context = new DefaultContext(contextObjectModel);
        Source sampleSource = new ResourceSource("resource://org/apache/cocoon/woody/datatype/FlowJXPathSelectionListTestCase.source.xml");
        Document sample = parser.parse(sampleSource.getInputStream());
        Element datatypeElement = (Element) sample.getElementsByTagNameNS(Constants.WD_NS, "datatype").item(0);
        Datatype datatype = datatypeManager.createDatatype(datatypeElement, false);
        FlowJXPathSelectionList list = new FlowJXPathSelectionList
View Full Code Here

        Creator testCreator = new TestCreator(1);
        m_manager.addCreatorExtension( testCreator );
        m_manager.addAccessorExtension( testAccessor );

        TestComponent component = new TestComponent();
        Context context = new DefaultContext();
        m_manager.executeCreationExtensions( component, context );
        m_manager.executeAccessExtensions( component, context );
        m_manager.executeReleaseExtensions( component, context );
        m_manager.executeDestructionExtensions( component, context );
    }
View Full Code Here

        m_manager.initialize();
    }

    public void testContextManager() throws Exception
    {
        final Context managerContext = m_manager.getContainerManagerContext();
        assertNotNull( managerContext );

        final ServiceManager serviceManager = (ServiceManager) managerContext.get( SERVICE_MANAGER );
        assertNotNull( serviceManager );

        final InstrumentManager instrumentManager =
                (InstrumentManager) serviceManager.lookup( InstrumentManager.ROLE );
        assertNotNull( instrumentManager );
View Full Code Here

        this.itsContainer = SitemapHelper.createContainer(
                                               tree,
                                               location,
                                               fam,
                                               (ServletContext)this.context.get(Constants.CONTEXT_ENVIRONMENT_CONTEXT));
        final Context itsContext = (Context)this.itsContainer.getBean(AvalonUtils.CONTEXT_ROLE);
        // The namespace used in the whole sitemap is the one of the root
        // element
        this.itsNamespace = tree.getNamespace();

        // replace properties?
View Full Code Here

     * Get the Context object
     */
    public void contextualize( Context context )
        throws ContextException
    {
        Context currentContext = context;
       
        try {
            String projectHome = ForrestConfUtils.getProjectHome();

            if(!projectHome.startsWith(ForrestConfUtils.defaultHome)){
View Full Code Here

     * Get the Context object
     */
    public void contextualize( Context context )
        throws ContextException
    {
        Context currentContext = context;
       
        try {
            String projectHome = ForrestConfUtils.getProjectHome();
            if(!projectHome.equals(ForrestConfUtils.defaultHome)){
                DefaultContext newContext = new DefaultContext(context);
View Full Code Here

TOP

Related Classes of org.apache.avalon.framework.context.Context

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.