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

com.lonelystorm.air.asset.services.LibraryAdapterManager Maven / Gradle / Ivy

Go to download

The LonelyStorm Air Asset library provides support to be able to compile SASS files at runtime.

The newest version!
package com.lonelystorm.air.asset.services;

import org.apache.sling.api.resource.Resource;

import com.lonelystorm.air.asset.models.AssetLibrary;
import com.lonelystorm.air.asset.models.AssetTheme;

/**
 * The LibraryAdapterManager provides an interface to convert an resource into an asset.
 *
 * Due to a race condition present with immediate Components in Apache Felix,
 * this service must be used to adapt an resource.
 *
 * https://issues.apache.org/jira/browse/SLING-4026
 */
public interface LibraryAdapterManager {

    /**
     * Converts an resource into an AssetLibrary.
     *
     * @param resource
     *     The Resource to adapt
     * @return
     *     The AssetLibrary if the resource contained the required parameters and passed validation,
     *     otherwise null is returned.
     */
    public AssetLibrary library(Resource resource);

    /**
     * Converts an resource into an AssetTheme.
     *
     * @param resource
     *     The resource to adapt
     * @return
     *     The AssetTheme if the resource contaiend the required parameters and passed validation,
     *     otherwise null is returned.
     */
    public AssetTheme theme(Resource resource);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy