All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.adobe.granite.ui.components.ExpressionResolver Maven / Gradle / Ivy

There is a newer version: 6.5.21
Show newest version
/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2013 Adobe Systems Incorporated
 *  All Rights Reserved.
 *
 * NOTICE:  All information contained herein is, and remains
 * the property of Adobe Systems Incorporated and its suppliers,
 * if any.  The intellectual and technical concepts contained
 * herein are proprietary to Adobe Systems Incorporated and its
 * suppliers and are protected by trade secret or copyright law.
 * Dissemination of this information or reproduction of this material
 * is strictly forbidden unless prior written permission is obtained
 * from Adobe Systems Incorporated.
 **************************************************************************/
package com.adobe.granite.ui.components;

import java.util.Locale;

import javax.annotation.Nonnull;
import javax.servlet.jsp.PageContext;

import org.apache.sling.api.SlingHttpServletRequest;
import org.osgi.annotation.versioning.ProviderType;

/**
 * A service to resolve an expression into an actual object.
 */
@ProviderType
public interface ExpressionResolver {

    /**
     * Resolves the given expression.
     *
     * @param expression
     *            The expression to resolve
     * @param locale
     *            The locale
     * @param expectedType
     *            The type the result of the expression will be coerced to after
     *            evaluation
     * @param pageContext
     *            The current page context
     * @param 
     *            The type of the resolved expression
     * @return The result of expression
     */
    @Nonnull
     T resolve(@Nonnull String expression, @Nonnull Locale locale, @Nonnull Class expectedType,
            @Nonnull PageContext pageContext);

    /**
     * Resolves the given expression.
     *
     * @param expression
     *            The expression to resolve
     * @param locale
     *            The locale
     * @param expectedType
     *            The type the result of the expression will be coerced to after
     *            evaluation
     * @param request
     *            The current request
     * @param 
     *            The type of the resolved expression
     * @return The result of expression
     */
    @Nonnull
     T resolve(@Nonnull String expression, @Nonnull Locale locale, @Nonnull Class expectedType,
            @Nonnull SlingHttpServletRequest request);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy