public abstract class AbstractService extends Object implements Serializable
AbstractBusinessService classes for everything else. This class
implements the BeanNameAware interface (therefore each service knows its bean name) and the
InitializingBean interface (set the correct tenant in the service).
The main purpose of this class is for de~/serializing the services.| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractService.SerializableDTO
This is the SerializableDTO (DataTransferObject) for the core services.
|
| Modifier and Type | Field and Description |
|---|---|
protected Tenant |
tenant
Deprecated.
since 5.0
|
| Constructor and Description |
|---|
AbstractService() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet()
Invoked by a BeanFactory after it has set all bean properties supplied.
|
protected Tenant |
getCurrentTenant() |
void |
setBeanName(String name)
Sets the bean name of the current class.
|
void |
setCurrentTenant(Tenant currentTenant) |
void |
setTenantScope(TenantScope scope)
Deprecated.
since 5.0
|
Object |
writeReplace()
Used by the Java serialization mechanism.
|
@Deprecated protected volatile Tenant tenant
public void afterPropertiesSet()
throws Exception
super.afterPropertiesSet() before or the java serialization won't work.ExceptionInitializingBean#afterPropertiesSet()public void setCurrentTenant(Tenant currentTenant)
protected Tenant getCurrentTenant()
public void setBeanName(String name)
@Deprecated public void setTenantScope(TenantScope scope)
setCurrentTenant(Tenant) this method has no effect any more.public Object writeReplace() throws ObjectStreamException
AbstractService.SerializableDTO is written. This object contains the used Tenant and the
current bean name.ObjectStreamExceptionCopyright © 2017 SAP SE. All Rights Reserved.