Package org.apache.jetspeed.util

Examples of org.apache.jetspeed.util.Path


            TemplateDescriptor template = locator.locateTemplate(descriptor);
            // Check for defaults above the currently specified root
            if (template == null)
            {
                Path pathObject = new Path(path);
                if (pathObject.length() > 1)
                {
                    template = getTemplate(pathObject.getSegment(1).toString(), templateType, locator, descriptor);
                }
            }
            return template;
        }
        catch (TemplateLocatorException e)
View Full Code Here


                                  JetspeedCache decorationConfigurationCache,
                                  String defLayoutDecoration,
                                  String defPortletDecoration)
    {
        this.registry =  registry;
        this.decorationsPath = new Path( decorationsPath );
        this.layoutDecorationsPath = getBasePath( ContentFragment.LAYOUT );
        this.layoutDecorationsPathStr = this.layoutDecorationsPath.toString();
        this.portletDecorationsPath = getBasePath( ContentFragment.PORTLET );
        this.portletDecorationsPathStr = this.portletDecorationsPath.toString();
        this.validator = validator;
View Full Code Here

        return decoration;
    }

    public PortletDecoration getPortletDecoration( String name, RequestContext requestContext )
    {
        Path basePath = getPortletDecorationBasePath( name );
        Path baseClientPath = createClientPath( name, basePath, requestContext, ContentFragment.PORTLET );
        Properties configuration = getConfiguration( name, ContentFragment.PORTLET );
        SessionPathResolverCache sessionPathResolver = new SessionPathResolverCache( requestContext.getRequest().getSession() );
        return new PortletDecorationImpl( configuration, validator, basePath, baseClientPath, sessionPathResolver );
    }
View Full Code Here

        return new PortletDecorationImpl( configuration, validator, basePath, baseClientPath, sessionPathResolver );
    }

    public LayoutDecoration getLayoutDecoration( String name, RequestContext requestContext )
    {
        Path basePath = getLayoutDecorationBasePath( name );
        Path baseClientPath = createClientPath( name, basePath, requestContext, ContentFragment.LAYOUT );
        Properties configuration = getConfiguration( name, ContentFragment.LAYOUT );
        SessionPathResolverCache sessionPathResolver = new SessionPathResolverCache( requestContext.getRequest().getSession() );
        return new LayoutDecorationImpl( configuration, validator, basePath, baseClientPath, sessionPathResolver );
    }   
View Full Code Here

    {
        Iterator itr = rawList.iterator();
        Set filteredList = new HashSet();
        while(itr.hasNext())
        {
            Path path = new Path((String) itr.next());
            if(path.getFileName() == null && validator.resourceExists(path.toString() + propsFile))
            {
                int offset = path.length() - 1;
                filteredList.add(path.getSegment(offset));
            }
        }
        SortedSet decoraters = new TreeSet();
        decoraters.addAll(filteredList);
        return decoraters;
View Full Code Here

        rv = (ResourceValidator)rvMock.proxy();
       
        config = new Properties();
        config.setProperty("name", "test");
       
        testPath = new Path("/decorations/test");
        testPathHtmlEn = new Path("/decorations/test/html/en");
    }
View Full Code Here

   
    public void testResolution() throws Exception
    {
        setUp1();
       
        Path testPath = testPathHtmlEn;
        String failure1 = testPath.getChild("/images/myimage.gif").toString();
        testPath = testPath.removeLastPathSegment();
        String failure2 = testPath.getChild("/images/myimage.gif").toString();
        testPath = testPath.removeLastPathSegment();
        String success = testPath.getChild("/images/myimage.gif").toString();
       
        Constraint[] constraints = new Constraint[]{eq(failure1), eq(failure2), eq(success)};
       
        rvMock.expects(atLeastOnce()).method("resourceExists").with(new OnConsecutiveInvokes(constraints))
              .will(onConsecutiveCalls(returnValue(false), returnValue(false), returnValue(true)));
View Full Code Here

    public DecorationFactoryImpl( PortletRegistry registry,
            String decorationsPath,
            ResourceValidator validator )
    {
        this.registry =  registry;
        this.decorationsPath = new Path( decorationsPath );
        this.layoutDecorationsPath = getBasePath( Fragment.LAYOUT );
        this.layoutDecorationsPathStr = this.layoutDecorationsPath.toString();
        this.portletDecorationsPath = getBasePath( Fragment.PORTLET );
        this.portletDecorationsPathStr = this.portletDecorationsPath.toString();
        this.validator = validator;
View Full Code Here

        return decoration;
    }

    public PortletDecoration getPortletDecoration( String name, RequestContext requestContext )
    {
        Path basePath = getPortletDecorationBasePath( name );
        Path baseClientPath = createClientPath( name, basePath, requestContext, Fragment.PORTLET );
        Properties configuration = getConfiguration( name, Fragment.PORTLET );
        SessionPathResolverCache sessionPathResolver = new SessionPathResolverCache( requestContext.getRequest().getSession() );
        return new PortletDecorationImpl( configuration, validator, basePath, baseClientPath, sessionPathResolver );
    }
View Full Code Here

        return new PortletDecorationImpl( configuration, validator, basePath, baseClientPath, sessionPathResolver );
    }

    public LayoutDecoration getLayoutDecoration( String name, RequestContext requestContext )
    {
        Path basePath = getLayoutDecorationBasePath( name );
        Path baseClientPath = createClientPath( name, basePath, requestContext, Fragment.LAYOUT );
        Properties configuration = getConfiguration( name, Fragment.LAYOUT );
        SessionPathResolverCache sessionPathResolver = new SessionPathResolverCache( requestContext.getRequest().getSession() );
        return new LayoutDecorationImpl( configuration, validator, basePath, baseClientPath, sessionPathResolver );
    }   
View Full Code Here

TOP

Related Classes of org.apache.jetspeed.util.Path

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.