public class CrudComponent<E extends com.lucidworks.apollo.common.objects.Entity>
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static interface |
CrudComponent.CrudBiFunction<T,U,R> |
static interface |
CrudComponent.CrudConsumer<T> |
static interface |
CrudComponent.CrudFunction<T,R> |
static interface |
CrudComponent.CrudSupplier<R> |
Modifier and Type | Method and Description |
---|---|
java.util.List<E> |
getAllEntities(CrudComponent.CrudSupplier<java.util.List<E>> getAllEntitiesFunction,
java.util.function.Function<E,com.lucidworks.apollo.names.FusionResource> resourceFunction)
Return a list of entities of type "E" which has been properly filtered
Filters applied: Remove entities which the current user is not authorized to view
If "context" query param is provided, only return entities which are part of that
context
|
com.lucidworks.apollo.pipeline.schema.ObjectType |
getEntitySchema(java.util.function.Supplier<com.lucidworks.apollo.pipeline.schema.ObjectType> getEntitySchemaFunction) |
static <E extends com.lucidworks.apollo.common.objects.Entity> |
newCrudComponent(java.lang.Class<E> entityClazz,
ObjectMapper objectMapper,
com.lucidworks.apollo.links.LinkManager linkManager,
java.util.function.Supplier<HttpServletResponse> httpServletResponseSupplier,
java.util.function.Supplier<UriInfo> uriInfoSupplier,
java.util.function.Supplier<com.lucidworks.apollo.security.AuthorizationContext> authorizationContextSupplier,
java.util.function.Function<java.lang.String,com.lucidworks.apollo.common.error.RESTError> notFoundError) |
static <E extends com.lucidworks.apollo.common.objects.Entity> |
newCrudComponent(java.lang.Class<E> entityClazz,
java.util.function.Supplier<ObjectMapper> objectMapperSupplier,
java.util.function.Supplier<com.lucidworks.apollo.links.LinkManager> linkManagerSupplier,
java.util.function.Supplier<HttpServletResponse> httpServletResponseSupplier,
java.util.function.Supplier<UriInfo> uriInfoSupplier,
java.util.function.Supplier<com.lucidworks.apollo.security.AuthorizationContext> authorizationContextSupplier) |
public static <E extends com.lucidworks.apollo.common.objects.Entity> CrudComponent<E> newCrudComponent(java.lang.Class<E> entityClazz, java.util.function.Supplier<ObjectMapper> objectMapperSupplier, java.util.function.Supplier<com.lucidworks.apollo.links.LinkManager> linkManagerSupplier, java.util.function.Supplier<HttpServletResponse> httpServletResponseSupplier, java.util.function.Supplier<UriInfo> uriInfoSupplier, java.util.function.Supplier<com.lucidworks.apollo.security.AuthorizationContext> authorizationContextSupplier)
public static <E extends com.lucidworks.apollo.common.objects.Entity> CrudComponent<E> newCrudComponent(java.lang.Class<E> entityClazz, ObjectMapper objectMapper, com.lucidworks.apollo.links.LinkManager linkManager, java.util.function.Supplier<HttpServletResponse> httpServletResponseSupplier, java.util.function.Supplier<UriInfo> uriInfoSupplier, java.util.function.Supplier<com.lucidworks.apollo.security.AuthorizationContext> authorizationContextSupplier, java.util.function.Function<java.lang.String,com.lucidworks.apollo.common.error.RESTError> notFoundError)
public final com.lucidworks.apollo.pipeline.schema.ObjectType getEntitySchema(java.util.function.Supplier<com.lucidworks.apollo.pipeline.schema.ObjectType> getEntitySchemaFunction)
public final java.util.List<E> getAllEntities(CrudComponent.CrudSupplier<java.util.List<E>> getAllEntitiesFunction, java.util.function.Function<E,com.lucidworks.apollo.names.FusionResource> resourceFunction) throws com.lucidworks.apollo.common.error.RESTError
getAllEntitiesFunction
- A supplier which returns all entities of a type "E"resourceFunction
- A function which derives a FusionResource
from an entity of
type "E"com.lucidworks.apollo.common.error.RESTError