Package org.bonitasoft.engine.resources
Interface TenantResourcesService
-
- All Known Implementing Classes:
TenantResourcesServiceImpl
public interface TenantResourcesService- Author:
- Baptiste Mesta
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringTENANT_RESOURCE
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidadd(java.lang.String name, TenantResourceType type, byte[] content, long userId)longcount(TenantResourceType type)longcount(TenantResourceType type, java.lang.String name)java.util.List<STenantResource>get(TenantResourceType type, int from, int numberOfElements)STenantResourceget(TenantResourceType type, java.lang.String name)STenantResourceLightgetSingleLightResource(TenantResourceType type)Returns a single STenantResourceLight of the given type.voidremove(AbstractSTenantResource resource)voidremoveAll(TenantResourceType external)
-
-
-
Field Detail
-
TENANT_RESOURCE
static final java.lang.String TENANT_RESOURCE
- See Also:
- Constant Field Values
-
-
Method Detail
-
add
void add(java.lang.String name, TenantResourceType type, byte[] content, long userId) throws SRecorderException- Throws:
SRecorderException
-
removeAll
void removeAll(TenantResourceType external) throws SBonitaReadException, SRecorderException
-
get
java.util.List<STenantResource> get(TenantResourceType type, int from, int numberOfElements) throws SBonitaReadException
- Throws:
SBonitaReadException
-
count
long count(TenantResourceType type) throws SBonitaReadException
- Throws:
SBonitaReadException
-
count
long count(TenantResourceType type, java.lang.String name) throws SBonitaReadException
- Throws:
SBonitaReadException
-
get
STenantResource get(TenantResourceType type, java.lang.String name) throws SBonitaReadException
- Throws:
SBonitaReadException
-
getSingleLightResource
STenantResourceLight getSingleLightResource(TenantResourceType type) throws SBonitaReadException
Returns a single STenantResourceLight of the given type. This is the responsibility of the caller to only call this method when he / she is sure that there are not more than one result of the query. If the result is non unique, a SBonitaReadException is thrown.- Parameters:
type- the type of the resource to filter- Returns:
- the found resource if unique, null if none found
- Throws:
SBonitaReadException- if non unique result, or other Hibernate exception is issued
-
remove
void remove(AbstractSTenantResource resource) throws SRecorderException
- Throws:
SRecorderException
-
-