Examples of ViewPreparer


Examples of org.apache.tiles.preparer.ViewPreparer

        if (LOG.isDebugEnabled()) {
            LOG.debug("Prepare request received for '" + preparerName);
        }

        ViewPreparer preparer = preparerFactory.getPreparer(preparerName, context);
        if (preparer == null && ignoreMissing) {
            return;
        }

        if (preparer == null) {
            throw new NoSuchPreparerException("Preparer '" + preparerName + " not found");
        }

        AttributeContext attributeContext = getContext(context);

        preparer.execute(context, attributeContext);
    }
View Full Code Here

Examples of org.apache.tiles.preparer.ViewPreparer

        if (LOG.isDebugEnabled()) {
            LOG.debug("Prepare request received for '" + preparerName);
        }

        ViewPreparer preparer = preparerFactory.getPreparer(preparerName, context);
        if (preparer == null && ignoreMissing) {
            return;
        }

        if (preparer == null) {
            throw new NoSuchPreparerException("Preparer '" + preparerName + " not found");
        }

        AttributeContext attributeContext = getContext(context);

        preparer.execute(context, attributeContext);
    }
View Full Code Here

Examples of org.apache.tiles.preparer.ViewPreparer

  private final Map sharedPreparers = CollectionFactory.createConcurrentMapIfPossible(16);


  protected ViewPreparer getPreparer(String name, WebApplicationContext context) throws TilesException {
    // Quick check on the concurrent map first, with minimal locking.
    ViewPreparer preparer = (ViewPreparer) this.sharedPreparers.get(name);
    if (preparer == null) {
      synchronized (this.sharedPreparers) {
        preparer = (ViewPreparer) this.sharedPreparers.get(name);
        if (preparer == null) {
          try {
View Full Code Here

Examples of org.apache.tiles.preparer.ViewPreparer


  @Override
  protected ViewPreparer getPreparer(String name, WebApplicationContext context) throws TilesException {
    // Quick check on the concurrent map first, with minimal locking.
    ViewPreparer preparer = this.sharedPreparers.get(name);
    if (preparer == null) {
      synchronized (this.sharedPreparers) {
        preparer = this.sharedPreparers.get(name);
        if (preparer == null) {
          try {
View Full Code Here

Examples of org.apache.tiles.preparer.ViewPreparer


  @Override
  protected ViewPreparer getPreparer(String name, WebApplicationContext context) throws TilesException {
    // Quick check on the concurrent map first, with minimal locking.
    ViewPreparer preparer = this.sharedPreparers.get(name);
    if (preparer == null) {
      synchronized (this.sharedPreparers) {
        preparer = this.sharedPreparers.get(name);
        if (preparer == null) {
          try {
View Full Code Here

Examples of org.apache.tiles.preparer.ViewPreparer

        factory = new BasicPreparerFactory();
    }

    public void testGetPreparer() throws TilesException {
        String name = ViewPreparerSupport.class.getName();
        ViewPreparer p = factory.getPreparer(name, null);
        assertNotNull(p);
        assertTrue(p instanceof ViewPreparerSupport);

        name = "org.doesnotexist.Class";
        p = factory.getPreparer(name, null);
View Full Code Here

Examples of org.apache.tiles.preparer.ViewPreparer

        if (LOG.isDebugEnabled()) {
            LOG.debug("Prepare request received for '" + preparerName);
        }

        ViewPreparer preparer = preparerFactory.getPreparer(preparerName, context);
        if (preparer == null && ignoreMissing) {
            return;
        }

        if (preparer == null) {
            throw new NoSuchPreparerException("Preparer '" + preparerName + " not found");
        }

        ComponentContext componentContext = BasicComponentContext.getContext(context);

        // TODO: Temporary while preparerInstance gets refactored to throw a more specific exception.
        try {
            preparer.execute(context, componentContext);
        } catch (Exception e) {
            throw new PreparerException(e.getMessage(), e);
        }
    }
View Full Code Here

Examples of org.apache.tiles.preparer.ViewPreparer

        if (log.isDebugEnabled()) {
            log.debug("Prepare request received for '" + preparerName);
        }

        ViewPreparer preparer = preparerFactory.getPreparer(preparerName, context);
        if (preparer == null && ignoreMissing) {
            return;
        }

        if (preparer == null) {
            throw new NoSuchPreparerException("Preparer '" + preparerName + " not found");
        }

        AttributeContext attributeContext = getContext(context);

        preparer.execute(context, attributeContext);
    }
View Full Code Here

Examples of org.apache.tiles.preparer.ViewPreparer

*/
public class CompatibilityPreparerFactory extends BasicPreparerFactory {

    /** {@inheritDoc} */
    protected ViewPreparer createPreparer(String name) {
        ViewPreparer retValue;

        if (name.startsWith("/")) {
            retValue = new UrlPreparer(name);
        } else {
            retValue = super.createPreparer(name);
View Full Code Here

Examples of org.apache.tiles.preparer.ViewPreparer

        if (LOG.isDebugEnabled()) {
            LOG.debug("Prepare request received for '" + preparerName);
        }

        ViewPreparer preparer = preparerFactory.getPreparer(preparerName, context);
        if (preparer == null && ignoreMissing) {
            return;
        }

        if (preparer == null) {
            throw new NoSuchPreparerException("Preparer '" + preparerName + " not found");
        }

        AttributeContext attributeContext = getContext(context);

        preparer.execute(context, attributeContext);
    }
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.