Examples of AggregatedValidity


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() {
        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

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

     */
    public SourceValidity getValidityForEventPipeline() {
        if ( null != this.toCacheKey
             && !this.completeResponseIsCached
             && this.firstNotCacheableTransformerIndex == super.transformers.size()) {
            AggregatedValidity validity = new AggregatedValidity();
            for(int i=0; i < this.toCacheKey.size(); i++) {
                validity.add(this.getValidityForInternalPipeline(i));
                //validity.add(new DeferredPipelineValidity(this, i));
            }
            return validity;
        }
        return null;
View Full Code Here

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

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() {

        AggregatedValidity validity = new AggregatedValidity();

        Source source;

        for (Enumeration e = cachedsources.elements(); e.hasMoreElements(); ) {
            source = (Source) e.nextElement();

            validity.add(source.getValidity());
        }

        return validity;
    }
View Full Code Here

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

                     && !this.completeResponseIsCached
                     && this.firstProcessedTransformerIndex == super.transformers.size()) {
             vals = this.fromCacheKey.size();
        }
        if ( vals > 0 ) {
            final AggregatedValidity validity = new AggregatedValidity();
            for(int i=0; i < vals; i++) {
                validity.add(this.getValidityForInternalPipeline(i));
                //validity.add(new DeferredPipelineValidity(this, i));
            }
            return validity;
        }
        return null;
View Full Code Here

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

                    }

            if (this.toCacheSourceValidities != null) {
                // This means that the pipeline is valid based on the validities
                // of the individual components
                final AggregatedValidity validity = new AggregatedValidity();
                for (int i=0; i < this.toCacheSourceValidities.length; i++) {
                    validity.add(this.toCacheSourceValidities[i]);
                }

                return validity;
            }

            // This means that the pipeline is valid because it has not yet expired
            return NOPValidity.SHARED_INSTANCE;
        } else {
            int vals = 0;

            if (null != this.toCacheKey
                    && !this.cacheCompleteResponse
                    && this.firstNotCacheableTransformerIndex == super.transformers.size()) {
                vals = this.toCacheKey.size();
            } else if (null != this.fromCacheKey
                    && !this.completeResponseIsCached
                    && this.firstProcessedTransformerIndex == super.transformers.size()) {
                vals = this.fromCacheKey.size();
                    }

            if (vals > 0) {
                final AggregatedValidity validity = new AggregatedValidity();
                for (int i = 0; i < vals; i++) {
                    validity.add(getValidityForInternalPipeline(i));
                }

                return validity;
            }
View Full Code Here

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

        if (this.cachedResponse != null) {
            if (this.toCacheSourceValidities != null) {
                // This means that the pipeline is valid based on the validities
                // of the individual components
                final AggregatedValidity validity = new AggregatedValidity();
                for (int i=0; i < this.toCacheSourceValidities.length; i++) {
                    validity.add(this.toCacheSourceValidities[i]);
                }
                return validity;
            }
            else {
                // This means that the pipeline is valid because it has not yet expired
                return NOPValidity.SHARED_INSTANCE;
            }
        } else {
            int vals = 0;

            if ( null != this.toCacheKey
                 && !this.cacheCompleteResponse
                 && this.firstNotCacheableTransformerIndex == super.transformers.size()) {
                 vals = this.toCacheKey.size();
            } else if ( null != this.fromCacheKey
                         && !this.completeResponseIsCached
                         && this.firstProcessedTransformerIndex == super.transformers.size()) {
                 vals = this.fromCacheKey.size();
            }
            if ( vals > 0 ) {
                final AggregatedValidity validity = new AggregatedValidity();
                for(int i=0; i < vals; i++) {
                    validity.add(this.getValidityForInternalPipeline(i));
                    //validity.add(new DeferredPipelineValidity(this, i));
                }
                return validity;
            }
            return null;
View Full Code Here

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() {
        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

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

                     && !this.completeResponseIsCached
                     && this.firstProcessedTransformerIndex == super.transformers.size()) {
             vals = this.fromCacheKey.size();
        }
        if ( vals > 0 ) {
            final AggregatedValidity validity = new AggregatedValidity();
            for(int i=0; i < vals; i++) {
                validity.add(this.getValidityForInternalPipeline(i));
                //validity.add(new DeferredPipelineValidity(this, i));
            }
            return validity;
        }
        return null;
View Full Code Here

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

   
    /**
     * Returns an aggregate validity describing the validity of all the properties.
     */
    public SourceValidity getValidity(Source source) {
        AggregatedValidity validity = new AggregatedValidity();
        SourceInspector inspector;
        final Iterator inspectors = m_inspectors.iterator();
        while (inspectors.hasNext()) {
            inspector = (SourceInspector) inspectors.next();
            SourceValidity sv = inspector.getValidity(source);
            if (sv == null) {
                return null;
            }
            validity.add(sv);
        }
        return validity;
    }
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.