Package org.apache.excalibur.source.impl.validity

Examples of org.apache.excalibur.source.impl.validity.AggregatedValidity


     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public SourceValidity getValidity() {
        try {
            AggregatedValidity v = new AggregatedValidity();
            Source current;
            for (int i = 0; i < this.parts.size(); i++) {
                current = ((Part)this.parts.get(i)).source;
                SourceValidity sv = current.getValidity();
                if (sv == null) {
                    return null;
                } else {
                    v.add(sv);
                }
            }
            return v;
        } catch (Exception e) {
            getLogger().error("ContentAggregator: could not generateKey", e);
View Full Code Here


     * @return The generated validity object or <code>null</code> if the
     *         component is currently not cacheable.
     */
    public SourceValidity getValidity() {
        if (this.inputSource.getLastModified()!=0) {
            AggregatedValidity validity = new AggregatedValidity();

            validity.add(new TimeStampValidity(page));
            validity.add(this.inputSource.getValidity());
            return validity;
        } else {
            return null;
        }
    }
View Full Code Here

                    final TransformerHandler handler = m_factory.newTransformerHandler( template );
                    handler.getTransformer().setErrorListener( m_errorHandler );
                    handler.getTransformer().setURIResolver( this );

                    // Create aggregated validity
                    AggregatedValidity aggregated = null;
                    if( validity != null && m_checkIncludes)
                    {
                        List includes = (List)m_includesMap.get( id );
                        if( includes != null )
                        {
                            aggregated = new AggregatedValidity();
                            aggregated.add( validity );
                            for( int i = includes.size() - 1; i >= 0; i-- )
                            {
                                aggregated.add( (SourceValidity)( (Object[])includes.get( i ) )[ 1 ] );
                            }
                            validity = aggregated;
                        }
                    }
View Full Code Here

        }

        // Check includes
        if ( m_checkIncludes )
        {
            AggregatedValidity aggregated = null;
            List includes = (List)templateAndValidityAndIncludes[ 2 ];
            if( includes != null )
            {
                aggregated = new AggregatedValidity();
                aggregated.add( storedValidity );
   
                for( int i = includes.size() - 1; i >= 0; i-- )
                {
                    // Every include stored as pair of source ID and validity
                    Object[] pair = (Object[])includes.get( i );
                    storedValidity = (SourceValidity)pair[ 1 ];
                    aggregated.add( storedValidity );
   
                    valid = storedValidity.isValid();
                    isValid = false;
                    if( valid == 0 )
                    {
View Full Code Here

TOP

Related Classes of org.apache.excalibur.source.impl.validity.AggregatedValidity

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.