public class TenantResourcesServiceImpl extends java.lang.Object implements TenantResourcesService
TENANT_RESOURCE
Constructor and Description |
---|
TenantResourcesServiceImpl(Recorder recorder,
ReadPersistenceService persistenceService,
TechnicalLoggerService logger) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.lang.String name,
TenantResourceType type,
byte[] content,
long userId) |
long |
count(TenantResourceType type) |
long |
count(TenantResourceType type,
java.lang.String name) |
java.util.List<STenantResource> |
get(TenantResourceType type,
int from,
int numberOfElements) |
STenantResource |
get(TenantResourceType type,
java.lang.String name) |
java.util.List<STenantResourceLight> |
getLight(TenantResourceType type,
int from,
int numberOfElements) |
STenantResourceLight |
getSingleLightResource(TenantResourceType type)
Returns a single STenantResourceLight of the given type.
|
void |
remove(STenantResourceLight resource) |
void |
removeAll(TenantResourceType type) |
public TenantResourcesServiceImpl(Recorder recorder, ReadPersistenceService persistenceService, TechnicalLoggerService logger)
public void add(java.lang.String name, TenantResourceType type, byte[] content, long userId) throws SRecorderException
add
in interface TenantResourcesService
SRecorderException
public void removeAll(TenantResourceType type) throws SBonitaReadException, SRecorderException
removeAll
in interface TenantResourcesService
SBonitaReadException
SRecorderException
public java.util.List<STenantResourceLight> getLight(TenantResourceType type, int from, int numberOfElements) throws SBonitaReadException
SBonitaReadException
public java.util.List<STenantResource> get(TenantResourceType type, int from, int numberOfElements) throws SBonitaReadException
get
in interface TenantResourcesService
SBonitaReadException
public long count(TenantResourceType type) throws SBonitaReadException
count
in interface TenantResourcesService
SBonitaReadException
public long count(TenantResourceType type, java.lang.String name) throws SBonitaReadException
count
in interface TenantResourcesService
SBonitaReadException
public STenantResource get(TenantResourceType type, java.lang.String name) throws SBonitaReadException
get
in interface TenantResourcesService
SBonitaReadException
public STenantResourceLight getSingleLightResource(TenantResourceType type) throws SBonitaReadException
TenantResourcesService
getSingleLightResource
in interface TenantResourcesService
type
- the type of the resource to filterSBonitaReadException
- if non unique result, or other Hibernate exception is issuedpublic void remove(STenantResourceLight resource) throws SRecorderException
remove
in interface TenantResourcesService
SRecorderException