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

com.adobe.cq.screens.schedule.ScheduleService Maven / Gradle / Ivy

/*************************************************************************
 *
 * ADOBE CONFIDENTIAL
 * __________________
 *
 *  Copyright 2017 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.cq.screens.schedule;

import aQute.bnd.annotation.ProviderType;

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

import javax.annotation.Nonnull;
import javax.annotation.Nullable;
import javax.jcr.RepositoryException;

import java.util.Iterator;

/**
 * Manages the schedules in the repository.
 */
@ProviderType
public interface ScheduleService {

    /**
     * Gets the schedule for the specified assignment
     * @param  assignment   The assignment
     * @return  The schedule that contains the assignment
     */
    @Nullable
    Resource getSchedule(@Nonnull Resource assignment);

    /**
     * The assignments for the specified Schedule.
     * @param  schedule  The schedule in which to look for the assignment
     * @return  All assignments
     */
    @Nonnull
    Iterator getAssignments(@Nonnull Resource schedule);

    /**
     * Resolves the channel resource for the specified channel assignment.
     * @param  resolver     The resource resolver
     * @param  schedule     The schedule in which to look for the assignment
     * @param  assignment   The assignment resource
     * @return  The resolved channel resource, or null
     */
    @Deprecated
    Resource resolveChannel(@Nonnull ResourceResolver resolver, @Nonnull Resource schedule, @Nonnull Resource assignment);

    /**
     * Returns the channel assignment resource for the specified channel in the specified schedule
     * @param  schedule     The schedule in which to look for the assignment
     * @param  channel      The channel resource to get the channel assignments for
     * @return the assignments or {@code null}
     */
    @Nullable
    Resource getChannelAssignment(@Nonnull Resource schedule, @Nonnull Resource channel);

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy