Class StoreImpl
java.lang.Object
internal.org.springframework.content.commons.store.factory.StoreImpl
- All Implemented Interfaces:
AssociativeStore<Object,,Serializable> ContentRepository<Object,,Serializable> ContentStore<Object,,Serializable> Store<Serializable>,AssociativeStore<Object,,Serializable> ContentStore<Object,,Serializable> Store<Serializable>
public class StoreImpl
extends Object
implements ContentStore<Object,Serializable>, ContentStore<Object,Serializable>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidassociate(Object entity, Serializable id) Associates the resource (identified by id) with entity.voidassociate(Object entity, PropertyPath propertyPath, Serializable id) Associates the resource (identified by id) with entity.getContent(Object entity) getContent(Object entity, PropertyPath propertyPath) org.springframework.core.io.ResourceReturns a resource handle for the specified id.org.springframework.core.io.ResourcegetResource(Object entity) Returns the resource associated with the given entity, or null if no association existsorg.springframework.core.io.ResourcegetResource(Object entity, PropertyPath propertyPath) Returns the resource associated with the given property for entity, or null if no association existsorg.springframework.core.io.ResourcegetResource(Object entity, PropertyPath propertyPath, GetResourceParams oldParams) Returns the resource associated with the given property for entity, or null if no association existsorg.springframework.core.io.ResourcegetResource(Object entity, PropertyPath propertyPath, GetResourceParams params) Returns the resource associated with the given property for entity, or null if no association existsinternalGetContent(Object entity, PropertyPath propertyPath, Supplier<InputStream> invocation) org.springframework.core.io.ResourceinternalGetResource(Object entity, PropertyPath propertyPath, Supplier<org.springframework.core.io.Resource> invocation) internalSetContent(Object property, PropertyPath propertyPath, InputStream content, Function<InputStream, Object> invocation) internalSetContent(Object property, PropertyPath propertyPath, org.springframework.core.io.Resource resourceContent, Supplier invocation) internalUnsetContent(Object entity, PropertyPath propertyPath, Supplier invocation) setContent(Object entity, InputStream content) setContent(Object entity, PropertyPath propertyPath, InputStream content) setContent(Object entity, PropertyPath propertyPath, InputStream content, long contentLen) setContent(Object entity, PropertyPath propertyPath, InputStream content, SetContentParams params) setContent(Object entity, PropertyPath propertyPath, InputStream content, SetContentParams params) setContent(Object entity, PropertyPath propertyPath, org.springframework.core.io.Resource resourceContent) setContent(Object entity, org.springframework.core.io.Resource resourceContent) voidunassociate(Object entity) Unassociates the resource from entityvoidunassociate(Object entity, PropertyPath propertyPath) Unassociates the resource from entityunsetContent(Object entity) unsetContent(Object entity, PropertyPath propertyPath) unsetContent(Object entity, PropertyPath propertyPath, UnsetContentParams params) unsetContent(Object entity, PropertyPath propertyPath, UnsetContentParams params)
-
Constructor Details
-
StoreImpl
public StoreImpl(Class<? extends Store> storeInterface, Store<Serializable> delegate, org.springframework.context.ApplicationEventPublisher publisher, Path copyContentRootPath)
-
-
Method Details
-
setContent
- Specified by:
setContentin interfaceContentStore<Object,Serializable> - Specified by:
setContentin interfaceContentStore<Object,Serializable>
-
setContent
- Specified by:
setContentin interfaceContentStore<Object,Serializable> - Specified by:
setContentin interfaceContentStore<Object,Serializable>
-
setContent
public Object setContent(Object entity, PropertyPath propertyPath, InputStream content, long contentLen) - Specified by:
setContentin interfaceContentStore<Object,Serializable> - Specified by:
setContentin interfaceContentStore<Object,Serializable>
-
setContent
public Object setContent(Object entity, PropertyPath propertyPath, InputStream content, SetContentParams params) - Specified by:
setContentin interfaceContentStore<Object,Serializable>
-
setContent
public Object setContent(Object entity, PropertyPath propertyPath, InputStream content, SetContentParams params) - Specified by:
setContentin interfaceContentStore<Object,Serializable>
-
internalSetContent
public Object internalSetContent(Object property, PropertyPath propertyPath, InputStream content, Function<InputStream, Object> invocation) -
setContent
- Specified by:
setContentin interfaceContentStore<Object,Serializable> - Specified by:
setContentin interfaceContentStore<Object,Serializable>
-
setContent
public Object setContent(Object entity, PropertyPath propertyPath, org.springframework.core.io.Resource resourceContent) - Specified by:
setContentin interfaceContentStore<Object,Serializable> - Specified by:
setContentin interfaceContentStore<Object,Serializable>
-
internalSetContent
public Object internalSetContent(Object property, PropertyPath propertyPath, org.springframework.core.io.Resource resourceContent, Supplier invocation) -
unsetContent
- Specified by:
unsetContentin interfaceContentStore<Object,Serializable> - Specified by:
unsetContentin interfaceContentStore<Object,Serializable>
-
unsetContent
- Specified by:
unsetContentin interfaceContentStore<Object,Serializable> - Specified by:
unsetContentin interfaceContentStore<Object,Serializable>
-
unsetContent
- Specified by:
unsetContentin interfaceContentStore<Object,Serializable>
-
unsetContent
- Specified by:
unsetContentin interfaceContentStore<Object,Serializable>
-
internalUnsetContent
-
getContent
- Specified by:
getContentin interfaceContentStore<Object,Serializable> - Specified by:
getContentin interfaceContentStore<Object,Serializable>
-
getContent
- Specified by:
getContentin interfaceContentStore<Object,Serializable> - Specified by:
getContentin interfaceContentStore<Object,Serializable>
-
internalGetContent
public InputStream internalGetContent(Object entity, PropertyPath propertyPath, Supplier<InputStream> invocation) -
getResource
Description copied from interface:AssociativeStoreReturns the resource associated with the given entity, or null if no association exists- Specified by:
getResourcein interfaceAssociativeStore<Object,Serializable> - Specified by:
getResourcein interfaceAssociativeStore<Object,Serializable> - Parameters:
entity- the entity associated with resource- Returns:
- resource
-
getResource
Description copied from interface:AssociativeStoreReturns the resource associated with the given property for entity, or null if no association exists- Specified by:
getResourcein interfaceAssociativeStore<Object,Serializable> - Specified by:
getResourcein interfaceAssociativeStore<Object,Serializable> - Parameters:
entity- the entity associated with resourcepropertyPath- the property path of the associated resource- Returns:
- resource
-
getResource
public org.springframework.core.io.Resource getResource(Object entity, PropertyPath propertyPath, GetResourceParams oldParams) Description copied from interface:AssociativeStoreReturns the resource associated with the given property for entity, or null if no association exists- Specified by:
getResourcein interfaceAssociativeStore<Object,Serializable> - Parameters:
entity- the entity associated with resourcepropertyPath- the property path of the associated resource- Returns:
- resource
-
getResource
public org.springframework.core.io.Resource getResource(Object entity, PropertyPath propertyPath, GetResourceParams params) Description copied from interface:AssociativeStoreReturns the resource associated with the given property for entity, or null if no association exists- Specified by:
getResourcein interfaceAssociativeStore<Object,Serializable> - Parameters:
entity- the entity associated with resourcepropertyPath- the property path of the associated resourceparams- parameters customizing how the resource is fetched and returned- Returns:
- resource
-
internalGetResource
public org.springframework.core.io.Resource internalGetResource(Object entity, PropertyPath propertyPath, Supplier<org.springframework.core.io.Resource> invocation) -
getResource
Description copied from interface:StoreReturns a resource handle for the specified id.- Specified by:
getResourcein interfaceStore<Serializable>- Specified by:
getResourcein interfaceStore<Serializable>- Parameters:
id- the id of the resource- Returns:
- resource
-
associate
Description copied from interface:AssociativeStoreAssociates the resource (identified by id) with entity.- Specified by:
associatein interfaceAssociativeStore<Object,Serializable> - Specified by:
associatein interfaceAssociativeStore<Object,Serializable> - Parameters:
entity- the target of the associationid- the id of the resource to be associated
-
associate
Description copied from interface:AssociativeStoreAssociates the resource (identified by id) with entity.- Specified by:
associatein interfaceAssociativeStore<Object,Serializable> - Specified by:
associatein interfaceAssociativeStore<Object,Serializable> - Parameters:
entity- the target of the associationpropertyPath- the property path to associate the resource toid- the id of the resource to be associated
-
unassociate
Description copied from interface:AssociativeStoreUnassociates the resource from entity- Specified by:
unassociatein interfaceAssociativeStore<Object,Serializable> - Specified by:
unassociatein interfaceAssociativeStore<Object,Serializable> - Parameters:
entity- the target of the unassociation
-
unassociate
Description copied from interface:AssociativeStoreUnassociates the resource from entity- Specified by:
unassociatein interfaceAssociativeStore<Object,Serializable> - Specified by:
unassociatein interfaceAssociativeStore<Object,Serializable> - Parameters:
entity- the target of the unassociationpropertyPath- the property path to unassociate the resource from
-