Class Tenant
java.lang.Object
net.tangly.app.Tenant
- All Implemented Interfaces:
net.tangly.core.domain.TenantDirectory
,net.tangly.core.HasId
A tenant has a set of bounded domains specific to an organizational entity. Each bounded domain can have a user interface or a REST interface.
A tenant has a set of users and roles. Authorization rights are declared per uer and per bounded domain. The tenant is the root of the security model.
Persistent data is stored on a per-tenant basis.
A tenant is configured through the properties file passed to the constructor. The identifier of the tenant is used to select the organization during the authentication process.
Tenants have no access to other tenants defined in the application.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from interface net.tangly.core.HasId
ID
Fields inherited from interface net.tangly.core.domain.TenantDirectory
TENANT_ID_PROPERTY, TENANT_ORGANIZATION_ADDRESS_PROPERTY, TENANT_ORGANIZATION_DATE_FORMAT_PROPERTY, TENANT_ORGANIZATION_ID_PROPERTY, TENANT_ORGANIZATION_LANGUAGE_PROPERTY, TENANT_ORGANIZATION_NAME_PROPERTY
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionactiveUsersFor
(@NotNull String domain) apps()
Collection
<net.tangly.core.domain.BoundedDomain<?, ?, ?>> Optional
<net.tangly.core.domain.BoundedDomain<?, ?, ?>> getBoundedDomain
(@NotNull String name) getBoundedDomainRest
(String name) getProperty
(@NotNull String property) id()
boolean
inMemory()
boolean
void
registerBoundedDomain
(net.tangly.core.domain.BoundedDomain<?, ?, ?> domain) void
void
shutdown()
Shutdowns the tenant before unloading the tenant from the application.void
startup
(@NotNull io.javalin.Javalin javalin) Initializes the tenant upon creation.
-
Field Details
-
IN_MEMORY_PROPERTY
- See Also:
-
TENANT_ROOT_DIRECTORY_PROPERTY
- See Also:
-
TENANT_ARCHIVE_DRECTORY_PROPERTY
- See Also:
-
DATABASES_DIRECTORY_PROPERTY
- See Also:
-
IMPORTS_DIRECTORY_PROPERTY
- See Also:
-
DOCUMENTS_DIRECTORY_PROPERTY
- See Also:
-
-
Constructor Details
-
Tenant
-
-
Method Details
-
id
- Specified by:
id
in interfacenet.tangly.core.HasId
-
getProperty
-
boundedDomains
- Specified by:
boundedDomains
in interfacenet.tangly.core.domain.TenantDirectory
-
getBoundedDomain
-
usersFor
-
activeUsersFor
-
docs
-
isEnabled
-
properties
-
startup
public void startup(@NotNull @NotNull io.javalin.Javalin javalin) Initializes the tenant upon creation. Upon completion, the tenant is ready to be used in the application. Tenants are created when the first user of the tenant logs in. -
shutdown
public void shutdown()Shutdowns the tenant before unloading the tenant from the application. Tenants are shutdown when the last user of the tenant logs out. -
boundedDomainRests
-
registerBoundedDomain
public void registerBoundedDomain(net.tangly.core.domain.BoundedDomain<?, ?, ?> domain) -
apps
-
registerBoundedDomainRest
-
getBoundedDomainRest
-
inMemory
public boolean inMemory() -
imports
-
resources
-
databases
-