com.liferay.apio.architect.routes.NestedCollectionRoutes Maven / Gradle / Ivy
/**
* Copyright (c) 2000-present Liferay, Inc. All rights reserved.
*
* This library is free software; you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License as published by the Free
* Software Foundation; either version 2.1 of the License, or (at your option)
* any later version.
*
* This library is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
* FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
* details.
*/
package com.liferay.apio.architect.routes;
import aQute.bnd.annotation.ProviderType;
import com.liferay.apio.architect.alias.form.FormBuilderFunction;
import com.liferay.apio.architect.alias.routes.NestedBatchCreateItemFunction;
import com.liferay.apio.architect.alias.routes.NestedCreateItemFunction;
import com.liferay.apio.architect.alias.routes.NestedGetPageFunction;
import com.liferay.apio.architect.alias.routes.permission.HasNestedAddingPermissionFunction;
import com.liferay.apio.architect.form.Form;
import com.liferay.apio.architect.function.throwable.ThrowableBiFunction;
import com.liferay.apio.architect.function.throwable.ThrowableHexaFunction;
import com.liferay.apio.architect.function.throwable.ThrowablePentaFunction;
import com.liferay.apio.architect.function.throwable.ThrowableTetraFunction;
import com.liferay.apio.architect.function.throwable.ThrowableTriFunction;
import com.liferay.apio.architect.pagination.PageItems;
import com.liferay.apio.architect.pagination.Pagination;
import java.util.List;
import java.util.Optional;
/**
* Holds information about the routes supported for a {@link
* com.liferay.apio.architect.router.NestedCollectionRouter}.
*
*
* This interface's methods return functions to get the collection resource's
* different endpoints. You should always use a {@link Builder} to create
* instances of this interface.
*
*
* @author Alejandro Hernández
* @param the model's type
* @param the type of the model's identifier (e.g., {@code Long},
* {@code String}, etc.)
* @param the type of the parent model's identifier (e.g., {@code
* Long}, {@code String}, etc.)
* @see Builder
* @deprecated As of 1.9.0, use {@link
* com.liferay.apio.architect.annotation.Actions} annotations
* instead
* @review
*/
@Deprecated
@ProviderType
@SuppressWarnings("DeprecatedIsStillUsed")
public interface NestedCollectionRoutes {
/**
* Returns the form that is used to create a collection item, if it was
* added through the {@link NestedCollectionRoutes.Builder}. Returns {@code
* Optional#empty()} otherwise.
*
* @return the form used to create a collection item; {@code
* Optional#empty()} otherwise
* @deprecated As of 1.9.0, use {@link
* com.liferay.apio.architect.annotation.Actions} annotations
* instead
* @review
*/
@Deprecated
public Optional