Package org.apache.jetspeed.util

Examples of org.apache.jetspeed.util.Path


    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, (Path)basePath.clone(), 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, (Path)basePath.clone(), 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

        new SessionPathResolverCache(requestContext.getRequest().getSession()).clear();
    }

    protected Path getBasePath( String decorationType )
    {
        Path basePath = ((Path)decorationsPath.clone()).addSegment(decorationType);
        return basePath;
    }
View Full Code Here

        return basePath;
    }
   
    protected Path getBasePath( String name, String decorationType )
    {
        Path basePath = ((Path)decorationsPath.clone()).addSegment(decorationType).addSegment(name);
        return basePath;
    }
View Full Code Here

        return basePath;
    }
   
    protected Path getLayoutDecorationBasePath( String name )
    {
        Path basePath = ((Path)layoutDecorationsPath.clone()).addSegment(name);
        return basePath;
    }
View Full Code Here

        Path basePath = ((Path)layoutDecorationsPath.clone()).addSegment(name);
        return basePath;
    }
    protected Path getPortletDecorationBasePath( String name )
    {
        Path basePath = ((Path)portletDecorationsPath.clone()).addSegment(name);
        return basePath;
    }
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));
            }
        }
        return filteredList;
    }
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 = (Path) testPathHtmlEn.clone();
        String failure1 = testPath.getChild("/images/myimage.gif").toString();
        testPath.removeLastPathSegment();
        String failure2 = testPath.getChild("/images/myimage.gif").toString();
        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

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.